| 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 ListSubscriptionsRequest extends sns.ListSubscriptionsInput {} |
| 6 | |
| 7 | /** |
| 8 | * Runtime binding for `sns:ListSubscriptions`. |
| 9 | * |
| 10 | * An account-scoped operation — bind it with no arguments to page through |
| 11 | * all subscriptions in the account/region. The binding grants the host |
| 12 | * function `sns:ListSubscriptions`. Provide the `ListSubscriptionsHttp` |
| 13 | * layer on the Function to implement the binding. |
| 14 | * |
| 15 | * To list only the subscriptions of one topic, use |
| 16 | * {@link ListSubscriptionsByTopic}. |
| 17 | * ### Listing Subscriptions |
| 18 | * **Example:** List All Subscriptions |
| 19 | * ```typescript |
| 20 | * // init (provide SNS.ListSubscriptionsHttp on the Function) |
| 21 | * const listSubscriptions = yield* SNS.ListSubscriptions(); |
| 22 | * |
| 23 | * // runtime: pass NextToken to page through large accounts |
| 24 | * const response = yield* listSubscriptions(); |
| 25 | * // response.Subscriptions |
| 26 | * ``` |
| 27 | * |
| 28 | * @binding |
| 29 | */ |
| 30 | export interface ListSubscriptions extends Binding.Service< |
| 31 | ListSubscriptions, |
| 32 | "AWS.SNS.ListSubscriptions", |
| 33 | () => Effect.Effect< |
| 34 | ( |
| 35 | request?: ListSubscriptionsRequest, |
| 36 | ) => Effect.Effect< |
| 37 | sns.ListSubscriptionsResponse, |
| 38 | sns.ListSubscriptionsError |
| 39 | > |
| 40 | > |
| 41 | > {} |
| 42 | |
| 43 | export const ListSubscriptions = Binding.Service<ListSubscriptions>( |
| 44 | "AWS.SNS.ListSubscriptions", |
| 45 | ); |