Help Center/ Document Database Service/ API Reference/ APIs V3.0 (Recommended)/ DB Instance Management/ Querying Access Across CIDR Blocks for a Replica Set Instance
Updated on 2023-12-28 GMT+08:00

Querying Access Across CIDR Blocks for a Replica Set Instance

API Description

This API is used to query access across CIDR blocks for a replica set instance.

Restrictions

This API applies only to replica set instances.

URI

  • URI format

    GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/client-network

  • URI example

    https://dds.ap-southeast-1.myhuaweicloud.com/v3/0d248ca90800d3902f79c014f11df3b8/instances/593416e7c9da4a4c97c6ad5b086b8ddfin02/client-network

    Table 1 Request parameters

    Parameter

    Mandatory

    Type

    Description

    X-Auth-Token

    Yes

    String

    User token obtained from IAM. For details, see Authentication.

    project_id

    Yes

    String

    Project ID of a tenant in a region. Obtain the project ID by following the instructions in Obtaining a Project ID.

    instance_id

    Yes

    String

    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.

Requests

  • Parameter description

    None

  • Example request

    None

Responses

  • Parameter description
    Table 2 Response body parameters

    Parameter

    Type

    Description

    instance_id

    String

    DB instance ID.

    client_network_ranges

    Array of strings

    CIDR block where the client is located.

    • Access across CIDR blocks is required only when the CIDR blocks of the client and the replica set instance are different. For example, if the client CIDR block is 192.168.0.0/16 and the replica set instance's CIDR block is 172.16.0.0/24, add the CIDR block 192.168.0.0/16 so that the client can access the replica set instance.
    • This function is available only for replica sets.
  • Example response
    {
      "instance_id": "f400017ff2184ee1bad45f3f247f4936in02",
      "client_network_ranges": [
        "173.12.10.0/9",
        "132.22.1.1/10"
      ]
    }

Status Code

For details, see Status Code.

Error Code

For details, see Error Code.