OpenSearchServiceServerless / Client / batch_get_effective_lifecycle_policy

batch_get_effective_lifecycle_policy#

OpenSearchServiceServerless.Client.batch_get_effective_lifecycle_policy(**kwargs)#

Returns a list of successful and failed retrievals for the OpenSearch Serverless indexes. For more information, see Viewing data lifecycle policies.

See also: AWS API Documentation

Request Syntax

response = client.batch_get_effective_lifecycle_policy(
    resourceIdentifiers=[
        {
            'resource': 'string',
            'type': 'retention'
        },
    ]
)
Parameters:

resourceIdentifiers (list) –

[REQUIRED]

The unique identifiers of policy types and resource names.

  • (dict) –

    The unique identifiers of policy types and resource names.

    • resource (string) – [REQUIRED]

      The name of the OpenSearch Serverless ilndex resource.

    • type (string) – [REQUIRED]

      The type of lifecycle policy.

Return type:

dict

Returns:

Response Syntax

{
    'effectiveLifecyclePolicyDetails': [
        {
            'noMinRetentionPeriod': True|False,
            'policyName': 'string',
            'resource': 'string',
            'resourceType': 'index',
            'retentionPeriod': 'string',
            'type': 'retention'
        },
    ],
    'effectiveLifecyclePolicyErrorDetails': [
        {
            'errorCode': 'string',
            'errorMessage': 'string',
            'resource': 'string',
            'type': 'retention'
        },
    ]
}

Response Structure

  • (dict) –

    • effectiveLifecyclePolicyDetails (list) –

      A list of lifecycle policies applied to the OpenSearch Serverless indexes.

      • (dict) –

        Error information for an OpenSearch Serverless request.

        • noMinRetentionPeriod (boolean) –

          The minimum number of index retention days set. That is an optional param that will return as true if the minimum number of days or hours is not set to a index resource.

        • policyName (string) –

          The name of the lifecycle policy.

        • resource (string) –

          The name of the OpenSearch Serverless index resource.

        • resourceType (string) –

          The type of OpenSearch Serverless resource. Currently, the only supported resource is index.

        • retentionPeriod (string) –

          The minimum number of index retention in days or hours. This is an optional parameter that will return only if it’s set.

        • type (string) –

          The type of lifecycle policy.

    • effectiveLifecyclePolicyErrorDetails (list) –

      A list of resources for which retrieval failed.

      • (dict) –

        Error information for an OpenSearch Serverless request.

        • errorCode (string) –

          The error code for the request.

        • errorMessage (string) –

          A description of the error. For example, The specified Index resource is not found.

        • resource (string) –

          The name of OpenSearch Serverless index resource.

        • type (string) –

          The type of lifecycle policy.

Exceptions

  • OpenSearchServiceServerless.Client.exceptions.InternalServerException

  • OpenSearchServiceServerless.Client.exceptions.ValidationException