All Products
Search
Document Center

Virtual Private Cloud:DescribeEipAddresses

Last Updated:Dec 02, 2023

Queries elastic IP addresses (EIPs) created in a region.

Operation Description

You can call this operation to query information about EIPs in a region, including maximum bandwidth, billing methods, and associated instances.

debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

debugging

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the EIP.

You can call the DescribeRegions operation to query the region ID.

cn-hangzhou
IncludeReservationDatabooleanNo

Specifies whether to return information about pending orders. Valid values:

  • false (default)
  • true
false
StatusstringNo

The state of the EIP. Valid values:

  • Associating
  • Unassociating
  • InUse
  • Available
  • Releasing
Available
EipAddressstringNo

The EIP that you want to query.

You can specify up to 50 EIPs. Separate multiple EIPs with commas (,).

Note If both EipAddress and AllocationId are specified, you can specify up to 50 EIPs for EipAddress, and specify up to 50 EIP IDs for AllocationId.
47.75.XX.XX
AllocationIdstringNo

The ID of the EIP that you want to query.

You can specify up to 50 EIP IDs. Separate multiple IDs with commas (,).

Note If both EipAddress and AllocationId are specified, you can specify up to 50 EIP IDs for AllocationId, and specify up to 50 EIPs for EipAddress.
eip-2zeerraiwb7ujxscd****
SegmentInstanceIdstringNo

The ID of the contiguous EIP group.

eipsg-t4nr90yik5oy38xdy****
ResourceGroupIdstringNo

The ID of the resource group to which the EIP belongs.

rg-acfmxazb4pcdvf****
PageNumberintegerNo

The page number. Default value: 1.

10
PageSizeintegerNo

The number of entries per page. Valid values: 1 to 100. Default value: 10.

10
ISPstringNo

The line type. Valid values:

  • BGP (default): Border Gateway Protocol (BGP) (Multi-ISP) lines. All regions support BGP (Multi-ISP) EIPs.
  • BGP_PRO: BGP (Multi-ISP) Pro lines. Only the following regions support BGP (Multi-ISP) Pro lines: China (Hong Kong), Singapore, Japan (Tokyo), Malaysia (Kuala Lumpur), Philippines (Manila), Indonesia (Jakarta), and Thailand (Bangkok).

For more information about BGP (Multi-ISP) and BGP (Multi-ISP) Pro, see the Line types section of the "What is EIP?" topic.

If you are allowed to use single-ISP bandwidth, you can also use one of the following values:

  • ChinaTelecom
  • ChinaUnicom
  • ChinaMobile
  • ChinaTelecom_L2
  • ChinaUnicom_L2
  • ChinaMobile_L2

If your services are deployed in China East 1 Finance, this parameter is required and you must set the value to BGP_FinanceCloud.

BGP
Filter.1.KeystringNo

The filter key used to query resources. Set the value to CreationStartTime, which specifies the time when the system started to create the resource.

CreationStartTime
Filter.2.KeystringNo

The filter key used to query resources. Set the value to CreationEndTime, which specifies the time when the system finished creating the resource.

CreationEndTime
Filter.1.ValuestringNo

The filter value used to query resources. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mmZ format. The time must be in Coordinated Universal Time (UTC).

2023-01-01T01:00Z
Filter.2.ValuestringNo

The filter value used to query resources. Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mmZ format. The time must be in UTC.

2023-01-06T02:00Z
LockReasonstringNo

The reason why the EIP is locked. Valid values:

  • financial: The EIP is locked due to overdue payments.
  • security: The EIP is locked for security reasons.
financial
AssociatedInstanceTypestringNo

The type of the cloud resource with which you want to associate the EIP. Valid values:

  • EcsInstance (default): an Elastic Compute Service (ECS) instance in a virtual private cloud (VPC).
  • SlbInstance: a Server Load Balancer (SLB) instance in a VPC.
  • Nat: a NAT gateway.
  • HaVip: a high-availability virtual IP address (HAVIP).
  • NetworkInterface: a secondary elastic network interface (ENI).
  • IpAddress: an IP address.
Note You can associate only one EIP with each ECS instance, SLB instance, HAVIP, or IP address. You can associate multiple EIPs with each NAT gateway. The number of EIPs that you can associate with a secondary ENI depends on the association mode. For more information, see Associate EIPs with and disassociate EIPs from cloud resources.
EcsInstance
AssociatedInstanceIdstringNo

