You can call this operation to bind a Server Load Balancer (SLB) instance to an application.

Debugging

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 only uses common request headers. For more information, see the Common request parameters topic.

Request syntax

POST /pop/app/bind_slb_json HTTPS|HTTP

Request parameters

Parameter Type Required Example Description
AppId String Yes 3616cdca-*********

The ID of the application to which you want to bind an SLB instance.

SlbId String Yes lb-wz96ph63r************

The ID of the SLB instance to be bound.

SlbIp String Yes 192.16*. *. *

The IP address allocated to the SLB instance to be bound.

Type String Yes intranet

The type of the SLB instance to be bound.

ListenerPort Integer No 80

The listening port for the SLB instance to be bound.

VServerGroupId String No ""

The ID of the virtual server (VServer) group associated with the intranet SLB instance.

Response parameters

Parameter Type Example Description
Code Integer 200

The returned code.

Message String bind slb success

The returned message.

RequestId String 23DR4FDXXXXXXXXXX
Data Struct

The returned data.

SlbName String test**********

The name of the SLB instance that was bound to the application.

SlbId String lb-wz96ph63r************

The ID of the SLB instance that was bound to the application.

SlbIp String 192.16*. *. *

The IP address allocated to the SLB instance that was bound to the application.

ExtSlbName String ""

The name of the Internet SLB instance that was bound to the application.

ExtSlbId String ""

The ID of the Internet SLB instance that was bound to the application.

ExtSlbIp String ""

The IP address allocated to the Internet SLB instance that was bound to the application.

SlbPort Integer 80

The listening port for the SLB instance that was bound to the application.

VServerGroupId String ""

The ID of the VServer group associated with the intranet SLB instance that was bound to the application.

ExtVServerGroupId String ""

The ID of the VServer group associated with the Internet SLB instance that was bound to the application.

Examples

Sample requests

POST /pop/app/bind_slb_json HTTP/1.1
Common request headers
{
  "AppId": ""
  "SlbId": ""
  "SlbIp": ""
  "Type": ""
}

Sample success responses

JSON format

{
    "Data": {
        "SlbPort": 80,
        "SlbId": "lb-wz96ph63r************",
        "SlbIp": "192.168. *. *",
        "SlbName": "test*********"
    },
    "Message": "bind slb success",
    "Code": 200
}

XML format

<Data>
    <SlbPort>80</SlbPort>
    <SlbId>lb-wz96ph63r************</SlbId>
    <SlbIp>192.168. *. *</SlbIp>
    <SlbName>test*********</SlbName>
</Data>
<Message>bind slb success</Message>
<Code>200</Code>

Error codes

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