Updated on 2024-09-11 GMT+08:00

Querying an EIP

Function

This API is used to query an EIP. Before calling this API:

URI

GET /v3/{project_id}/instances/{instance_id}/eip

Table 1 URI parameters

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

Table 2 Request header 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

Table 3 Response body parameters

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

Table 4 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 500

Table 5 Response body parameters

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.