edit-icon download-icon


Last Updated: Apr 09, 2018


Bind an EIP to a cloud product instance in the same region.

Note the following before binding an EIP:

  • Only the EIP in the available status can be bound.

  • An EIP can only be bound to one cloud resource.

  • You can bind an EIP to the following cloud resources:

    • ECS instances of the VPC network

      Only the ECS instance in the running or stopped status can be bound.

    • NAT Gateway

      If the NAT Gateway has associated with a bandwidth package, submit a ticket to bind an EIP to a NAT Gateway.

    • SLB instances of the VPC network

      After binding, the SLB instance can forward requests from the Internet.

    • HAVIP

      Only the HAVIP in the available or InUse status can be bound.

  • Each ECS instance, SLB instance and HAVIP can only be bound with one EIP. However, NAT Gateway can be bound with multiple EIPs.

Request parameters

Name Type Required Description
Action String Yes

The action to perform.

Valid value: AssociateEipAddress

AllocationId String Yes The ID of the EIP.
InstanceType String No

The cloud resource to bind. Valid value:

  • EcsInstance(Default): an ECS instance of the VPC network
  • SlbInstance: an SLB instance of the VPC network
  • Nat: NAT Gateway
  • HAVIP: HAVIP instance
InstanceId String Yes The ID of the cloud resource to bind.

Response parameters

Name Type Description
RequestId String The ID of the request.

Error codes

See VPC API Error Center.


Request example

  1. https://vpc.aliyuncs.com/?Action=AssociateEipAddress
  2. &AllocationId=eip-25877c70x
  3. &InstanceId=i-25skktcp4
  4. &<CommonParameters>

Response example

XML format

  1. <AssociateEipAddressResponse>
  2. <RequestId>C0FD0EED-F90D-4479-803D-DD62335357E5</RequestId>
  3. </AssociateEipAddressResponse>

JSON format

  1. {
  2. "RequestId": "C0FD0EED-F90D-4479-803D-DD62335357E5"
  3. }
Thank you! We've received your feedback.