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

main
ts 42 lines 1.37 KB
Raw
1 import type * as appconfig from "@distilled.cloud/aws/appconfig";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Application } from "./Application.ts";
5 import type { Environment } from "./Environment.ts";
6
7 export interface StopDeploymentRequest extends Omit<
8 appconfig.StopDeploymentRequest,
9 "ApplicationId" | "EnvironmentId"
10 > {}
11
12 /**
13 * Stop (or revert) an AppConfig deployment from a Lambda (or other AWS
14 * runtime). Stopping an in-progress rollout rolls it back; with
15 * `AllowRevert: true` a completed deployment can be reverted within 72
16 * hours.
17 *
18 * Provide `AppConfig.StopDeploymentHttp` on the hosting function's Effect to
19 * implement the binding.
20 *
21 * ### Deploying Configuration at Runtime
22 * **Example:** Roll back an in-progress rollout
23 * ```typescript
24 * const stopDeployment = yield* AppConfig.StopDeployment(app, env);
25 * yield* stopDeployment({ DeploymentNumber: 2 });
26 * ```
27 *
28 * @binding
29 */
30 export interface StopDeployment extends Binding.Service<
31 StopDeployment,
32 "AWS.AppConfig.StopDeployment",
33 (
34 application: Application,
35 environment: Environment,
36 ) => Effect.Effect<
37 (
38 request: StopDeploymentRequest,
39 ) => Effect.Effect<appconfig.Deployment, appconfig.StopDeploymentError>
40 >
41 > {}
42 export const StopDeployment = Binding.Service<StopDeployment>("AWS.AppConfig.StopDeployment");