Help Center/ GeminiDB/ API Reference/ APIs v3 (Recommended)/ Instances/ Querying IP Addresses Required for Creating an Instance or Adding Nodes
Updated on 2024-08-08 GMT+08:00

Querying IP Addresses Required for Creating an Instance or Adding Nodes

Function

This API is used to query IP addresses required for creating an instance or adding nodes to an instance.

Constraints

This API supports the following types of instances:

  • GeminiDB Cassandra
  • GeminiDB Mongo
  • GeminiDB Influx
  • GeminiDB Redis

URI

GET https://{Endpoint}/v3/{project_id}/ip-num-requirement

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID.

Table 2 Query parameters

Parameter

Mandatory

Type

Description

node_num

Yes

Integer

Nodes required for creating or scaling out an instance The maximum value is 200.

engine_name

No

String

DB API name. If no instance ID is transferred, this parameter is mandatory. The value can be:

  • cassandra, indicating GeminiDB Cassandra API.
  • mongodb, indicating GeminiDB Mongo API
  • influxdb, indicating GeminiDB Influx API.
  • redis, indicating GeminiDB Redis API.

instance_mode

No

String

Instance type. The value can be: If no instance ID is transferred, this parameter is mandatory. The value can be:

  • Cluster, indicating that the instance is a GeminiDB Cassandra, GeminiDB Influx, or GeminiDB Redis replica set instance.
  • ReplicaSet, indicating that the instance is a GeminiDB Mongo replica set instance.

instance_id

No

String

Instance ID, which can be obtained by calling the API described in Querying Instances and Details. If there are no instances available, call the API described in Creating an Instance to create one.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

count

Integer

Number of IP addresses used.

Example Requests

  • URI example
    GET https://gaussdb-nosql.ap-southeast-1.myhuaweicloud.com/v3/375d8d8fad1f43039e23d3b6c0f60a19/ip-num-requirement?node_num=3&engine_name=cassandra&instance_mode=Cluster
  • Example request body

    None

Example Responses

Status code: 200

Success

{ 
  "count" : 3 
}

Status Codes

For details, see Status Codes.

Error Codes

For details, see Error Codes.