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.
- Obtain the required region and endpoint.
Debugging
You can debug this API in API Explorer.
URI
GET /v3/{project_id}/instances/{instance_id}/public-ips
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | 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 | Yes | String | Definition Instance ID, which uniquely identifies an instance. For details about how to obtain the instance ID, see Querying DB Instances. Constraints N/A Range The value can contain 36 characters. Only letters and digits are allowed. Default Value N/A |
| offset | No | Integer | Definition Index offset. The query starts from the next piece of data indexed by this parameter. Constraints N/A Range ≥ 0 Default Value 0: The query starts from the first data record. |
| limit | No | Integer | Definition Number of records returned by a query. Constraints N/A Range 1–50 Default Value 50 |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Definition User token. You can obtain the token by calling the IAM API used to obtain a user token. After a response is returned, the value of X-Subject-Token in the response header is the token. Constraints N/A Range N/A Default Value N/A |
| X-Language | No | String | Definition Language. Constraints N/A Range
Default Value en-us |
Response Parameters
| Name | Type | Description |
|---|---|---|
| public_ips | Array of objects | Definition EIPs bound to an instance. For details, see Table 4. |
| total_count | Integer | Definition Total number of EIPs bound to an instance. Range N/A |
| Name | Type | Description |
|---|---|---|
| public_ip_id | String | Definition EIP ID. Range N/A |
| public_ip_type | String | Definition EIP type. Range
|
| 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
|
| bandwidth_size | Integer | Definition Bandwidth size, in Mbit/s. 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
- Normal
- Abnormal
For details, see Status Codes.
Error Codes
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot