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 /v3.1/{project_id}/restorable-instances
Parameter |
Mandatory |
Description |
---|---|---|
project_id |
Yes |
Definition Project ID of a tenant in a region. To obtain the value, see Obtaining a Project ID. Constraints N/A Range The value can contain 32 characters. Only letters and digits are allowed. Default Value N/A |
backup_id |
No |
Definition 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. Constraints N/A Range N/A Default Value N/A |
restore_time |
No |
Definition 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. Constraints N/A Range N/A Default Value N/A |
source_instance_id |
No |
Definition ID of the DB instance to be restored. Constraints
Range N/A Default Value N/A |
offset |
No |
Definition Index offset. The query starts from the next piece of data indexed by this parameter. Constraints The value must be a non-negative integer. Range N/A Default Value 0: The query starts from the first data record. |
limit |
No |
Definition Number of records returned by a query. Constraints N/A Range [1,100] Default Value 100 |
Request Parameters
None
Response Parameters
Parameter |
Type |
Description |
---|---|---|
instances |
Array of objects |
Definition Instances that can be used for backups and restorations. For details, see Table 3. |
total_count |
Integer |
Definition Total number of queried instances. Range N/A |
Parameter |
Type |
Description |
---|---|---|
instance_name |
String |
Definition DB instance name. Range N/A |
instance_id |
String |
Definition Instance ID. Range N/A |
volume_type |
String |
Definition Storage type. Range N/A |
data_volume_size |
Number |
Definition Storage space, in GB Range N/A |
version |
String |
Definition Instance version. Range N/A |
mode |
String |
Definition Deployment model. Range
|
instance_mode |
String |
Definition Instance model. Range
|
Example Request
Querying instances that can be used for backups and restorations
GET https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3.1/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": "V2.0-8.102", "mode": "Ha", "instance_mode": "enterprise" } ], "total_count": 1 }
Status Codes
- Normal
- Abnormal
For details, see Status Codes.
Error Codes
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