| 1 | import type * as imagebuilder from "@distilled.cloud/aws/imagebuilder"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for `imagebuilder:CancelImageCreation`. |
| 7 | * |
| 8 | * Cancels an in-flight image build (only valid for builds in a non-terminal |
| 9 | * state). Build versions are created dynamically by pipeline runs, so this |
| 10 | * is an account-level binding: pass the `imageBuildVersionArn` returned by |
| 11 | * `StartImagePipelineExecution`. The idempotency `clientToken` is generated |
| 12 | * automatically. Provide the implementation with |
| 13 | * `Effect.provide(AWS.ImageBuilder.CancelImageCreationHttp)`. |
| 14 | * ### Running Builds |
| 15 | * **Example:** Cancel an In-Flight Build |
| 16 | * ```typescript |
| 17 | * // init — account-level binding, no resource argument |
| 18 | * const cancelBuild = yield* AWS.ImageBuilder.CancelImageCreation(); |
| 19 | * |
| 20 | * // runtime |
| 21 | * yield* cancelBuild({ imageBuildVersionArn }); |
| 22 | * ``` |
| 23 | * |
| 24 | * @binding |
| 25 | */ |
| 26 | export interface CancelImageCreation extends Binding.Service< |
| 27 | CancelImageCreation, |
| 28 | "AWS.ImageBuilder.CancelImageCreation", |
| 29 | () => Effect.Effect< |
| 30 | ( |
| 31 | request: Omit<imagebuilder.CancelImageCreationRequest, "clientToken">, |
| 32 | ) => Effect.Effect< |
| 33 | imagebuilder.CancelImageCreationResponse, |
| 34 | imagebuilder.CancelImageCreationError |
| 35 | > |
| 36 | > |
| 37 | > {} |
| 38 | export const CancelImageCreation = Binding.Service<CancelImageCreation>( |
| 39 | "AWS.ImageBuilder.CancelImageCreation", |
| 40 | ); |