ApplyAutoSnapshotPolicy - 设置自动快照策略
为一个或多个数据库文件系统设置自动快照策略。
接口说明
一个文件系统只能设置一条自动快照策略。若需要更换策略,请先取消原自动快照策略。
一条自动快照策略支持应用到多个文件系统。
数据库文件系统快照基于云盘快照,由云盘进行快照扣费。请确保在使用该接口前,已充分了解云盘快照的收费方式和价格。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
dbfs:ApplyAutoSnapshotPolicy |
*AutoSnapShotPolicy
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| PolicyId |
string |
是 |
自动快照策略 ID。 |
sp-z5siir3iq3m********** |
| DbfsIds |
array |
是 |
传入的需要设置该自动快照策略的数据库文件系统 ID 列表,传入的参数需要保持 JSON 数组格式,ID 之间用半角逗号(,)隔开。例如:["dbfs-1luaxt4vs1iusrd |
|
|
string |
是 |
需要设置该自动快照策略的数据库文件系统。 |
"dbfs-1luaxt4vs1iusrd*******" |
|
| RegionId |
string |
是 |
所属的地域 ID。您可以调用 DescribeRegions 查看最新的阿里云地域列表。 |
cn-hangzhou |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
返回结果。 |
||
| RequestId |
string |
请求 ID。 |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| AccessDeniedDetail |
object |
||
| PolicyType |
string |
PolicyType |
|
| AuthPrincipalOwnerId |
string |
AuthPrincipalOwnerId |
|
| EncodedDiagnosticMessage |
string |
EncodedDiagnosticMessage |
|
| AuthPrincipalType |
string |
AuthPrincipalType |
|
| AuthPrincipalDisplayName |
string |
AuthPrincipalDisplayName |
|
| NoPermissionType |
string |
NoPermissionType |
|
| AuthAction |
string |
AuthAction |
示例
正常返回示例
JSON格式
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"AccessDeniedDetail": {
"PolicyType": "",
"AuthPrincipalOwnerId": "",
"EncodedDiagnosticMessage": "",
"AuthPrincipalType": "",
"AuthPrincipalDisplayName": "",
"NoPermissionType": "",
"AuthAction": ""
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | ParameterInvalid.DbfsIds | The DbfsIds parameter is invalid. | 文件系统列表格式不规范。 |
| 400 | ParameterEmpty.PolicyId | The value of policyId is empty. | 策略ID值未填写。 |
| 400 | DbfsAlreadyAppliedAutoSnapshotPolicy | An automatic snapshot policy has been applied on the specified dbfs. | 单个文件系统只支持设置一个自动快照策略。 |
| 400 | InvalidRegion.DBFS | The region is not supported. | 不支持的区域。 |
| 401 | PermissionDeny.Policy | The account has no permission on this policy. | |
| 401 | PermissionDeny.DBFS | The account has no permission on this DBFS. | |
| 404 | EntityNotExist.DBFS | The DBFS instance does not exist. | |
| 404 | AutoSnapshotPolicyNotFound | The automatic snapshot policy does not exist. | 该自动快照策略不存在。 |
| 503 | AutoShapshotBusy | The server is busy now, please try again later. | 服务器繁忙,请稍后再试。 |
| 409 | OperationConflict | Too many requests on automatic snapshot policy, please try again later. | 自动快照策略操作冲突,请稍后再试。 |