ListSubscriptionsByTopic
Source:
src/AWS/SNS/ListSubscriptionsByTopic.ts
Runtime binding for sns:ListSubscriptionsByTopic.
Bind this operation to a Topic inside a function runtime to page
through that topic’s subscriptions; the TopicArn is injected
automatically. The binding grants the host function
sns:ListSubscriptionsByTopic on the topic. Provide the
ListSubscriptionsByTopicHttp layer on the Function to implement the
binding.
Listing a Topic’s Subscriptions
Section titled “Listing a Topic’s Subscriptions”// init (provide SNS.ListSubscriptionsByTopicHttp on the Function)const listSubscriptionsByTopic = yield* SNS.ListSubscriptionsByTopic(topic);
// runtimeconst response = yield* listSubscriptionsByTopic();const endpoints = (response.Subscriptions ?? []).map((s) => s.Endpoint);