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

***********************
list_lifecycle_policies
***********************



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

  

  Returns a list of 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/ListLifecyclePolicies>`_  


  **Request Syntax**
  ::

    response = client.list_lifecycle_policies(
        type='retention',
        resources=[
            'string',
        ],
        nextToken='string',
        maxResults=123
    )
    
  :type type: string
  :param type: **[REQUIRED]** 

    The type of lifecycle policy.

    

  
  :type resources: list
  :param resources: 

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

    

  
    - *(string) --* 

    

  :type nextToken: string
  :param nextToken: 

    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.

    

  
  :type maxResults: integer
  :param maxResults: 

    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.

    

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

    
    ::

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

    

    - *(dict) --* 
      

      - **lifecyclePolicySummaries** *(list) --* 

        Details about the requested lifecycle policies.

        
        

        - *(dict) --* 

          A summary of the 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.

            
          

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

            The Epoch time when the lifecycle policy was created.

            
          

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

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

            
      
    
      

      - **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**
  
  *   :py:class:`OpenSearchServiceServerless.Client.exceptions.InternalServerException`

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

  