Querying a Snapshot Policy
Function
This API is used to query a snapshot policy.
Calling Method
For details, see Calling APIs.
URI
GET /v2/{project_id}/clusters/{cluster_id}/snapshot-policies
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition Project ID. To obtain the value, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
|
cluster_id |
Yes |
String |
Definition Cluster ID. For details about how to obtain the value, see Obtaining the Cluster ID. Constraints The value must be a valid DWS cluster ID. Range It is a 36-digit UUID. Default Value N/A |
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
keep_day |
Integer |
Definition Retention days. Range Greater than or equal to 0 |
|
backup_strategies |
Array of BackupStrategyDetail objects |
Definition Backup policy list. Range N/A |
|
device_name |
String |
Definition Backup device, which is OBS in most cases. Range N/A |
|
server_ips |
Array of strings |
Definition Service IP address. Range N/A |
|
server_port |
String |
Definition Server port. Range N/A |
|
backup_param |
String |
Definition Backup parameters. Range N/A |
|
auto_backup |
Boolean |
Definition Whether automated backup is enabled. Range true: Automated backup is enabled. false: Automated backup is disabled. |
|
backup_strategy_cluster_type_limit_num |
Integer |
Definition Maximum number of cluster-level snapshots in this policy. Range Greater than or equal to 0 |
|
backup_strategy_schema_type_limit_num |
Integer |
Definition Maximum number of schema-level snapshots in this policy. Range Greater than or equal to 0 |
|
Parameter |
Type |
Description |
|---|---|---|
|
policy_id |
String |
Definition Policy ID. Range N/A |
|
policy_name |
String |
Definition Policy name. Range N/A |
|
backup_strategy |
String |
Definition Execution policy. Generally, the value is a crontab expression. Range N/A |
|
backup_type |
String |
Definition Backup type. Range N/A |
|
backup_level |
String |
Definition Backup level. Range N/A |
|
next_fire_time |
String |
Definition Estimated time for the next trigger of the task (it will not execute if the task conflicts with other tasks). Range N/A |
|
update_time |
String |
Definition Update time. Range N/A |
|
time_zone_offset |
Integer |
Definition Time zone offset (compared with UTC time). Range 0 to 23 |
Example Requests
GET https://{Endpoint}/v2/89cd04f168b84af6be287f71730fdb4b/clusters/e59d6b86-9072-46eb-a996-13f8b44994c1/snapshot-policies
Example Responses
Status code: 200
Snapshot policy queried.
{
"keep_day" : 3,
"backup_strategies" : [ {
"policy_id" : "3b5464ad-74a5-42cc-9667-76122839109a",
"policy_name" : "apie-default-full-strategy",
"backup_strategy" : "0 0 2 ? * 1",
"backup_type" : "full",
"backup_level" : "cluster",
"next_fire_time" : "1747533600000",
"update_time" : "2025-05-11T10:06:16",
"time_zone_offset" : 0
}, {
"policy_id" : "ceaeaf07-d600-494c-86d7-caa0fbf0858a",
"policy_name" : "apie-default-increment-strategy",
"backup_strategy" : "0 7 2/8 ? * 2,3,4,5,6,7",
"backup_type" : "increment",
"backup_level" : "cluster",
"next_fire_time" : "1747015620000",
"update_time" : "2025-05-11T10:06:16",
"time_zone_offset" : 0
} ],
"device_name" : "OBS",
"server_ips" : null,
"server_port" : null,
"backup_param" : null,
"auto_backup" : true,
"backup_strategy_cluster_type_limit_num" : 10,
"backup_strategy_schema_type_limit_num" : 50
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Snapshot policy queried. |
|
400 |
Request error. |
|
401 |
Authentication failed. |
|
403 |
You do not have required permissions. |
|
404 |
No resources found. |
|
500 |
Internal server error. |
|
503 |
Service unavailable. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.