| 1 | import type * as aa from "@distilled.cloud/aws/accessanalyzer"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for `access-analyzer:StartPolicyGeneration`. |
| 7 | * |
| 8 | * Starts generating a least-privilege policy for a principal from its access |
| 9 | * activity (optionally a CloudTrail trail). Provide the implementation with |
| 10 | * `Effect.provide(AWS.AccessAnalyzer.StartPolicyGenerationHttp)`. |
| 11 | * ### Policy Generation |
| 12 | * **Example:** Generate a Policy for a Role |
| 13 | * ```typescript |
| 14 | * const startGeneration = |
| 15 | * yield* AWS.AccessAnalyzer.StartPolicyGeneration(); |
| 16 | * const { jobId } = yield* startGeneration({ |
| 17 | * policyGenerationDetails: { principalArn: roleArn }, |
| 18 | * }); |
| 19 | * ``` |
| 20 | * |
| 21 | * @binding |
| 22 | */ |
| 23 | export interface StartPolicyGeneration extends Binding.Service< |
| 24 | StartPolicyGeneration, |
| 25 | "AWS.AccessAnalyzer.StartPolicyGeneration", |
| 26 | () => Effect.Effect< |
| 27 | ( |
| 28 | request: aa.StartPolicyGenerationRequest, |
| 29 | ) => Effect.Effect< |
| 30 | aa.StartPolicyGenerationResponse, |
| 31 | aa.StartPolicyGenerationError |
| 32 | > |
| 33 | > |
| 34 | > {} |
| 35 | |
| 36 | export const StartPolicyGeneration = Binding.Service<StartPolicyGeneration>( |
| 37 | "AWS.AccessAnalyzer.StartPolicyGeneration", |
| 38 | ); |