use of software.amazon.awssdk.services.sns.model.ListSubscriptionsResponse in project aws-doc-sdk-examples by awsdocs.
the class ListSubscriptions method listSNSSubscriptions.
// snippet-start:[sns.java2.ListSubscriptions.main]
public static void listSNSSubscriptions(SnsClient snsClient) {
try {
ListSubscriptionsRequest request = ListSubscriptionsRequest.builder().build();
ListSubscriptionsResponse result = snsClient.listSubscriptions(request);
System.out.println(result.subscriptions());
} catch (SnsException e) {
System.err.println(e.awsErrorDetails().errorMessage());
System.exit(1);
}
}
Aggregations