Updates the Server Load Balancer (SLB) instance bound to an application that is deployed in a Container Service for Kubernetes (ACK) cluster.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request headers

This operation uses only common request headers. For more information, see the topic about common request parameters.

Request syntax

PUT /pop/v5/k8s/acs/k8s_slb_binding HTTP/1.1

Request parameters

Parameter Type Position Required Example Description
AppId String Query Yes 5a166fbd-****-****-a286-781659d9f54c

The ID of the application. You can call the ListApplication operation to query the application ID.

ClusterId String Query Yes 712082c3-****-****-9217-a947b5cde6ee

The ID of the cluster. You can call the GetK8sCluster operation to query the cluster ID.

Type String Query Yes Internet

The type of the SLB instance. Valid values:

  • Internet: an Internet-facing SLB instance
  • Intranet: an internal-facing SLB instance
SlbProtocol String Query No TCP

The protocol used by the SLB instance. Set the value to TCP.

TargetPort String Query No 8082

The backend port, which is also the service port of the application. Valid values: 1 to 65535.

Port String Query No 80

The frontend port. Valid values: 1 to 65535.

ServicePortInfos String Query No {"targetPort":8080,"port":82,"loadBalancerProtocol":"TCP"},{"port":81,"certId":"136246975637380916c185d6fa21914500329_-xxxxxxx","targetPort":8181,"lo adBalancerProtocol":"HTTPS"}

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"}

  • port: required. The frontend port. Valid values: 1 to 65535. The value must be unique.
  • targetPort: required. The backend port. Valid values: 1 to 65535.
  • loadBalancerProtocol: required. Valid values: TCP and HTTPS. If the HTTP protocol is used, set this parameter to TCP.
  • certId: the ID of the certificate. This parameter is required if the HTTPS protocol is used. You can purchase an SLB instance in the SLB console.
  • Note: The ServicePortInfos parameter is specified to support multi-port mappings. If you want this parameter to take effect, make sure that you specify the AppId, ClusterId, Type, and SlbId parameters.
Specification String Query No slb.s1.small

The specifications of the SLB instance. If you do not specify this parameter, Small I (slb.s1.small) is used. For more information about the specifications and prices of SLB instances, see Pay-as-you-go.

Scheduler String Query No wrr

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: weighted round-robin scheduling. Backend servers that have higher weights receive more requests than those that have lower weights.
  • rr: round-robin scheduling. Requests are sequentially distributed to backend servers.
SlbName String Query No SLB_doctest

The name of the SLB instance.

Response parameters

Parameter Type Example Description
ChangeOrderId String 9a1dcdee-****-****-ad37-cbf9dc91fba9

The ID of the change process.

Code Integer 200

The HTTP status code.

Message String success

The returned message that indicates whether the call is successful.

RequestId String 4823-bhjf-23u4-eiufh

The ID of the request.


Sample requests

PUT /pop/v5/k8s/acs/k8s_slb_binding HTTP/1.1
Common request headers
"AppId": "5a166fbd-****-****-a286-781659d9f54c",
"ClusterId": "712082c3-****-****-9217-a947b5cde6ee",
"Type": "Internete"

Sample success responses

XML format


JSON format

    "RequestId": "4823-bhjf-23u4-eiufh",
    "Message": "success",
    "ChangeOrderId": "9a1dcdee-****-****-ad37-cbf9dc91fba9",
    "Code": 200

Error codes

For a list of error codes, visit the API Error Center.