| 1 | import * as sns from "@distilled.cloud/aws/sns"; |
| 2 | import * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | export interface UnsubscribeRequest extends sns.UnsubscribeInput {} |
| 6 | |
| 7 | /** |
| 8 | * Runtime binding for `sns:Unsubscribe`. |
| 9 | * |
| 10 | * An account-scoped operation — deletes a subscription by ARN, e.g. one |
| 11 | * created at runtime with the `Subscribe` binding. |
| 12 | * Provide the `UnsubscribeHttp` layer on the Function to implement the binding. |
| 13 | * ### Unsubscribing |
| 14 | * **Example:** Unsubscribe by ARN |
| 15 | * ```typescript |
| 16 | * const unsubscribe = yield* SNS.Unsubscribe(); |
| 17 | * yield* unsubscribe({ SubscriptionArn: subscriptionArn }); |
| 18 | * ``` |
| 19 | * |
| 20 | * @binding |
| 21 | */ |
| 22 | export interface Unsubscribe extends Binding.Service< |
| 23 | Unsubscribe, |
| 24 | "AWS.SNS.Unsubscribe", |
| 25 | () => Effect.Effect< |
| 26 | ( |
| 27 | request: UnsubscribeRequest, |
| 28 | ) => Effect.Effect<sns.UnsubscribeResponse, sns.UnsubscribeError> |
| 29 | > |
| 30 | > {} |
| 31 | |
| 32 | export const Unsubscribe = Binding.Service<Unsubscribe>("AWS.SNS.Unsubscribe"); |