All Products
Search
Document Center

Server Load Balancer:UpdateLoadBalancerAddressTypeConfig

Last Updated:Oct 03, 2026

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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

alb:UpdateLoadBalancerAddressTypeConfig

update

*LoadBalancer

acs:alb:{#regionId}:{#accountId}:loadbalancer/{#LoadBalancerId}

  • alb:AddressType
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:

  • true: Sends a dry run request. The network type of the instance is not changed. The system checks whether the required parameters are specified, the request format is valid, and the business limits are met. If the check fails, the corresponding error is returned. If the check passes, the error code DryRunOperation is returned.

  • false (default): Sends a regular request. If the check passes, the system returns an HTTP 2xx status code and performs the operation.

false

LoadBalancerId

string

Yes

The instance ID of the load balancing instance.

alb-bp1o94dp5i6ea****

AddressType

string

Yes

The target network type. Valid values:

  • Internet: The load balancing instance has a public IP address, and its DNS domain name is resolved to the public IP address. The load balancing instance can be accessed over the Internet.

  • Intranet: The load balancing instance has only a private IP address, and its DNS domain name is resolved to the private IP address. The load balancing instance can be accessed only within the internal network environment of the VPC where it resides.

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:

  • Common (default): a standard EIP.

  • Anycast: an Anycast EIP.

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.