:doc:`DLM <../../dlm>` / Client / get_lifecycle_policies

**********************
get_lifecycle_policies
**********************



.. py:method:: DLM.Client.get_lifecycle_policies(**kwargs)

  

  Gets summary information about all or the specified data lifecycle policies.

   

  To get complete information about a policy, use `GetLifecyclePolicy <https://docs.aws.amazon.com/dlm/latest/APIReference/API_GetLifecyclePolicy.html>`__.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12/GetLifecyclePolicies>`_  


  **Request Syntax**
  ::

    response = client.get_lifecycle_policies(
        PolicyIds=[
            'string',
        ],
        State='ENABLED'|'DISABLED'|'ERROR',
        ResourceTypes=[
            'VOLUME'|'INSTANCE',
        ],
        TargetTags=[
            'string',
        ],
        TagsToAdd=[
            'string',
        ],
        DefaultPolicyType='VOLUME'|'INSTANCE'|'ALL'
    )
    
  :type PolicyIds: list
  :param PolicyIds: 

    The identifiers of the data lifecycle policies.

    

  
    - *(string) --* 

    

  :type State: string
  :param State: 

    The activation state.

    

  
  :type ResourceTypes: list
  :param ResourceTypes: 

    The resource type.

    

  
    - *(string) --* 

    

  :type TargetTags: list
  :param TargetTags: 

    The target tag for a policy.

     

    Tags are strings in the format ``key=value``.

    

  
    - *(string) --* 

    

  :type TagsToAdd: list
  :param TagsToAdd: 

    The tags to add to objects created by the policy.

     

    Tags are strings in the format ``key=value``.

     

    These user-defined tags are added in addition to the Amazon Web Services-added lifecycle tags.

    

  
    - *(string) --* 

    

  :type DefaultPolicyType: string
  :param DefaultPolicyType: 

    **[Default policies only]** Specifies the type of default policy to get. Specify one of the following:

     

    
    * ``VOLUME`` - To get only the default policy for EBS snapshots
     
    * ``INSTANCE`` - To get only the default policy for EBS-backed AMIs
     
    * ``ALL`` - To get all default policies
    

    

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

    
    ::

      {
          'Policies': [
              {
                  'PolicyId': 'string',
                  'Description': 'string',
                  'State': 'ENABLED'|'DISABLED'|'ERROR',
                  'Tags': {
                      'string': 'string'
                  },
                  'PolicyType': 'EBS_SNAPSHOT_MANAGEMENT'|'IMAGE_MANAGEMENT'|'EVENT_BASED_POLICY',
                  'DefaultPolicy': True|False
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Policies** *(list) --* 

        Summary information about the lifecycle policies.

        
        

        - *(dict) --* 

          Summary information about a lifecycle policy.

          
          

          - **PolicyId** *(string) --* 

            The identifier of the lifecycle policy.

            
          

          - **Description** *(string) --* 

            The description of the lifecycle policy.

            
          

          - **State** *(string) --* 

            The activation state of the lifecycle policy.

            
          

          - **Tags** *(dict) --* 

            The tags.

            
            

            - *(string) --* 
              

              - *(string) --* 
        
      
          

          - **PolicyType** *(string) --* 

            The type of policy. ``EBS_SNAPSHOT_MANAGEMENT`` indicates that the policy manages the lifecycle of Amazon EBS snapshots. ``IMAGE_MANAGEMENT`` indicates that the policy manages the lifecycle of EBS-backed AMIs. ``EVENT_BASED_POLICY`` indicates that the policy automates cross-account snapshot copies for snapshots that are shared with your account.

            
          

          - **DefaultPolicy** *(boolean) --* 

            **[Default policies only]** The type of default policy. Values include:

             

            
            * ``VOLUME`` - Default policy for EBS snapshots
             
            * ``INSTANCE`` - Default policy for EBS-backed AMIs
            

            
      
    
  
  **Exceptions**
  
  *   :py:class:`DLM.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`DLM.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`DLM.Client.exceptions.InternalServerException`

  
  *   :py:class:`DLM.Client.exceptions.LimitExceededException`

  