Application BLB Monitor Related Interface
CreateAppTCPListener
- Under the specified LoadBalancer, create an application blb listener based on the TCP protocol that listens to a frontend port and forwards all TCP traffic sent to that port according to the policy.
Request Structure
POST /v{version}/appblb/{blbId}/TCPlistener?clientToken={clientToken} HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: authorization string
{
"listenerPort":listenerPort,
"scheduler":scheduler,
"tcpSessionTimeout":tcpSessionTimeout
}
Request Header
There are no other special headers except the public headers.
Request Parameter
Parameter name | Type | Required or not | Parameter position | Description |
---|---|---|---|---|
version | String | Yes | URL parameter | API version number (the current value is 1) |
blbId | String | Yes | URL parameter | The identifier of the own LoadBalancer |
clientToken | String | Yes | Query parameter | Idempotent Token, no longer than 64 bits |
listenerPort | int | Yes | RequestBody parameter | The listening port of the listener. It must be an integer between 1 and 65535. |
scheduler | String | Yes | RequestBody parameter | Load balancing algorithm supports 3 methods: "RoundRobin"/"LeastConnection"/"Hash" |
tcpSessionTimeout | int | No | RequestBody parameter | tcp set connection timeout (unit: second); 900 by default; it must be an integer between 10 and 4000 |
udpSessionTimeout | int | No | RequestBody parameter | The udp session timeout duration. The default value is 90. This parameter needs to be an integer between 5-4000 and expressed in seconds |
Return Status Code
"200" for return successful and Error Code for return failed.
Return Header
There are no other special headers except the public headers.
Return Parameter
None
Request Example
POST /v1/appblb/lb-j8UqijYf/TCPlistener?clientToken=asdfg HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
{
"listenerPort":95,
"scheduler":"LeastConnection"
}
Response Example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Wed, 10 Apr 2016 08:26:52 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
CreateAppUDPListener
- Under the specified LoadBalancer, create an application listener based on the UDP protocol that listens to a frontend port and forwards all UDP traffic sent to that port according to the policy.
Request Structure
POST /v{version}/appblb/{blbId}/UDPlistener?clientToken={clientToken} HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: authorization string
{
"listenerPort":listenerPort,
"scheduler":scheduler
}
Request Header
There are no other special headers except the public headers.
Request Parameter
Parameter name | Type | Required or not | Parameter position | Description |
---|---|---|---|---|
version | String | Yes | URL parameter | API version number (the current value is 1) |
blbId | String | Yes | URL parameter | The identifier of the own LoadBalancer |
clientToken | String | Yes | Query parameter | Idempotent Token, no longer than 64 bits |
listenerPort | int | Yes | RequestBody parameter | The listening port of the listener. It must be an integer between 1 and 65535. |
scheduler | String | Yes | RequestBody parameter | Load balancing algorithm supports 3 methods: "RoundRobin"/"LeastConnection"/"Hash" |
Return Status Code
"200" for return successful and Error Code for return failed.
Return Header
There are no other special headers except the public headers.
Return Parameter
None
Request Example
POST /v1/appblb/lb-j8UqijYf/UDPlistener?clientToken=asdfg HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
{
"listenerPort":95,
"scheduler":"LeastConnection"
}
Response Example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Wed, 10 Apr 2016 08:26:52 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
CreateAppHTTPListener
- Under the specified LoadBalancer, create an application listener based on the HTTP protocol that listens to a frontend port, and forward all HTTP requests sent to that port to the backend port monitored by the backend server according to the policy.
Request Structure
POST /v{version}/appblb/{blbId}/HTTPlistener?clientToken={clientToken} HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: authorization string
{
"listenerPort":listenerPort,
"scheduler":scheduler,
"keepSession":keepSession,
"keepSessionType":keepSessionType,
"keepSessionTimeout":keepSessionTimeout,
"keepSessionCookieName":keepSessionCookieName,
"xForwardedFor":xForwardedFor,
"xForwardedProto":xForwardedProto,
"serverTimeout":serverTimeout,
"redirectPort":redirectPort
}
Request Header
There are no other special headers except the public headers.
Request Parameter
Parameter name | Type | Required or not | Parameter position | Description |
---|---|---|---|---|
version | String | Yes | URL parameter | API version number (the current value is 1) |
blbId | String | Yes | URL parameter | The identifier of the own LoadBalancer |
clientToken | String | Yes | Query parameter | Idempotent Token, no longer than 64 bits |
listenerPort | int | Yes | RequestBody parameter | The listening port of the listener. It must be an integer between 1 and 65535. |
scheduler | String | Yes | RequestBody parameter | Load balancing algorithm supports 2 methods: "RoundRobin"/"LeastConnection" |
keepSession | boolean | No | RequestBody parameter | Whether to enable the keep session feature with which requests from the same Client will reach the same backend server; disabled by default |
keepSessionType | String | No | RequestBody parameter | Cookie processing method of keep session; valid only if keep session is enabled; supports "insert"/"rewrite"; "insert" by default |
keepSessionTimeout | int | No | RequestBody parameter | Cookie validity time of keep session (unit: seconds); valid only if keep session is enabled. 3,600 sec by default; must be an integer between 1 and 15,552,000. |
keepSessionCookieName | String | No | RequestBody parameter | The name of the cookie that needs to be overwritten during keep session. It is valid only if keep session is enabled and keepSessionType = "rewrite". |
xForwardedFor | boolean | No | RequestBody parameter | Whether to obtain the real IP address of the client. After it is enabled, the client's real address can be obtained through the X-Forwarded-For HTTP header on the backend server. It is disabled by default. |
serverTimeout | int | No | RequestBody parameter | Backend server timeout (unit: second); 30s by default; it must be an integer between 1 and 3600 |
redirectPort | int | No | RequestBody parameter | Forward the request received by this listener to the HTTPS listener specified through this port |
Return Status Code
"200" for return successful and Error Code for return failed.
Return Header
There are no other special headers except the public headers.
Return Parameter
None
Request Example
POST /v1/appblb/lb-j8UqijYf/HTTPlistener?clientToken=asdfg HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
{
"listenerPort":95,
"scheduler":"LeastConnection",
"xForwardedFor":true,
"xForwardedProto":xForwardedProto,
"serverTimeout":1800,
"redirectPort":0
}
Response Example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Wed, 10 Apr 2016 08:26:52 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
CreateAppHTTPSListener
- Under the specified LoadBalancer, create an application listener based on the HTTPS protocol, listening to a frontend port, and converting all HTTPS requests sent to this port through SSL offload to HTTP requests before forwarding them to the backend port for monitoring the backend server according to the policy.
Request Structure
POST /v{version}/appblb/{blbId}/HTTPSlistener?clientToken={clientToken} HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: authorization string
{
"listenerPort":listenerPort,
"scheduler":scheduler,
"keepSession":keepSession,
"keepSessionType":keepSessionType,
"keepSessionTimeout":keepSessionTimeout,
"keepSessionCookieName":keepSessionCookieName,
"xForwardedFor":xForwardedFor,
"xForwardedProto":xForwardedProto,
"serverTimeout":serverTimeout,
"certIds":[id1, id2],
"ie6Compatible":true,
"encryptionType":encryptionType,
"encryptionProtocols":[protocal1, protacal2],
"dualAuth":false,
"clientCertIds":[id1, id2]
}
Request Header
There are no other special headers except the public headers.
Request Parameter
Parameter name | Type | Required or not | Parameter position | Description |
---|---|---|---|---|
version | String | Yes | URL parameter | API version number (the current value is 1) |
blbId | String | Yes | URL parameter | The identifier of the own LoadBalancer |
clientToken | String | Yes | Query parameter | Idempotent Token, no longer than 64 bits |
listenerPort | int | Yes | RequestBody parameter | The listening port of the listener. It must be an integer between 1 and 65535. |
scheduler | String | Yes | RequestBody parameter | Load balancing algorithm supports 2 methods: "RoundRobin"/"LeastConnection" |
keepSession | boolean | No | RequestBody parameter | Whether to enable the keep session feature with which requests from the same Client will reach the same backend server; disabled by default |
keepSessionType | String | No | RequestBody parameter | Cookie processing method of keep session; valid only if keep session is enabled; supports "insert"/"rewrite"; "insert" by default |
keepSessionTimeout | int | No | RequestBody parameter | Cookie validity time of keep session (unit: seconds); valid only if keep session is enabled. 3,600 sec by default; must be an integer between 1 and 15,552,000. |
keepSessionCookieName | String | No | RequestBody parameter | The name of the cookie that needs to be overwritten during keep session. It is valid only if keep session is enabled and keepSessionType = "rewrite". |
xForwardedFor | boolean | No | RequestBody parameter | Whether to obtain the real IP address of the client. After it is enabled, the client's real address can be obtained through the X-Forwarded-For HTTP header on the backend server. It is disabled by default. |
xForwardedProto | boolean | No | RequestBody parameter | Indicates whether the header of the request sent to the back-end server carries a proto field, which is disabled by default |
serverTimeout | int | No | RequestBody parameter | Backend server timeout (unit: second); 30s by default; it must be an integer between 1 and 3600 |
certIds | List\<String> | Yes | RequestBody parameter | The certificate chain to be loaded by the listener |
ie6Compatible | boolean | No | RequestBody parameter | Whether compatible with the HTTPS request of IE6 (the protocol format is the earlier SSL3.0 with poor security); enabled by default |
encryptionType | String | No | RequestBody parameter | Encryption option supports three types: compatibleIE/incompatibleIE/userDefind ie6Compatible field pass value does not take effect when encryptionType has a value and is legal |
encryptionProtocols | List\<String> | No | RequestBody parameter | When the encryptionType value is userDefind, the protocol type list is a string list formed by the combination of four protocols: "sslv3", "tlsv10", "tlsv11", and "tlsv12" |
dualAuth | boolean | No | RequestBody parameter | Whether to enable two-way authentication. The default is off. |
clientCertIds | List\<String> | No | RequestBody parameter | The client certificate chain loaded when dualAuth is true |
Return Status Code
"200" for return successful and Error Code for return failed.
Return Header
There are no other special headers except the public headers.
Return Parameter
None
Request Example
POST /v1/appblb/lb-j8UqijYf/HTTPSlistener?clientToken=asdfg HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
{
"listenerPort":95,
"scheduler":"LeastConnection",
"xForwardedFor":true,
"xForwardedProto":xForwardedProto,
"serverTimeout":1800,
"certIds":["cert-zfj2ey2z4kmm"]
}
Response Example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Wed, 10 Apr 2016 08:26:52 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
CreateAppSSLListener
- Under the specified LoadBalancer, create an application blb listener based on the SSL protocol that listens to a frontend port and forwards all SSL traffic sent to this port according to the policy.
Request Structure
POST /v{version}/appblb/{blbId}/SSLlistener?clientToken={clientToken} HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: authorization string
{
"listenerPort":listenerPort,
"scheduler":scheduler,
"certIds":[id1, id2],
"ie6Compatible":true,
"encryptionType":encryptionType,
"encryptionProtocols":[protocal1, protacal2],
"dualAuth":false,
"clientCertIds":[id1, id2]
}
Request Header
There are no other special headers except the public headers.
Request Parameter
Parameter name | Type | Required or not | Parameter position | Description |
---|---|---|---|---|
version | String | Yes | URL parameter | API version number (the current value is 1) |
blbId | String | Yes | URL parameter | The identifier of the own LoadBalancer |
clientToken | String | Yes | Query parameter | Idempotent Token, no longer than 64 bits |
listenerPort | int | Yes | RequestBody parameter | The listening port of the listener. It must be an integer between 1 and 65535. |
scheduler | String | Yes | RequestBody parameter | Load balancing algorithm supports 3 methods: "RoundRobin"/"LeastConnection"/"Hash" |
certIds | List\<String> | Yes | RequestBody parameter | The certificate chain to be loaded by the listener |
ie6Compatible | boolean | No | RequestBody parameter | Whether compatible with the HTTPS request of IE6 (the protocol format is the earlier SSL3.0 with poor security); enabled by default |
encryptionType | String | No | RequestBody parameter | Encryption option supports three types: compatibleIE/incompatibleIE/userDefind ie6Compatible field pass value does not take effect when encryptionType has a value and is legal |
encryptionProtocols | List\<String> | No | RequestBody parameter | When the encryptionType value is userDefind, the protocol type list is a string list formed by the combination of four protocols: "sslv3", "tlsv10", "tlsv11", and "tlsv12" |
dualAuth | boolean | No | RequestBody parameter | Whether to enable two-way authentication. The default is off. |
clientCertIds | List\<String> | No | RequestBody parameter | The client certificate chain loaded when dualAuth is true |
Return Status Code
"200" for return successful and Error Code for return failed.
Return Header
There are no other special headers except the public headers.
Return Parameter
None
Request Example
POST /v1/appblb/lb-j8UqijYf/SSLlistener?clientToken=asdfg HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
{
"listenerPort":95,
"scheduler":"LeastConnection",
"certIds":["cert-zfj2ey2z4kmm"]
}
Response Example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Wed, 10 Apr 2016 08:26:52 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
UpdateAppTCPListener
- Update the TCP listener parameters under the specified LoadBalancer. All the domains specified in the request parameters will be updated. The unspecified domains remain unchanged, and the listener is specified by the port.
Request Structure
PUT /v{version}/appblb/{blbId}/TCPlistener?clientToken={clientToken}&listenerPort={listenerPort} HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: authorization string
{
"scheduler":scheduler,
"tcpSessionTimeout":tcpSessionTimeout
}
Request Header
There are no other special headers except the public headers.
Request Parameter
Parameter name | Type | Required or not | Parameter position | Description |
---|---|---|---|---|
version | String | Yes | URL parameter | API version number (the current value is 1) |
blbId | String | Yes | URL parameter | The identifier of the own LoadBalancer |
clientToken | String | Yes | Query parameter | Idempotent Token, no longer than 64 bits |
listenerPort | int | Yes | Query parameter | Listener port number |
scheduler | String | No | RequestBody parameter | Load balancing algorithm supports 3 methods: "RoundRobin"/"LeastConnection"/"Hash" |
tcpSessionTimeout | int | No | RequestBody parameter | tcp set connection timeout (unit: second); 900 by default; it must be an integer between 10 and 4000 |
Return Status Code
"200" for return successful and Error Code for return failed.
Return Header
There are no other special headers except the public headers.
Return Parameter
None
Request Example
PUT /v1/appblb/lb-j8UqijYf/TCPlistener?clientToken=asdfg&listenerPort=80 HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
{
"scheduler":"LeastConnection"
}
Response Example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Wed, 10 Apr 2016 08:26:52 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
UpdateAppUDPListener
- Update the UDP listener parameters under the specified LoadBalancer. All the domains specified in the request parameters will be updated, the unspecified domains will remain unchanged, and the listener will be specified through the port.
Request Structure
PUT /v{version}/appblb/{blbId}/UDPlistener?clientToken={clientToken}&listenerPort={listenerPort} HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: authorization string
{
"scheduler":scheduler
}
Request Header
There are no other special headers except the public headers.
Request Parameter
Parameter name | Type | Required or not | Parameter position | Description |
---|---|---|---|---|
version | String | Yes | URL parameter | API version number (the current value is 1) |
blbId | String | Yes | URL parameter | The identifier of the own LoadBalancer |
clientToken | String | Yes | Query parameter | Idempotent Token, no longer than 64 bits |
listenerPort | int | Yes | URL parameter | Listener port number |
scheduler | String | Yes | RequestBody parameter | Load balancing algorithm supports 3 methods: "RoundRobin"/"LeastConnection"/"Hash" |
Return Status Code
"200" for return successful and Error Code for return failed.
Return Header
There are no other special headers except the public headers.
Return Parameter
None
Request Example
PUT /v1/appblb/lb-j8UqijYf/UDPlistener?clientToken=asdfg&listenerPort=80 HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
{
"scheduler":"LeastConnection"
}
Response Example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Wed, 10 Apr 2016 08:26:52 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
UpdateAppHTTPListener
- Update the HTTP listener parameters under the specified LoadBalancer. All the domains specified in the request parameters will be updated. The unspecified domains will remain unchanged. The listener is specified through the port.
Request Structure
PUT /v{version}/appblb/{blbId}/HTTPlistener?clientToken={clientToken}&listenerPort={listenerPort} HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: authorization string
{
"scheduler":scheduler,
"keepSession":keepSession,
"keepSessionType":keepSessionType,
"keepSessionTimeout":keepSessionTimeout,
"keepSessionCookieName":keepSessionCookieName,
"xForwardedFor":xForwardedFor,
"xForwardedProto":xForwardedProto,
"serverTimeout":serverTimeout,
"redirectPort":redirectPort
}
Request Header
There are no other special headers except the public headers.
Request Parameter
Parameter name | Type | Required or not | Parameter position | Description |
---|---|---|---|---|
version | String | Yes | URL parameter | API version number (the current value is 1) |
blbId | String | Yes | URL parameter | The identifier of the own LoadBalancer |
clientToken | String | Yes | Query parameter | Idempotent Token, no longer than 64 bits |
listenerPort | int | Yes | Query parameter | The listener port to be updated needs to be an integer between 1 and 65,535 |
scheduler | String | Yes | RequestBody parameter | Load balancing algorithm supports 2 methods: "RoundRobin"/"LeastConnection" |
keepSession | boolean | No | RequestBody parameter | Whether to enable the keep session feature with which requests from the same Client will reach the same backend server; disabled by default |
keepSessionType | String | No | RequestBody parameter | Cookie processing method of keep session; valid only if keep session is enabled; supports "insert"/"rewrite"; "insert" by default |
keepSessionTimeout | int | No | RequestBody parameter | Cookie validity time of keep session (unit: seconds); valid only if keep session is enabled. 3,600 sec by default; must be an integer between 1 and 15,552,000. |
keepSessionCookieName | String | No | RequestBody parameter | The name of the cookie that needs to be overwritten during keep session. It is valid only if keep session is enabled and keepSessionType = "rewrite". |
xForwardedFor | boolean | No | RequestBody parameter | Whether to obtain the real IP address of the client. After it is enabled, the client's real address can be obtained through the X-Forwarded-For HTTP header on the backend server. It is disabled by default. |
serverTimeout | int | No | RequestBody parameter | Backend server timeout (unit: second); 30s by default; it must be an integer between 1 and 3600 |
redirectPort | int | No | RequestBody parameter | Forward the request received by this listener to the HTTPS listener specified through this port |
Return Status Code
"200" for return successful and Error Code for return failed.
Return Header
There are no other special headers except the public headers.
Return Parameter
None
Request Example
PUT/v1/appblb/lb-j8UqijYf/HTTPlistener? clientToken=asdfg&listenerPort=80 HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
{
"scheduler":"LeastConnection",
"xForwardedFor":true,
"xForwardedProto":xForwardedProto,
"serverTimeout":1800,
}
Response Example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Wed, 10 Apr 2016 08:26:52 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
UpdateAppHTTPSListener
- Update the HTTPS listener parameters under the specified LoadBalancer. All the domains specified in the request parameters will be updated. The unspecified domains will remain unchanged. The listener is specified through the port.
Request Structure
PUT /v{version}/appblb/{blbId}/HTTPSlistener?clientToken={clientToken}&listenerPort={listenerPort} HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: authorization string
{
"scheduler":scheduler,
"keepSession":keepSession,
"keepSessionType":keepSessionType,
"keepSessionDuration":keepSessionDuration,
"keepSessionCookieName":keepSessionCookieName,
"xForwardedFor":xForwardedFor,
"xForwardedProto":xForwardedProto,
"serverTimeout":serverTimeout,
"certIds":[id1, id2],
"compatibleIE":true,
"encryptionType":encryptionType,
"encryptionProtocols":[protocal1, protacal2],
"dualAuth":false,
"clientCertIds":[id1, id2]
}
Request Header
There are no other special headers except the public headers.
Request Parameter
Parameter name | Type | Required or not | Parameter position | Description |
---|---|---|---|---|
version | String | Yes | URL parameter | API version number (the current value is 1) |
blbId | String | Yes | URL parameter | The identifier of the own LoadBalancer |
clientToken | String | Yes | Query parameter | Idempotent Token, no longer than 64 bits |
listenerPort | int | Yes | Query parameter | The listener port to be updated needs to be an integer between 1 and 65,535 |
scheduler | String | Yes | RequestBody parameter | Load balancing algorithm supports 2 methods: "RoundRobin"/"LeastConnection" |
keepSession | boolean | No | RequestBody parameter | Whether to enable the keep session feature with which requests from the same Client will reach the same backend server; disabled by default |
keepSessionType | String | No | RequestBody parameter | Cookie processing method of keep session; valid only if keep session is enabled; supports "insert"/"rewrite"; "insert" by default |
keepSessionTimeout | int | No | RequestBody parameter | Cookie validity time of keep session (unit: seconds); valid only if keep session is enabled. 3,600 sec by default; must be an integer between 1 and 15,552,000. |
keepSessionCookieName | String | No | RequestBody parameter | The name of the cookie that needs to be overwritten during keep session. It is valid only if keep session is enabled and keepSessionType = "rewrite". |
xForwardedFor | boolean | No | RequestBody parameter | Whether to obtain the real IP address of the client. After it is enabled, the client's real address can be obtained through the X-Forwarded-For HTTP header on the backend server. It is disabled by default. |
xForwardedProto | boolean | No | RequestBody parameter | Indicates whether the header of the request sent to the back-end server carries a proto field, which is disabled by default |
serverTimeout | int | No | RequestBody parameter | Backend server timeout (unit: second); 30s by default; it must be an integer between 1 and 3600 |
certIds | List\<String> | Yes | RequestBody parameter | The certificate chain to be loaded by the listener |
compatibleIE | boolean | No | RequestBody parameter | Whether compatible with the HTTPS request of IE6 (the protocol format is the earlier SSL3.0 with poor security); enabled by default |
encryptionType | String | No | RequestBody parameter | Encryption option supports three types: compatibleIE/incompatibleIE/userDefind ie6Compatible field pass value does not take effect when encryptionType has a value and is legal |
encryptionProtocols | List\<String> | No | RequestBody parameter | When the encryptionType value is userDefind, the protocol type list is a string list formed by the combination of four protocols: "sslv3", "tlsv10", "tlsv11", and "tlsv12" |
dualAuth | boolean | No | RequestBody parameter | Whether to enable two-way authentication. The default is off. |
clientCertIds | List\<String> | No | RequestBody parameter | The client certificate chain loaded when dualAuth is true |
Return Status Code
"200" for return successful and Error Code for return failed.
Return Header
There are no other special headers except the public headers.
Return Parameter
None
Request Example
PUT /v1/appblb/lb-j8UqijYf/HTTPSlistener?clientToken=asdfg&listenerPort=80 HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
{
"scheduler":"LeastConnection",
"xForwardedFor":true,
"xForwardedProto":xForwardedProto,
"serverTimeout":1800,
"certIds":["cert-zfj2ey2z4kmm"]
}
Response Example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Wed, 10 Apr 2016 08:26:52 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
UpdateAppSSLListener
- Update the SSL listener parameters under the specified LoadBalancer. All the domains specified in the request parameters will be updated, the unspecified domains will remain unchanged, and the listener will be specified through the port.
Request Structure
PUT /v{version}/appblb/{blbId}/SSLlistener?clientToken={clientToken}&listenerPort={listenerPort} HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: authorization string
{
"scheduler":scheduler,
"certIds":[id1, id2],
"compatibleIE":true,
"encryptionType":encryptionType,
"encryptionProtocols":[protocal1, protacal2],
"dualAuth":false,
"clientCertIds":[id1, id2]
}
Request Header
There are no other special headers except the public headers.
Request Parameter
Parameter name | Type | Required or not | Parameter position | Description |
---|---|---|---|---|
version | String | Yes | URL parameter | API version number (the current value is 1) |
blbId | String | Yes | URL parameter | The identifier of the own LoadBalancer |
clientToken | String | Yes | Query parameter | Idempotent Token, no longer than 64 bits |
listenerPort | int | Yes | Query parameter | The listener port to be updated needs to be an integer between 1 and 65,535 |
scheduler | String | No | RequestBody parameter | Load balancing algorithm supports 3 methods: "RoundRobin"/"LeastConnection"/"Hash" |
certIds | List\<String> | Yes | RequestBody parameter | The certificate chain to be loaded by the listener |
compatibleIE | boolean | No | RequestBody parameter | Whether compatible with the HTTPS request of IE6 (the protocol format is the earlier SSL3.0 with poor security); enabled by default |
encryptionType | String | No | RequestBody parameter | Encryption option supports three types: compatibleIE/incompatibleIE/userDefind ie6Compatible field pass value does not take effect when encryptionType has a value and is legal |
encryptionProtocols | List\<String> | No | RequestBody parameter | When the encryptionType value is userDefind, the protocol type list is a string list formed by the combination of four protocols: "sslv3", "tlsv10", "tlsv11", and "tlsv12" |
dualAuth | boolean | No | RequestBody parameter | Whether to enable two-way authentication. The default is off. |
clientCertIds | List\<String> | No | RequestBody parameter | The client certificate chain loaded when dualAuth is true |
Return Status Code
"200" for return successful and Error Code for return failed.
Return Header
There are no other special headers except the public headers.
Return Parameter
None
Request Example
PUT /v1/appblb/lb-j8UqijYf/TCPlistener?clientToken=asdfg&listenerPort=80 HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
{
"scheduler":"LeastConnection",
"certIds":["cert-zfj2ey2z4kmm"]
}
Response Example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Wed, 10 Apr 2016 08:26:52 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
DescribeAppTCPListeners
- Query information about all TCP listeners under the specified LoadBalancer
- Support matching query by listener port
- The result supports marker paging. The default paging size is 1,000, and can be specified by the maxKeys parameter
Request Structure
GET /v{version}/appblb/{blbId}/TCPlistener?listenerPort={listenerPort}&marker={marker}&maxKeys={maxKeys} HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: authorization string
Request Header
There are no other special headers except the public headers.
Request Parameter
Parameter name | Type | Required or not | Parameter position | Description |
---|---|---|---|---|
version | String | Yes | URL parameter | API version number (the current value is 1) |
blbId | String | Yes | URL parameter | The identifier of the own LoadBalancer |
listenerPort | int | No | Query parameter | The listener port to query |
marker | String | No | Query parameter | The starting location of query for batch acquisition of lists, and is one string generated by the system. |
maxKeys | int | No | Query parameter | Maximum number contained in each page, generally not exceeding 1000. The default value is 1000. |
Return Status Code
"200" for return successful and Error Code for return failed.
Return Header
There are no other special headers except the public headers.
Return Parameter
Parameter name | Type | Description |
---|---|---|
listenerList | List<AppTCPListenerModel> | List containing query results |
marker | String | Mark the starting position of the query. The item does not exist if the result list is empty |
isTruncated | boolean | True means there are additional data in the following pages and false means the current page is the last page. |
nextMarker | String | The marker value requiring to be passed in order to acquire the next page. The domain doesn't appear when isTruncated is false. |
maxKeys | int | Maximum number contained in each page. |
Request Example
GET /v1/appblb/lb-j8UqijYf/TCPlistener?maxKeys=2 HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
Response Example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Wed, 10 Apr 2016 08:26:52 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
{
"listenerList": [
{
"listenerPort": 80,
"scheduler": "RoundRobin"
},
{
"listenerPort": 88,
"scheduler": "RoundRobin"
}
],
"marker": "listener-0050",
"nextMarker": null,
"isTruncated": false,
"maxKeys": 2
}
DescribeAppUDPListeners
- Query information about all UDP listeners under the specified LoadBalancer
- Support matching query by listener port
- The result supports marker paging. The default paging size is 1,000, and can be specified by the maxKeys parameter
Request Structure
GET /v{version}/appblb/{blbId}/UDPlistener?listenerPort={listenerPort}&marker={marker}&maxKeys={maxKeys} HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: authorization string
Request Header
There are no other special headers except the public headers.
Request Parameter
Parameter name | Type | Required or not | Parameter position | Description |
---|---|---|---|---|
version | String | Yes | URL parameter | API version number (the current value is 1) |
blbId | String | Yes | URL parameter | The identifier of the own LoadBalancer |
listenerPort | int | No | Query parameter | The listener port to query |
marker | String | No | Query parameter | The starting location of query for batch acquisition of lists, and is one string generated by the system. |
maxKeys | int | No | Query parameter | Maximum number contained in each page, generally not exceeding 1000. The default value is 1000. |
Return Status Code
"200" for return successful and Error Code for return failed.
Return Header
There are no other special headers except the public headers.
Return Parameter
Parameter name | Type | Description |
---|---|---|
listenerList | List<AppUDPListenerModel> | List containing query results |
marker | String | Mark the starting position of the query. The item does not exist if the result list is empty |
isTruncated | boolean | True means there are additional data in the following pages and false means the current page is the last page. |
nextMarker | String | The marker value requiring to be passed in order to acquire the next page. The domain doesn't appear when isTruncated is false. |
maxKeys | int | Maximum number contained in each page. |
Request Example
GET /v1/appblb/lb-j8UqijYf/UDPlistener?maxKeys=2 HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
Response Example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Wed, 10 Apr 2016 08:26:52 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
{
"listenerList": [
{
"listenerPort": 80,
"scheduler": "RoundRobin"
},
{
"listenerPort": 88,
"scheduler": "RoundRobin"
}
],
"marker": "listener-0050",
"nextMarker": null,
"isTruncated": false,
"maxKeys": 2
}
DescribeAppHTTPListeners
- Query information about all HTTP listeners under the specified LoadBalancer
- Support matching query by listener port
- The result supports marker paging. The default paging size is 1,000, and can be specified by the maxKeys parameter
Request Structure
GET /v{version}/appblb/{blbId}/HTTPlistener?listenerPort={listenerPort}&marker={marker}&maxKeys={maxKeys} HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: authorization string
Request Header
There are no other special headers except the public headers.
Request Parameter
Parameter name | Type | Required or not | Parameter position | Description |
---|---|---|---|---|
version | String | Yes | URL parameter | API version number (the current value is 1) |
blbId | String | Yes | URL parameter | The identifier of the own LoadBalancer |
listenerPort | int | No | Query parameter | The listener port to query |
marker | String | No | Query parameter | The starting location of query for batch acquisition of lists, and is one string generated by the system. |
maxKeys | int | No | Query parameter | Maximum number contained in each page, generally not exceeding 1000. The default value is 1000. |
Return Status Code
"200" for return successful and Error Code for return failed.
Return Header
There are no other special headers except the public headers.
Return Parameter
Parameter name | Type | Description |
---|---|---|
listenerList | List<AppHTTPListenerModel> | List containing query results |
marker | String | Mark the starting position of the query. The item does not exist if the result list is empty |
isTruncated | boolean | True means there are additional data in the following pages and false means the current page is the last page. |
nextMarker | String | The marker value requiring to be passed in order to acquire the next page. The domain doesn't appear when isTruncated is false. |
maxKeys | int | Maximum number contained in each page. |
Request Example
GET /v1/appblb/lb-j8UqijYf/HTTPlistener?maxKeys=2 HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: bce-auth-v1/ae4780f344774daa832f34caadd4d7de/2016-06-03T06:42:31Z/1800/host/3f26e5a322d41fa0f3315e906342c2691fe5ee35d21c7e66e425b4ee0f67ced3
Response Example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Fri, 03 Jun 2016 06:42:44 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
{
"listenerList": [
{
"listenerPort": 90,
"backendPort": 90,
"scheduler": "LeastConnection",
"keepSession": false,
"keepSessionType": null,
"keepSessionDuration": null,
"keepSessionCookieName": null,
"xForwardedFor": false,
"xForwardedProto":xForwardedProto,
"serverTimeout": 30,
"redirectPort": 80
},
{
"listenerPort": 95,
"backendPort": 95,
"scheduler": "LeastConnection",
"keepSession": false,
"keepSessionType": null,
"keepSessionDuration": null,
"keepSessionCookieName": null,
"xForwardedFor": false,
"serverTimeout": 1800,
"redirectPort": 80
}
],
"marker": "listener-005A",
"nextMarker": "listener-0322",
"isTruncated": true,
"maxKeys": 2
}
DescribeAppHTTPSListeners
- Query information about all HTTPS listeners under the specified LoadBalancer
- Support matching query by listener port
- The result supports marker paging. The default paging size is 1,000, and can be specified by the maxKeys parameter
Request Structure
GET /v{version}/appblb/{blbId}/HTTPSlistener?listenerPort={listenerPort}&marker={marker}&maxKeys={maxKeys} HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: authorization string
Request Header
There are no other special headers except the public headers.
Request Parameter
Parameter name | Type | Required or not | Parameter position | Description |
---|---|---|---|---|
version | String | Yes | URL parameter | API version number (the current value is 1) |
blbId | String | Yes | URL parameter | The identifier of the own LoadBalancer |
listenerPort | int | No | Query parameter | The listener port to query |
marker | String | No | Query parameter | The starting location of query for batch acquisition of lists, and is one string generated by the system. |
maxKeys | int | No | Query parameter | Maximum number contained in each page, generally not exceeding 1000. The default value is 1000. |
Return Status Code
"200" for return successful and Error Code for return failed.
Return Header
There are no other special headers except the public headers.
Return Parameter
Parameter name | Type | Description |
---|---|---|
listenerList | List<AppHTTPSListenerModel> | List containing query results |
marker | String | Mark the starting position of the query. The item does not exist if the result list is empty |
isTruncated | boolean | True means there are additional data in the following pages and false means the current page is the last page. |
nextMarker | String | The marker value requiring to be passed in order to acquire the next page. The domain doesn't appear when isTruncated is false. |
maxKeys | int | Maximum number contained in each page. |
Request Example
GET /v1/appblb/lb-j8UqijYf/HTTPSlistener?maxKeys=2 HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: bce-auth-v1/ae4780f344774daa832f34caadd4d7de/2016-06-03T06:42:31Z/1800/host/3f26e5a322d41fa0f3315e906342c2691fe5ee35d21c7e66e425b4ee0f67ced3
Response Example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Fri, 03 Jun 2016 06:42:44 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
{
"listenerList": [
{
"listenerPort": 90,
"backendPort": 90,
"scheduler": "LeastConnection",
"keepSession": false,
"keepSessionType": null,
"keepSessionDuration": null,
"keepSessionCookieName": null,
"xForwardedFor": false,
"xForwardedProto":xForwardedProto,
"serverTimeout": 30,
"certIds": ["cert-zfj2ey2z4kmm"],
"ie6Compatible": true
},
{
"listenerPort": 95,
"backendPort": 95,
"scheduler": "LeastConnection",
"keepSession": false,
"keepSessionType": null,
"keepSessionDuration": null,
"keepSessionCookieName": null,
"xForwardedFor": false,
"xForwardedProto":xForwardedProto,
"serverTimeout": 1800,
"certIds": ["cert-zfj2ey2z4kmm"],
"ie6Compatible": true
}
],
"marker": "listener-005A",
"nextMarker": "listener-0322",
"isTruncated": true,
"maxKeys": 2
}
DescribeAppSSLListeners
- Query information about all SSL listeners under the specified LoadBalancer.
- Support matching query by listener port.
- The result supports marker paging. The default paging size is 1,000, and can be specified by the maxKeys parameter.
Request Structure
GET /v{version}/appblb/{blbId}/SSLlistener?listenerPort={listenerPort}&marker={marker}&maxKeys={maxKeys} HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: authorization string
Request Header
There are no other special headers except the public headers.
Request Parameter
Parameter name | Type | Required or not | Parameter position | Description |
---|---|---|---|---|
version | String | Yes | URL parameter | API version number (the current value is 1) |
blbId | String | Yes | URL parameter | The identifier of the own LoadBalancer |
listenerPort | int | No | Query parameter | The listener port to query |
marker | String | No | Query parameter | The starting location of query for batch acquisition of lists, and is one string generated by the system. |
maxKeys | int | No | Query parameter | Maximum number contained in each page, generally not exceeding 1000. The default value is 1000. |
Return Status Code
"200" for return successful and Error Code for return failed.
Return Header
There are no other special headers except the public headers.
Return Parameter
Parameter name | Type | Description |
---|---|---|
listenerList | List<AppSSLListenerModel> | List containing query results |
marker | String | Mark the starting position of the query. The item does not exist if the result list is empty |
isTruncated | boolean | True means there are additional data in the following pages and false means the current page is the last page. |
nextMarker | String | The marker value requiring to be passed in order to acquire the next page. The domain doesn't appear when isTruncated is false. |
maxKeys | int | Maximum number contained in each page. |
Request Example
GET /v1/appblb/lb-j8UqijYf/SSLlistener?maxKeys=2 HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
Response Example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Wed, 10 Apr 2016 08:26:52 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
{
"listenerList": [
{
"listenerPort": 80,
"scheduler": "RoundRobin",
"certIds": ["cert-zfj2ey2z4kmm"],
"ie6Compatible": true
},
{
"listenerPort": 88,
"scheduler": "RoundRobin",
"certIds": ["cert-zfj2ey2z4kmm"],
"ie6Compatible": true
}
],
"marker": "listener-0050",
"nextMarker": null,
"isTruncated": false,
"maxKeys": 2
}
DeleteAppListeners
- Releases the listener under the specified LoadBalancer. The listener is specified by the listening port.
- Support batch release.
Request Structure
PUT /v{version}/appblb/{blbId}/listener?{action}&clientToken={clientToken} HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: authorization string
{
"portList":[port1,port2]
}
Request Header
There are no other special headers except the public headers.
Request Parameter
Parameter name | Type | Required or not | Parameter position | Description |
---|---|---|---|---|
version | String | Yes | URL parameter | API version number (the current value is 1) |
blbId | String | Yes | URL parameter | The identifier of the own LoadBalancer |
action | String | Yes | Query parameter | Must be batchdelete |
clientToken | String | Yes | Query parameter | Idempotent Token |
portList | List\<int> | Yes | RequestBody parameter | The ports of all listeners to be released form an array together |
Return Status Code
"200" for return successful and Error Code for return failed.
Return Header
There are no other special headers except the public headers.
Return Parameter
None
Request Example
PUT /v1/appblb/lb-j8UqijYf/listener?batchdelete
Host: blb.bj.baidubce.com
Authorization: bce-auth-v1/ae4780f344774daa832f34caadd4d7de/2016-06-03T03:26:45Z/1800/host/c863c8b9f75ff307eb1a3c564307b0833acb9d857c65de108258c3edd4cd0118
{
"portList":[80,87]
}
Response Example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Fri, 03 Jun 2016 03:54:29 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
Create Policy
- Create a policy under the specified application BLB listener port.
Request Structure
POST /v{version}/appblb/{blbId}/policys?clientToken={clientToken} HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: authorization string
{
"listenerPort": listenerPort,
"appPolicyVos": [
{
"appServerGroupId": appServerGroupId,
"backendPort": backendPort,
"priority": priority,
"desc": desc,
"ruleList": [
{
"key": key,
"value": value
}
]
}
]
}
Request Header
There are no other special headers except the public headers.
Request Parameter
Parameter name | Type | Required or not | Parameter position | Description |
---|---|---|---|---|
version | String | Yes | URL parameter | API version number (the current value is 1) |
blbId | String | Yes | URL parameter | The identifier of the own LoadBalancer |
clientToken | String | Yes | Query parameter | Idempotent Token |
listenerPort | int | Yes | RequestBody parameter | Correspond to the port number of the listener under the BLB |
appPolicyVos | List<AppPolicy> | Yes | RequestBody parameter | Listener binding policy list. When the listener model is TCP, UDP, or SSL, only one policy can be created and only full matching is supported. When the listener model is http or https, the listener supports multiple policies. |
Return Status Code
"200" for return successful and Error Code for return failed. Return Header
There are no other special headers except the public headers.
Return Parameter
None
Request Example
POST /v1/appblb/lb-j8UqijYf/policys?clientToken=asdfg HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
{
"listenerPort": 98,
"appPolicyVos": [
{
"appServerGroupId": "sg-db3975dc",
"backendPort": 83,
"priority": 100,
"desc": "aa",
"ruleList": [
{
"key": "*",
"value": "*"
}
]
}
]
}
Response Example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Wed, 10 Apr 2016 08:26:52 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
Describe Policy
- Query information about all server groups under a specified LoadBalancer.
- Support matching query by listener port.
- The result supports marker paging. The default paging size is 1,000, and can be specified by the maxKeys parameter.
Request Structure
GET /v{version}/appblb/{blbId}/policys?marker={marker}&maxKeys={maxKeys}&port={port} HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: authorization string
Request Header
There are no other special headers except the public headers.
Request Parameter
Parameter name | Type | Required or not | Parameter position | Description |
---|---|---|---|---|
version | String | Yes | URL parameter | API version number (the current value is 1) |
blbId | String | Yes | URL parameter | The identifier of the own LoadBalancer |
port | int | Yes | Query parameter | Listener port number under BLB |
marker | String | No | Query parameter | The starting location of query for batch acquisition of lists, and is one string generated by the system. |
maxKeys | int | No | Query parameter | Maximum number contained in each page, generally not exceeding 1000. The default value is 1000. |
Return Status Code
"200" for return successful and Error Code for return failed.
Return Header
There are no other special headers except the public headers.
Return Parameter
Parameter name | Type | Description |
---|---|---|
policyList | List<AppPolicy> | List containing query results |
marker | String | Mark the starting position of the query. The item does not exist if the result list is empty |
isTruncated | boolean | True means there are additional data in the following pages and false means the current page is the last page. |
nextMarker | String | The marker value requiring to be passed in order to acquire the next page. The domain doesn't appear when isTruncated is false. |
maxKeys | int | Maximum number contained in each page. |
Request Example
GET /v1/appblb/lb-j8UqijYf/policys?maxKeys=2&port=80 HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: bce-auth-v1/ae4780f344774daa832f34caadd4d7de/2016-06-03T06:42:31Z/1800/host/3f26e5a322d41fa0f3315e906342c2691fe5ee35d21c7e66e425b4ee0f67ced3
Response Example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Fri, 03 Jun 2016 06:42:44 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
{
"marker": "rs-012310",
"isTruncated": false,
"maxKeys": 1000,
"nextMarker": "rs-013214",
policyList:[
{
"id":"policy_id",
"appServerGroupId": sg_id,
"backendPort":98,
"portType":"TCP",
"priority":100,
"desc":"aa",
"ruleList": [
{
"key": "host",
"value": "*.baidu.com"
}
]
},{
"id":"policy_id",
"appServerGroupId": sg_id,
"backendPort":80,
"portType":"TCP",
"priority":101,
"desc":"bb",
"backendServerList": [
{
"key": "*",
"value": "*"
}
]
}
]
}
Delete Policy
- Delete policies under corresponding BLB ports in batch.
Request Structure
PUT /v{version}/appblb/{blbId}/policys?{action}&clientToken={clientToken} HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: authorization string
{
"port": port,
policyIdList: ["policyId1", "policyId2", "policyId3"]
}
Request Header
There are no other special headers except the public headers.
Request Parameter
Parameter name | Type | Required or not | Parameter position | Description |
---|---|---|---|---|
version | String | Yes | URL parameter | API version number (the current value is 1) |
blbId | String | Yes | URL parameter | The identifier of the own LoadBalancer |
action | String | Yes | Query parameter | Must be batchdelete |
clientToken | String | Yes | Query parameter | Idempotent Token |
port | int | Yes | RequestBody parameter | Delete policy frontend port |
policyIdList | List\<String> | Yes | RequestBody parameter | All the policy identifiers to be released form an array together |
Return Status Code
"200" for return successful and Error Code for return failed.
Return Header
There are no other special headers except the public headers.
Return Parameter
None
Request Example
PUT /v1/appblb/lb-j8UqijYf/policys?batchdelete&clientToken=your_clientToken
Host: blb.bj.baidubce.com
Authorization: bce-auth-v1/ae4780f344774daa832f34caadd4d7de/2016-06-03T03:26:45Z/1800/host/c863c8b9f75ff307eb1a3c564307b0833acb9d857c65de108258c3edd4cd0118
{
"port":90,
"policyIdList": ["ab48bbe", "2520741", "a78e04"]
}
Response Example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Fri, 03 Jun 2016 03:54:29 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS