EFS.Client.
describe_lifecycle_configuration
(**kwargs)¶Returns the current LifecycleConfiguration
object for the specified Amazon EFS file system. EFS lifecycle management uses the LifecycleConfiguration
object to identify which files to move to the EFS Infrequent Access (IA) storage class. For a file system without a LifecycleConfiguration
object, the call returns an empty array in the response.
When EFS Intelligent-Tiering is enabled, TransitionToPrimaryStorageClass
has a value of AFTER_1_ACCESS
.
This operation requires permissions for the elasticfilesystem:DescribeLifecycleConfiguration
operation.
See also: AWS API Documentation
Request Syntax
response = client.describe_lifecycle_configuration(
FileSystemId='string'
)
[REQUIRED]
The ID of the file system whose LifecycleConfiguration
object you want to retrieve (String).
{
'LifecyclePolicies': [
{
'TransitionToIA': 'AFTER_7_DAYS'|'AFTER_14_DAYS'|'AFTER_30_DAYS'|'AFTER_60_DAYS'|'AFTER_90_DAYS'|'AFTER_1_DAY',
'TransitionToPrimaryStorageClass': 'AFTER_1_ACCESS'
},
]
}
Response Structure
An array of lifecycle management policies. EFS supports a maximum of one policy per file system.
Describes a policy used by EFS lifecycle management and EFS Intelligent-Tiering that specifies when to transition files into and out of the file system's Infrequent Access (IA) storage class. For more information, see EFS Intelligent‐Tiering and EFS Lifecycle Management.
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, TransitionToIA
, TransitionToPrimaryStorageClass
. For more information, see the request examples in PutLifecycleConfiguration.
Describes the period of time that a file is not accessed, after which it transitions to IA storage. Metadata operations such as listing the contents of a directory don't count as file access events.
Describes when to transition a file from IA storage to primary 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': {
'...': '...',
},
}