快照策略功能请联系客户经理开通。
URI
GET https://ecpc-[regionCode].ctapi.ctyun.cn/v2/snapshotPolicy/getDetail
URI参数
名称 | 类型 | 必填 | 描述 |
---|---|---|---|
snapshotPolicyOid | string | 是 | 快照策略ID |
返回结果
名称 | 类型 | 描述 |
---|---|---|
code | int | 状态码 |
msg | string | 返回消息(如有必要) |
data | SnapshotPolicyDetail | 返回数据对象 |
返回相关类型定义
SnapshotPolicyDetail
名称 | 类型 | 描述 |
---|---|---|
snapshotPolicyOid | string | 快照策略ID。 |
snapshotPolicyName | string | 快照策略名称。 |
snapshotType | string | 快照类型。枚举值范围:sys-系统盘;data-数据盘;all-系统盘和数据盘。 |
snapshotTimePoints | string[] | 快照时间点集合。使用UTC+8时间。时间点格式:HH:mm。 |
cycleType | string | 快照的周期类型。枚举值范围:Week-按周;Day-按天。 |
daysOfWeek | string[] | 一个星期中需要快照的天。取值范围[1,7]。只有cycleType取值为Week时有实际意义。 |
cycleDayCnt | int | 快照周期天数。只有cycleType取值为Day时有实际意义。 |
retentionRule | string | 保留规则。枚举值范围:Month-按月;Day-按天;Quantity-按数量;Forever-永久保留。 |
retentionMonthCnt | int | 保留月数。只有retentionRule取值为Month时有实际意义。 |
retentionDayCnt | int | 保留天数。只有retentionRule取值为Day时有实际意义。 |
retentionCnt | int | 保留数量。只有retentionRule取值为Quantity时有实际意义。 |
autoDelete | boolean | 是否自动删除。只有retentionRule取值为Quantity时有实际意义。 |
description | string | 描述。 |
createTime | string | 创建时间。以ISO 8601为标准,并使用UTC+0时间,格式为yyyy-MM-ddTHH:mm:ssZ。 |
示例
请求示例
GET https://ecpc-[regionCode].ctapi.ctyun.cn/v2/snapshotPolicy/getDetail?snapshotPolicyOid=ssp-xxx
正常返回示例
{
"code":0,
"data":{
"snapshotPolicyOid":"ssp-xxx",
"snapshotPolicyName":"fooName",
"snapshotType":"sys",
"snapshotTimePoints":["00:00","01:00"],
"cycleType":"Day",
"daysOfWeek":null,
"cycleDayCnt":30,
"retentionRule":"Day",
"retentionMonthCnt":null,
"retentionDayCnt":4,
"retentionCnt":null,
"autoDelete":null,
"description":"",
"createTime":"2021-02-24T08:12:43Z"
}
}