| 1 | import type * as SVC from "@distilled.cloud/aws/codebuild"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Project } from "./Project.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `codebuild:StartCommandExecution` — runs a shell |
| 8 | * command in a running sandbox of the bound project. Poll the result with |
| 9 | * {@link BatchGetCommandExecutions}. |
| 10 | * ### Sandboxes |
| 11 | * **Example:** Run a Command in a Sandbox |
| 12 | * ```typescript |
| 13 | * const startCommandExecution = yield* AWS.CodeBuild.StartCommandExecution(project); |
| 14 | * |
| 15 | * const { commandExecution } = yield* startCommandExecution({ |
| 16 | * sandboxId, |
| 17 | * command: "echo hello", |
| 18 | * }); |
| 19 | * ``` |
| 20 | * |
| 21 | * @binding |
| 22 | */ |
| 23 | export interface StartCommandExecution extends Binding.Service< |
| 24 | StartCommandExecution, |
| 25 | "AWS.CodeBuild.StartCommandExecution", |
| 26 | <P extends Project>( |
| 27 | project: P, |
| 28 | ) => Effect.Effect< |
| 29 | ( |
| 30 | request: SVC.StartCommandExecutionInput, |
| 31 | ) => Effect.Effect< |
| 32 | SVC.StartCommandExecutionOutput, |
| 33 | SVC.StartCommandExecutionError |
| 34 | > |
| 35 | > |
| 36 | > {} |
| 37 | export const StartCommandExecution = Binding.Service<StartCommandExecution>( |
| 38 | "AWS.CodeBuild.StartCommandExecution", |
| 39 | ); |