Returns information about a list of OpenSearch Serverless access policies.

See also: AWS API Documentation

Request Syntax

response = client.list_access_policies(
  • maxResults (integer) -- An optional parameter that specifies the maximum number of results to return. You can use nextToken to get the next page of results. The default is 20.
  • nextToken (string) -- If your initial ListAccessPolicies operation returns a nextToken , you can include the returned nextToken in subsequent ListAccessPolicies operations, which returns results in the next page.
  • resource (list) --

    Resource filters (can be collection or indexes) that policies can apply to.

    • (string) --
  • type (string) --


    The type of access policy.

Return type



Response Syntax

    'accessPolicySummaries': [
            'createdDate': 123,
            'description': 'string',
            'lastModifiedDate': 123,
            'name': 'string',
            'policyVersion': 'string',
            'type': 'data'
    'nextToken': 'string'

Response Structure

  • (dict) --

    • accessPolicySummaries (list) --

      Details about the requested access policies.

      • (dict) --

        A summary of the data access policy.

        • createdDate (integer) --

          The Epoch time when the access policy was created.

        • description (string) --

          The description of the access policy.

        • lastModifiedDate (integer) --

          The date and time when the collection was last modified.

        • name (string) --

          The name of the access policy.

        • policyVersion (string) --

          The version of the policy.

        • type (string) --

          The type of access policy. Currently the only available type is data .

    • nextToken (string) --

      When nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page.


  • OpenSearchServiceServerless.Client.exceptions.InternalServerException
  • OpenSearchServiceServerless.Client.exceptions.ValidationException