Add backend instances for traditional load balancing - AllocateBackend
Overview
Add CLB backend resource instance
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is AllocateBackend . | Yes |
PublicKey | string | The user's public key can be obtained from Console (opens in a new tab) | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Region | string | Region. See List of Regions and Availability Zones | Yes |
ProjectId | string | Project ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface. | Yes |
ULBId | string | ID of the traditional load balancing instance | Yes |
VServerId | string | ID of the VServer instance | Yes |
ResourceType | string | The type of the added backend resources, enumeration values: UHost -> Cloud host; UNI -> Virtual network card; UPM -> Physical cloud host; UHybrid->Hybrid cloud host; CUBE->Cube, IP->IP type; The default value is UHost. Packet forwarding mode does not support UHybrid, CUBE, IP. | Yes |
ResourceId | string | The resource ID of the added backend resources; either this or ResourceIP must be filled in. | No |
ResourceIP | string | The IP of the added backend server resource instance is valid when ResourceType is UHybrid or IP, and it is required; it is required to fill either this or ResourceId. | No |
VPCId | string | The VPC where the added backend servers are located is effective when ResourceType is UHybrid or IP, and it is required. | No |
SubnetId | string | The subnet where the added backend server is located is effective when ResourceType is UHybrid or IP, and it is mandatory. | No |
Port | int | The backend resource service port you added, the value range is [1-65535], default is 80. | No |
Weight | int | The weight of the added backend RS (effective under the weighted round-robin algorithm), the value range is [1-100], the default is 1. | No |
Enabled | int | Backend instance status switch, enumeration values: 1: Enabled; 0: Disabled. The default is Enabled. | No |
IsBackup | int | Whether rs is for backup, default is 0 0: ordinary rs 1: backup rs | No |
Response Field
Field Name | Type | Description Information | Required |
---|---|---|---|
RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
Action | string | Operation command name. | Yes |
Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
BackendId | string | The object ID of the added backend resource in CLB, (used in the CLB system, unrelated to the resource's own ID), can be used for UpdateBackendAttribute/UpdateBackendAttributeBatch/ReleaseBackend. | No |
Example
Request Example
https://api.surfercloud.com/?Action=AllocateBackend
&Region=cn-bj2
&ProjectId=project-XXXXX
&ULBId=ulb-XXXXX
&VServerId=vserver-XXXXX
&ResourceType=UHost
&ResourceId=uhost-XXXX
&Port=80
&Enabled=1
&Weight=4
&IsBackup=4
&ResourceIP=ELVhVVux
&VPCId=qFbjvNJn
&SubnetId=DKBOyKER
Response Example
{
"Action": "AllocateBackendResponse",
"BackendId": "backend-XXXXX",
"RetCode": 0
}