@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
ts 39 lines 1.44 KB
Raw
1 import type * as greengrassv2 from "@distilled.cloud/aws/greengrassv2";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import 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 */
28 export 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<greengrassv2.GetDeploymentResponse, greengrassv2.GetDeploymentError>
37 >
38 > {}
39 export const GetDeployment = Binding.Service<GetDeployment>("AWS.GreengrassV2.GetDeployment");