Changes the network type of the IPv4 address of a Network Load Balancer (NLB) instance.

Usage notes

  • Make sure that an NLB instance is created. For more information, see CreateLoadBalancer.
  • You can call the GetLoadBalancerAttribute operation to query the AddressType value of an NLB instance after you change the network type.
  • UpdateLoadBalancerAddressTypeConfig is an asynchronous operation. After you send a request, the request ID is returned but the operation is still being performed in the system background. You can call the GetJobStatus operation to query the task status:
    • If the task is in the Succeeded state, the network type of the IPv4 address of the NLB instance is changed.
    • If the task is in the Processing state, the network type of the IPv4 address of the NLB instance is being changed. In this case, you can perform only query operations.

Debugging

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

Request parameters

Parameter Type Required Example Description
Action String Yes UpdateLoadBalancerAddressTypeConfig

The operation that you want to perform. Set the value to UpdateLoadBalancerAddressTypeConfig.

LoadBalancerId String Yes nlb-83ckzc8d4xlp8o****

The ID of the NLB instance.

AddressType String Yes Internet

The new network type. Valid values:

  • Internet: The NLB instance uses a public IP address. The domain name of the NLB instance is resolved to the public IP address. Therefore, the NLB instance can be accessed over the Internet.
  • Intranet: The NLB instance uses a private IP address. The domain name of the NLB instance is resolved to the private IP address. Therefore, the NLB instance can be accessed over the virtual private cloud (VPC) where the NLB instance is deployed.
ZoneMappings.N.VSwitchId String No vsw-bp10ttov87felojcn****

The ID of the vSwitch in the zone. You can specify only one vSwitch (subnet) in each zone of an NLB instance.

ZoneMappings.N.ZoneId String No cn-hangzhou-a

The ID of the zone of the NLB instance.

You can call the DescribeZones operation to query the most recent zone list.

ZoneMappings.N.AllocationId String No eip-bp1aedxso6u80u0qf****

The ID of the elastic IP address (EIP).

ZoneMappings.N.EipType String No Common

The type of the EIP. Valid values:

  • Common: EIP
  • Anycast: Anycast EIP
Note Only NLB instances in the China (Hong Kong) region can be associated with Anycast EIPs. This parameter is required if you set the AddressType parameter to Internet.
DryRun Boolean No false

Specifies whether to check the request without performing the operation. Valid values:

  • true: checks the request without performing the operation. The system checks the required parameters, request syntax, and limits. If the request fails the check, an error message is returned. If the request passes the check, the DryRunOperation error code is returned.
  • false (default): sends the request. If the request passes the check, an HTTP 2xx status code is returned and the operation is performed.
ClientToken String No 123e4567-e89b-12d3-a456-426655440000

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 make sure that it is unique among all requests. The token can only contain ASCII characters.

Note If you do not specify this parameter, the system automatically sets ClientToken to the value of RequestId. RequestId of each API request may be different.
RegionId String No cn-hangzhou

The ID of the region where the NLB instance is deployed.

You can call the DescribeRegions operation to query the most recent region list.

Response parameters

Parameter Type Example Description
RequestId String CEF72CEB-54B6-4AE8-B225-F876FF7BA984

The ID of the request.

JobId String 72dcd26b-f12d-4c27-b3af-18f6aed5****

The ID of the asynchronous task.

Examples

Sample requests

http(s)://[Endpoint]/?Action=UpdateLoadBalancerAddressTypeConfig
&LoadBalancerId=nlb-83ckzc8d4xlp8o****
&AddressType=Internet
&ZoneMappings=[{"VSwitchId":"vsw-bp10ttov87felojcn****","ZoneId":"cn-hangzhou-a","AllocationId":"eip-bp1aedxso6u80u0qf****","EipType":"Common"}]
&DryRun=false
&ClientToken=123e4567-e89b-12d3-a456-426655440000
&RegionId=cn-hangzhou
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<UpdateLoadBalancerAddressTypeConfigResponse>
    <RequestId>CEF72CEB-54B6-4AE8-B225-F876FF7BA984</RequestId>
    <JobId>72dcd26b-f12d-4c27-b3af-18f6aed5****</JobId>
</UpdateLoadBalancerAddressTypeConfigResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "CEF72CEB-54B6-4AE8-B225-F876FF7BA984",
  "JobId" : "72dcd26b-f12d-4c27-b3af-18f6aed5****"
}

Error codes

For a list of error codes, see Service error codes.