The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 1 | import type * as aa from "@distilled.cloud/aws/accessanalyzer"; |
| 2 | import * as Binding from "alchemy/Binding"; |
| 3 | import type * as Effect from "effect/Effect"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for `access-analyzer:CheckAccessNotGranted`. |
| 7 | * |
| 8 | * Custom policy check: verifies a policy does not grant the specified actions |
| 9 | * or resource access. Provide the implementation with |
| 10 | * `Effect.provide(AWS.AccessAnalyzer.CheckAccessNotGrantedHttp)`. |
| 11 | * ### Custom Policy Checks |
| 12 | * **Example:** Assert a Policy Cannot Delete Buckets |
| 13 | * ```typescript |
| 14 | * const checkAccessNotGranted = |
| 15 | * yield* AWS.AccessAnalyzer.CheckAccessNotGranted(); |
| 16 | * const result = yield* checkAccessNotGranted({ |
| 17 | * policyDocument: JSON.stringify(policy), |
| 18 | * policyType: "IDENTITY_POLICY", |
| 19 | * access: [{ actions: ["s3:DeleteBucket"] }], |
| 20 | * }); |
| 21 | * // result.result === "PASS" | "FAIL" |
| 22 | * ``` |
| 23 | * |
| 24 | * @binding |
| 25 | */ |
| 26 | export interface CheckAccessNotGranted extends Binding.Service< |
| 27 | CheckAccessNotGranted, |
| 28 | "AWS.AccessAnalyzer.CheckAccessNotGranted", |
| 29 | () => Effect.Effect< |
| 30 | ( |
| 31 | request: aa.CheckAccessNotGrantedRequest, |
| 32 | ) => Effect.Effect<aa.CheckAccessNotGrantedResponse, aa.CheckAccessNotGrantedError> |
| 33 | > |
| 34 | > {} |
| 35 | |
| 36 | export const CheckAccessNotGranted = Binding.Service<CheckAccessNotGranted>( |
| 37 | "AWS.AccessAnalyzer.CheckAccessNotGranted", |
| 38 | ); |