Docs
api
Load Balance(ULB)
AllocateBackend

Add backend instances for traditional load balancing - AllocateBackend

Overview

Add CLB backend resource instance

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is AllocateBackend.Yes
PublicKeystringThe user’s public key can be obtained from ConsoleYes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
RegionstringRegion. See List of Regions and Availability ZonesYes
ProjectIdstringProject ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface.Yes
ULBIdstringID of the traditional load balancing instanceYes
VServerIdstringID of the VServer instanceYes
ResourceTypestringThe 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
ResourceIdstringThe resource ID of the added backend resources; either this or ResourceIP must be filled in.No
ResourceIPstringThe 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
VPCIdstringThe VPC where the added backend servers are located is effective when ResourceType is UHybrid or IP, and it is required.No
SubnetIdstringThe subnet where the added backend server is located is effective when ResourceType is UHybrid or IP, and it is mandatory.No
PortintThe backend resource service port you added, the value range is [1-65535], default is 80.No
WeightintThe weight of the added backend RS (effective under the weighted round-robin algorithm), the value range is [1-100], the default is 1.No
EnabledintBackend instance status switch, enumeration values: 1: Enabled; 0: Disabled. The default is Enabled.No
IsBackupintWhether rs is for backup, default is 0
0: ordinary rs
1: backup rs
No

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
BackendIdstringThe 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.dezai.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
}