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
| 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 RemovePermissionRequest extends Omit<sns.RemovePermissionInput, "TopicArn"> {} |
| 7 | |
| 8 | /** |
| 9 | * Runtime binding for `sns:RemovePermission`. |
| 10 | * |
| 11 | * Bind this operation to a {@link Topic} inside a function runtime to remove |
| 12 | * a policy statement previously added with {@link AddPermission} by its |
| 13 | * label. The binding grants the host function `sns:RemovePermission` on the |
| 14 | * topic. Provide the `RemovePermissionHttp` layer on the Function to |
| 15 | * implement the binding. |
| 16 | * ### Managing Topic Permissions |
| 17 | * **Example:** Remove a Permission by Label |
| 18 | * ```typescript |
| 19 | * // init (provide SNS.RemovePermissionHttp on the Function) |
| 20 | * const removePermission = yield* SNS.RemovePermission(topic); |
| 21 | * |
| 22 | * // runtime |
| 23 | * yield* removePermission({ Label: "PartnerPublish" }); |
| 24 | * ``` |
| 25 | * |
| 26 | * @binding |
| 27 | */ |
| 28 | export interface RemovePermission extends Binding.Service< |
| 29 | RemovePermission, |
| 30 | "AWS.SNS.RemovePermission", |
| 31 | ( |
| 32 | topic: Topic, |
| 33 | ) => Effect.Effect< |
| 34 | ( |
| 35 | request: RemovePermissionRequest, |
| 36 | ) => Effect.Effect<sns.RemovePermissionResponse, sns.RemovePermissionError> |
| 37 | > |
| 38 | > {} |
| 39 | |
| 40 | export const RemovePermission = Binding.Service<RemovePermission>("AWS.SNS.RemovePermission"); |