tencent cloud

APIs

CreateLoadBalancer

Unduh
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-09-28 15:10:58

1. API Description

Domain name for API request: alb.intl.tencentcloudapi.com.

CreateLoadBalancer is an async API. The system returns an instance ID, but the application CLB instance is not created successfully yet, and the creation task is still in progress in the system backend. You can call DescribeLoadBalancerDetail to query the creation status of the application CLB instance.

  • When an application CLB instance is in the Provisioning status, it means the application CLB instance is being created.
    -When an application CLB instance is in the Active status, the application CLB instance is successfully created.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: CreateLoadBalancer.
Version Yes String Common Params. The value used for this API: 2025-10-30.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
AddressType Yes String Address type of the application CLB.

- Internet: The load balancing has a public IP address, and the DNS domain name is resolved to the public IP, so it can be accessed via the public network.

- Intranet: The load balancer has only a private IP address, and the DNS domain name is resolved to the private IP, so it can only be accessed from the private network environment of the VPC where the load balancer resides.
LoadBalancerBillingConfig Yes LoadBalancerBillingConfig Billing configuration of an application CLB instance.
VpcId Yes String Virtual Private Cloud (VPC) ID.
ZoneMappings.N Yes Array of ZoneMappingsItem AZ and private network subnet mapping list. A maximum of 10 AZs can be added. If the current region supports 2 or more AZs, a minimum of 2 AZs are required.
AddressIpVersion No String IP address version. Value: IPv4 or IPv6.
ClientToken No String Client Token, used for ensuring the idempotency of requests.

Generate a parameter value from your client to underwrite the uniqueness of the value for different requests. ClientToken supports only ASCII characters.
DeleteProtection No DeletionProtectionConfig Deletion protection configuration.
DryRun No Boolean Whether to only precheck this request. Parameter Value:

- true: Send a check request without creating an application CLB instance. Check items include whether required parameters are filled in, request format, and service limits. If the check fails, return the corresponding error. If the check passes, return the error code DryRunOperation.

- false (default value): Send a normal request. After the check is passed, return HTTP 2xx status code and directly perform the operation.
InternetAddressType No String EIP address type. Valid values:
- EIP: Ordinary Elastic IP
- AntiDDoSEIP: Anti-DDoS EIP
- AnycastEIP: Accelerated EIP
-HighQualityEIP: High Quality IP. High Quality IP is supported only in Singapore and Hong Kong (China).
- ResidentialEIP: natively assigned IP

Default if not passed: EIP.
LoadBalancerName No String Application CLB instance name. It contains 1-80 characters, including Chinese characters, letters, digits, dashes (-), forward slashes (/), half-width periods (.), and underscores (_).
Tags.N No Array of TagInfo Tag.

3. Output Parameters

Parameter Name Type Description
LoadBalancerId String CLB instance ID in the format of "alb-" followed by 8 alphanumeric characters.
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Creating a Public Network CLB

Input Example

POST / HTTP/1.1
Host: alb.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateLoadBalancer
<Common request parameters>

{
    "VpcId": "vpc-92hffaxb",
    "AddressType": "Internet",
    "ZoneMappings": [
        {
            "SubnetId": "subnet-bi75pogm",
            "ZoneId": "ap-guangzhou-2"
        },
        {
            "SubnetId": "subnet-bi75pogm",
            "ZoneId": "ap-guangzhou-3"
        }
    ],
    "LoadBalancerBillingConfig": {
        "ChargeType": "POSTPAID_BY_HOUR"
    }
}

Output Example

{
    "Response": {
        "LoadBalancerId": "alb-f8q2xk9m",
        "RequestId": "3b848733-70e5-4558-ae39-4b9938eb7609"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
InvalidParameter Parameter error.
MissingParameter Parameters are missing.
UnsupportedOperation The operation is not supported.
UnsupportedOperation.ResourcesSoldOut Insufficient resources.

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan