1import type * as greengrassv2 from "@distilled.cloud/aws/greengrassv2";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Deployment } from "./Deployment.ts";
5
6/**
7 * Runtime binding for `greengrass:GetDeployment`.
8 *
9 * Reads the bound {@link Deployment}'s full detail — status (`ACTIVE`,
10 * `COMPLETED`, `CANCELED`, `FAILED`), component specs, IoT job linkage, and
11 * whether it is still the latest revision for its target — so a function can
12 * monitor a rollout. The deployment id is injected from the binding. Provide
13 * the implementation with
14 * `Effect.provide(AWS.GreengrassV2.GetDeploymentHttp)`.
15 * ### Monitoring Deployments
16 * **Example:** Check A Deployment's Status
17 * ```typescript
18 * // init — bind the operation to the deployment
19 * const getDeployment = yield* AWS.GreengrassV2.GetDeployment(deployment);
20 *
21 * // runtime
22 * const detail = yield* getDeployment();
23 * yield* Effect.log(`rollout is ${detail.deploymentStatus}`);
24 * ```
25 *
26 * @binding
27 */
28export interface GetDeployment extends Binding.Service<
29 GetDeployment,
30 "AWS.GreengrassV2.GetDeployment",
31 (
32 deployment: Deployment,
33 ) => Effect.Effect<
34 (
35 request?: Omit<greengrassv2.GetDeploymentRequest, "deploymentId">,
36 ) => Effect.Effect<
37 greengrassv2.GetDeploymentResponse,
38 greengrassv2.GetDeploymentError
39 >
40 >
41> {}
42export const GetDeployment = Binding.Service<GetDeployment>(
43 "AWS.GreengrassV2.GetDeployment",
44);