Obtaining the List of Databases That Can Be Restored
Function
This API is used to obtain the list of databases that can be restored.
Constraints
This API applies only to replica sets.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
dds:backup:getRestoreDatabases
list
-
-
dds:instance:list
-
URI
|
Name |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition Project ID. To obtain the project ID, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
|
instance_id |
Yes |
String |
Definition Instance ID, which can be obtained by calling the API described in Querying Instances and Details. If you do not have an instance, call the API described in Creating a DB Instance to create one. Constraints N/A Range N/A Default Value N/A |
|
Name |
Mandatory |
Type |
Description |
|---|---|---|---|
|
restore_time |
Yes |
String |
Definition Restoration time point. The value is a UNIX timestamp, in milliseconds. The time zone is UTC. Constraints N/A Range N/A Default Value N/A |
|
offset |
No |
Integer |
Definition Index offset. Constraints The value must be greater than or equal to 0. Range N/A Default Value 0. The query offset is 0 by default. |
|
limit |
No |
Integer |
Definition Maximum records to be queried. Constraints N/A Range 1–100 Default Value 100: 100 instances are queried by default. |
Request Parameters
|
Name |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Definition User token obtained from IAM. For details, see Authentication. Constraints N/A Range N/A Default Value N/A |
Response Parameters
|
Name |
Mandatory |
Type |
Description |
|---|---|---|---|
|
databases |
Yes |
Array of String |
Definition Indicates the database list. Each element in the list indicates a database. Range N/A |
|
total_count |
Yes |
Integer |
Definition Indicates the total number of databases. Range N/A |
Example Request
GET https://{endpoint}/v3/056538411200d4cd2f79c003c7606412/instances/d5833c2854a4486cb7960f829269e211in02/restore-database?restore_time=1607689584000&limit=10&offset=1
Example Response
{
"databases": [
"test_db"
],
"total_count": 1
}
SDK
Click Document Database Service DDS SDK to download the SDK or view the SDK document. To learn how to install and authenticate an SDK, read the Usage section.
Status Code
For more information, see Status Code.
Error Code
For more information, see Error Code.
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