Help Center/ GaussDB/ API Reference/ APIs (Recommended)/ Instance Management/ Querying EIPs Bound to a DB Instance
Updated on 2025-08-11 GMT+08:00

Querying EIPs Bound to a DB Instance

Function

This API is used to query EIPs bound to a DB instance. Before calling this API:

URI

GET /v3/{project_id}/instances/{instance_id}/public-ips?offset={offset}&limit={limit}
Table 1 Parameter description

Name

Type

Mandatory

Description

project_id

String

Yes

Definition

Project ID of a tenant in a region.

To obtain the value, see Obtaining a Project ID.

Constraints

N/A

Range

The value can contain 32 characters. Only letters and digits are allowed.

Default Value

N/A

instance_id

String

Yes

Definition

Instance ID, which uniquely identifies an instance.

Constraints

N/A

Range

The value can contain 36 characters. Only letters and digits are allowed.

Default Value

N/A

offset

Integer

No

Definition

Index offset. The query starts from the next piece of data indexed by this parameter.

Constraints

N/A

Range

The value must be a non-negative integer.

Default Value

0: The query starts from the first data record.

limit

Integer

No

Definition

Number of records returned by a query.

Constraints

N/A

Range

1–50

Default Value

50

Request Parameters

None

Response Parameters

Table 2 Parameter description

Name

Type

Description

public_ips

Array of objects

Definition

EIPs bound to an instance.

For details, see Table 3.

total_count

Integer

Definition

Total number of records.

Range

N/A

Table 3 public_ips field data structure description

Name

Type

Description

public_ip_id

String

Definition

EIP ID.

Range

N/A

public_ip_type

String

Definition

EIP type.

Range

N/A

port_id

String

Definition

Port ID.

Range

N/A

public_ip_address

String

Definition

EIP.

Range

N/A

private_ip_address

String

Definition

Private IP address.

Range

N/A

bandwidth_id

String

Definition

Bandwidth ID.

Range

N/A

bandwidth_name

String

Definition

Bandwidth name.

Range

N/A

bandwidth_share_type

String

Definition

Bandwidth sharing type.

Range

N/A

bandwidth_size

Integer

Definition

Bandwidth range.

Range

N/A

applied_at

String

Definition

Modification time in the yyyy-mm-ddThh:mm:ssZ format. T is the separator between calendar and hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the offset is +08:00.

Range

N/A

Example Request

Querying EIPs bound to a DB instance

https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/599628f2665841b2a66fa2780fadc025/instances/e0984e23578c4296950336e613d99d32in14/public-ips?offset=0&limit=1

Example Response

EIPs bound to the instance queried.

{ 
  "public_ips" : [ {
  "public_ip_id" : "78458261-5175-4254-8242-5959115d379a",
  "public_ip_type" : "5_g-vm",
  "port_id" : "a8d606bf-7e20-463d-afed-b7fc2909aa7d",
  "public_ip_address" : "100.95.156.144",
  "private_ip_address" : "192.168.0.133",
  "applied_at" : "2022-08-09T03:06:52+0800",
  "bandwidth_id" : "7ae23d75-3150-4957-94ae-9352b15f140e",
  "bandwidth_name" : "Bandwidth_2021-12-08-16-39-27",
  "bandwidth_size" : 5,
  "bandwidth_share_type" : "PER"
 } ],
  "total_count" : 1
}

Status Codes

Error Codes

For details, see Error Codes.