Associates an Anycast elastic IP address (Anycast EIP) with a cloud resource in a specified region.

Debugging

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

Request parameters

Parameter Type Required Example Description
Action String Yes AssociateAnycastEipAddress

The operation that you want to perform.

Set the value to AssociateAnycastEipAddress.

AnycastId String Yes aeip-bp1ix34fralt4ykf3****

The ID of the Anycast EIP.

BindInstanceId String Yes lb-d7oxbixhxv1uupnon****

The ID of the cloud resource with which you want to associate the Anycast EIP.

BindInstanceRegionId String Yes us-west-1

The ID of the region where the cloud resource is deployed.

BindInstanceType String Yes SlbInstance

The type of cloud resource with which you want to associate the Anycast EIP.

Set the value to SlbInstance. You can associate Anycast EIPs with only internal-facing Server Load Balancer (SLB) instances that are deployed in virtual private clouds (VPCs).

ClientToken String No 02fb3da4-130e-11e9-8e44-001****

The client token that is used to ensure the idempotence of the request.

You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

DryRun Boolean No false

Specifies whether to only precheck the request. Check items include permissions and state of the Anycast EIP. Valid values:

  • false: checks the request. After the request passes the check, the Anycast EIP is associated with the instance. This is the default value.
  • true: checks the request. After the request passes the check, the Anycast EIP is not associated with the instance. If you select this option, the system also checks whether the required parameters are set, and whether the values of the parameters are in valid formats. If the request fails the check, the system returns error messages. If the request passes the check, the system returns the ID of the request.

Response parameters

Parameter Type Example Description
RequestId String FBDB18D8-E91E-4978-8D6C-6E2E3EE10133

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/? Action=AssociateAnycastEipAddress
&AnycastId=aeip-bp1ix34fralt4ykf3****
&BindInstanceId=lb-d7oxbixhxv1uupnon****
&BindInstanceRegionId=cn-hangzhou
&BindInstanceType=SlbInstance
&<Common request parameters>

Sample success responses

XML format

<AssociateAnycastEipAddressResponse>
  <RequestId>FBDB18D8-E91E-4978-8D6C-6E2E3EE10133</RequestId>
</AssociateAnycastEipAddressResponse>

JSON format

{
    "RequestId": "FBDB18D8-E91E-4978-8D6C-6E2E3EE10133"
}

Error codes

For a list of error codes, visit the API Error Center.