@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, 04:45 UTC

main
ts 51 lines 1.59 KB
Raw
1 import * as sns from "@distilled.cloud/aws/sns";
2 import * as Binding from "alchemy/Binding";
3 import * as Effect from "effect/Effect";
4 import type { Topic } from "./Topic.ts";
5
6 export interface PutDataProtectionPolicyRequest extends Omit<
7 sns.PutDataProtectionPolicyInput,
8 "ResourceArn"
9 > {}
10
11 /**
12 * Runtime binding for `sns:PutDataProtectionPolicy`.
13 *
14 * Bind this operation to a {@link Topic} inside a function runtime to attach
15 * or replace the topic's data protection policy; the `ResourceArn` is
16 * injected automatically. The binding grants the host function
17 * `sns:PutDataProtectionPolicy` on the topic. Provide the
18 * `PutDataProtectionPolicyHttp` layer on the Function to implement the
19 * binding.
20 * ### Data Protection Policies
21 * **Example:** Attach a Data Protection Policy
22 * ```typescript
23 * // init (provide SNS.PutDataProtectionPolicyHttp on the Function)
24 * const putDataProtectionPolicy = yield* SNS.PutDataProtectionPolicy(topic);
25 *
26 * // runtime
27 * yield* putDataProtectionPolicy({
28 * DataProtectionPolicy: JSON.stringify({
29 * Name: "basic-pii-audit",
30 * Version: "2021-06-01",
31 * Statement: [],
32 * }),
33 * });
34 * ```
35 *
36 * @binding
37 */
38 export interface PutDataProtectionPolicy extends Binding.Service<
39 PutDataProtectionPolicy,
40 "AWS.SNS.PutDataProtectionPolicy",
41 (
42 topic: Topic,
43 ) => Effect.Effect<
44 (
45 request: PutDataProtectionPolicyRequest,
46 ) => Effect.Effect<sns.PutDataProtectionPolicyResponse, sns.PutDataProtectionPolicyError>
47 >
48 > {}
49 export const PutDataProtectionPolicy = Binding.Service<PutDataProtectionPolicy>(
50 "AWS.SNS.PutDataProtectionPolicy",
51 );