The best way to control Claude Code, Codex and more from any computer or phone

main
ts 35 lines 1.15 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
5 export interface ListTopicsRequest extends sns.ListTopicsInput {}
6
7 /**
8 * Runtime binding for `sns:ListTopics`.
9 *
10 * An account-scoped operation — bind it with no arguments to page through
11 * all topic ARNs in the account/region. The binding grants the host function
12 * `sns:ListTopics`. Provide the `ListTopicsHttp` layer on the Function to
13 * implement the binding.
14 * ### Listing Topics
15 * **Example:** List Topic ARNs
16 * ```typescript
17 * // init (provide SNS.ListTopicsHttp on the Function)
18 * const listTopics = yield* SNS.ListTopics();
19 *
20 * // runtime: pass NextToken to page through large accounts
21 * const response = yield* listTopics();
22 * const arns = (response.Topics ?? []).map((topic) => topic.TopicArn);
23 * ```
24 *
25 * @binding
26 */
27 export interface ListTopics extends Binding.Service<
28 ListTopics,
29 "AWS.SNS.ListTopics",
30 () => Effect.Effect<
31 (request?: ListTopicsRequest) => Effect.Effect<sns.ListTopicsResponse, sns.ListTopicsError>
32 >
33 > {}
34
35 export const ListTopics = Binding.Service<ListTopics>("AWS.SNS.ListTopics");