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

**************************
batch_get_lifecycle_policy
**************************



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

  

  Returns one or more configured OpenSearch Serverless lifecycle policies. For more information, see `Viewing data lifecycle policies <https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-lifecycle.html#serverless-lifecycle-list>`__.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/opensearchserverless-2021-11-01/BatchGetLifecyclePolicy>`_  


  **Request Syntax**
  ::

    response = client.batch_get_lifecycle_policy(
        identifiers=[
            {
                'type': 'retention',
                'name': 'string'
            },
        ]
    )
    
  :type identifiers: list
  :param identifiers: **[REQUIRED]** 

    The unique identifiers of policy types and policy names.

    

  
    - *(dict) --* 

      The unique identifiers of policy types and policy names.

      

    
      - **type** *(string) --* **[REQUIRED]** 

        The type of lifecycle policy.

        

      
      - **name** *(string) --* **[REQUIRED]** 

        The name of the lifecycle policy.

        

      
    

  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'lifecyclePolicyDetails': [
              {
                  'type': 'retention',
                  'name': 'string',
                  'policyVersion': 'string',
                  'description': 'string',
                  'policy': {...}|[...]|123|123.4|'string'|True|None,
                  'createdDate': 123,
                  'lastModifiedDate': 123
              },
          ],
          'lifecyclePolicyErrorDetails': [
              {
                  'type': 'retention',
                  'name': 'string',
                  'errorMessage': 'string',
                  'errorCode': 'string'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **lifecyclePolicyDetails** *(list) --* 

        A list of lifecycle policies matched to the input policy name and policy type.

        
        

        - *(dict) --* 

          Details about an OpenSearch Serverless lifecycle policy.

          
          

          - **type** *(string) --* 

            The type of lifecycle policy.

            
          

          - **name** *(string) --* 

            The name of the lifecycle policy.

            
          

          - **policyVersion** *(string) --* 

            The version of the lifecycle policy.

            
          

          - **description** *(string) --* 

            The description of the lifecycle policy.

            
          

          - **policy** (:ref:`document<document>`) -- 

            The JSON policy document without any whitespaces.

            
          

          - **createdDate** *(integer) --* 

            The date the lifecycle policy was created.

            
          

          - **lastModifiedDate** *(integer) --* 

            The timestamp of when the lifecycle policy was last modified.

            
      
    
      

      - **lifecyclePolicyErrorDetails** *(list) --* 

        A list of lifecycle policy names and policy types for which retrieval failed.

        
        

        - *(dict) --* 

          Error information for an OpenSearch Serverless request.

          
          

          - **type** *(string) --* 

            The type of lifecycle policy.

            
          

          - **name** *(string) --* 

            The name of the lifecycle policy.

            
          

          - **errorMessage** *(string) --* 

            A description of the error. For example, ``The specified Lifecycle Policy is not found``.

            
          

          - **errorCode** *(string) --* 

            The error code for the request. For example, ``NOT_FOUND``.

            
      
    
  
  **Exceptions**
  
  *   :py:class:`OpenSearchServiceServerless.Client.exceptions.InternalServerException`

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

  