| 1 | import type * as cloudformation from "@distilled.cloud/aws/cloudformation"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Stack } from "./Stack.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for the `DescribeStackResourceDrifts` operation (IAM action |
| 8 | * `cloudformation:DescribeStackResourceDrifts`). |
| 9 | * |
| 10 | * Bind this operation to a {@link Stack} to read per-resource drift results |
| 11 | * after a {@link DetectStackDrift} run — which resources were `MODIFIED` or |
| 12 | * `DELETED` out-of-band and the actual-vs-expected property differences. |
| 13 | * Provide the implementation with |
| 14 | * `Effect.provide(AWS.CloudFormation.DescribeStackResourceDriftsHttp)`. |
| 15 | * ### Drift Detection |
| 16 | * **Example:** Read Drifted Resources |
| 17 | * ```typescript |
| 18 | * const describeStackResourceDrifts = |
| 19 | * yield* AWS.CloudFormation.DescribeStackResourceDrifts(stack); |
| 20 | * |
| 21 | * const { StackResourceDrifts } = yield* describeStackResourceDrifts({ |
| 22 | * StackResourceDriftStatusFilters: ["MODIFIED", "DELETED"], |
| 23 | * }); |
| 24 | * ``` |
| 25 | * |
| 26 | * @binding |
| 27 | */ |
| 28 | export interface DescribeStackResourceDrifts extends Binding.Service< |
| 29 | DescribeStackResourceDrifts, |
| 30 | "AWS.CloudFormation.DescribeStackResourceDrifts", |
| 31 | ( |
| 32 | stack: Stack, |
| 33 | ) => Effect.Effect< |
| 34 | ( |
| 35 | request?: Omit< |
| 36 | cloudformation.DescribeStackResourceDriftsInput, |
| 37 | "StackName" |
| 38 | >, |
| 39 | ) => Effect.Effect< |
| 40 | cloudformation.DescribeStackResourceDriftsOutput, |
| 41 | cloudformation.DescribeStackResourceDriftsError |
| 42 | > |
| 43 | > |
| 44 | > {} |
| 45 | export const DescribeStackResourceDrifts = |
| 46 | Binding.Service<DescribeStackResourceDrifts>( |
| 47 | "AWS.CloudFormation.DescribeStackResourceDrifts", |
| 48 | ); |