Updated on 2025-08-22 GMT+08:00

Querying Available DB Instances

API Description

This API is used to query DB instances to which a specified parameter template can be applied.

URI

  • URI format

    GET https://{Endpoint}/v3/{project_id}/configurations/{config_id}/applicable-instances

  • URI example

    https://dds.ap-southeast-1.myhuaweicloud.com/v3/056538411200d4cd2f79c003c7606412/configurations/7a8d539ba30f43adaf1b16d08b1df4bdpr02/applicable-instances

Table 1 Request parameters

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

Table 2 Path parameters

Name

Mandatory

Type

Description

config_id

Yes

String

Definition

Parameter template ID.

Constraints

N/A

Range

N/A

Default Value

N/A

Table 3 Query parameters

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.

    Table 6 EntityInfo

    Name

    Type

    Description

    entity_id

    String

    Definition

    Group ID or node ID.

    Range

    N/A

    entity_name

    String

    Definition

    Group name or node name.

    Range

    N/A

  • 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.