All Products
Search
Document Center

File Storage NAS:UpdateLifecyclePolicy

Last Updated:Apr 04, 2026

Updates the rules of a lifecycle policy. This operation is supported only for CPFS for AI file systems. The UpdateLifecyclePolicy operation overwrites the entire policy. Omitting an optional parameter deletes its corresponding configuration. To add a rule to an existing policy, call the DescribeLifecyclePolicies operation to retrieve the current policy, append the new rule, and then call UpdateLifecyclePolicy with the updated configuration.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

FileSystemId

string

Yes

The ID of the file system.

bmcpfs-290w65p03ok64y*****

StorageType

string

No

The storage tier.

  • InfrequentAccess: The Infrequent Access storage tier. This is the default value.

  • Archive: The Archive storage tier.

InfrequentAccess

LifecyclePolicyId

string

Yes

The ID of the lifecycle policy.

Note

This parameter is required for CPFS for AI file systems.

lsp-bp1234567890ab****

Description

string

No

The description of the lifecycle policy.

The description must be 3 to 64 characters long and must start with a letter. It can contain letters, digits, underscores (_), and hyphens (-).

Note

This parameter is supported only for CPFS for AI file systems.

Lifecycle policy description

Paths

array

No

The absolute paths of the directories to which the lifecycle policy applies.

string

No

The absolute path of a directory to which the lifecycle policy applies.

You can specify 1 to 10 paths. Each path must start with a forward slash (/) and be an existing path in the mount target.

/path1

TransitRules

array<object>

No

The transition rule for files. You can specify only one transition rule.

Note

This parameter is supported only for CPFS for AI file systems when LifecyclePolicyType is set to Auto.

object

No

A transition rule for the files.

Attribute

string

No

The rule attribute.

Valid value:

  • Atime: The last access time of a file.

Atime

Threshold

string

No

The rule threshold.

Valid value:

  • If Attribute is set to Atime, this parameter specifies the number of days since a file was last accessed. The value must be between 1 and 365.

3

RetrieveRules

array<object>

No

The retrieval rule for files. You can specify only one retrieval rule.

Note

This parameter is supported only for CPFS for AI file systems.

object

No

A retrieval rule for the files.

Attribute

string

No

The rule attribute. Valid value:

  • RetrieveType: The retrieval method.

RetrieveType

Threshold

string

No

The retrieval method. Valid values:

  • If Attribute is set to RetrieveType:
    • AfterVisit: Retrieves data on a best-effort basis after a file is accessed. This value is valid only when LifecyclePolicyType is Auto.

    • All: Retrieves all data. This value is valid only when LifecyclePolicyType is OnDemand.

Valid values:

  • All :

  • AfterVisit :

All

Response elements

Element

Type

Description

Example

object

The response object.

RequestId

string

The request ID.

98696EF0-1607-4E9D-B01D-F20930B6****

Success

boolean

Indicates whether the request succeeded.

Valid values:

  • true: The request succeeded.

  • false: The request failed.

true

Examples

Success response

JSON format

{
  "RequestId": "98696EF0-1607-4E9D-B01D-F20930B6****",
  "Success": true
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidLifecyclePolicy.NotFound The specified LifecyclePolicy does not exist. The specified LifecyclePolicy does not exist.
404 InvalidFileSystem.NotFound The specified file system does not exist. The specified file system does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.