Updates the Server Load Balancer (SLB) instance bound 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 | Write |
|
| none |
Request syntax
PUT /pop/v5/k8s/acs/k8s_slb_binding
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
AppId | string | Yes | The ID of the application. You can query the application ID by calling the ListApplication operation. For more information, see ListApplication . | 5a166fbd-****-****-a286-781659d9f54c |
ClusterId | string | Yes | The ID of the cluster. You can query the cluster ID by calling the GetK8sCluster operation. For more information, see GetK8sCluster . | 712082c3-****-****-9217-a947b5cde6ee |
Type | string | Yes | The type of the SLB instance. Valid values:
| Internet |
SlbProtocol | string | No | The protocol used by the SLB instance. Set the value to TCP. | TCP |
TargetPort | string | No | The backend port, which is also the service port of the application. Valid values: 1 to 65535. | 8082 |
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"}]
| {"targetPort":8080,"port":82,"loadBalancerProtocol":"TCP"},{"port":81,"certId":"136246975637380916c185d6fa21914500329_-xxxxxxx","targetPort":8181,"lo adBalancerProtocol":"HTTPS"} |
Specification | string | No | The specifications of the SLB instance.
If you do not specify this parameter, the default value slb.s1.small is used. | 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. SLB supports the following scheduling algorithms: round-robin and weighted round-robin. Valid values:
| wrr |
SlbName | string | No | The name of the SLB instance. | SLB_doctest |
DisableForceOverride | boolean | No | Specifies whether to disable listener configuration overriding.
| true |
Response parameters
Examples
Sample success responses
JSON
format
{
"ChangeOrderId": "9a1dcdee-****-****-ad37-cbf9dc91fba9",
"Code": 200,
"Message": "success",
"RequestId": "4823-bhjf-23u4-eiufh"
}
Error codes
For a list of error codes, visit the Service error codes.