paws.storage (version 0.1.0)

efs_put_lifecycle_configuration: Enables lifecycle management by creating a new LifecycleConfiguration object

Description

Enables lifecycle management by creating a new LifecycleConfiguration object. A LifecycleConfiguration object defines when files in an Amazon EFS file system are automatically transitioned to the lower-cost EFS Infrequent Access (IA) storage class. A LifecycleConfiguration applies to all files in a file system.

Usage

efs_put_lifecycle_configuration(FileSystemId, LifecyclePolicies)

Arguments

FileSystemId

[required] The ID of the file system for which you are creating the LifecycleConfiguration object (String).

LifecyclePolicies

[required] An array of LifecyclePolicy objects that define the file system's LifecycleConfiguration object. A LifecycleConfiguration object tells lifecycle management when to transition files from the Standard storage class to the Infrequent Access storage class.

Request syntax

svc$put_lifecycle_configuration(
  FileSystemId = "string",
  LifecyclePolicies = list(
    list(
      TransitionToIA = "AFTER_30_DAYS"
    )
  )
)

Details

Each Amazon EFS file system supports one lifecycle configuration, which applies to all files in the file system. If a LifecycleConfiguration object already exists for the specified file system, a PutLifecycleConfiguration call modifies the existing configuration. A PutLifecycleConfiguration call with an empty LifecyclePolicies array in the request body deletes any existing LifecycleConfiguration and disables lifecycle management.

You can enable lifecycle management only for EFS file systems created after the release of EFS infrequent access.

In the request, specify the following:

  • The ID for the file system for which you are creating a lifecycle management configuration.

  • A LifecyclePolicies array of LifecyclePolicy objects that define when files are moved to the IA storage class. The array can contain only one "TransitionToIA": "AFTER_30_DAYS" LifecyclePolicy item.

This operation requires permissions for the elasticfilesystem:PutLifecycleConfiguration operation.

To apply a LifecycleConfiguration object to an encrypted file system, you need the same AWS Key Management Service (AWS KMS) permissions as when you created the encrypted file system.

Examples

Run this code
# NOT RUN {
# This operation enables lifecycle management on a file system by creating
# a new LifecycleConfiguration object. A LifecycleConfiguration object
# defines when files in an Amazon EFS file system are automatically
# transitioned to the lower-cost EFS Infrequent Access (IA) storage class.
# A LifecycleConfiguration applies to all files in a file system.
# }
# NOT RUN {
svc$put_lifecycle_configuration(
  FileSystemId = "fs-01234567",
  LifecyclePolicies = list(
    list(
      TransitionToIA = "AFTER_30_DAYS"
    )
  )
)
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace