OpenSearchServiceServerless / Client / list_lifecycle_policies

list_lifecycle_policies#

OpenSearchServiceServerless.Client.list_lifecycle_policies(**kwargs)#

Returns a list of OpenSearch Serverless lifecycle policies. For more information, see Viewing data lifecycle policies.

See also: AWS API Documentation

Request Syntax

response = client.list_lifecycle_policies(
    maxResults=123,
    nextToken='string',
    resources=[
        'string',
    ],
    type='retention'
)
Parameters:
  • maxResults (integer) – An optional parameter that specifies the maximum number of results to return. You can use use nextToken to get the next page of results. The default is 10.

  • nextToken (string) – If your initial ListLifecyclePolicies operation returns a nextToken, you can include the returned nextToken in subsequent ListLifecyclePolicies operations, which returns results in the next page.

  • resources (list) –

    Resource filters that policies can apply to. Currently, the only supported resource type is index.

    • (string) –

  • type (string) –

    [REQUIRED]

    The type of lifecycle policy.

Return type:

dict

Returns:

Response Syntax

{
    'lifecyclePolicySummaries': [
        {
            'createdDate': 123,
            'description': 'string',
            'lastModifiedDate': 123,
            'name': 'string',
            'policyVersion': 'string',
            'type': 'retention'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    • lifecyclePolicySummaries (list) –

      Details about the requested lifecycle policies.

      • (dict) –

        A summary of the lifecycle policy.

        • createdDate (integer) –

          The Epoch time when the lifecycle policy was created.

        • description (string) –

          The description of the lifecycle policy.

        • lastModifiedDate (integer) –

          The date and time when the lifecycle policy was last modified.

        • name (string) –

          The name of the lifecycle policy.

        • policyVersion (string) –

          The version of the lifecycle policy.

        • type (string) –

          The type of lifecycle policy.

    • 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.

Exceptions

  • OpenSearchServiceServerless.Client.exceptions.InternalServerException

  • OpenSearchServiceServerless.Client.exceptions.ValidationException