:doc:`OpenSearchServiceServerless <../../opensearchserverless>` / Client / update_security_policy

**********************
update_security_policy
**********************



.. py:method:: OpenSearchServiceServerless.Client.update_security_policy(**kwargs)

  

  Updates an OpenSearch Serverless security policy. For more information, see `Network access for Amazon OpenSearch Serverless <https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-network.html>`__ and `Encryption at rest for Amazon OpenSearch Serverless <https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-encryption.html>`__.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/opensearchserverless-2021-11-01/UpdateSecurityPolicy>`_  


  **Request Syntax**
  ::

    response = client.update_security_policy(
        type='encryption'|'network',
        name='string',
        policyVersion='string',
        description='string',
        policy='string',
        clientToken='string'
    )
    
  :type type: string
  :param type: **[REQUIRED]** 

    The type of access policy.

    

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

    The name of the policy.

    

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

    The version of the policy being updated.

    

  
  :type description: string
  :param description: 

    A description of the policy. Typically used to store information about the permissions defined in the policy.

    

  
  :type policy: string
  :param policy: 

    The JSON policy document to use as the content for the new policy.

    

  
  :type clientToken: string
  :param clientToken: 

    Unique, case-sensitive identifier to ensure idempotency of the request.

    This field is autopopulated if not provided.

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'securityPolicyDetail': {
              'type': 'encryption'|'network',
              'name': 'string',
              'policyVersion': 'string',
              'description': 'string',
              'policy': {...}|[...]|123|123.4|'string'|True|None,
              'createdDate': 123,
              'lastModifiedDate': 123
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **securityPolicyDetail** *(dict) --* 

        Details about the updated security policy.

        
        

        - **type** *(string) --* 

          The type of security policy.

          
        

        - **name** *(string) --* 

          The name of the policy.

          
        

        - **policyVersion** *(string) --* 

          The version of the policy.

          
        

        - **description** *(string) --* 

          The description of the security policy.

          
        

        - **policy** (:ref:`document<document>`) -- 

          The JSON policy document without any whitespaces.

          
        

        - **createdDate** *(integer) --* 

          The date the policy was created.

          
        

        - **lastModifiedDate** *(integer) --* 

          The timestamp of when the policy was last modified.

          
    
  
  **Exceptions**
  
  *   :py:class:`OpenSearchServiceServerless.Client.exceptions.InternalServerException`

  
  *   :py:class:`OpenSearchServiceServerless.Client.exceptions.ConflictException`

  
  *   :py:class:`OpenSearchServiceServerless.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`OpenSearchServiceServerless.Client.exceptions.ValidationException`

  
  *   :py:class:`OpenSearchServiceServerless.Client.exceptions.ServiceQuotaExceededException`

  