SetEndpointAttributes
Sets the attributes for an endpoint for a device on one of the supported push notification services, such as GCM (Firebase Cloud Messaging) and APNS. For more information, see Using Amazon SNS Mobile Push Notifications.
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
- Attributes
- Attributes.entry.N.key (key)
- Attributes.entry.N.value (value)
- 
               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.
 Type: String to string map Required: Yes 
- 
                     
- EndpointArn
- 
               EndpointArn used for SetEndpointAttributesaction.Type: String Required: Yes 
Errors
For information about the errors that are common to all actions, see Common Errors.
- AuthorizationError
- 
               Indicates that the user has been denied access to the requested resource. HTTP Status Code: 403 
- InternalError
- 
               Indicates an internal service error. HTTP Status Code: 500 
- InvalidParameter
- 
               Indicates that a request parameter does not comply with the associated constraints. HTTP Status Code: 400 
- NotFound
- 
               Indicates that the requested resource does not exist. HTTP Status Code: 404 
Examples
The structure of AUTHPARAMS depends on the signature of the API request. 
    For more information, see Examples 
    of the complete Signature Version 4 signing process (Python) in the 
    
            AWS General Reference.
Example
This example illustrates one usage of SetEndpointAttributes.
Sample Request
https://sns.us-west-2.amazonaws.com/?Action=SetEndpointAttributes
&EndpointArn=arn%3Aaws%3Asns%3Aus-west-2%3A123456789012%3Aendpoint%2FGCM%2Fgcmpushapp%2F5e3e9847-3183-3f18-a7e8-671c3a57d4b3
&Attributes.entry.1.key=CustomUserData
&Attributes.entry.1.value=My+custom+userdata
&Version=2010-03-31
&AUTHPARAMSSample Response
<SetEndpointAttributesResponse xmlns="https://sns.amazonaws.com/doc/2010-03-31/">
    <ResponseMetadata>
        <RequestId>2fe0bfc7-3e85-5ee5-a9e2-f58b35e85f6a</RequestId>
    </ResponseMetadata>
</SetEndpointAttributesResponse> See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: