| 1 | import type * as cloudhsm from "@distilled.cloud/aws/cloudhsm-v2"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for the `GetResourcePolicy` operation (IAM action |
| 7 | * `cloudhsm:GetResourcePolicy`). |
| 8 | * |
| 9 | * Reads the resource policy attached to a CloudHSM backup (backups are the |
| 10 | * only CloudHSM resource that supports policies — they govern cross-account |
| 11 | * backup sharing). Provide the implementation with |
| 12 | * `Effect.provide(AWS.CloudHSMV2.GetResourcePolicyHttp)`. |
| 13 | * ### Sharing Backups |
| 14 | * **Example:** Read A Backup's Sharing Policy |
| 15 | * ```typescript |
| 16 | * const getResourcePolicy = yield* AWS.CloudHSMV2.GetResourcePolicy(); |
| 17 | * |
| 18 | * const { Policy } = yield* getResourcePolicy({ ResourceArn: backupArn }); |
| 19 | * ``` |
| 20 | * |
| 21 | * @binding |
| 22 | */ |
| 23 | export interface GetResourcePolicy extends Binding.Service< |
| 24 | GetResourcePolicy, |
| 25 | "AWS.CloudHSMV2.GetResourcePolicy", |
| 26 | () => Effect.Effect< |
| 27 | ( |
| 28 | request?: cloudhsm.GetResourcePolicyRequest, |
| 29 | ) => Effect.Effect< |
| 30 | cloudhsm.GetResourcePolicyResponse, |
| 31 | cloudhsm.GetResourcePolicyError |
| 32 | > |
| 33 | > |
| 34 | > {} |
| 35 | export const GetResourcePolicy = Binding.Service<GetResourcePolicy>( |
| 36 | "AWS.CloudHSMV2.GetResourcePolicy", |
| 37 | ); |