CreateLoadBalancer
Create a CLB instance. To use the CLB service, you first need to purchase one or more instances. After this API is called successfully, a unique instance ID will be returned. There are two types of instances: public network and private network. For more information, see the product types in the product documentation.
Wire call
Converge Cloud is RPC over HTTP. There is one path — / — and the action travels in the X-TC-Action header. The /clb/CreateLoadBalancer path used in the OpenAPI document is a documentation convenience so each action is addressable; it is not a route on the server.
curl -sS https://clb.api3.convergecloud.com/ \
-H 'Authorization: TC3-HMAC-SHA256 Credential=<SecretId>/<YYYY-MM-DD>/clb/tc3_request, SignedHeaders=content-type;host;x-tc-action, Signature=<sig>' \
-H 'Content-Type: application/json; charset=utf-8' \
-H 'Host: clb.api3.convergecloud.com' \
-H 'X-TC-Action: CreateLoadBalancer' \
-H 'X-TC-Version: 2018-03-17' \
-H 'X-TC-Timestamp: <unix-seconds>' \
-H 'X-TC-Region: luzon' \
-d '{"LoadBalancerType":"<LoadBalancerType>"}'Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
| LoadBalancerType | string | Yes | CLB instance network type: |
| Forward | integer | No | CLB instance type. Valid value: 1 (generic CLB instance). |
| LoadBalancerName | string | No | CLB instance name, which takes effect only when only one instance is to be created in the request. It can consist 1 to 60 letters, digits, hyphens (-), or underscores (_). |
| VpcId | string | No | Network ID of the target device on the CLB backend, such as `vpc-12345678`, which can be obtained through the `DescribeVpcEx` API. If this parameter is not entered, `DefaultVPC` is used by default. This parameter is required when creating a private network instance. |
| SubnetId | string | No | A subnet ID should be specified when you purchase a private network CLB instance under a VPC. The VIP of the private network CLB instance is in this subnet. This parameter is required when you create a private network CLB instance but not supported when you create a public network IPv4 CLB instance. |
| ProjectId | integer | No | ID of the project to which a CLB instance belongs, which can be obtained through the `DescribeProject` API. If this parameter is not entered, the default project will be used. |
| AddressIPVersion | string | No | It's only applicable to public network CLB instances. IP version. Values: `IPV4`, `IPV6` and `IPv6FullChain` (case-insensitive). Default: `IPV4`. Note: `IPV6` indicates IPv6 NAT64, while `IPv6FullChain` indicates IPv6. |
| Number | integer | No | Specifies the count of cloud load balancers to create, with a default value of 1. the count must not exceed the maximum value allowed for the account, with a default creation maximum value of 20. |
| MasterZoneId | string | No | Applicable only to public network IPv4 cloud load balancer instances. specifies the primary AZ ID for cross-az disaster recovery. both AZ ID and name are supported, such as 100001 or ap-guangzhou-1. |
| ZoneId | string | No | Applicable only to public network IPv4 clb instances. specifies the AZ ID or availability zone name for creating a clb instance. for example, 100001 or ap-guangzhou-1. |
| InternetAccessible | InternetAccessible | No | Network billing mode by the maximum outbound bandwidth. It applies only to private network LCU-supported instances and all public network instances. The feature of purchasing monthly subscription instances via an API is under grayscale release. If you want to experience this feature, submit a ticket. |
| VipIsp | string | No | ISP of VIP. Values: `CMCC` (China Mobile), `CUCC` (China Unicom) and `CTCC` (China Telecom). You need to activate static single-line IPs. This feature is in beta and is only available in Guangzhou, Shanghai, Nanjing, Jinan, Hangzhou, Fuzhou, Beijing, Shijiazhuang, Wuhan, Changsha, Chengdu and Chongqing regions. To try it out, please contact your sales rep. If it's specified, the network billing… |
| Tags | TagInfo[] | No | Tags the CLB instance when purchasing it. Up to 20 tag key value pairs are supported. |
| Vip | string | No | Specifies the VIP for the application of a CLB instance. This parameter is optional. If you do not specify this parameter, the system automatically assigns a value for the parameter. IPv4 and IPv6 CLB instances support this parameter, but IPv6 NAT64 CLB instances do not. |
| BandwidthPackageId | string | No | BANDWIDTH PACKAGE ID, which can be obtained through the DescribeBandwidthPackages api. specifies the BANDWIDTH PACKAGE ID. when this parameter is specified, the network billing mode (InternetAccessible.InternetChargeType) supports only billing by BANDWIDTH PACKAGE (BANDWIDTH_PACKAGE). the attributes of the BANDWIDTH PACKAGE determine the settlement method. for IPv6 clb instances purchased by no… |
| ExclusiveCluster | ExclusiveCluster | No | Information about the dedicated CLB instance. You must specify this parameter when you create a dedicated CLB instance in a private network. |
| SlaType | string | No | Specification of the LCU-supported instance. If you need to create an LCU-supported instance, this parameter is required. Valid values: clb.c2.medium: Standard clb.c3.small: Advanced 1 clb.c3.medium: Advanced 2 clb.c4.small: Super Large 1 clb.c4.medium: Super Large 2 clb.c4.large: Super Large 3 clb.c4.xlarge: Super Large 4 If you need to create a shared instance, this parameter is not required.… |
| ClusterIds | string[] | No | Cluster ID. This cluster identifier is used for configuring a public cloud exclusive cluster or a cloud dedicated cluster. To apply for a public cloud exclusive cluster, submit a ticket. For cloud dedicated clusters, see the descriptions in Cloud Dedicated Cluster. |
| ClientToken | string | No | A unique string supplied by the client to ensure that the request is idempotent. Its maximum length is 64 ASCII characters. If this parameter is not specified, the idempotency of the request cannot be guaranteed. |
| SnatPro | boolean | No | Whether Binding IPs of other VPCs feature switch |
| SnatIps | SnatIp[] | No | Creates `SnatIp` when the binding IPs of other VPCs feature is enabled |
| ClusterTag | string | No | Tag for the STGW exclusive cluster. |
| SlaveZoneId | string | No | Applicable only to public network IPv4 clb instances. specifies the secondary AZ ID for cross-az disaster recovery. both AZ ID and name are supported, such as 100001 or ap-guangzhou-1. |
| EipAddressId | string | No | The unique ID of EIP, which can be queried through the DescribeAddresses API. format: EIP-qhx8udkc. applicable only to private network clb binding EIP. |
| LoadBalancerPassToTarget | boolean | No | Specifies whether to allow CLB traffic to the Target. enable (true): verify security groups on CLB. disable (false): verify security groups on both CLB and backend instances. IPv6 CLB security group default permit, this parameter is not required. |
| DynamicVip | boolean | No | Upgrades to domain name-based CLB |
| Egress | string | No | Network egress point |
| LBChargePrepaid | LBChargePrepaid | No | Prepayment-related attributes of a CLB instance. The feature of purchasing monthly subscription instances via an API is under grayscale release. If you want to experience this feature, submit a ticket. |
| LBChargeType | string | No | Billing type of a CLB instance. Valid values: POSTPAID_BY_HOUR and PREPAID. Default value: POSTPAID_BY_HOUR. The feature of purchasing monthly subscription instances via an API is under grayscale release. If you want to experience this feature, submit a ticket. |
| AccessLogTopicId | string | No | Topic ID of logs of traffic access over layer-7 protocols. |
| AdvancedRoute | boolean | No | Whether layer-7 advanced routing is enabled. |
Response
Fields are returned inside the Response envelope. Converge Cloud answers HTTP 200 for errors as well as successes, so read Response.Error rather than the status code — and test for the presence of that object, because Code is occasionally the empty string.
| Field | Type | Description |
|---|---|---|
| LoadBalancerIds | string[] | Array of unique CLB instance IDs. |
| DealName | string | Order ID. |
| 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. |
{
"Response": {
"LoadBalancerIds": …,
"DealName": …,
"RequestId": "…"
}
}{
"Response": {
"Error": { "Code": "…", "Message": "…" },
"RequestId": "…"
}
}Try it
Behaviour
Load balancer writes occasionally return HTTP 200 with a null identifier and no effect. Read back with DescribeLoadBalancers before treating the result as applied.
