Querying Available DB Instances
API Description
This API is used to query DB instances to which a specified parameter template can be applied.
URI
Name |
Type |
IN |
Mandatory |
Description |
---|---|---|---|---|
X-Auth-Token |
string |
header |
Yes |
Definition User token obtained from IAM. For details, see Authentication. Constraints N/A Range N/A Default Value N/A |
project_id |
string |
path |
Yes |
Definition Project ID of a tenant in a region. Obtain the project ID by following the instructions in Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
Name |
Mandatory |
Type |
Description |
---|---|---|---|
config_id |
Yes |
String |
Definition Parameter template ID. Constraints N/A Range N/A Default Value N/A |
Name |
Mandatory |
Type |
Description |
---|---|---|---|
offset |
No |
Integer |
Definition Index offset. Constraints The value must be an integer. Range ≥ 0 Default Value 0: The query starts from the first data record. |
limit |
No |
Integer |
Definition Number of records to be queried. Constraints The value must be a positive integer. Range 1 to 100 Default Value 100 |
Request Parameters
None
Response Parameters
- Parameter description
Table 4 Response body parameters Name
Type
Description
instances
Array of Table 5-5 objects
Definition
List of instances to which the parameter template can be applied.
Range
N/A
Table 5 ApplicableInstancesInfo Name
Type
Description
instance_id
String
Definition
DB instance ID.
Range
N/A
instance_name
String
Definition
DB instance name.
Range
N/A
entities
Array of Table 6-6 objects
Definition
List of node group information or node information.
Range
For a replica set instance or single node instance, this parameter is not returned and the parameter template is directly applied to the corresponding DB instance.
For the shard or config group of a cluster instance, information about the node group of the corresponding instance is returned. For the mongos group of a cluster instance, information about the node of the corresponding instance is returned.
For example, a parameter template of the mongos node can be applied to one or more mongos nodes.
- Example response
{ instances:[ { "instance_id": "1967d9d9d6ef4c5ea38bd5a754f5737ein02", "instance_name": "dds-5425", "entities": [ { "entity_id": "36457a9af7c7486a882727d205ef37afgr02", "entity_name": "shard_1" }, { "entity_id": "a36651f1807f40be891db839e8bbe9e7gr02", "entity_name": "shard_2" } ] }, { "instance_id": "4809355b9836467c8749610089b1ef3bin02", "instance_name": "dds-9d67", "entities": [ { "entity_id": "08e61e50220c49728eb49dbb092d6ec4gr02", "entity_name": "shard_2" }, { "entity_id": "24d58cd41c20486e9745e7f5b424e641gr02", "entity_name": "shard_3" }, { "entity_id": "602807fcb2b24e38952347e030ec4a61gr02", "entity_name": "shard_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