OpenSearchServiceServerless / Client / get_access_policy

get_access_policy#

OpenSearchServiceServerless.Client.get_access_policy(**kwargs)#

Returns an OpenSearch Serverless access policy. For more information, see Data access control for Amazon OpenSearch Serverless.

See also: AWS API Documentation

Request Syntax

response = client.get_access_policy(
    name='string',
    type='data'
)
Parameters:
  • name (string) –

    [REQUIRED]

    The name of the access policy.

  • type (string) –

    [REQUIRED]

    Tye type of policy. Currently the only supported value is data.

Return type:

dict

Returns:

Response Syntax

{
    'accessPolicyDetail': {
        'createdDate': 123,
        'description': 'string',
        'lastModifiedDate': 123,
        'name': 'string',
        'policy': {...}|[...]|123|123.4|'string'|True|None,
        'policyVersion': 'string',
        'type': 'data'
    }
}

Response Structure

  • (dict) –

    • accessPolicyDetail (dict) –

      Details about the requested access policy.

      • createdDate (integer) –

        The date the policy was created.

      • description (string) –

        The description of the policy.

      • lastModifiedDate (integer) –

        The timestamp of when the policy was last modified.

      • name (string) –

        The name of the policy.

      • policy (document) –

        The JSON policy document without any whitespaces.

      • policyVersion (string) –

        The version of the policy.

      • type (string) –

        The type of access policy.

Exceptions

  • OpenSearchServiceServerless.Client.exceptions.InternalServerException

  • OpenSearchServiceServerless.Client.exceptions.ResourceNotFoundException

  • OpenSearchServiceServerless.Client.exceptions.ValidationException