Querying EIPs Bound to a DB Instance
Function
This API is used to query EIPs bound to a DB instance. Before calling this API:
- Learn how to authenticate this API.
URI
| Name | Type | Mandatory | Description |
|---|---|---|---|
| project_id | String | Yes | Explanation: Project ID of a tenant in a region. For details about how to obtain the project ID, see Obtaining a Project ID. Restrictions: None Value range: The value can contain 32 characters. Only letters and digits are allowed. Default value: None |
| 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 data entry. The default value is 0, indicating that the query starts from the first data entry. 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
| 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. |
| 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.eu-west-101.myhuaweicloud.eu/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
- Normal
- Abnormal
For details, see Status Codes.
Error Code
For details, see Error Codes.