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

*******************
get_security_policy
*******************



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

  

  Returns information about a configured 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/GetSecurityPolicy>`_  


  **Request Syntax**
  ::

    response = client.get_security_policy(
        type='encryption'|'network',
        name='string'
    )
    
  :type type: string
  :param type: **[REQUIRED]** 

    The type of security policy.

    

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

    The name of the security policy.

    

  
  
  :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 requested 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.ResourceNotFoundException`

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

  