Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PutLifecycleConfigurationCommand

Use this action to manage EFS lifecycle management and EFS Intelligent-Tiering. A LifecycleConfiguration consists of one or more LifecyclePolicy objects that define the following:

  • EFS Lifecycle management - When Amazon EFS automatically transitions files in a file system into the lower-cost EFS Infrequent Access (IA) storage class.

    To enable EFS Lifecycle management, set the value of TransitionToIA to one of the available options.

  • EFS Intelligent-Tiering - When Amazon EFS automatically transitions files from IA back into the file system's primary storage class (EFS Standard or EFS One Zone Standard).

    To enable EFS Intelligent-Tiering, set the value of TransitionToPrimaryStorageClass to AFTER_1_ACCESS.

For more information, see EFS Lifecycle Management.

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 turns off lifecycle management and EFS Intelligent-Tiering for the file system.

In the request, specify the following:

  • The ID for the file system for which you are enabling, disabling, or modifying lifecycle management and EFS Intelligent-Tiering.

  • A LifecyclePolicies array of LifecyclePolicy objects that define when files are moved into IA storage, and when they are moved back to Standard storage.

    Amazon EFS requires that each LifecyclePolicy object have only have a single transition, so the LifecyclePolicies array needs to be structured with separate LifecyclePolicy objects. See the example requests in the following section for more information.

This operation requires permissions for the elasticfilesystem:PutLifecycleConfiguration operation.

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

example

Use a bare-bones client and the command you need to make an API call.

import { EFSClient, PutLifecycleConfigurationCommand } from "@aws-sdk/client-efs"; // ES Modules import
// const { EFSClient, PutLifecycleConfigurationCommand } = require("@aws-sdk/client-efs"); // CommonJS import
const client = new EFSClient(config);
const command = new PutLifecycleConfigurationCommand(input);
const response = await client.send(command);
see

PutLifecycleConfigurationCommandInput for command's input shape.

see

PutLifecycleConfigurationCommandOutput for command's response shape.

see

config for EFSClient's config shape.

Hierarchy

Implements

Index

Constructors

constructor

Properties

Readonly input

input: PutLifecycleConfigurationCommandInput

Readonly middlewareStack

Methods

Static getEndpointParameterInstructions