EFS / Client / describe_lifecycle_configuration
describe_lifecycle_configuration#
- EFS.Client.describe_lifecycle_configuration(**kwargs)#
Returns the current
LifecycleConfiguration
object for the specified Amazon EFS file system. Lifecycle management uses theLifecycleConfiguration
object to identify when to move files between storage classes. For a file system without aLifecycleConfiguration
object, the call returns an empty array in the response.This operation requires permissions for the
elasticfilesystem:DescribeLifecycleConfiguration
operation.See also: AWS API Documentation
Request Syntax
response = client.describe_lifecycle_configuration( FileSystemId='string' )
- Parameters:
FileSystemId (string) –
[REQUIRED]
The ID of the file system whose
LifecycleConfiguration
object you want to retrieve (String).- Return type:
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.
Note
When using the
put-lifecycle-configuration
CLI command or thePutLifecycleConfiguration
API action, Amazon EFS requires that eachLifecyclePolicy
object have only a single transition. This means that in a request body,LifecyclePolicies
must be structured as an array ofLifecyclePolicy
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
EFS.Client.exceptions.InternalServerError
EFS.Client.exceptions.BadRequest
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': { '...': '...', }, }