Querying DB Instances Available for Creating a Schema
Function
This API is used to query DB instances that can be used for creating a schema.
Constraints
None
URI
GET /v1/{project_id}/instances/{instance_id}/rds
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID of a tenant in a region |
instance_id |
Yes |
String |
DDM instance ID |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token It can be obtained by calling the IAM API (value of X-Subject-Token in the response header). |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
instances |
Array of instances objects |
Information about DB instances available for creating a schema |
Parameter |
Type |
Description |
---|---|---|
id |
String |
DB instance ID |
projectId |
String |
Project ID of a tenant in a region |
status |
String |
DB instance status |
name |
String |
DB instance name |
engineName |
String |
DB instance engine |
engineSoftwareVersion |
String |
DB instance engine |
privateIp |
String |
Private IP address of the DB instance |
mode |
String |
Deployment model of the DB instance, which can be clustered or single |
port |
Integer |
DB instance port number |
azCode |
String |
AZ code |
timeZone |
String |
Time zone |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
errCode |
String |
Service error code |
externalMessage |
String |
Error message |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
errCode |
String |
Service error code |
externalMessage |
String |
Error message |
Example Request
GET https://{endpoint}/v1/{project_id}/instances/{instance_id}/rds
Example Response
Status code: 200
OK
{ "instances": [ { "id": "a44a103e64634a2e872d1ab2523bb838in01", "projectId": "070c071d8e80d58c2f42c0121b10cf9f", "status": "normal", "name": "rds-ab04-test", "engineName": "mysql", "engineSoftwareVersion": "8.0", "privateIp": "192.168.0.72", "mode": "Single", "port": 3306, "azCode": "az1xahz", "timeZone": "UTC+08:00" } ] }
Status code: 400
bad request
{ "externalMessage" : "Parameter error.", "errCode" : "DBS.280001" }
Status code: 500
server error
{ "externalMessage" : "Parameter error.", "errCode" : "DBS.280001" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
bad request |
500 |
server error |
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