- 最新动态
- 功能总览
- 服务公告
- 产品介绍
- 快速入门
- 计费说明
- 用户指南
- 混合云备份特性指南
- 最佳实践
- API参考
- SDK参考
- 故障排除
-
常见问题
- 概念类
- 计费类
-
备份类
- 备份时,需要停止服务器吗?
- 包含数据库的服务器是否可以备份?
- 如何区分备份是自动备份还是手动备份?
- 备份支持选择磁盘的某个分区进行备份吗?
- 服务器能否跨区域备份?
- 如何通过云服务器备份实现云服务器数据跨区域迁移?
- 可以将两个磁盘的数据备份至一个磁盘上吗?
- 如何同区域同可用区的复制一个磁盘?
- 支持在存储库之间进行备份迁移吗?
- 删除资源后还可以使用备份恢复数据吗?
- 单个资源可以创建多少个备份?
- 删除全量备份后,还可以使用增量备份恢复数据吗?
- 备份时可以终止备份吗?
- 如何减小备份占用空间?
- 如何查看每个备份的大小?
- 如何查看备份中的数据?
- 备份会保存多久?
- 如何对资源进行周期性全备?
- 如何查询自己哪些资源还未配置备份?
- 数据备份时是否对网络带宽有要求?
- 容量类
- 恢复类
- 策略类
- 优化类
- 其他类
-
更多文档
- 用户指南
- API参考(阿布扎比区域)
- 最佳实践(阿布扎比区域)
- 用户指南(巴黎区域)
- API参考(巴黎区域)
- 最佳实践(巴黎区域)
- 用户指南(吉隆坡区域)
- 最佳实践(吉隆坡区域)
- API参考(吉隆坡区域)
- 用户指南(安卡拉区域)
- API参考(安卡拉区域)
- 最佳实践(安卡拉区域)
- 产品术语
- 通用参考
链接复制成功!
查询单个策略
功能介绍
查询单个策略
URI
GET /v3/{project_id}/policies/{policy_id}
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
policy_id |
是 |
String |
策略ID |
project_id |
是 |
String |
项目ID |
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
X-Auth-Token |
是 |
String |
用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 缺省值:MIIDkgYJKoZIhvcNAQcCoIIDgzCCXXXXX... |
响应参数
状态码: 200
参数 |
参数类型 |
描述 |
---|---|---|
policy |
Policy object |
Response to the request for creating a policy |
参数 |
参数类型 |
描述 |
---|---|---|
enabled |
Boolean |
Whether the policy is enabled |
id |
String |
Policy ID |
name |
String |
Policy Name |
operation_definition |
PolicyoODCreate object |
Policy attributes |
operation_type |
String |
Protection type, which can be backup or replication 枚举值:
|
trigger |
PolicyTriggerResp object |
Time scheduling rule for the policy |
associated_vaults |
Array of PolicyAssociateVault objects |
Associated vault |
参数 |
参数类型 |
描述 |
---|---|---|
day_backups |
Integer |
Specifies the number of retained daily backups. The latest backup of each day is saved in the long term. This parameter can be effective together with the maximum number of retained backups specified by max_backups. The value ranges from 0 to 100. If this parameter is configured, timezone is mandatory. 最小值:0 最大值:100 |
max_backups |
Integer |
Maximum number of retained backups. The value can be -1 or ranges from 0 to 99999. If the value is set to -1, the backups will not be cleared even though the configured retained backup quantity is exceeded. If this parameter and retention_duration_days are both left blank, the backups will be retained permanently. 最小值:1 最大值:99999 缺省值:-1 |
month_backups |
Integer |
Specifies the number of retained monthly backups. The latest backup of each month is saved in the long term. This parameter can be effective together with the maximum number of retained backups specified by max_backups. The value ranges from 0 to 100. If this parameter is configured, timezone is mandatory. 最小值:0 最大值:100 |
retention_duration_days |
Integer |
Duration of retaining a backup, in days. The maximum value is 99999. -1 indicates that the backups will not be cleared based on the retention duration. If this parameter and max_backups are left blank at the same time, the backups will be retained permanently. 最小值:1 最大值:99999 缺省值:-1 |
timezone |
String |
Time zone where the user is located, for example, UTC+08:00. Set this parameter if you have configured any of the parameters: day_backups, week_backups, month_backups, year_backups. |
week_backups |
Integer |
Specifies the number of retained weekly backups. The latest backup of each week is saved in the long term. This parameter can be effective together with the maximum number of retained backups specified by max_backups. The value ranges from 0 to 100. If this parameter is configured, timezone is mandatory. |
year_backups |
Integer |
Specifies the number of retained yearly backups. The latest backup of each year is saved in the long term. This parameter can be effective together with the maximum number of retained backups specified by max_backups. The value ranges from 0 to 100. If this parameter is configured, timezone is mandatory. 最小值:0 最大值:100 |
full_backup_interval |
Integer |
Defines how often (after how many incremental backups) a full backup is performed. If -1 is specified, full backup will not be performed. Minimum value: -1 Maximum value: 100 最小值:-1 最大值:100 |
参数 |
参数类型 |
描述 |
---|---|---|
id |
String |
Scheduler ID |
name |
String |
Scheduler name |
properties |
PolicyTriggerPropertiesResp object |
Scheduler attributes |
type |
String |
Scheduler type. Currently, only time (periodic scheduling) is supported. 枚举值:
|
参数 |
参数类型 |
描述 |
---|---|---|
pattern |
Array of strings |
Scheduling rule of the scheduler. A maximum of 24 rules can be configured. The scheduling rule complies with iCalendar RFC 2445, but it supports only the FREQ, BYDAY, BYHOUR, BYMINUTE, and INTERVAL parameters. FREQ can be set only to WEEKLY or DAILY. BYDAY can be set to MO, TU, WE, TH, FR, SA, and SU (seven days of a week). BYHOUR ranges from 0 to 23 hours. BYMINUTE ranges from 0 to 59 minutes. The scheduling interval cannot be less than 1 hour. A maximum of 24 time points are allowed in a day. For example, if the scheduling time is 14:00 (UTC) from Monday to Sunday, set the scheduling rule as follows: FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR,SA,SU;BYHOUR=14;BYMINUTE=00. If the scheduling time is 14:00 (UTC+8) every day, set the scheduling rule as follows: FREQ=DAILY;INTERVAL=1;BYHOUR=6;BYMINUTE=00 |
start_time |
String |
Start time of the scheduler, for example, 2020-01-08 09:59:49 |
请求示例
查询单个策略。
GET https://{endpoint}/v3/{project_id}/policies/{policy_id}
响应示例
状态码: 200
OK
{ "policy" : { "name" : "policy001", "associated_vaults" : [ ], "enabled" : true, "trigger" : { "properties" : { "pattern" : [ "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR,SA,SU;BYHOUR=14;BYMINUTE=00" ], "start_time" : "2019-05-08T06:57:05.000+00:00" }, "type" : "time", "id" : "d67269a6-5369-42d7-8150-5254bd446328", "name" : "default" }, "operation_definition" : { "retention_duration_days" : 1, "year_backups" : 0, "day_backups" : 0, "month_backups" : 0, "week_backups" : 0, "timezone" : "UTC+08:00" }, "operation_type" : "backup", "id" : "cbb3ce6f-3332-4e7c-b98e-77290d8471ff" } }
状态码
状态码 |
描述 |
---|---|
200 |
OK |
错误码
请参见错误码。