The ID of the instance associated with the EIP.

i-2zebb08phyccdvf****
ChargeTypestringNo

The billing method of the EIP. Valid values:

  • PostPaid: pay-as-you-go.
  • PrePaid: subscription.
PostPaid
DryRunbooleanNo

Specifies whether to perform only a dry run, without performing the actual request. Valid values:

  • true: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the DryRunOperation error code is returned.
  • false (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.
false
EipNamestringNo

The name of the EIP.

The name must be 1 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter.

EIP-01
Tagobject []No

The tags used to filter EIPs.

KeystringNo

The key of the tag. You can specify up to 20 tag keys. The tag key cannot be an empty string.

The tag key can be up to 128 characters in length and cannot contain http:// or https://. The tag key cannot start with acs: or aliyun.

FinanceDept
ValuestringNo

The value of the tag. You can specify up to 20 tag values. The tag value can be an empty string.

The tag value can be up to 128 characters in length and cannot contain http:// or https://. The tag value cannot start with acs: or aliyun.

FinanceJoshua
SecurityProtectionEnabledbooleanNo

Specifies whether to enable Anti-DDoS Pro/Premium. Valid values:

  • false (default)
  • true
false
PublicIpAddressPoolIdstringNo

The IP address pool to which the EIP that you want to query belongs.

pippool-2vc0kxcedhquybdsz****

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

PageSizeinteger

The number of entries per page.

10
RequestIdstring

The request ID.

4EC47282-1B74-4534-BD0E-403F3EE64CAF
PageNumberinteger

The page number.

10
TotalCountinteger

The total number of entries returned.

1
EipAddressesobject []

The details about the EIPs.

ReservationActiveTimestring

The time when the renewal took effect. The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format.

2021-05-23T16:00:00Z
Statusstring

The state of the EIP. Valid values:

  • Associating
  • Unassociating
  • InUse
  • Available
  • Releasing
Available
ReservationOrderTypestring

The type of the renewal order. Valid values:

  • RENEWCHANGE: renewal with an upgrade or a downgrade.
  • TEMP_UPGRADE: temporary upgrade.
  • UPGRADE: upgrade.
RENEWCHANGE
AllocationTimestring

The time when the EIP was created. The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format.

2021-04-23T01:37:38Z
Netmodestring

The network type. Only public may be returned.

public
ChargeTypestring

The billing method of the EIP. Valid values:

  • PostPaid: pay-as-you-go.
  • PrePaid: subscription.
PostPaid
Descriptionstring

The description of the EIP.

abc
SegmentInstanceIdstring

The ID of the contiguous EIP group.

This value is returned only when you query contiguous EIPs.

eipsg-t4nr90yik5oy38xd****
ReservationInternetChargeTypestring

The metering method that is used after the renewal takes effect. Valid values:

  • PayByBandwidth: pay-by-bandwidth.
  • PayByTraffic: pay-by-traffic.
PayByBandwidth
BandwidthPackageIdstring

The ID of the Internet Shared Bandwidth instance.

cbwp-bp1ego3i4j07ccdvf****
IpAddressstring

The EIP.

47.75.XX.XX
Bandwidthstring

The maximum bandwidth of the EIP. Unit: Mbit/s.

5
ReservationBandwidthstring

The maximum bandwidth after the renewal takes effect. Unit: Mbit/s.

12
EipBandwidthstring

The maximum bandwidth of the EIP when it is not associated with an Internet Shared Bandwidth instance. Unit: Mbit/s.

101
Namestring

The name of the EIP.

EIP-01
InstanceRegionIdstring

The region ID of the associated instance.

cn-hangzhou
DeletionProtectionboolean

Indicates whether deletion protection is enabled. Valid values:

  • true
  • false
true
InstanceIdstring

The ID of the associated instance.

i-bp15zckdt37cdvf****
SecondLimitedboolean

Indicates whether level-2 throttling is configured. Valid values:

  • true
  • false
false
InstanceTypestring

The type of the associated instance. Valid values:

  • EcsInstance: an ECS instance in a VPC.
  • SlbInstance: an SLB instance in a VPC.
  • Nat: a NAT gateway.
  • HaVip: an HAVIP.
  • NetworkInterface: a secondary ENI.
  • IpAddress: an IP address.
EcsInstance
HDMonitorStatusstring

Indicates whether fine-grained monitoring is enabled for the EIP. Valid values:

  • false
  • true
false
RegionIdstring

The region ID of the EIP.

cn-hangzhou
BandwidthPackageBandwidthstring

The maximum bandwidth of the Internet Shared Bandwidth instance with which the EIP is associated. Unit: Mbit/s.

50
ServiceManagedinteger

Indicates whether the resource is created by the service account. Valid values:

  • 0: The resource is not created by the service account.
  • 1: The resource is created by the service account.
0
ExpiredTimestring

The time when the EIP expires. The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format.

2021-05-23T02:00:00Z
ResourceGroupIdstring

The ID of the resource group.

rg-acfmxazcdxs****
AllocationIdstring

The ID of the EIP.

eip-2zeerraiwb7ujcdvf****
InternetChargeTypestring

The metering method of the EIP. Valid values:

  • PayByBandwidth: pay-by-bandwidth.
  • PayByTraffic: pay-by-traffic.
PayByBandwidth
BusinessStatusstring

The service state of the EIP. Valid values:

  • Normal
  • FinancialLocked
Normal
BandwidthPackageTypestring

The type of the bandwidth. Only CommonBandwidthPackage may be returned, which indicates Internet Shared Bandwidth.

CommonBandwidthPackage
HasReservationDatastring

Indicates whether renewal data is included. Valid values:

  • false
  • true A value of true is returned only when IncludeReservationData is set to true and some orders have not taken effect.
false
ISPstring

The line type. Valid values:

  • BGP: BGP (Multi-ISP) lines. All regions support BGP (Multi-ISP) EIPs.
  • BGP_PRO: BGP (Multi-ISP) Pro lines. Only the following regions support BGP (Multi-ISP) Pro lines: China (Hong Kong), Singapore, Japan (Tokyo), Malaysia (Kuala Lumpur), Philippines (Manila), Indonesia (Jakarta), and Thailand (Bangkok).

For more information about BGP (Multi-ISP) and BGP (Multi-ISP) Pro, see the Line types section of the "What is EIP?" topic.

If you are allowed to use single-ISP bandwidth, one of the following values may be returned:

  • ChinaTelecom
  • ChinaUnicom
  • ChinaMobile
  • ChinaTelecom_L2
  • ChinaUnicom_L2
  • ChinaMobile_L2

If your services are deployed in China East 1 Finance, BGP_FinanceCloud is returned.

BGP
OperationLocksobject []

The details about the locked EIP.

LockReasonstring

The reason why the EIP is locked. Valid values:

  • financial: The EIP is locked due to overdue payments.
  • security: The EIP is locked for security reasons.
financial
Tagsobject []

The tags of the EIP.

Keystring

The tag key of the EIP.

KeyTest
Valuestring

The tag value of the EIP.

ValueTest
SecurityProtectionTypesarray

The edition of Anti-DDoS.

  • If an empty value is returned, it indicates that Anti-DDoS Origin Basic is used.
  • If AntiDDoS_Enhanced is returned, it indicates that Anti-DDoS Pro/Premium is used.
string

The edition of Anti-DDoS.

  • If an empty value is returned, it indicates that Anti-DDoS Origin Basic is used.
  • If AntiDDoS_Enhanced is returned, it indicates that Anti-DDoS Pro/Premium is used.
AntiDDoS_Enhanced
PublicIpAddressPoolIdstring

The ID of the IP address pool to which the EIP belongs.

pippool-2vc0kxcedhquybdsz****
VpcIdstring

The ID of the VPC in which an IPv4 gateway is created and that is deployed in the same region as the EIP.

When you associate an EIP with an IP address, the system can enable the IP address to access the Internet based on VPC route configurations.

Note This parameter is returned if the value of InstanceType is IpAddress. In this case, the EIP is associated with an IP address.
vpc-bp15zckdt37pq72zv****
Zonestring

The zone of the EIP.

This parameter is returned only when the service type is CloudBox.

cn-hangzhou-a
BizTypestring

The service type. Valid values:

  • CloudBox Only cloud box users can select this type.
  • Default (default)
CloudBox

Examples

Sample success responses

JSONformat

{
  "PageSize": 10,
  "RequestId": "4EC47282-1B74-4534-BD0E-403F3EE64CAF",
  "PageNumber": 10,
  "TotalCount": 1,
  "EipAddresses": {
    "EipAddress": [
      {
        "ReservationActiveTime": "2021-05-23T16:00:00Z",
        "Status": "Available",
        "ReservationOrderType": "RENEWCHANGE",
        "AllocationTime": "2021-04-23T01:37:38Z",
        "Netmode": "public",
        "ChargeType": "PostPaid",
        "Description": "abc",
        "SegmentInstanceId": "eipsg-t4nr90yik5oy38xd****",
        "ReservationInternetChargeType": "PayByBandwidth",
        "BandwidthPackageId": "cbwp-bp1ego3i4j07ccdvf****",
        "IpAddress": "47.75.XX.XX",
        "Bandwidth": "5",
        "ReservationBandwidth": "12",
        "EipBandwidth": "101",
        "Name": "EIP-01",
        "InstanceRegionId": " cn-hangzhou",
        "DeletionProtection": true,
        "InstanceId": "i-bp15zckdt37cdvf****",
        "SecondLimited": false,
        "InstanceType": "EcsInstance",
        "HDMonitorStatus": "false",
        "RegionId": "cn-hangzhou",
        "BandwidthPackageBandwidth": "50",
        "ServiceManaged": 0,
        "ExpiredTime": "2021-05-23T02:00:00Z",
        "ResourceGroupId": "rg-acfmxazcdxs****",
        "AllocationId": "eip-2zeerraiwb7ujcdvf****",
        "InternetChargeType": "PayByBandwidth",
        "BusinessStatus": "Normal",
        "BandwidthPackageType": "CommonBandwidthPackage",
        "HasReservationData": "false",
        "ISP": "BGP",
        "OperationLocks": {
          "LockReason": [
            {
              "LockReason": "financial"
            }
          ]
        },
        "Tags": {
          "Tag": [
            {
              "Key": "KeyTest",
              "Value": "ValueTest"
            }
          ]
        },
        "SecurityProtectionTypes": {
          "SecurityProtectionType": [
            "AntiDDoS_Enhanced"
          ]
        },
        "PublicIpAddressPoolId": "pippool-2vc0kxcedhquybdsz****",
        "VpcId": "vpc-bp15zckdt37pq72zv****",
        "Zone": "cn-hangzhou-a",
        "BizType": "CloudBox"
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidIAssociatedInstanceType.ValueNotSupportedThe specified value of AssociatedInstanceType is not supported.The AssociatedInstanceType parameter is set to an invalid value.
400InvalidChargeType.ValueNotSupportedThe specified ChargeType is not supported.The specified billing method is not supported. Specify a supported billing method.
400InvalidAliuidUser Id is not valid.-
400InvalidResourceGroupIdThe specified ResourceGroupId does not exist.The specified resource group ID does not exist.
400InstanceType.InvalidInstanceType is not null-
400InstanceIdLength.ExceedInstanceId length is exceed-
400InvalidTagKeyThe tag keys are not valid.The tag index is invalid.
400InvalidTagValueThe tag values are not valid.The tag value is invalid.
400OperationUnsupported.ResourceGroupIdResourceGroup is not supported in this region.ResourceGroup is not supported in this region.
400IellgalParameter.OwnerAccountThe specified parameter OwnerAccount is not valid.-
404InvalidFilterValueThe specified FilterValue is not supported.-
404Forbidden.RegionNotFoundSpecified region is not found during access authentication.The specified region does not exist. Check whether the specified region ID is valid.
404InvalidFilterKey.NotFoundThe specified Filterkey is not supported.-
404InvalidLockReason.NotFoundThe specified LockReason is not foundThe reason why the instance is locked is unknown.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-08-09The error codes of the API operation change.see changesets
Change itemChange content
Error CodesThe error codes of the API operation change.
    delete Error Codes: 400
    delete Error Codes: 404
2023-08-09API Description Update,The error codes of the API operation change.,The input parameters of the API operation change.see changesets
Change itemChange content
API DescriptionAPI Description Update
Error CodesThe error codes of the API operation change.
    delete Error Codes: 400
    delete Error Codes: 404
Input ParametersThe input parameters of the API operation change.
    Added Input Parameters: Tag
2023-08-08The error codes of the API operation change.,The response structure of the API operation changes.see changesets
Change itemChange content
Error CodesThe error codes of the API operation change.
    delete Error Codes: 400
    delete Error Codes: 404
Output ParametersThe response structure of the API operation changes.
2022-12-02The error codes of the API operation change.,The response structure of the API operation changes.see changesets
Change itemChange content
Error CodesThe error codes of the API operation change.
    delete Error Codes: 400
    delete Error Codes: 404
Output ParametersThe response structure of the API operation changes.