| 1 | import type * as config from "@distilled.cloud/aws/config-service"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for `config:BatchGetResourceConfig` — fetch the current |
| 7 | * configuration item for up to 100 recorded resources identified by |
| 8 | * resource keys. Keys the recorder has not discovered come back in |
| 9 | * `unprocessedResourceKeys`. |
| 10 | * |
| 11 | * Provide `Config.BatchGetResourceConfigHttp` on the hosting Lambda Function to |
| 12 | * satisfy the requirement. |
| 13 | * ### Reading Resource Configurations |
| 14 | * **Example:** Batch-Read Current Configurations |
| 15 | * ```typescript |
| 16 | * // init — grants config:BatchGetResourceConfig |
| 17 | * const batchGetResourceConfig = yield* AWS.Config.BatchGetResourceConfig(); |
| 18 | * |
| 19 | * // runtime |
| 20 | * const result = yield* batchGetResourceConfig({ |
| 21 | * resourceKeys: [ |
| 22 | * { resourceType: "AWS::S3::Bucket", resourceId: "my-bucket" }, |
| 23 | * ], |
| 24 | * }); |
| 25 | * console.log(result.baseConfigurationItems); |
| 26 | * ``` |
| 27 | * |
| 28 | * @binding |
| 29 | */ |
| 30 | export interface BatchGetResourceConfig extends Binding.Service< |
| 31 | BatchGetResourceConfig, |
| 32 | "AWS.Config.BatchGetResourceConfig", |
| 33 | () => Effect.Effect< |
| 34 | ( |
| 35 | request: config.BatchGetResourceConfigRequest, |
| 36 | ) => Effect.Effect< |
| 37 | config.BatchGetResourceConfigResponse, |
| 38 | config.BatchGetResourceConfigError |
| 39 | > |
| 40 | > |
| 41 | > {} |
| 42 | |
| 43 | export const BatchGetResourceConfig = Binding.Service<BatchGetResourceConfig>( |
| 44 | "AWS.Config.BatchGetResourceConfig", |
| 45 | ); |