Creates a primary/secondary server group. Each primary/secondary server group consists of two backend servers. One backend server functions as the primary server, and the other backend server functions as the secondary backend server.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
slb:CreateMasterSlaveServerGroup | create |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the Classic Load Balancer (CLB) instance. | cn-hangzhou |
LoadBalancerId | string | Yes | The CLB instance ID. | lb-bp1hv944r69al4j****** |
MasterSlaveServerGroupName | string | No | The name of the primary/secondary server group. | Group1 |
MasterSlaveBackendServers | string | Yes | The backend servers in the primary/secondary server group. Each primary/secondary server group consists of two backend servers. Configure the following parameters:
Note
You can specify ENIs and elastic container instances as backend servers only for high-performance CLB instances.
| [{ "ServerId": "i-xxxxxxxxx", "Weight": "100", "Type": "ecs", "Port":"82","ServerType":"Master","Description":"test-112" }, { "ServerId": "i-xxxxxxxxx", "Weight": "100", "Type": "ecs", "Port":"84","ServerType":"Slave","Description":"test-112" }] |
Tag | array<object> | No | The tags. | |
object | No | |||
Key | string | No | The key of tag N. Valid values of N: 1 to 20. The tag key cannot be an empty string. The tag key can be up to 64 characters in length, and cannot contain | test |
Value | string | No | The value of tag N. Valid values of N: 1 to 20. The tag value can be an empty string. The tag value can be up to 128 characters in length, and cannot contain | 1 |
Response parameters
Examples
Sample success responses
JSON
format
{
"MasterSlaveServerGroupId": "rsp-bp19au4******",
"RequestId": "7CA4DB76-4D32-523B-822E-5C9494613D46",
"MasterSlaveBackendServers": {
"MasterSlaveBackendServer": [
{
"Type": "ecs",
"Weight": 100,
"Description": "test-112",
"Port": 82,
"ServerId": "i-bp1fq61enf4loa5i****",
"ServerType": "Master"
}
]
}
}
Error codes
HTTP status code | Error code | Error message |
---|---|---|
400 | BACKEND_SERVERS_NUM_MUST_BE_TWO | Backend servers num must be 2. |
400 | Mismatched.ZoneId | The zone of the server is not matched with the cloud box loadbalancer. |
400 | BACKEND_SERVERS_HAVE_SAME_PORT_AND_SERVERID | Backend servers have same port and serverId. |
400 | BACKEND_SERVERS_CAN_ONLY_CONTAIN_ONE_MASTER_AND_ONE_SLAVE | Backend servers can only contain one master and one slave. |
400 | BACKEND_SERVER_ID_CAN_NOT_EMPTY | Backend server id can not empty. |
400 | INVALID_SERVER_TYPE | Invalid server type. |
400 | BACKEND_SERVER_PORT_CAN_NOT_EMPTY | Backend server port can not empty. |
400 | RealServerPortNotSupport | Real server port not support. |
400 | OperationUnsupported.CreateMasterSlaveServerGroup | This type of backend server is not allowed to attached to singleTunnel or anyTunnel lb. |
400 | IncorrectStatus.RSByPassToas | %s. |
400 | OperationFailed.ActionNotSupport | The loadbalancer does not support such action. |
400 | RsTunnelIp2VmNameConflict | %s. |
400 | NetworkConflict | %s. |
400 | InvalidParam.TagValue | %s. |
400 | InvalidParam.TagKey | %s. |
400 | SizeLimitExceeded.Tag | %s. |
400 | MissingParam.TagKey | The param MissingParam.TagKey is missing. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-06-02 | The Error code has changed | View Change Details |