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 |
Definition: Project ID of a tenant in a region. To obtain this 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. Constraints: N/A Range: The value can contain 36 characters with a suffix of in07. Only letters and digits are allowed. Default value: N/A |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Definition: Project ID of a tenant in a region. To obtain this 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 |
|
Content-Type |
Yes |
String |
Definition: Content type. Constraints: N/A Range: application/json Default value: application/json |
|
X-Language |
No |
String |
Definition: Request language type. Constraints: N/A Range: Default value: en-us |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
can_enable_public_access |
Boolean |
Definition: Whether public access can be enabled. Range: |
|
id |
String |
Definition: EIP ID. Range: N/A |
|
type |
String |
Definition: Network type of the EIP. 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 bound to the EIP Range: N/A |
|
status |
String |
Definition: EIP status. Range: |
|
tenant_id |
String |
Definition: Tenant ID. Range: N/A |
|
create_time |
String |
Definition: Time when the EIP was assigned. Range: N/A |
|
bandwidth_id |
String |
Definition: Bandwidth ID. Range: N/A |
|
bandwidth_name |
String |
Definition: Bandwidth name. Range: N/A |
|
bandwidth_size |
String |
Definition: Bandwidth, in Mbit/s Range: N/A |
|
bandwidth_share_type |
String |
Definition: Bandwidth type. Range: |
|
profile |
Object |
Definition: Additional parameters, including the order ID and product ID. If profile is not empty, the EIP is billed on a yearly/monthly basis. Range: N/A |
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.