:doc:`EFS <../../efs>` / Client / describe_lifecycle_configuration

********************************
describe_lifecycle_configuration
********************************



.. py:method:: EFS.Client.describe_lifecycle_configuration(**kwargs)

  

  Returns the current ``LifecycleConfiguration`` object for the specified EFS file system. Lifecycle management uses the ``LifecycleConfiguration`` object to identify when to move files between storage classes. For a file system without a ``LifecycleConfiguration`` object, the call returns an empty array in the response.

   

  This operation requires permissions for the ``elasticfilesystem:DescribeLifecycleConfiguration`` operation.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeLifecycleConfiguration>`_  


  **Request Syntax**
  ::

    response = client.describe_lifecycle_configuration(
        FileSystemId='string'
    )
    
  :type FileSystemId: string
  :param FileSystemId: **[REQUIRED]** 

    The ID of the file system whose ``LifecycleConfiguration`` object you want to retrieve (String).

    

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

    
    ::

      {
          'LifecyclePolicies': [
              {
                  'TransitionToIA': 'AFTER_7_DAYS'|'AFTER_14_DAYS'|'AFTER_30_DAYS'|'AFTER_60_DAYS'|'AFTER_90_DAYS'|'AFTER_1_DAY'|'AFTER_180_DAYS'|'AFTER_270_DAYS'|'AFTER_365_DAYS',
                  'TransitionToPrimaryStorageClass': 'AFTER_1_ACCESS',
                  'TransitionToArchive': 'AFTER_1_DAY'|'AFTER_7_DAYS'|'AFTER_14_DAYS'|'AFTER_30_DAYS'|'AFTER_60_DAYS'|'AFTER_90_DAYS'|'AFTER_180_DAYS'|'AFTER_270_DAYS'|'AFTER_365_DAYS'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **LifecyclePolicies** *(list) --* 

        An array of lifecycle management policies. EFS supports a maximum of one policy per file system.

        
        

        - *(dict) --* 

          Describes a policy used by lifecycle management that specifies when to transition files into and out of storage classes. For more information, see `Managing file system storage <https://docs.aws.amazon.com/efs/latest/ug/lifecycle-management-efs.html>`__.

           

          .. note::

            

            When using the ``put-lifecycle-configuration`` CLI command or the ``PutLifecycleConfiguration`` API action, Amazon EFS requires that each ``LifecyclePolicy`` object have only a single transition. This means that in a request body, ``LifecyclePolicies`` must be structured as an array of ``LifecyclePolicy`` objects, one object for each transition. For more information, see the request examples in  PutLifecycleConfiguration.

            

          
          

          - **TransitionToIA** *(string) --* 

            The number of days after files were last accessed in primary storage (the Standard storage class) at which to move them to Infrequent Access (IA) storage. Metadata operations such as listing the contents of a directory don't count as file access events.

            
          

          - **TransitionToPrimaryStorageClass** *(string) --* 

            Whether to move files back to primary (Standard) storage after they are accessed in IA or Archive storage. Metadata operations such as listing the contents of a directory don't count as file access events.

            
          

          - **TransitionToArchive** *(string) --* 

            The number of days after files were last accessed in primary storage (the Standard storage class) at which to move them to Archive storage. Metadata operations such as listing the contents of a directory don't count as file access events.

            
      
    
  
  **Exceptions**
  
  *   :py:class:`EFS.Client.exceptions.InternalServerError`

  
  *   :py:class:`EFS.Client.exceptions.BadRequest`

  
  *   :py:class:`EFS.Client.exceptions.FileSystemNotFound`

  

  **Examples**

  This operation describes a file system's LifecycleConfiguration. EFS lifecycle management uses the LifecycleConfiguration object to identify which files to move to the EFS Infrequent Access (IA) storage class. 
  ::

    response = client.describe_lifecycle_configuration(
        FileSystemId='fs-01234567',
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'LifecyclePolicies': [
            {
                'TransitionToIA': 'AFTER_30_DAYS',
            },
        ],
        'ResponseMetadata': {
            '...': '...',
        },
    }

  