| 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:DescribeComplianceByResource` — read whether |
| 7 | * evaluated resources comply with the Config rules that evaluate them. |
| 8 | * |
| 9 | * Provide `Config.DescribeComplianceByResourceHttp` on the hosting Lambda Function to |
| 10 | * satisfy the requirement. |
| 11 | * ### Reading Compliance |
| 12 | * **Example:** Check Resource Compliance |
| 13 | * ```typescript |
| 14 | * // init — grants config:DescribeComplianceByResource |
| 15 | * const describeComplianceByResource = yield* AWS.Config.DescribeComplianceByResource(); |
| 16 | * |
| 17 | * // runtime |
| 18 | * const result = yield* describeComplianceByResource({ |
| 19 | * ResourceType: "AWS::S3::Bucket", |
| 20 | * }); |
| 21 | * console.log(result.ComplianceByResources); |
| 22 | * ``` |
| 23 | * |
| 24 | * @binding |
| 25 | */ |
| 26 | export interface DescribeComplianceByResource extends Binding.Service< |
| 27 | DescribeComplianceByResource, |
| 28 | "AWS.Config.DescribeComplianceByResource", |
| 29 | () => Effect.Effect< |
| 30 | ( |
| 31 | request?: config.DescribeComplianceByResourceRequest, |
| 32 | ) => Effect.Effect< |
| 33 | config.DescribeComplianceByResourceResponse, |
| 34 | config.DescribeComplianceByResourceError |
| 35 | > |
| 36 | > |
| 37 | > {} |
| 38 | |
| 39 | export const DescribeComplianceByResource = |
| 40 | Binding.Service<DescribeComplianceByResource>( |
| 41 | "AWS.Config.DescribeComplianceByResource", |
| 42 | ); |