Binds a Server Load Balancer (SLB) instance 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

POST /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.

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

The ID of the cluster.

Type String Query Yes internet

The type of the SLB instance. Valid values: internet and intranet.

Port String Query No 80

The frontend port. Valid values: 1 to 65535.

SlbProtocol String Query No TCP

The protocol used by the SLB instance. Valid values: TCP, HTTP, and HTTPS.

TargetPort String Query No 8080

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

SlbId String Query No lb-2ze1quax9t****iz82bjt

The ID of the SLB instance. If you leave this parameter empty, Enterprise Distributed Application Service (EDAS) automatically purchases an SLB instance.

ServicePortInfos String Query No [{"targetPort":8080,"port":82,"loadBalancerProtocol":"TCP"},{"port":81,"certId":"136246975637380916c185d6fa21914500329_-988as","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. Each port 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.

Response parameters

Parameter Type Example Description
ChangeOrderId String b4b37bde-a125-****-****-741f7f4a9ae3

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 unique ID of the request.


Sample requests

POST /pop/v5/k8s/acs/k8s_slb_binding HTTP/1.1
Common request headers
  "AppId": "5a166fbd-****-****-a286-781659d9f54c"
  "ClusterId": "712082c3-f554-****-****-a947b5cde6ee"
  "Port": "80"
  "SlbProtocol": "TCP"
  "TargetPort": "8080"
  "Type": "internet"

Sample success responses

XML format


JSON format

	"Message": "success",
	"ChangeOrderId": "b4b37bde-a125-43fc-9f8e-741f7f4a9ae3",
	"Code": 200

Error codes

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