All Products
Search
Document Center

:DescribeEipAddresses

最終更新日:Aug 30, 2023

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

Usage notes

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

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter

Type

Required

Example

Description

Action String Yes DescribeEipAddresses

The operation that you want to perform. Set the value to DescribeEipAddresses.

RegionId String Yes cn-hangzhou

The region ID of the EIP.

You can call the DescribeRegions operation to query the most recent region list.

IncludeReservationData Boolean No false

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

  • false (default)

  • true

Status String No Available

The status of the EIP. Valid values:

  • Associating

  • Unassociating

  • InUse

  • Available

  • Releasing
EipAddress String No 47.75.XX.XX

The IP address of the EIP that you want to query.

You can enter up to 50 IP addresses of EIPs. Separate IP addresses with commas (,).

Note

If both EipAddress and AllocationId are specified, you can enter up to 50 IP addresses of EIPs in EipAddress, and enter up to 50 IDs of EIPs in AllocationId.

AllocationId String No eip-2zeerraiwb7ujxscd****

The ID of the EIP that you want to query.

You can enter up to 50 IDs of EIPs. Separate IDs with commas (,).

Note

If both EipAddress and AllocationId are set, you can enter up to 50 IDs of EIPs in AllocationId, and enter up to 50 IP addresses of EIPs in EipAddress.

SegmentInstanceId String No eipsg-t4nr90yik5oy38xdy****

The ID of the contiguous EIP group.

ResourceGroupId String No rg-acfmxazb4pcdvf****

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

PageNumber Integer No 10

The number of the page to return. Default value: 1.

PageSize Integer No 10

The number of entries per page. Maximum value: 100. Default value: 10.

ISP String No BGP

The line type. Valid values:

  • BGP (default): 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 EIP line types.

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

  • ChinaTelecom
  • ChinaUnicom
  • ChinaMobile
  • ChinaTelecom_L2
  • ChinaUnicom_L2
  • ChinaMobile_L2: China Mobile L2

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

Filter.1.Key String No CreationStartTime

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

Filter.2.Key String No CreationEndTime

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

Filter.1.Value String No 2023-01-01T01:00Z

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.

Filter.2.Value String No 2023-01-06T02:00Z

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.

LockReason String No financial

The reason why the EIP is locked. Valid values:

  • financial

  • security

AssociatedInstanceType String No EcsInstance

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 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 EIP overview.

AssociatedInstanceId String No i-2zebb08phyccdvf****

The instance ID.

ChargeType String No PostPaid

The billing method of the EIP. Valid values:

  • PostPaid: pay-as-you-go
  • PrePaid: subscription
DryRun Boolean No false

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 sends the request. If the request passes the dry run, an HTTP 2xx status code is returned and the operation is performed.

EipName String No EIP-01

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.

Tag.N.Key String No FinanceDept

The key of tag N that is added to the resource. You can specify at most 20 tag keys. The tag key cannot be an empty string.

The tag key can be at most 128 characters in length. It cannot start with aliyun or acs:, and cannot contain http:// or https://.

Tag.N.Value String No FinanceJoshua

The value of tag N to add to the resource. You can specify at most 20 tag values. The tag value can be an empty string.

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

SecurityProtectionEnabled Boolean No false

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

  • false (default)
  • true
PublicIpAddressPoolId String No pippool-2vc0kxcedhquybdsz****

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

Response parameters

Parameter

Type

Example

Description

PageSize Integer 10

The number of entries per page.

RequestId String 4EC47282-1B74-4534-BD0E-403F3EE64CAF

The request ID.

PageNumber Integer 10

The page number.

TotalCount Integer 1

The number of entries returned.

EipAddresses Array of EipAddress

The details about the EIPs.

EipAddress
ReservationActiveTime String 2021-05-23T16:00:00Z

The time when the renewal took effect. The time is displayed in the YYYY-MM-DDThh:mm:ssZ format.

Status String Available

The status of the EIP. Valid values:

  • Associating

  • Unassociating

  • InUse

  • Available

  • Releasing
ReservationOrderType String RENEWCHANGE

The type of the renewal order. Valid values:

  • RENEWCHANGE
  • TEMP_UPGRADE
  • UPGRADE
AllocationTime String 2021-04-23T01:37:38Z

The time when the EIP was created. The time is displayed in YYYY-MM-DDThh:mm:ssZ format.

Netmode String public

The network type. Only public may be returned.

ChargeType String PostPaid

The billing method of the EIP. Valid values:

  • PostPaid: pay-as-you-go
  • PrePaid: subscription
Description String abc

The description of the EIP.

SegmentInstanceId String eipsg-t4nr90yik5oy38xd****

The IDs of contiguous EIPs.

This value is returned only when you query contiguous EIPs.

ReservationInternetChargeType String PayByBandwidth

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

  • PayByBandwidth: pay-by-bandwidth.

  • PayByTraffic: pay-by-data-transfer.

BandwidthPackageId String cbwp-bp1ego3i4j07ccdvf****

The ID of the EIP bandwidth plan.

IpAddress String 47.75.XX.XX

The IP address of the EIP.

Bandwidth String 5

The maximum bandwidth of the contiguous EIPs. Unit: Mbit/s.

ReservationBandwidth String 12

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

EipBandwidth String 101

The maximum bandwidth of the EIP when it is not associated with an EIP bandwidth plan. Unit: Mbit/s.

Name String EIP-01

The name of the EIP.

