| 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 | import type { ImagePipeline } from "./ImagePipeline.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `imagebuilder:ListImagePipelineImages`. |
| 8 | * |
| 9 | * Enumerates the image build versions the bound {@link ImagePipeline} has |
| 10 | * produced — the building block of a "latest AMI from this pipeline" lookup |
| 11 | * or a build-history dashboard. The pipeline's ARN is injected from the |
| 12 | * binding. Provide the implementation with |
| 13 | * `Effect.provide(AWS.ImageBuilder.ListImagePipelineImagesHttp)`. |
| 14 | * ### Observing Pipelines |
| 15 | * **Example:** List the Pipeline's Builds |
| 16 | * ```typescript |
| 17 | * // init — bind the operation to the pipeline |
| 18 | * const listBuilds = yield* AWS.ImageBuilder.ListImagePipelineImages( |
| 19 | * pipeline, |
| 20 | * ); |
| 21 | * |
| 22 | * // runtime |
| 23 | * const { imageSummaryList } = yield* listBuilds(); |
| 24 | * const available = (imageSummaryList ?? []).filter( |
| 25 | * (image) => image.state?.status === "AVAILABLE", |
| 26 | * ); |
| 27 | * ``` |
| 28 | * |
| 29 | * @binding |
| 30 | */ |
| 31 | export interface ListImagePipelineImages extends Binding.Service< |
| 32 | ListImagePipelineImages, |
| 33 | "AWS.ImageBuilder.ListImagePipelineImages", |
| 34 | ( |
| 35 | pipeline: ImagePipeline, |
| 36 | ) => Effect.Effect< |
| 37 | ( |
| 38 | request?: Omit< |
| 39 | imagebuilder.ListImagePipelineImagesRequest, |
| 40 | "imagePipelineArn" |
| 41 | >, |
| 42 | ) => Effect.Effect< |
| 43 | imagebuilder.ListImagePipelineImagesResponse, |
| 44 | imagebuilder.ListImagePipelineImagesError |
| 45 | > |
| 46 | > |
| 47 | > {} |
| 48 | export const ListImagePipelineImages = Binding.Service<ListImagePipelineImages>( |
| 49 | "AWS.ImageBuilder.ListImagePipelineImages", |
| 50 | ); |