@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 42 lines 1.36 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 SetTopicAttributesRequest extends Omit<sns.SetTopicAttributesInput, "TopicArn"> {}
7
8 /**
9 * Runtime binding for `sns:SetTopicAttributes`.
10 *
11 * Bind this operation to a {@link Topic} inside a function runtime to set a
12 * single topic attribute by name. The binding grants the host function
13 * `sns:SetTopicAttributes` on the topic. Provide the
14 * `SetTopicAttributesHttp` layer on the Function to implement the binding.
15 * ### Updating Topic Attributes
16 * **Example:** Set a Topic's Display Name
17 * ```typescript
18 * // init (provide SNS.SetTopicAttributesHttp on the Function)
19 * const setTopicAttributes = yield* SNS.SetTopicAttributes(topic);
20 *
21 * // runtime
22 * yield* setTopicAttributes({
23 * AttributeName: "DisplayName",
24 * AttributeValue: "order-events",
25 * });
26 * ```
27 *
28 * @binding
29 */
30 export interface SetTopicAttributes extends Binding.Service<
31 SetTopicAttributes,
32 "AWS.SNS.SetTopicAttributes",
33 (
34 topic: Topic,
35 ) => Effect.Effect<
36 (
37 request: SetTopicAttributesRequest,
38 ) => Effect.Effect<sns.SetTopicAttributesResponse, sns.SetTopicAttributesError>
39 >
40 > {}
41
42 export const SetTopicAttributes = Binding.Service<SetTopicAttributes>("AWS.SNS.SetTopicAttributes");