PutDataProtectionPolicy - Amazon Simple Notification Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).


Adds or updates an inline policy document that is stored in the specified Amazon SNS topic.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.


The JSON serialization of the topic's DataProtectionPolicy.

The DataProtectionPolicy must be in JSON string format.

Length Constraints: Maximum length of 30,720.

Type: String

Required: Yes


The ARN of the topic whose DataProtectionPolicy you want to add or update.

For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon General Reference.

Type: String

Required: Yes


For information about the errors that are common to all actions, see Common Errors.


Indicates that the user has been denied access to the requested resource.

HTTP Status Code: 403


Indicates an internal service error.

HTTP Status Code: 500


Indicates that a request parameter does not comply with the associated constraints.

HTTP Status Code: 400


The credential signature isn't valid. You must use an HTTPS endpoint and sign your request using Signature Version 4.

HTTP Status Code: 403


Indicates that the requested resource does not exist.

HTTP Status Code: 404


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 Amazon General Reference.


This example illustrates one usage of PutDataProtectionPolicy.

Sample Request

https://sns.us-east-2.amazonaws.com/?Action=PutDataProtectionPolicy &ResourceArn=arn%3Aaws%3Asns%3Aus-east-2%3A123456789012%3AMy-Topic &DataProtectionPolicy= &Version=2010-03-31 &AUTHPARAMS

Sample Response

<PutDataProtectionPolicyResponse xmlns="http://sns.amazonaws.com/doc/2010-03-31/"> <ResponseMetadata> <RequestId>e6616aef-1cf0-5c13-b454-31657d8ed10b</RequestId> </ResponseMetadata> </PutDataProtectionPolicyResponse>

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: