@devries-cameron20 / t3code Mirror · read-only
Fork 0

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, 06:00 UTC

main
ts 45 lines 1.47 KB
Raw
1 import type * as cloudhsm from "@distilled.cloud/aws/cloudhsm-v2";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 /**
6 * Runtime binding for the `PutResourcePolicy` operation (IAM action
7 * `cloudhsm:PutResourcePolicy`).
8 *
9 * Creates or replaces the resource policy on a CloudHSM backup, sharing a
10 * `READY` backup you own with other accounts (AWS recommends RAM for
11 * discoverable multi-resource shares; this is the direct API). Provide the
12 * implementation with `Effect.provide(AWS.CloudHSMV2.PutResourcePolicyHttp)`.
13 * ### Sharing Backups
14 * **Example:** Share A Backup With Another Account
15 * ```typescript
16 * const putResourcePolicy = yield* AWS.CloudHSMV2.PutResourcePolicy();
17 *
18 * yield* putResourcePolicy({
19 * ResourceArn: backupArn,
20 * Policy: JSON.stringify({
21 * Version: "2012-10-17",
22 * Statement: [{
23 * Effect: "Allow",
24 * Principal: { AWS: "arn:aws:iam::123456789012:root" },
25 * Action: ["cloudhsm:DescribeBackups"],
26 * Resource: backupArn,
27 * }],
28 * }),
29 * });
30 * ```
31 *
32 * @binding
33 */
34 export interface PutResourcePolicy extends Binding.Service<
35 PutResourcePolicy,
36 "AWS.CloudHSMV2.PutResourcePolicy",
37 () => Effect.Effect<
38 (
39 request: cloudhsm.PutResourcePolicyRequest,
40 ) => Effect.Effect<cloudhsm.PutResourcePolicyResponse, cloudhsm.PutResourcePolicyError>
41 >
42 > {}
43 export const PutResourcePolicy = Binding.Service<PutResourcePolicy>(
44 "AWS.CloudHSMV2.PutResourcePolicy",
45 );