Binds a Server Load Balancer (SLB) instance to an application that is deployed in a Container Service for Kubernetes (ACK) cluster.
Debugging
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"}
|
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. |
Examples
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
<Message>success</Message>
<ChangeOrderId>b4b37bde-a125-43fc-9f8e-741f7f4a9ae3</ChangeOrderId>
<Code>200</Code>
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.