@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 46 lines 1.52 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 GetDataProtectionPolicyRequest extends Omit<
7 sns.GetDataProtectionPolicyInput,
8 "ResourceArn"
9 > {}
10
11 /**
12 * Runtime binding for `sns:GetDataProtectionPolicy`.
13 *
14 * Bind this operation to a {@link Topic} inside a function runtime to read
15 * the topic's data protection policy document; the `ResourceArn` is injected
16 * automatically. The binding grants the host function
17 * `sns:GetDataProtectionPolicy` on the topic. Provide the
18 * `GetDataProtectionPolicyHttp` layer on the Function to implement the
19 * binding.
20 * ### Data Protection Policies
21 * **Example:** Read the Data Protection Policy
22 * ```typescript
23 * // init (provide SNS.GetDataProtectionPolicyHttp on the Function)
24 * const getDataProtectionPolicy = yield* SNS.GetDataProtectionPolicy(topic);
25 *
26 * // runtime
27 * const response = yield* getDataProtectionPolicy();
28 * // response.DataProtectionPolicy (JSON document string)
29 * ```
30 *
31 * @binding
32 */
33 export interface GetDataProtectionPolicy extends Binding.Service<
34 GetDataProtectionPolicy,
35 "AWS.SNS.GetDataProtectionPolicy",
36 (
37 topic: Topic,
38 ) => Effect.Effect<
39 (
40 request?: GetDataProtectionPolicyRequest,
41 ) => Effect.Effect<sns.GetDataProtectionPolicyResponse, sns.GetDataProtectionPolicyError>
42 >
43 > {}
44 export const GetDataProtectionPolicy = Binding.Service<GetDataProtectionPolicy>(
45 "AWS.SNS.GetDataProtectionPolicy",
46 );