InstanceRegionId String cn-hangzhou

The region ID of the associated instance.

DeletionProtection Boolean true

Indicates whether deletion protection is enabled. Valid values:

  • true

  • false

InstanceId String i-bp15zckdt37cdvf****

The ID of the associated instance.

SecondLimited Boolean false

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

  • true

  • false

InstanceType String EcsInstance

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
HDMonitorStatus String false

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

  • false

  • true

RegionId String cn-hangzhou

The region ID of the EIP.

BandwidthPackageBandwidth String 50

The maximum bandwidth of the EIP bandwidth plan with which the EIP is associated. Unit: Mbit/s.

ServiceManaged Integer 0

Indicates whether the resource is created by the service account.

  • 0: no
  • 1: yes
ExpiredTime String 2021-05-23T02:00:00Z

The time when the EIP expires. The time is displayed in the YYYY-MM-DDThh:mm:ssZ format.

ResourceGroupId String rg-acfmxazcdxs****

The ID of the resource group.

AllocationId String eip-2zeerraiwb7ujcdvf****

The ID of the EIP.

InternetChargeType String PayByBandwidth

The metering method of the EIP. Valid values:

  • PayByBandwidth: pay-by-bandwidth.

  • PayByTraffic: pay-by-data-transfer.

BusinessStatus String Normal

The service status of the EIP. Valid values:

  • Normal
  • FinancialLocked
BandwidthPackageType String CommonBandwidthPackage

The type of the bandwidth. Only CommonBandwidthPackage (Internet Shared Bandwidth) may be returned.

HasReservationData String false

Indicates whether renewal data is included.

  • false
  • true This parameter returns true only when the IncludeReservationData parameter is set to true and some orders have not taken effect.
ISP String BGP

The line type. Valid values:

  • BGP: BGP (Multi-ISP). 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 EIP line types.

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

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

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

OperationLocks Array of LockReason

The details about the locked EIP.

LockReason
LockReason String financial

The reason why the EIP is locked. Valid values:

  • financial

  • security

Tags Array of Tag

The tag list of the EIP.

Tag
Key String KeyTest

The tag key of the EIP.

Value String ValueTest

The tag value of the EIP.

SecurityProtectionTypes Array of String AntiDDoS_Enhanced

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.

PublicIpAddressPoolId String pippool-2vc0kxcedhquybdsz****

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

VpcId String vpc-bp15zckdt37pq72zv****

The ID of the VPC that has IPv4 gateways enabled 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 InstanceType is set to IpAddress. In this case, the EIP is associated with an IP address.

Zone String ap-southeast-1-lzdvn-cb

The zone of the EIP.

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

BizType String CloudBox

The service type.

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

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeEipAddresses
&RegionId=cn-hangzhou
&IncludeReservationData=false
&Status=Available
&EipAddress=47.75.XX.XX
&AllocationId=eip-2zeerraiwb7ujxscd****
&SegmentInstanceId=eipsg-t4nr90yik5oy38xdy****
&ResourceGroupId=rg-acfmxazb4pcdvf****
&PageNumber=10
&PageSize=10
&ISP=BGP
&Filter.1.Key=CreationStartTime
&Filter.2.Key=CreationEndTime
&Filter.1.Value=2023-01-01T01:00Z
&Filter.2.Value=2023-01-06T02:00Z
&LockReason=financial
&AssociatedInstanceType=EcsInstance
&AssociatedInstanceId=i-2zebb08phyccdvf****
&ChargeType=PostPaid
&DryRun=false
&EipName=EIP-01
&Tag=[null]
&SecurityProtectionEnabled=false
&PublicIpAddressPoolId=pippool-2vc0kxcedhquybdsz****
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

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

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "PageSize" : 10,
  "RequestId" : "4EC47282-1B74-4534-BD0E-403F3EE64CAF",
  "PageNumber" : 10,
  "TotalCount" : 1,
  "EipAddresses" : [ {
    "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" : "financial"
    } ],
    "Tags" : [ {
      "Key" : "KeyTest",
      "Value" : "ValueTest"
    } ],
    "SecurityProtectionTypes" : [ "AntiDDoS_Enhanced" ],
    "PublicIpAddressPoolId" : "pippool-2vc0kxcedhquybdsz****",
    "VpcId" : "vpc-bp15zckdt37pq72zv****",
    "Zone" : "ap-southeast-1-lzdvn-cb",
    "BizType" : "CloudBox"
  } ]
}

Error codes

HttpCode

Error code

Error message

Description

400 InvalidIAssociatedInstanceType.ValueNotSupported The specified value of AssociatedInstanceType is not supported. The error message returned because AssociatedInstanceType is set to an invalid value. Check whether the value is valid.
400 InvalidChargeType.ValueNotSupported The specified ChargeType is not supported. The billing method is not supported. Select a supported billing method.
400 InvalidResourceGroupId The specified ResourceGroupId does not exist. The specified resource group ID does not exist.
400 InvalidTagKey The tag keys are not valid. The tag index is invalid.
400 InvalidTagValue The tag values are not valid. The tag value is invalid.
400 OperationUnsupported.ResourceGroupId ResourceGroup is not supported in this region. The resource group feature is disabled.
404 Forbidden.RegionNotFound Specified region is not found during access authentication. The specified region does not exist. Check whether the specified region ID is valid.
404 InvalidLockReason.NotFound The specified LockReason is not found The reason why the instance is locked is unknown.

For a list of error codes, see Service error codes.