Help Center> GaussDB> API Reference> APIs (Recommended)> Instance Management> Querying EIPs Bound to a DB Instance
Updated on 2024-05-21 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 https://{Endpoint}/v3/{project_id}/instances/{instance_id}/public-ips?offset={offset}&limit={limit}
Table 1 Parameter description

Name

Type

Mandatory

Description

project_id

String

Yes

Project ID of a tenant in a region.

For details about how to obtain the project ID, see Obtaining a Project ID.

instance_id

String

Yes

DB instance ID.

offset

Integer

No

Index offset. If offset is set to N, the resource query starts from the N+1 piece of data. The value is 0 by default, indicating that the query starts from the first piece of data. The value cannot be a negative number.

limit

Integer

No

Number of records to be queried. The default value is 50. The value cannot be a negative number. The minimum value is 1 and the maximum value is 50.

Request Parameters

None

Response Parameters

Table 2 Parameter description

Name

Type

Description

public_ips

Array of objects

EIPs bound to an instance.

For details, see Table 3.

total_count

Integer

Total number of records.

Table 3 public_ips field data structure description

Name

Type

Description

public_ip_id

String

EIP ID.

public_ip_type

String

EIP type.

port_id

String

Port ID.

public_ip_address

String

EIP.

private_ip_address

String

Private IP address.

bandwidth_id

String

Bandwidth ID.

bandwidth_name

String

Bandwidth name.

bandwidth_share_type

String

Bandwidth sharing type.

bandwidth_size

Integer

Bandwidth range.

applied_at

String

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.

Example Request

Querying EIPs bound to a DB instance

GET https://gaussdb-opengauss.cn-north-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 Code

Error Code

For details, see Error Codes.