调用DescribeBackupPolicy接口查看PolarDB集群的自动备份策略。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DescribeBackupPolicy | 系统规定参数。取值:DescribeBackupPolicy。 |
DBClusterId | String | 是 | pc-************* | 集群ID。 说明 您可以调用DescribeDBClusters接口查看目标地域下所有的集群信息,包括集群ID。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
PreferredBackupPeriod | String | Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday | 数据备份周期,取值范围如下:
|
DataLevel1BackupRetentionPeriod | String | 7 | 一级备份保留周期,取值范围为3~14,单位为天。 |
RequestId | String | EADFCE0F-9FB5-4685-B395-1440B****** | 请求ID。 |
PreferredBackupTime | String | 07:00Z-08:00Z | 执行自动备份的时间段,格式为 |
BackupRetentionPolicyOnClusterDeletion | String | NONE | 删除集群时是否保留备份:
|
PreferredNextBackupTime | String | 2020-11-16T07:30Z | 下一次备份的时间,格式为 |
DataLevel2BackupRetentionPeriod | String | 0 | 二级备份保留周期,取值范围如下:
|
BackupFrequency | String | Normal | 备份频率,取值如下:
说明
|
DataLevel1BackupFrequency | String | Normal | 备份频率,取值如下:
说明
|
DataLevel1BackupPeriod | String | Monday,Tuesday | 一级备份周期,取值范围如下:
说明
|
DataLevel1BackupTime | String | 15:00Z-16:00Z | 执行自动备份的时间段,格式为 说明
|
DataLevel2BackupPeriod | String | Monday,Tuesday | 二级备份周期,取值范围如下:
说明
|
DataLevel2BackupAnotherRegionRetentionPeriod | String | 30 | 二级备份跨地域备份保留周期。取值范围如下:
|
DataLevel2BackupAnotherRegionRegion | String | cn-hangzhou | 二级备份跨地域备份区域。跨地域备份支持的地域请参见概述。 |
示例
请求示例
http(s)://polardb.aliyuncs.com/?Action=DescribeBackupPolicy
&DBClusterId=pc-*************
&公共请求参数
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeBackupPolicyResponse>
<PreferredBackupPeriod>Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday</PreferredBackupPeriod>
<DataLevel1BackupRetentionPeriod>7</DataLevel1BackupRetentionPeriod>
<RequestId>EADFCE0F-9FB5-4685-B395-1440B******</RequestId>
<PreferredBackupTime>07:00Z-08:00Z</PreferredBackupTime>
<BackupRetentionPolicyOnClusterDeletion>NONE</BackupRetentionPolicyOnClusterDeletion>
<PreferredNextBackupTime>2020-11-16T07:30Z</PreferredNextBackupTime>
<DataLevel2BackupRetentionPeriod>0</DataLevel2BackupRetentionPeriod>
<BackupFrequency>Normal</BackupFrequency>
<DataLevel1BackupFrequency>Normal</DataLevel1BackupFrequency>
<DataLevel1BackupPeriod>Monday,Tuesday</DataLevel1BackupPeriod>
<DataLevel1BackupTime>15:00Z-16:00Z</DataLevel1BackupTime>
<DataLevel2BackupPeriod>Monday,Tuesday</DataLevel2BackupPeriod>
<DataLevel2BackupAnotherRegionRetentionPeriod>30</DataLevel2BackupAnotherRegionRetentionPeriod>
<DataLevel2BackupAnotherRegionRegion>cn-hangzhou</DataLevel2BackupAnotherRegionRegion>
</DescribeBackupPolicyResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"PreferredBackupPeriod" : "Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday",
"DataLevel1BackupRetentionPeriod" : "7",
"RequestId" : "EADFCE0F-9FB5-4685-B395-1440B******",
"PreferredBackupTime" : "07:00Z-08:00Z",
"BackupRetentionPolicyOnClusterDeletion" : "NONE",
"PreferredNextBackupTime" : "2020-11-16T07:30Z",
"DataLevel2BackupRetentionPeriod" : "0",
"BackupFrequency" : "Normal",
"DataLevel1BackupFrequency" : "Normal",
"DataLevel1BackupPeriod" : "Monday,Tuesday",
"DataLevel1BackupTime" : "15:00Z-16:00Z",
"DataLevel2BackupPeriod" : "Monday,Tuesday",
"DataLevel2BackupAnotherRegionRetentionPeriod" : "30",
"DataLevel2BackupAnotherRegionRegion" : "cn-hangzhou"
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | InvalidDBClusterId.Malformed | The specified parameter DBClusterId is not valid. | 指定的参数DBClusterId无效 |
404 | InvalidDBCluster.NotFound | The DBClusterId provided does not exist in our records. | 当前的记录中不存在提供的DBClusterId。 |
访问错误中心查看更多错误码。