edit-icon download-icon

AllocateEipAddress

Last Updated: Apr 09, 2018

Description

Create an EIP.

EIP supports ICMP, TCP, and UDP protocols, but does not support IGMP and SCTP protocols.

Request parameters

Name Type Required Description
Action String Yes

The action to perform.

Valid value: AllocateEipAddress

RegionId String Yes

The region of the EIP.

You can obtain the region ID by calling the DescribeRegions API.

Bandwidth String No The peak bandwidth in Mbps of the EIP. The default value is 5.
InternetChargeType String No

EIP is charged by the traffic usage.

Valid value: PayByTraffic

InstanceChargeType String No

The billing method of the EIP is Pay-As-You-Go.

Valid value: PostPaid

ClientToken String No

The client token used to guarantee the idempotence of the request. This parameter value is generated by the client and must be unique. It cannot exceed 64 ASCII characters.

For more information, see How to ensure idempotence.

Response parameters

Name Type Description
RequestId String The ID of the request.
EipAddress String The allocated IP address.
AllocationId String The ID of the EIP.

Error codes

See VPC API Error Center.

Examples

Request example

  1. https://vpc.aliyuncs.com/?Action=AllocateEipAddress
  2. &RegionId=cn-beijing
  3. &<CommonParameters>

Response example

XML format

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

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.