DescribeLifecyclePolicies
Queries a list of lifecycle management policies.
Operation description
This feature is supported only by General-purpose NAS file systems and CPFS for Lingjun.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
nas:DescribeLifecyclePolicies |
get |
*LifecyclePolicy
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| FileSystemId |
string |
No |
The ID of the file system. |
31a8e4**** |
| LifecyclePolicyName |
string |
No |
Policy Name of the lifecycle policy. Policy Name must meet the following naming rules: Policy Name must be 3 to 64 characters in length. It must start with a letter and can contain letters, digits, underscores (_), and hyphens (-). Note
For General-purpose NAS file systems, this parameter is optional. If this parameter is specified, it takes precedence. If this parameter is not specified, LifecyclePolicyId is used. |
lifecyclepolicy_01 |
| PageSize |
integer |
No |
The number of lifecycle management policies per page. Valid values: 1 to 100. Default value: 10. |
10 |
| PageNumber |
integer |
No |
The page number. Starting value (default value): 1. |
1 |
| StorageType |
string |
No |
The tiered storage type. Valid values:
Note
If StorageType is not specified, all lifecycle policies are returned. Valid values:
|
InfrequentAccess |
| LifecyclePolicyId |
string |
No |
The ID of the lifecycle policy. |
lc-xxx |
| LifecyclePolicyType |
string |
No |
The policy type. Valid values:
Note
Supported only by CPFS for Lingjun. Valid values:
|
Auto |
| Description |
string |
No |
The description of the policy. Note
Supported only by CPFS for Lingjun. |
Description |
| Path |
string |
No |
Filters policies by path. Note
Supported only by CPFS for Lingjun. |
/abc/ |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| TotalCount |
integer |
The total number of lifecycle management policies. |
10 |
| RequestId |
string |
The ID of the request. |
BC7C825C-5F65-4B56-BEF6-98C56C7C**** |
| PageSize |
integer |
The number of lifecycle management policies per page. |
10 |
| PageNumber |
integer |
The page number. |
1 |
| LifecyclePolicies |
array<object> |
The lifecycle management policies. |
|
|
array<object> |
|||
| FileSystemId |
string |
The ID of the file system. |
31a8e4**** |
| LifecycleRuleName |
string |
The management rule associated with the lifecycle management policy. Valid values:
|
DEFAULT_ATIME_14 |
| CreateTime |
string |
The time when the lifecycle management policy was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. |
2019-10-30T10:08:08Z |
| Path |
string |
The absolute path of the single directory configured for the lifecycle management policy. |
/pathway/to/folder |
| StorageType |
string |
The tiered storage type. Valid values:
|
InfrequentAccess |
| LifecyclePolicyName |
string |
The name of the lifecycle management policy. |
lifecyclepolicy_01 |
| Paths |
array |
The absolute paths of the multiple directories configured for the lifecycle management policy. |
|
|
string |
The absolute paths of the multiple directories configured for the lifecycle management policy. |
["/path1","/path2"] |
|
| LifecyclePolicyId |
string |
The ID of the lifecycle policy. |
lc-xxx |
| Description |
string |
The description. |
Description |
| LifecyclePolicyType |
string |
The policy type. |
Auto |
| TransitRules |
array<object> |
The file data transition rules. |
|
|
object |
The file data transition rules. |
||
| Attribute |
string |
The attribute of the transition rule. |
Atime |
| Threshold |
string |
The threshold of the transition rule. |
3 |
| RetrieveRules |
array<object> |
The file data retrieval rules. |
|
|
object |
The file data retrieval rules. |
||
| Attribute |
string |
The attribute of the retrieval rule. |
RetrieveType |
| Threshold |
string |
The threshold of the retrieval rule. |
All |
| DeleteRules |
array<object> |
The expiration and deletion rules for file data. You can configure up to one rule. |
|
|
object |
The expiration and deletion rules for file data. You can configure up to one rule. |
||
| Attribute |
string |
The attribute of the rule. Valid values:
|
Atime |
| Threshold |
string |
The threshold of the rule. Valid values:
|
5 |
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": "Description",
"LifecyclePolicyType": "Auto",
"TransitRules": [
{
"Attribute": "Atime",
"Threshold": "3"
}
],
"RetrieveRules": [
{
"Attribute": "RetrieveType",
"Threshold": "All"
}
],
"DeleteRules": [
{
"Attribute": "Atime",
"Threshold": "5"
}
]
}
]
}
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.