Creates a lifecycle management policy.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateLifecyclePolicy

The operation that you want to perform.

Set the value to CreateLifecyclePolicy.

FileSystemId String Yes 31a8e4****

The ID of the file system.

LifecyclePolicyName String Yes lifecyclepolicy1

The name of the lifecycle management policy.

LifecycleRuleName String Yes DEFAULT_ATIME_14

The rule in the lifecycle management policy. Valid values:

  • DEFAULT_ATIME_14: specifies the files that were not accessed in the last 14 days.
  • DEFAULT_ATIME_30: specifies the files that were not accessed in the last 30 days.
  • DEFAULT_ATIME_60: specifies the files that were not accessed in the last 60 days.
  • DEFAULT_ATIME_90: specifies the files that were not accessed in the last 90 days.
Path String Yes /pathway/to/folder

The absolute path of the directory to which the policy is applied. The value must start with a forward slash (/). The value must be an existing path in the mount target.

StorageType String Yes InfrequentAccess

The storage class of the file system. Default value: InfrequentAccess.

Response parameters

Parameter Type Example Description
RequestId String BC7C825C-5F65-4B56-BEF6-98C56C7C546E

The ID of the request.

Success Boolean true

The status of the request.

Valid values: true and false.

Examples

Sample requests

GET https://nas.cn-hangzhou.aliyuncs.com/?Action=CreateLifecyclePolicy
&FileSystemId=31a8e4****
&LifecyclePolicyName=lifecyclepolicy1
&LifecycleRuleName=DEFAULT_ATIME_14
&Path=/pathway/to/folder
&StorageType=InfrequentAccess
&<Common request parameters>

Sample success responses

XML format

<RequestId>BC7C825C-5F65-4B56-BEF6-98C56C7C546E</RequestId>
<Success>true</Success>

JSON format

{
    "RequestId": "BC7C825C-5F65-4B56-BEF6-98C56C7C546E",
    "Success": true
}

Error codes

For a list of error codes, visit the API Error Center.