CreateSlbGroup
API Request
URLs
POST zstack/v1/load-balancers/slb/groups
Headers
Authorization: OAuth the-session-uuid
Body
Note: In
the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.
{
"params": {
"name": "slbGroup",
"slbOfferingUuid": "f66b4cd06a2d3ae985e40514502c3ea3",
"frontEndL3NetworkUuid": "307ab51e198a35bab0bcc517f849aa46",
"backendType": "VYOS",
"deployType": "Direct",
"description": "this is a slb spec for test"
},
"systemTags": [],
"userTags": []
}

Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"name":"slbGroup","slbOfferingUuid":"f66b4cd06a2d3ae985e40514502c3ea3","frontEndL3NetworkUuid":"307ab51e198a35bab0bcc517f849aa46","backendType":"VYOS","deployType":"Direct","description":"this is a slb spec for test"}}' http://localhost:8080/zstack/v1/load-balancers/slb/groups
Request Parameters
Name | Type | Location | Description | Valid Value | Starting Version |
---|---|---|---|---|---|
name | String | body(contained in the params structure) | The name of the SLB group. | 4.0.0 | |
slbOfferingUuid | String | body(contained in the params structure) | The UUID of the SLB offering. | 4.0.0 | |
frontEndL3NetworkUuid | String | body(contained in the params structure) | The frontend L3 network UUID. | 4.0.0 | |
backendL3NetworkUuids | List | body(contained in the params structure) | Optional. The backend L3 network UUID. | 4.0.0 | |
backendType | String | body(contained in the params structure) | Optional. The backend type. |
|
4.0.0 |
deployType | String | body(contained in the params structure) | Optional. The deployment type. |
|
4.0.0 |
description | String | body(contained in the params structure) | Optional. The detailed description of the SLB group. | 4.0.0 | |
resourceUuid | String | body(contained in the params structure) | Optional. The UUID of the SLB group. | 4.0.0 | |
tagUuids | List | body(contained in the params structure) | Optional. The tag UUIDs. | 4.0.0 | |
systemTags | List | body | Optional. The system tags. | 4.0.0 | |
userTags | List | body | Optional. The user tags. | 4.0.0 |
API Response
Sample Response
{
"inventory": {}
}
Name | Type | Description | Starting Version |
---|---|---|---|
error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error. | 4.0.0 |
inventory | SlbGroupInventory | See inventory. | 4.0.0 |
#error
Name | Type | Description | Starting Version |
---|---|---|---|
code | String | The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. | 4.0.0 |
description | String | The brief description of the error. | 4.0.0 |
details | String | The details about the error. | 4.0.0 |
elaboration | String | The reserved field. Default value: null. | 4.0.0 |
opaque | LinkedHashMap | The reserved field. Default value: null. | 4.0.0 |
cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 4.0.0 |
#inventory
Name | Type | Description | Starting Version |
---|---|---|---|
uuid | String | The UUID of the SLB group. | 4.0.0 |
name | String | The name of the SLB group. | 4.0.0 |
backendType | String | 4.0.0 | |
deployType | String | 4.0.0 | |
slbOfferingUuid | String | 4.0.0 | |
description | String | The detailed description of the SLB group. | 4.0.0 |
createDate | Timestamp | The time when the SLB group was created. | 4.0.0 |
lastOpDate | Timestamp | The time when the SLB group was last modified. | 4.0.0 |
slbVms | List | See slbVms. | 4.0.0 |
lbs | List | See lbs. | 4.0.0 |
networks | List | See networks | 4.0.0 |
#slbVms
Name | Type | Description | Starting Version |
---|---|---|---|
slbGroupUuid | String | 4.0.0 | |
publicNetworkUuid | String | 4.0.0 | |
virtualRouterVips | List | 4.0.0 | |
applianceVmType | String | 4.0.0 | |
managementNetworkUuid | String | 4.0.0 | |
defaultRouteL3NetworkUuid | String | 4.0.0 | |
status | String | 4.0.0 | |
agentPort | Integer | 4.0.0 | |
haStatus | String | 4.0.0 | |
uuid | String | The VM UUID. | 4.0.0 |
name | String | The name of the VM instance. | 4.0.0 |
description | String | The detailed description of the VM instance. | 4.0.0 |
zoneUuid | String | The zone UUID. | 4.0.0 |
clusterUuid | String | The cluster UUID. | 4.0.0 |
imageUuid | String | The image UUID. | 4.0.0 |
hostUuid | String | The host UUID. | 4.0.0 |
lastHostUuid | String | 4.0.0 | |
instanceOfferingUuid | String | The instance offering UUID. | 4.0.0 |
rootVolumeUuid | String | The root volume UUID. | 4.0.0 |
platform | String | 4.0.0 | |
defaultL3NetworkUuid | String | 4.0.0 | |
type | String | 4.0.0 | |
hypervisorType | String | 4.0.0 | |
memorySize | Long | 4.0.0 | |
cpuNum | Integer | 4.0.0 | |
cpuSpeed | Long | 4.0.0 | |
allocatorStrategy | String | 4.0.0 | |
createDate | Timestamp | The time when the VM instance was created. | 4.0.0 |
lastOpDate | Timestamp | The time when the VM instance was last modified. | 4.0.0 |
state | String | 4.0.0 | |
vmNics | List | See vmNics | 4.0.0 |
allVolumes | List | See allVolumes | 4.0.0 |
vmCdRoms | List | See vmCdRoms | 4.0.0 |
#vmNics
Name | Type | Description | Starting Version |
---|---|---|---|
uuid | String | The NIC UUID. | 4.0.0 |
vmInstanceUuid | String | The VM instance UUID. | 4.0.0 |
l3NetworkUuid | String | The L3 network UUID. | 4.0.0 |
ip | String | The IP address of the NIC. | 4.0.0 |
mac | String | The MAC address of the NIC. | 4.0.0 |
hypervisorType | String | The virtualization type. | 4.0.0 |
netmask | String | The netmask. | 4.0.0 |
gateway | String | The gateway IP address. | 4.0.0 |
metaData | String | 4.0.0 | |
ipVersion | Integer | The IP version. | 4.0.0 |
deviceId | Integer | The device ID. | 4.0.0 |
type | String | The NIC type. | 4.0.0 |
createDate | Timestamp | The time when the NIC was added to the VM instance. | 4.0.0 |
lastOpDate | Timestamp | The time when the NIC was last modified. | 4.0.0 |
usedIps | List | See usedIps | 4.0.0 |
#usedIps
Name | Type | Description | Starting Version |
---|---|---|---|
uuid | String | The IP address UUID. | 4.0.0 |
ipRangeUuid | String | The IP range UUID. | 4.0.0 |
l3NetworkUuid | String | The L3 network UUID. | 4.0.0 |
ipVersion | Integer | The IP version. | 4.0.0 |
ip | String | The IP address. | 4.0.0 |
netmask | String | The netmask. | 4.0.0 |
gateway | String | The gateway IP address. | 4.0.0 |
usedFor | String | 4.0.0 | |
ipInLong | long | 4.0.0 | |
vmNicUuid | String | The VM NIC UUID. | 4.0.0 |
createDate | Timestamp | The time when the IP address was used. | 4.0.0 |
lastOpDate | Timestamp | The time when the was last modified. | 4.0.0 |
#allVolumes
Name | Type | Description | Starting Version |
---|---|---|---|
uuid | String | The volume UUID. | 4.0.0 |
name | String | The volume name. | 4.0.0 |
description | String | The detailed description of the volume. | 4.0.0 |
primaryStorageUuid | String | The primary storage UUID. | 4.0.0 |
vmInstanceUuid | String | The bare metal instance UUID. | 4.0.0 |
diskOfferingUuid | String | The volume offering UUID. | 4.0.0 |
rootImageUuid | String | The root image UUID. | 4.0.0 |
installPath | String | The installation path of the volume in the primary storage. | 4.0.0 |
type | String | The type of the volume. | 4.0.0 |
format | String | The format of the volume. | 4.0.0 |
size | Long | The size of the volume. | 4.0.0 |
actualSize | Long | The actual storage space that the volume takes up. | 4.0.0 |
deviceId | Integer | 4.0.0 | |
state | String | The state of the volume. | 4.0.0 |
status | String | The status of the volume. | 4.0.0 |
createDate | Timestamp | The time when the volume was created. | 4.0.0 |
lastOpDate | Timestamp | The time when the volume was last modified. | 4.0.0 |
isShareable | Boolean | Indicates whether the volume is shareable. | 4.0.0 |
volumeQos | String | The QoS of the volume, for example, 1048576. | 4.0.0 |
#vmCdRoms
Name | Type | Description | Starting Version |
---|---|---|---|
uuid | String | The CD-ROM UUID. | 4.0.0 |
vmInstanceUuid | String | The VM instance UUID. | 4.0.0 |
deviceId | Integer | The device ID. | 4.0.0 |
isoUuid | String | The ISO image UUID. | 4.0.0 |
isoInstallPath | String | The installation path of the ISO image. | 4.0.0 |
name | String | The CD-ROM name. | 4.0.0 |
description | String | The detailed description of the CD-ROM. | 4.0.0 |
createDate | Timestamp | The time when the CD-ROM was created. | 4.0.0 |
lastOpDate | Timestamp | The time when the CD-ROM was last modified. | 4.0.0 |
#lbs
Name | Type | Description | Starting Version |
---|---|---|---|
slbGroupUuid | String | 4.0.0 | |
name | String | The name of the load balancer. | 4.0.0 |
uuid | String | The UUID of the load balancer. | 4.0.0 |
description | String | The detailed description of the load balancer. | 4.0.0 |
state | String | 4.0.0 | |
type | String | 4.0.0 | |
vipUuid | String | The virtual IP UUID. | 4.0.0 |
createDate | Timestamp | The time when the oad balancer was created. | 4.0.0 |
lastOpDate | Timestamp | The time when the load balancer was last modified. | 4.0.0 |
listeners | List | See listeners. | 4.0.0 |
#listeners
Name | Type | Description | Starting Version |
---|---|---|---|
uuid | String | The listener UUID. | 4.0.0 |
name | String | The name of the listener. | 4.0.0 |
description | String | The detailed description of the listener. | 4.0.0 |
loadBalancerUuid | String | The load balancer UUID. | 4.0.0 |
instancePort | Integer | 4.0.0 | |
loadBalancerPort | Integer | 4.0.0 | |
protocol | String | 4.0.0 | |
serverGroupUuid | String | 4.0.0 | |
createDate | Timestamp | The time when the listener was created. | 4.0.0 |
lastOpDate | Timestamp | The time when the listener was last modified. | 4.0.0 |
vmNicRefs | List | See vmNicRefs. | 4.0.0 |
aclRefs | List | See aclRefs. | 4.0.0 |
certificateRefs | List | See certificateRefs. | 4.0.0 |
serverGroupRefs | List | See serverGroupRefs. | 4.0.0 |
#vmNicRefs
Name | Type | Description | Starting Version |
---|---|---|---|
id | Long | 4.0.0 | |
listenerUuid | String | 4.0.0 | |
vmNicUuid | String | The VM NIC UUID. | 4.0.0 |
status | String | 4.0.0 | |
createDate | Timestamp | The time when the NIC was added to the VM instance. | 4.0.0 |
lastOpDate | Timestamp | The time when the NIC was last modified. | 4.0.0 |
#aclRefs
Name | Type | Description | Starting Version |
---|---|---|---|
id | Long | The record ID. | 4.0.0 |
listenerUuid | String | The listener UUID. | 4.0.0 |
aclUuid | String | The UUID of the access control list (ACL). | 4.0.0 |
type | String | The type of the ACL. | 4.0.0 |
createDate | Timestamp | The time when the ACL was created. | 4.0.0 |
lastOpDate | Timestamp | The time when the ACL was last modified. | 4.0.0 |
#certificateRefs
Name | Type | Description | Starting Version |
---|---|---|---|
id | Long | 4.0.0 | |
listenerUuid | String | 4.0.0 | |
certificateUuid | String | 4.0.0 | |
createDate | Timestamp | The time when the certificate was created. | 4.0.0 |
lastOpDate | Timestamp | The time when the certificate was last modified. | 4.0.0 |
#serverGroupRefs
Name | Type | Description | Starting Version |
---|---|---|---|
id | long | 4.0.0 | |
listenerUuid | String | 4.0.0 | |
serverGroupUuid | String | 4.0.0 | |
createDate | Timestamp | The time when the server group was created. | 4.0.0 |
lastOpDate | Timestamp | The time when the server group was last modified. | 4.0.0 |
#networks
Name | Type | Description | Starting Version |
---|---|---|---|
slbGroupUuid | String | 4.0.0 | |
l3NetworkUuid | String | The L3 network UUID. | 4.0.0 |
l3NetworkCategory | String | 4.0.0 | |
l3NetworkType | String | 4.0.0 | |
type | String | 4.0.0 | |
createDate | Timestamp | The time when the network was created. | 4.0.0 |
lastOpDate | Timestamp | The time when the network was last modified. | 4.0.0 |
SDK Sample
Java
SDK
CreateSlbGroupAction action = new CreateSlbGroupAction();
action.name = "slbGroup";
action.slbOfferingUuid = "f66b4cd06a2d3ae985e40514502c3ea3";
action.frontEndL3NetworkUuid = "307ab51e198a35bab0bcc517f849aa46";
action.backendType = "VYOS";
action.deployType = "Direct";
action.description = "this is a slb spec for test";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
CreateSlbGroupAction.Result res = action.call();
Python
SDK
CreateSlbGroupAction action = CreateSlbGroupAction()
action.name = "slbGroup"
action.slbOfferingUuid = "f66b4cd06a2d3ae985e40514502c3ea3"
action.frontEndL3NetworkUuid = "307ab51e198a35bab0bcc517f849aa46"
action.backendType = "VYOS"
action.deployType = "Direct"
action.description = "this is a slb spec for test"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
CreateSlbGroupAction.Result res = action.call()