:doc:`SNS <../../sns>` / Client / put_data_protection_policy

**************************
put_data_protection_policy
**************************



.. py:method:: SNS.Client.put_data_protection_policy(**kwargs)

  

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

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/PutDataProtectionPolicy>`_  


  **Request Syntax**
  ::

    response = client.put_data_protection_policy(
        ResourceArn='string',
        DataProtectionPolicy='string'
    )
    
  :type ResourceArn: string
  :param ResourceArn: **[REQUIRED]** 

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

     

    For more information about ARNs, see `Amazon Resource Names (ARNs) <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ in the Amazon Web Services General Reference.

    

  
  :type DataProtectionPolicy: string
  :param DataProtectionPolicy: **[REQUIRED]** 

    The JSON serialization of the topic's ``DataProtectionPolicy``.

     

    The ``DataProtectionPolicy`` must be in JSON string format.

     

    Length Constraints: Maximum length of 30,720.

    

  
  
  :returns: None
  **Exceptions**
  
  *   :py:class:`SNS.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`SNS.Client.exceptions.InternalErrorException`

  
  *   :py:class:`SNS.Client.exceptions.NotFoundException`

  
  *   :py:class:`SNS.Client.exceptions.AuthorizationErrorException`

  
  *   :py:class:`SNS.Client.exceptions.InvalidSecurityException`

  