Amazon AWS SDK Guida Utente Pagina 121: Amazon Simple Notification Service Programming with the AWS SDK for…

/ 155
Indice
•
Specifying Server-Side Encryption with Customer-Provided Encryption Keys

Amazon Simple Notification Service

Programming with the AWS SDK for .NET

The AWS SDK for .NET supports Amazon Simple Notification Service (Amazon SNS), which is a web
service that enables applications, end-users, and devices to instantly send and receive notifications from
the cloud. For more information, see
Amazon SNS
.
The following information introduces you to the Amazon SNS programming models in the SDK for .NET.

Programming Models

The SDK for .NET provides two programming models for working with Amazon SNS.These programming
models are known as the
low-level
and
resource
models. The following information describes these
models, how to use them, and why you would want to use them.

Low-Level APIs

The SDK for .NET provides low-level APIs for programming with Amazon SNS. These low-level APIs
typically consist of sets of matching request-and-response objects that correspond to HTTP-based API
calls focusing on their corresponding service-level constructs.
The following example shows how to use the low-level APIs to list accessible topics in Amazon SNS:
// using Amazon.SimpleNotificationService;
// using Amazon.SimpleNotificationService.Model;
var client = new AmazonSimpleNotificationServiceClient();
var request = new ListTopicsRequest();
var response = new ListTopicsResponse();
do
{
response = client.ListTopics(request);
foreach (var topic in response.Topics)
{
Console.WriteLine("Topic: {0}", topic.TopicArn);
var subs = client.ListSubscriptionsByTopic(
new ListSubscriptionsByTopicRequest
{
TopicArn = topic.TopicArn
});
var ss = subs.Subscriptions;
if (ss.Any())
{
Console.WriteLine("
Subscriptions:");
foreach (var sub in ss)
Version v2.0.0
117
AWS SDK for .NET Developer Guide
Amazon Simple Notification Service (Amazon SNS)

File PDF · ·

Stampa

Stampa documento

Condivisione

Domande su Amazon AWS SDK

Non ci sono ancora domande su questo manuale. Fate la prima.

Fai una domanda

Rispondiamo in base al manuale e indichiamo la pagina. La domanda viene pubblicata sul sito dopo il controllo.

Tutte le domande e risposte ›

Prodotti e manuali riguardanti Software Amazon AWS SDK