Queries elastic IP addresses (EIPs) 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
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
vpc:DescribeEipAddresses | list | *Address acs:vpc:{#regionId}:{#accountId}:eip/* |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the EIP. You can call the DescribeRegions operation to query the region ID. | cn-hangzhou |
IncludeReservationData | boolean | No | Specifies whether to return information about pending orders. Valid values:
| false |
Status | string | No | The state of the EIP. Valid values:
| Available |
EipAddress | string | No | 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 |
AllocationId | string | No | 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**** |
SegmentInstanceId | string | No | The ID of the contiguous EIP group. | eipsg-t4nr90yik5oy38xdy**** |
ResourceGroupId | string | No | The ID of the resource group to which the EIP belongs. | rg-acfmxazb4pcdvf**** |
PageNumber | integer | No | The page number. Default value: 1. | 10 |
PageSize | integer | No | The number of entries per page. Valid values: 1 to 100. Default value: 10. | 10 |
ISP | string | No | The line type. Valid values:
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:
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.Key | string | No | 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.Key | string | No | 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.Value | string | No | The filter value used to query resources. Specify the time in the ISO 8601 standard in the | 2023-01-01T01:00Z |
Filter.2.Value | string | No | The filter value used to query resources. Specify the time in the ISO 8601 standard in the | 2023-01-06T02:00Z |
LockReason | string | No | The reason why the EIP is locked. Valid values:
| financial |
AssociatedInstanceType | string | No | The type of the cloud resource with which you want to associate the EIP. Valid values:
Note
Each ECS instance, CLB instance, HAVIP, and IP address can be associated with only one EIP. A NAT gateway can be associated with multiple EIPs. 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 |
AssociatedInstanceId | string | No | The ID of the instance associated with the EIP. | i-2zebb08phyccdvf**** |
ChargeType | string | No | The billing method of the EIP. Valid values:
| PostPaid |
DryRun | boolean | No | Specifies whether to perform only a dry run, without performing the actual request. Valid values:
| false |
EipName | string | No | 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 |
Tag | array<object> | No | The tags used to filter EIPs. | |
object | No | The tags. | ||
Key | string | No | 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 | FinanceDept |
Value | string | No | 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 | FinanceJoshua |
SecurityProtectionEnabled | boolean | No | Specifies whether to activate Anti-DDoS Pro/Premium. Valid values:
| false |
PublicIpAddressPoolId | string | No | The IP address pool to which the EIP that you want to query belongs. | pippool-2vc0kxcedhquybdsz**** |
Response parameters
Examples
Sample success responses
JSON
format
{
"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",
"Mode": "NAT",
"SegmentInstanceId": "eipsg-t4nr90yik5oy38xd****",
"ReservationInternetChargeType": "PayByBandwidth",
"BandwidthPackageId": "cbwp-bp1ego3i4j07ccdvf****",
"IpAddress": "47.75.XX.XX",
"Bandwidth": "5",
"ReservationBandwidth": "12",
"EipBandwidth": "101",
"Name": "EIP-01",
"PrivateIpAddress": "192.168.XX.XX",
"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 code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidIAssociatedInstanceType.ValueNotSupported | The specified value of AssociatedInstanceType is not supported. | The AssociatedInstanceType parameter is set to an invalid value. |
400 | InvalidChargeType.ValueNotSupported | The specified ChargeType is not supported. | The specified billing method is not supported. Specify a supported billing method. |
400 | InvalidAliuid | User Id is not valid. | - |
400 | InvalidResourceGroupId | The specified ResourceGroupId does not exist. | The specified resource group ID does not exist. |
400 | InstanceType.Invalid | InstanceType is not null | - |
400 | InstanceIdLength.Exceed | InstanceId length is exceed | - |
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. | - |
400 | IellgalParameter.OwnerAccount | The specified parameter OwnerAccount is not valid. | The specified parameter OwnerAccount is illegal. |
404 | InvalidFilterValue | The specified FilterValue is not supported. | - |
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 | InvalidFilterKey.NotFound | The specified Filterkey is not supported. | - |
404 | InvalidLockReason.NotFound | The specified LockReason is not found | The reason why the instance is locked is unknown. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-03-14 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2023-12-07 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-08-09 | The Error code has changed | View Change Details |
2023-08-09 | API Description Update. The Error code has changed. The request parameters of the API has changed | View Change Details |
2023-08-08 | The Error code has changed. The response structure of the API has changed | View Change Details |
2022-12-02 | The Error code has changed. The response structure of the API has changed | View Change Details |