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

main
ts 54 lines 1.87 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 { ConfigurationProfile } from "./ConfigurationProfile.ts";
6 import type { DeploymentStrategy } from "./DeploymentStrategy.ts";
7 import type { Environment } from "./Environment.ts";
8
9 export interface StartDeploymentRequest extends Omit<
10 appconfig.StartDeploymentRequest,
11 "ApplicationId" | "EnvironmentId" | "ConfigurationProfileId" | "DeploymentStrategyId"
12 > {}
13
14 /**
15 * Start an AppConfig deployment from a Lambda (or other AWS runtime) — roll a
16 * configuration version out to an environment following a deployment
17 * strategy. Pairs with {@link CreateHostedConfigurationVersion} to build
18 * runtime feature-flag/configuration management services.
19 *
20 * Provide `AppConfig.StartDeploymentHttp` on the hosting function's Effect to
21 * implement the binding.
22 *
23 * ### Deploying Configuration at Runtime
24 * **Example:** Roll out a configuration version
25 * ```typescript
26 * const startDeployment = yield* AppConfig.StartDeployment(
27 * app,
28 * env,
29 * profile,
30 * strategy,
31 * );
32 * const deployment = yield* startDeployment({
33 * ConfigurationVersion: "2",
34 * });
35 * // deployment.DeploymentNumber, deployment.State ("DEPLOYING", ...)
36 * ```
37 *
38 * @binding
39 */
40 export interface StartDeployment extends Binding.Service<
41 StartDeployment,
42 "AWS.AppConfig.StartDeployment",
43 (
44 application: Application,
45 environment: Environment,
46 configurationProfile: ConfigurationProfile,
47 deploymentStrategy: DeploymentStrategy,
48 ) => Effect.Effect<
49 (
50 request: StartDeploymentRequest,
51 ) => Effect.Effect<appconfig.Deployment, appconfig.StartDeploymentError>
52 >
53 > {}
54 export const StartDeployment = Binding.Service<StartDeployment>("AWS.AppConfig.StartDeployment");