CreateLifecyclePolicy_文件存储(NAS/CPFS)_API文档

插件下载了解更多
VS Code 插件
安装插件之前,确保已安装 VS Code安装插件之前,确保已安装 VS Code
Alibaba Cloud Developer Toolkit is a collection of extensions that can help access Alibaba Cloud services in Visual Studio Code.
JetBrains 插件
安装插件之前,确保已安装 JetBrains IDE安装插件之前,确保已安装 JetBrains IDE
The Alibaba Cloud Developer Toolkit for JetBrains makes it easier to access Alibaba Cloud services.

接口说明

  • 仅通用型 NAS 文件系统支持创建生命周期管理策略。
  • 每个阿里云账号在一个地域最多可以创建 20 个生命周期管理策略。

流控信息

请求速率为120/60(s)。

授权信息

如下是此API对应的授权信息,用于RAM权限策略语句的Action元素中,为RAM用户或RAM角色授予调用此API的权限。请通过 RAM 访问控制设置,使用方法可参考访问控制帮助文档

具体说明如下:展开详情

操作访问级别资源类型条件关键字关联操作
nas:CreateLifecyclePolicy
Create
LifecyclePolicy
acs:nas:{#regionId}:{#accountId}:filesystem/{#filesystemId}

请求参数

字段名称字段详情
FileSystemIdstring

文件系统 ID。

示例值:31a8e4****参考取值来源:
    CreateFileSystem
    DescribeFileSystems
    SetFilesetQuota
LifecyclePolicyNamestring

生命周期管理策略名称。展开详情

示例值:lifecyclepolicy_01参考取值来源:
    DescribeLifecyclePolicies
Pathstring

生命周期管理策略关联目录的绝对路径。展开详情

示例值:/pathway/to/folder
LifecycleRuleNamestring

生命周期管理策略关联的管理规则。展开详情

示例值:DEFAULT_ATIME_14枚举值:DEFAULT_ATIME_14DEFAULT_ATIME_30DEFAULT_ATIME_60DEFAULT_ATIME_90DEFAULT_ATIME_180参考取值来源:
    DescribeLifecyclePolicies
StorageTypestring

分级存储类型。展开详情

示例值:InfrequentAccess枚举值:InfrequentAccessArchiveCapacityPerformance参考取值来源:
    DescribeStoragePackages
Pathsarray<string>

生命周期管理策略关联目录的绝对路径。

示例值:"/path1", "/path2"子级条数 <= 11
FsetIdsarray<string>
子级条数 <= 100
LifecycleRuleTypestring
枚举值:PlacementMigration参考取值来源:
    DescribeLifecyclePolicies

返回参数

字段名称字段详情
RequestIdstring

请求 ID。

示例值:BC7C825C-5F65-4B56-BEF6-98C56C7C****
Successboolean

请求状态。展开详情

示例值:true

返回示例

错误码

全局错误码
HTTP 状态码错误码错误信息操作
400
OperationDenied.FileSystemNotSupportedForLifecycle
The file system does not support lifecycle.诊断
400
OperationDenied.EncryptedFileSystemNotSupportedForLifecycle
The encrypted file system does not support lifecycle.诊断
400
OperationDenied.LifecyclePolicyCountLimitExceeded
The maximum number of LifecyclePolicies is exceeded.诊断
400
InvalidLifecyclePolicy.AlreadyExist
The specified LifecyclePolicy already exists.诊断
400
InvalidParameter.PathsNumberExceed
The maximum number of Path.N for this operation is 10.诊断
400
InvalidFilesystemType.NotSupport
The API operation does not support the file system type.诊断
400
InvalidParameter.PathOrPaths
Either Path or Paths.N must be specified.诊断
403
OperationDenied.NotSupportPaths.N
Your request does not meet the gray condition. The Paths.N parameter is not supported.诊断
404
InvalidFileSystem.NotFound
The specified file system does not exist.诊断
404
InvalidParameter.PathNotExist
The specified path does not exist.诊断

变更历史

变更时间变更内容概要操作
2025-03-19
变更请求参数LifecycleRuleName
变更请求参数StorageType
新增请求参数FsetIds
新增请求参数LifecycleRuleType
2024-03-25
变更请求参数LifecycleRuleName
变更请求参数StorageType
2021-04-08
新增OpenAPI,创建生命周期管理策略

相关示例