Apply for EIPs

Last Updated: Jun 01, 2017

Description

Request an EIP, which is in Available status.

  • At present, an EIP can be bound only to a VPC ECS instance in the same region.
  • Upon each request, an EIP is randomly allocated in the specified region.

  • At present, only ICMP, TCP, and UDP EIPs are supported. Transport layer EIPs, such as IGMP EIP and SCTP EIP, are not supported.

Request Parameters

Name Type Required Description
Action String Yes Required parameter, with a value: AllocateEipAddress.
RegionId String Yes The ID of the region to which the requested EIP belongs. See Regions and zones for region IDs.
Bandwidth String No The rate limit of the EIP. If not specified, it is 5Mbps by default.
InternetChargeType String No PayByBandwidth and PayByTraffic. The default value is PayByBandwidth.
ClientToken String No Used to ensure the idempotence of the request. The value is generated by a client. It must be unique among all requests and contains a maximum of 64 ASCII characters.
For details, refer to the appendix.

Return Parameters

Name Type Description
EipAddress String The assigned EIP.
AllocationId String The instance ID of the EIP.

Error Code

Error Code Description Http status code Meaning
Forbbiden User not authorized to operate on the specified resource. 403 The user is not authorized to use EIPs. Please submit a work order to request the authorization.
QuotaExceeded.Eip Elastic IP address quota exceeded. 400 The number of EIPs has exceeded the quota.
InvalidRegionId.NotFound Specified value of RegionId is not supported. 404 The specified RegionId does not exist. See Regions and zones for region IDs.
InvalidParameter Specified value of InternetChargeType is not valid. 400 The specified InternetChargeType parameter is invalid.
InvalidParameter Specified value of Bandwidth is not valid. 400 The specified Bandwidth parameter is invalid.
InsufficientEipCapacity Insufficient EIP capacity to fulfill your request. 500 The EIPs in the specified region are not enough.
InsufficientBalance Your account does not have enough balance. 400 The EIP cannot be requested because your account balance is not enough.

Examples

Request Example

  1. https://ecs.aliyuncs.com/?Action=AllocateEipAddress
  2. &RegionId=cn-beijing
  3. &<Public Request Parameters>

Return Example

XML format

  1. <AllocationId>eip-25877c70x</AllocationId>
  2. <EipAddress>123.56.0.206</EipAddress>
  3. <RequestId>B6B9F518-60F8-4D81-9242-1207B356754D</RequestId>

JSON format

  1. {
  2. "AllocationId": "eip-25877c70x",
  3. "EipAddress": "123.56.0.206",
  4. "RequestId": "B6B9F518-60F8-4D81-9242-1207B356754D"
  5. }
Thank you! We've received your feedback.