All Products
Search
Document Center

File Storage NAS:DescribeLifecyclePolicies

Last Updated:Jun 25, 2026

Retrieves a list of lifecycle management policies.

Operation description

Only General-purpose NAS file systems and CPFS for Lingjun support this feature.

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

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

nas:DescribeLifecyclePolicies

get

*LifecyclePolicy

acs:nas:{#regionId}:{#accountId}:filesystem/{#filesystemId}

None None

Request parameters

Parameter

Type

Required

Description

Example

FileSystemId

string

No

The file system ID.

31a8e4****

LifecyclePolicyName

string

No

The lifecycle policy name. Naming rules:

The name must be 3 to 64 characters in length, start with a letter, and can contain letters, digits, underscores (_), or hyphens (-).

Note

Optional for General-purpose NAS file systems. If specified, this parameter takes precedence. If not specified, LifecyclePolicyId is used instead.

lifecyclepolicy_01

PageSize

integer

No

The number of lifecycle management policies on each page.

Valid values: 1 to 100.

Default value: 10.

10

PageNumber

integer

No

The page number of the list.

Start value (default value): 1.

1

StorageType

string

No

The storage class type. Valid values:

  • InfrequentAccess: IA storage class.

  • Archive: Archive storage class.

Note

If StorageType is not specified, all lifecycle policies are returned.

Valid values:

  • Archive :

    Archive storage class.

  • InfrequentAccess :

    IA storage class.

InfrequentAccess

LifecyclePolicyId

string

No

The ID of the lifecycle policy.

lc-xxx

LifecyclePolicyType

string

No

The policy type.

Valid values:

  • Auto: automatic execution

  • OnDemand: on-demand execution

Note

Only CPFS for Lingjun supports this parameter.

Valid values:

  • Auto :

    Automatic execution.

  • OnDemand :

    On-demand execution.

Auto

Description

string

No

The description of the policy.

Note

Only CPFS for Lingjun supports this parameter.

描述

Path

string

No

Filters results by path.

Note

Only CPFS for Lingjun supports this parameter.

/abc/

Response elements

Element

Type

Description

Example

object

TotalCount

integer

The total number of lifecycle management policies.

10

RequestId

string

The request ID.

BC7C825C-5F65-4B56-BEF6-98C56C7C****

PageSize

integer

The number of lifecycle management policies on each page.

10

PageNumber

integer

The page number of the list.

1

LifecyclePolicies

array<object>

The collection of lifecycle management policy information.

array<object>

FileSystemId

string

The file system ID.

31a8e4****

LifecycleRuleName

string

The management rule associated with the lifecycle management policy.

Valid values:

  • DEFAULT_ATIME_14: files not accessed in the last 14 days

  • DEFAULT_ATIME_30: files not accessed in the last 30 days

  • DEFAULT_ATIME_60: files not accessed in the last 60 days

  • DEFAULT_ATIME_90: files not accessed in the last 90 days.

DEFAULT_ATIME_14

CreateTime

string

The time when the lifecycle management policy was created.

The time follows the ISO 8601 standard in the format: yyyy-MM-ddTHH:mm:ssZ.

2019-10-30T10:08:08Z

Path

string

The absolute path of the single directory configured in the lifecycle management policy.

/pathway/to/folder

StorageType

string

The storage class type. Valid values:

  • InfrequentAccess: IA storage class.

  • Archive: Archive storage class.

InfrequentAccess

LifecyclePolicyName

string

The lifecycle management policy name.

lifecyclepolicy_01

Paths

array

The list of absolute paths of multiple directories configured in the lifecycle management policy.

string

The list of absolute paths of multiple directories configured in the lifecycle management policy.

["/path1","/path2"]

LifecyclePolicyId

string

The ID of the lifecycle policy.

lc-xxx

Description

string

The description of the policy.

描述

LifecyclePolicyType

string

The policy type.

Auto

TransitRules

array<object>

The data transit rules for files.

object

The data transit rules for files.

Attribute

string

Attribute of the rule.

Atime

Threshold

string

Threshold for the rule.

3

RetrieveRules

array<object>

The data retrieval rules for files.

object

The data retrieval rules for files.

Attribute

string

Attribute of the rule.

RetrieveType

Threshold

string

Threshold for the rule.

All

Examples

Success response

JSON format

{
  "TotalCount": 10,
  "RequestId": "BC7C825C-5F65-4B56-BEF6-98C56C7C****",
  "PageSize": 10,
  "PageNumber": 1,
  "LifecyclePolicies": [
    {
      "FileSystemId": "31a8e4****",
      "LifecycleRuleName": "DEFAULT_ATIME_14",
      "CreateTime": "2019-10-30T10:08:08Z",
      "Path": "/pathway/to/folder",
      "StorageType": "InfrequentAccess",
      "LifecyclePolicyName": "lifecyclepolicy_01",
      "Paths": [
        "[\"/path1\",\"/path2\"]"
      ],
      "LifecyclePolicyId": "lc-xxx",
      "Description": "描述",
      "LifecyclePolicyType": "Auto",
      "TransitRules": [
        {
          "Attribute": "Atime",
          "Threshold": "3"
        }
      ],
      "RetrieveRules": [
        {
          "Attribute": "RetrieveType",
          "Threshold": "All"
        }
      ]
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

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.