Binds a Server Load Balancer (SLB) instance to an application that is deployed in a Container Service for Kubernetes (ACK) cluster.
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 |
---|---|---|---|---|
edas:ManageApplication | Read |
|
| none |
Request syntax
POST /pop/v5/k8s/acs/k8s_slb_binding
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
AppId | string | Yes | The ID of the application. | 5a166fbd-****-****-a286-781659d9f54c |
ClusterId | string | Yes | The ID of the cluster. | 712082c3-f554-****-****-a947b5cde6ee |
Type | string | Yes | The type of the SLB instance. Valid values:
| internet |
SlbId | string | No | The ID of the SLB instance. If you leave this parameter empty, Enterprise Distributed Application Service (EDAS) automatically purchases an SLB instance. | lb-2ze1quax9t****iz82bjt |
SlbProtocol | string | No | The protocol used by the SLB instance. Valid values: TCP, HTTP, and HTTPS. | TCP |
TargetPort | string | No | The backend port, which is also the service port of the application. Valid values: 1 to 65535. | 8080 |
Port | string | No | The frontend port. Valid values: 1 to 65535. | 80 |
ServicePortInfos | string | No | The information about the ports. This parameter is required if you want to configure multi-port mappings or use a protocol other than TCP. You must set this parameter to a JSON array. Example: [{"targetPort":8080,"port":82,"loadBalancerProtocol":"TCP"},{"port":81,"certId":"1362469756373809_16c185d6fa2_1914500329_-xxxxxxx","targetPort":8181,"lo adBalancerProtocol":"HTTPS"}]
Note
The ServicePortInfos parameter is specified to support multi-port mappings. If you want this parameter to take effect, make sure that you have set the AppId, ClusterId, Type, and SlbId parameters.
| [{"targetPort":8080,"port":82,"loadBalancerProtocol":"TCP"},{"port":81,"certId":"136246975637380916c185d6fa21914500329_-988as","targetPort":8181,"lo adBalancerProtocol":"HTTPS"}] |
Specification | string | No | The instance type of the SLB instance. Valid values:
| slb.s1.small |
Scheduler | string | No | The scheduling algorithm for the SLB instance. If you do not specify this parameter, the default value rr is used. Valid values:
| wrr |
Response parameters
Examples
Sample success responses
JSON
format
{
"ChangeOrderId": "b4b37bde-a125-****-****-741f7f4a9ae3",
"Code": 200,
"Message": "success",
"RequestId": "4823-bhjf-23u4-****"
}
Error codes
For a list of error codes, visit the Service error codes.