Querying an EIP
Function
This API is used to query an EIP. Before calling this API:
- Learn how to authorize and authenticate it.
- Obtain the required region and endpoint.
URI
GET /v3/{project_id}/instances/{instance_id}/eip
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. |
instance_id |
Yes |
String |
Instance ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. To obtain the value, call the API for obtaining a user token. The value of X-Subject-Token in the response header is the token value. |
Content-Type |
Yes |
String |
Content type. Value: application/json |
X-Language |
No |
String |
Language. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
can_enable_public_access |
Boolean |
Whether public access can be enabled. |
id |
String |
EIP ID. |
type |
String |
Network type of the EIP. |
port_id |
String |
Port ID. |
public_ip_address |
String |
EIP. |
private_ip_address |
String |
Private IP address. |
status |
String |
EIP status. |
tenant_id |
String |
Tenant ID. |
create_time |
String |
Creation time. |
bandwidth_id |
String |
Bandwidth ID. |
bandwidth_name |
String |
Bandwidth name. |
bandwidth_size |
String |
Bandwidth size. |
bandwidth_share_type |
String |
Bandwidth type. The value can be PER or WHOLE. |
profile |
Object |
Additional parameters, including the order ID and product ID. If profile is not empty, the EIP is billed on a yearly/monthly basis. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Example Request
Querying an EIP
GET https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/12a49c2dc32648df8dd25e2976f70180in07/eip
Example Response
Status code: 200
Success.
{ "can_enable_public_access" : true, "id" : "45a0ed37-cfa7-4403-8aeb-d720b4e831cf", "type" : "5_bgp", "port_id" : "2c02dc5b-a136-4921-b7ad-27e084548616", "public_ip_address" : "10.83.35.151", "private_ip_address" : "172.16.1.137", "status" : "ACTIVE", "tenant_id" : "23a50154cf494ec9ad6883979a12db0a", "create_time" : "2024-04-09 13:42:11", "bandwidth_id" : "2a4b2bc5-2a0a-42df-8f13-2fbe3d8bbbb2", "bandwidth_name" : "bandwidth-d3f4", "bandwidth_size" : 1, "bandwidth_share_type" : "PER", "profile" : { } }
Status Code
Status Code |
Description |
---|---|
200 |
Success. |
400 |
Client error. |
500 |
Server error. |
Error Code
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