Querying Instances That Can Be Used for Backups and Restorations
Function
This API is used to query the instances that can be used for backups and restorations. Before calling this API:
- Learn how to authenticate this API.
- Obtain the required region and endpoint.
Constraints
The restore_time and backup_id parameters cannot be both left blank.
URI
GET https://{Endpoint}/v3/{project_id}/restorable-instances
Parameter |
Mandatory |
Description |
---|---|---|
project_id |
Yes |
Explanation: Project ID of a tenant in a region. For details about how to obtain the project ID, see Obtaining a Project ID. Restrictions: None Value range: The value can contain 32 characters. Only letters and digits are allowed. Default value: None |
backup_id |
No |
Instance backup ID. You can use the backup ID to query the instance topology information and filter the queried instances (including the number of nodes and replicas of instances). If this parameter is left blank, restore_time is used. |
restore_time |
No |
Specific point of time. If the backup ID is left blank, this parameter is used to query the instance topology information and filter the queried instances. |
source_instance_id |
No |
ID of the DB instance to be restored.
|
offset |
No |
Index offset. If offset is set to N, the resource query starts from the N+1 data entries. The default value is 0, indicating that the query starts from the first data entry. The value cannot be a negative number. |
limit |
No |
Number of records to be queried. The default value is 100. The value cannot be a negative number. The minimum value is 1 and the maximum value is 100. |
Request Parameters
None
Response Parameters
Parameter |
Type |
Description |
---|---|---|
instances |
Array of Objects |
Instances that can be used for backups and restorations. For details, see Table 3. |
total_count |
Integer |
Total number of queried instances. |
Parameter |
Type |
Description |
---|---|---|
instance_name |
String |
DB instance name. |
instance_id |
String |
Instance ID. |
volume_type |
String |
Storage type. |
data_volume_size |
Number |
Storage space, in GB |
version |
String |
Instance version |
mode |
String |
Deployment model.
|
instance_mode |
String |
Instance model.
|
Example Request
Querying instances that can be used for backups and restorations
GET https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/0611f1bd8b00d5d32f17c017f15b599f/restorable-instances?source_instance_id=88efb3753dc844829c380edff7798eecin14&backup_id=d3f223e9c35d450ea0692bdbff686e45br14
Example Response
Instances that can be used for backups and restorations queried.
{ "instances": [ { "instance_name": "gaussdb", "instance_id": "3ea6d6463c9a4baf9a47c5b74464307cin14", "volume_type": "ULTRAHIGH", "data_volume_size": 500, "version": "8.102", "mode": "Ha", "instance_mode": "enterprise" } ], "total_count": 1 }
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Code
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot