Updated on 2025-07-29 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

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 contains 36 characters with a suffix of in07. Only letters and digits are allowed.

Default Value

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token. To obtain this value, call the IAM API for obtaining a user token.

The value of X-Subject-Token in the response header is the token value.

Constraints

N/A

Range

N/A

Default Value

N/A

X-Language

No

String

Definition

Request language type.

Constraints

N/A

Range

  • en-us

  • zh-cn

Default Value

en-us

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

can_enable_public_access

Boolean

Definition

Whether public access can be enabled.

Range

  • true: Public access can be enabled.

  • false: Public access cannot be enabled.

id

String

Definition

EIP ID.

Range

N/A

type

String

Definition

Network type of the EIP.

Range

  • 5_bgp: dynamic BGP

  • 5_sbgp: static BGP

  • 5_youxuanbgp: premium BGP

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

  • FREEZED: The EIP is frozen.

  • BIND_ERROR: The EIP failed to be bound.

  • BINDING: The EIP is being bound.

  • PENDING_DELETE: The EIP is being released.

  • PENDING_CREATE: The EIP is being created.

  • NOTIFYING: The EIP is being created.

  • NOTIFY_DELETE: The EIP is being released.

  • PENDING_UPDATE: The EIP is being updated.

  • DOWN: The EIP has not been bound.

  • ACTIVE: The EIP has been bound.

  • ELB: The EIP has been bound to a load balancer.

  • VPN: The EIP has been bound to a VPN.

  • ERROR: The EIP is failed.

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

  • PER: dedicated bandwidth

  • WHOLE: shared bandwidth

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

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.