Changes the network type of an Application Load Balancer (ALB) instance.
Operation description
Before you begin:
You have created an ALB instance. For more information, see CreateLoadBalancer.
To change the network type of an ALB instance from private network to public network using this operation, you must first create an elastic IP address (EIP). For more information, see AllocateEipAddress.
Usage notes:
UpdateLoadBalancerAddressTypeConfig is an asynchronous operation. After a request is sent, the system returns a request ID, but the network type of the ALB instance is not yet changed. The change node continues in the background. You can invoke GetLoadBalancerAttribute to query the network type change status of the ALB instance:
If the ALB instance is in the Configuring state, the load balancing instance network type is being changed.
If the ALB instance is in the Active state, the load balancing instance network type has been changed successfully.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
alb:UpdateLoadBalancerAddressTypeConfig |
update |
*LoadBalancer
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. Generate a unique value from your client for this parameter. ClientToken supports only ASCII characters. Note
If you do not specify this parameter, the system automatically uses the RequestId of the API request as the ClientToken. The RequestId of each API request may be different. |
123e4567-e89b-12d3-a456-42665544**** |
| DryRun |
string |
No |
Specifies whether to perform a dry run. Valid values:
|
false |
| LoadBalancerId |
string |
Yes |
The instance ID of the load balancing instance. |
alb-bp1o94dp5i6ea**** |
| AddressType |
string |
Yes |
The target network type. Valid values:
|
Internet |
| ZoneMappings |
array<object> |
No |
The list of zone and vSwitch mappings. You can add up to 10 zones. If the current region supports two or more zones, you must add at least two zones. |
|
|
object |
No |
The zone and vSwitch mapping list struct. |
||
| VSwitchId |
string |
No |
The vSwitch that corresponds to the zone. Each zone can use only one vSwitch and one subnet. You can add up to 10 zones. If the current region supports two or more zones, you must add at least two zones. |
vsw-bp10ttov87felojcn**** |
| ZoneId |
string |
No |
The zone ID of the load balancing instance. You can add up to 10 zones. If the current region supports two or more zones, you must add at least two zones. You can invoke DescribeZones to query the active zone information that corresponds to a zone ID. |
cn-hangzhou-a |
| AllocationId |
string |
No |
The instance ID of the EIP. You can add up to 10 active zones. Note
This parameter is required when you invoke this operation to transform the network type from private network to public network. |
eip-bp1aedxso6u80u0qf**** |
| EipType |
string |
No |
The type of the EIP. Valid values:
Note
For the regions that support binding Anycast EIPs to ALB instances, see Limits. |
Common |
| RetainResourceType |
array |
No |
The types of resources that are automatically created by ALB and need to be retained. Settings can currently be configured as eip, which indicates EIPs. Automatic creation and attach operations apply to these resource types. |
|
|
string |
No |
The type of resource to retain. You can set this parameter to eip, which indicates an EIP. |
eip |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response struct. |
||
| RequestId |
string |
The request ID. |
593B0448-D13E-4C56-AC0D-FDF0FDE0E9A3 |
| JobId |
string |
The ID of the asynchronous task. |
72dcd26b-f12d-4c27-b3af-18f6aed5**** |
Examples
Success response
JSON format
{
"RequestId": "593B0448-D13E-4C56-AC0D-FDF0FDE0E9A3",
"JobId": "72dcd26b-f12d-4c27-b3af-18f6aed5****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | OperationDenied.OnlyPostPaidEipSupported | The operation is not allowed because of OnlyPostPaidEipSupported. | The operation is rejected because only pay-as-you-go elastic IP addresses (EIPs) are supported. |
| 400 | Mismatch.ZoneIdAndVSwitchId | The ZoneId and VSwitchId are mismatched. | %s and %s do not match. |
| 400 | IncorrectBusinessStatus.Eip | The business status of %s [%s] is incorrect. | The business status of %s [%s] is incorrect. |
| 400 | ResourceNotFound.Eip | The specified resource ResourceNotFound.Eip is not found. | The Elastic IP Address (EIP) resource does not exist. |
| 400 | IncorrectStatus.CommonBandwidthPackage | The status of %s [%s] is incorrect. | The status of the resource %s [%s] is invalid. |
| 400 | IncorrectBusinessStatus.CommonBandwidthPackage | The business status of %s [%s] is incorrect. | The business status of the resource %s [%s] is invalid. |
| 400 | OperationDenied.AddressTypeNotChanged | The operation is not allowed because of AddressTypeNotChanged. | The network type of the load balancing instance has not changed. |
| 400 | IncorrectStatus.LoadBalancer | The status of %s [%s] is incorrect. | The current status of the instance does not support this operation. |
| 404 | ResourceNotFound.CommonBandwidthPackage | The specified resource %s is not found. | The resource %s does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.