AWS SDK Version 2 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

.NET Framework 3.5
 
Container for the parameters to the SetEndpointAttributes operation. Sets the attributes for an endpoint for a device on one of the supported push notification services, such as GCM and APNS. For more information, see Using Amazon SNS Mobile Push Notifications.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.SimpleNotificationService.AmazonSimpleNotificationServiceRequest
      Amazon.SimpleNotificationService.Model.SetEndpointAttributesRequest

Namespace: Amazon.SimpleNotificationService.Model
Assembly: AWSSDK.dll
Version: (assembly version)

Syntax

C#
public class SetEndpointAttributesRequest : AmazonSimpleNotificationServiceRequest
         IRequestEvents

The SetEndpointAttributesRequest type exposes the following members

Constructors

Properties

NameTypeDescription
Public Property Attributes System.Collections.Generic.Dictionary<System.String, System.String> Gets and sets the property Attributes.

A map of the endpoint attributes. Attributes in this map include the following:

  • CustomUserData -- arbitrary user data to associate with the endpoint. Amazon SNS does not use this data. The data must be in UTF-8 format and less than 2KB.
  • Enabled -- flag that enables/disables delivery to the endpoint. Amazon SNS will set this to false when a notification service indicates to Amazon SNS that the endpoint is invalid. Users can set it back to true, typically after updating Token.
  • Token -- device token, also referred to as a registration id, for an app and mobile device. This is returned from the notification service when an app and mobile device are registered with the notification service.
Public Property EndpointArn System.String Gets and sets the property EndpointArn.

EndpointArn used for SetEndpointAttributes action.

Examples

This example shows how to set mobile push application endpoint attributes.

Set mobile push application endpoint attributes example

var snsClient = new AmazonSimpleNotificationServiceClient();

var request = new SetEndpointAttributesRequest
{
  EndpointArn = "arn:aws:sns:us-east-1:80398EXAMPLE:" +
    "endpoint/GCM/TimeCardProcessingApplication/" +
    "d84b5f0d-7136-3bbe-9b42-4e001EXAMPLE",
  Attributes = new Dictionary<string, string>() { { "Enabled", "true" } }
};

snsClient.SetEndpointAttributes(request);
      

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

.NET for Windows Store apps:
Supported in: Windows 8.1, Windows 8

.NET for Windows Phone:
Supported in: Windows Phone 8.1, Windows Phone 8