com.baidubce.services.blb
Class AppBlbClient

java.lang.Object
  extended by com.baidubce.AbstractBceClient
      extended by com.baidubce.services.blb.AppBlbClient

public class AppBlbClient
extends AbstractBceClient

Provides the client for accessing the Baidu Cloud network Service Baidu Application Load Balance (APPBLB).


Field Summary
 
Fields inherited from class com.baidubce.AbstractBceClient
config, DEFAULT_CONTENT_TYPE, DEFAULT_ENCODING, DEFAULT_SERVICE_DOMAIN, URL_PREFIX
 
Constructor Summary
AppBlbClient()
          Constructs a new client to invoke service methods on blb.
AppBlbClient(BlbClientConfiguration clientConfiguration)
          Constructs a new blb client using the client configuration to access network.
 
Method Summary
 AppSgResponse createAppServerGroup(AppSgRequest appSgRequest)
          Create a appServerGroup with the specified options.
 AppSgResponse createAppServerGroup(String blbId, String name, String desc, List<AppBackendServer> backendServerList)
          Create a appServerGroup with the specified options.
 AppSgPortResponse createAppServerGroupPort(AppSgPortRequest appSgPortRequest)
          Create a appServerGroupPort with the specified options.
 CreateBlbResponse createBlb(CreateBlbRequest createBlbRequest)
          Create a blb with the specified options.
 CreateBlbResponse createBlb(String name, String desc, String vpcId, String subnetId, List<Tag> tags)
          Create a blb with the specified options.
 void createBlbRs(AppSgRequest appSgRequest)
          Add backend servers to the specified blb appServerGroup.
 void createBlbRs(String blbId, String sgId, List<AppBackendServer> backendServerList)
          Add backend servers to the specified blb appServerGroup.
 void createListener(BlbListenerRequest blbListenerRequest)
          Create a listener with the specified options.
 void createPolicys(AppPolicyRequest appPolicyRequest)
          Create a policy with the specified options.
 void createPolicys(String blbId, Integer listenerPort, List<AppPolicy> appPolicyVos)
          Create a policy with the specified options.
 void deleteAppServerGroup(AppSgRequest appSgRequest)
          Delete the special appServerGroup.
 void deleteAppServerGroup(String blbId, String sgId)
          Delete a appServerGroup with the specified options.
 void deleteAppServerGroupPort(AppSgPortRequest appSgPortRequest)
          Delete the special appServerGroupPort.
 void deleteAppServerGroupPort(String blbId, String sgId, List<String> portIdList)
          Delete a appServerGroup with the specified options.
 void deleteBlb(DeleteBlbRequest deleteBlbRequest)
          Delete the specified blb.
 void deleteBlb(String blbId)
          Delete the specified blb.
 void deleteBlbRs(AppRsRequest appRsRequest)
          Delete the specified backend server from the specified blb appServerGroup.
 void deleteBlbRs(String blbId, String sgId, List<String> backendServerIdList)
          Delete the specified backend server from the specified blb appServerGroup.
 void deleteListener(DeleteListenerRequest deleteListenerRequest)
          Delete the specified listener.
 void deleteListener(String blbId, List<Integer> portList)
          Delete the specified listener.
 void deletePolicys(DeleteAppPolicyRequest deleteAppPolicyRequest)
          Delete the special policy.
 void deletePolicys(String blbId, Integer port, List<String> policyIdList)
          Delete a appServerGroup with the specified options.
protected  void fillPayload(InternalRequest internalRequest, AbstractBceRequest bceRequest)
          the method to fill the internalRequest's content field with bceRequest only support HttpMethodName.POST or HttpMethodName.PUT
 ListAppSgResponse listAppServerGroup(ListAppSgRequest listAppSgRequest)
          Return a list of appServerGroup of the specified blb
 ListAppSgResponse listAppServerGroup(String blbId, String name)
          Return a list of appServerGroup of the specified blb.
 ListBackendServerStatusResponse listBackendServerStatus(ListBackendServerStatusRequest listBackendServerStatusRequest)
          Return a list of healthStatus of backend server with the specified blb and listener port.
 ListBackendServerStatusResponse listBackendServerStatus(String blbId, int listenerPort)
          Return a list of healthStatus of backend servers with the specified blb and listener port.
 ListAppRsResponse listBlbRs(ListAppRsRequest listAppRsRequest)
          Return a list of backend server of the specified blb appServerGroup
 ListAppRsResponse listBlbRs(String blbId, String sgId)
          Return a list of backend server of the specified blb appServerGroup.
 List<AppBackendServer> listBlbRsMount(ListAppRsRequest listAppRsRequest)
          Return a list of backend server of the specified blb appServerGroup
 List<AppBackendServer> listBlbRsMount(String blbId, String sgId)
          Return a list of backend server of the specified blb appServerGroup.
 List<AppBackendServer> listBlbRsUnMount(ListAppRsRequest listAppRsRequest)
          Return a list of backend server of the specified blb appServerGroup
 List<AppBackendServer> listBlbRsUnMount(String blbId, String sgId)
          Return a list of backend server of the specified blb appServerGroup.
 ListBlbResponse listBlbs(ListBlbRequest listBlbRequest)
          Return a list of blbs with the specified options.
 ListBlbResponse listBlbs(String address, String name, String blbId, String bccId)
          Return a list of blbs with the specified options.
 ListListenerResponse<HttpListener> listHttpListener(String blbId)
          Return a list of http listener with the specified options.
 ListListenerResponse<HttpsListener> listHttpsListener(String blbId)
          Return a list of https listener with the specified options.
 ListListenerResponse listListener(ListListenerRequest listListenerRequest)
          Return a list of listener with the specified options.
 ListAppPolicyResponse listPolicys(ListAppPolicyRequest listAppPolicyRequest)
          Return a list of policy of the specified blb
 ListAppPolicyResponse listPolicys(String blbId, Integer port)
          Return a list of backend server of the specified blb appServerGroup.
 ListListenerResponse<SslListener> listSslListener(String blbId)
          Return a list of ssl listener with the specified options.
 ListListenerResponse<TcpListener> listTcpListener(String blbId)
          Return a list of tcp listener with the specified options.
 ListListenerResponse<UdpListener> listUdpListener(String blbId)
          Return a list of udp listener with the specified options.
 void modifyAppServerGroupAttributes(AppSgRequest appSgRequest)
          Modifying the special attribute to new appServerGroup.
 void modifyAppServerGroupAttributes(String blbId, String sgId, String name, String desc)
          Update a appServerGroup with the specified options.
 void modifyAppServerGroupPortAttributes(AppSgPortRequest appSgPortRequest)
          Modifying the special attribute to new appServerGroupPort.
 void modifyBlbAttributes(ModifyBlbAttributesRequest modifyBlbAttributesRequest)
          Modifying the special attribute to new blb.
 void modifyBlbAttributes(String blbId, String name, String desc)
          Modifying the special attribute to new blb.
 void modifyBlbRs(AppSgRequest appSgRequest)
          Modifying the special backend servers of the specified blb appServerGroup.
 void modifyBlbRs(String blbId, String sgId, List<AppBackendServer> backendServerList)
          Modifying the special backend servers of the specified blb appServerGroup.
 void modifyListenerAttributes(BlbListenerRequest modifyListenerAttributesRequest)
          Modifying the special attribute to new listener.
 
Methods inherited from class com.baidubce.AbstractBceClient
computeServiceId, getClient, getEndpoint, getServiceId, invokeHttpClient, isRegionSupported, setClient, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AppBlbClient

public AppBlbClient()
Constructs a new client to invoke service methods on blb.


AppBlbClient

public AppBlbClient(BlbClientConfiguration clientConfiguration)
Constructs a new blb client using the client configuration to access network.

Parameters:
clientConfiguration - The blb client configuration options controlling how this client connects to network (e.g. proxy settings, retry counts, etc).
Method Detail

fillPayload

protected void fillPayload(InternalRequest internalRequest,
                           AbstractBceRequest bceRequest)
the method to fill the internalRequest's content field with bceRequest only support HttpMethodName.POST or HttpMethodName.PUT

Parameters:
internalRequest - A request object, populated with endpoint, resource path, ready for callers to populate any additional headers or parameters, and execute.
bceRequest - The original request, as created by the user.

createBlb

public CreateBlbResponse createBlb(String name,
                                   String desc,
                                   String vpcId,
                                   String subnetId,
                                   List<Tag> tags)
Create a blb with the specified options.

Parameters:
name - The name of blb
desc - The description of blb
vpcId - The vpcId of blb
Returns:
The response contains detail of the blb.

createBlb

public CreateBlbResponse createBlb(CreateBlbRequest createBlbRequest)
Create a blb with the specified options. You must fill the field of clientToken,which is especially for keeping idempotent.

Parameters:
createBlbRequest - The request containing all options for creating a blb.
Returns:
The response contains detail of the blb.

listBlbs

public ListBlbResponse listBlbs(String address,
                                String name,
                                String blbId,
                                String bccId)
Return a list of blbs with the specified options.

Parameters:
address - The address of the blb
name - The name of the blb.
blbId - The id of the blb.
bccId - The bcc id of the blb.
Returns:
The response containing a list of blbs owned by the specified options.

listBlbs

public ListBlbResponse listBlbs(ListBlbRequest listBlbRequest)
Return a list of blbs with the specified options.

Parameters:
listBlbRequest - The request containing all options for listing blbs.
Returns:
The response containing a list of blbs with the specified options.

modifyBlbAttributes

public void modifyBlbAttributes(String blbId,
                                String name,
                                String desc)
Modifying the special attribute to new blb.

Parameters:
blbId - The id of the blb.
name - The name after modifying.
desc - The description after modifying.

modifyBlbAttributes

public void modifyBlbAttributes(ModifyBlbAttributesRequest modifyBlbAttributesRequest)
Modifying the special attribute to new blb.

Parameters:
modifyBlbAttributesRequest - The request containing all options for modifying a blb.

deleteBlb

public void deleteBlb(String blbId)
Delete the specified blb.

Parameters:
blbId - The id of the blb to delete.

deleteBlb

public void deleteBlb(DeleteBlbRequest deleteBlbRequest)
Delete the specified blb.

Parameters:
deleteBlbRequest - The request containing all options for deleting blb.

createListener

public void createListener(BlbListenerRequest blbListenerRequest)
Create a listener with the specified options. You must fill the field of clientToken,which is especially for keeping idempotent.

Parameters:
blbListenerRequest - The request containing all options for creating a listener.

listTcpListener

public ListListenerResponse<TcpListener> listTcpListener(String blbId)
Return a list of tcp listener with the specified options.

Parameters:
blbId - The blb id of the listener.
Returns:
The response containing a list of listener owned by the specified options.

listUdpListener

public ListListenerResponse<UdpListener> listUdpListener(String blbId)
Return a list of udp listener with the specified options.

Parameters:
blbId - The blb id of the listener.
Returns:
The response containing a list of listener owned by the specified options.

listHttpListener

public ListListenerResponse<HttpListener> listHttpListener(String blbId)
Return a list of http listener with the specified options.

Parameters:
blbId - The blb id of the listener.
Returns:
The response containing a list of listener owned by the specified options.

listHttpsListener

public ListListenerResponse<HttpsListener> listHttpsListener(String blbId)
Return a list of https listener with the specified options.

Parameters:
blbId - The blb id of the listener.
Returns:
The response containing a list of listener owned by the specified options.

listSslListener

public ListListenerResponse<SslListener> listSslListener(String blbId)
Return a list of ssl listener with the specified options.

Parameters:
blbId - The blb id of the listener.
Returns:
The response containing a list of listener owned by the specified options.

listListener

public ListListenerResponse listListener(ListListenerRequest listListenerRequest)
Return a list of listener with the specified options.

Parameters:
listListenerRequest - The request containing all options for listing listeners.
Returns:
The response containing a list of listener with the specified options.

modifyListenerAttributes

public void modifyListenerAttributes(BlbListenerRequest modifyListenerAttributesRequest)
Modifying the special attribute to new listener.

Parameters:
modifyListenerAttributesRequest - The request containing all options for modifying listener.

deleteListener

public void deleteListener(String blbId,
                           List<Integer> portList)
Delete the specified listener.

Parameters:
blbId - The blb id of the listener to delete.
portList - The ports of the listener to delete.

deleteListener

public void deleteListener(DeleteListenerRequest deleteListenerRequest)
Delete the specified listener.

Parameters:
deleteListenerRequest - The request containing all options for deleting listener.

createBlbRs

public void createBlbRs(String blbId,
                        String sgId,
                        List<AppBackendServer> backendServerList)
Add backend servers to the specified blb appServerGroup.

Parameters:
blbId - The id of blb to add backend server.
sgId - The id of blb appServerGroup to add backend server.
backendServerList - The backend servers to add.

createBlbRs

public void createBlbRs(AppSgRequest appSgRequest)
Add backend servers to the specified blb appServerGroup.

Parameters:
appSgRequest - The request containing all backend servers for adding to the specified blb appServerGroup.

listBackendServerStatus

public ListBackendServerStatusResponse listBackendServerStatus(String blbId,
                                                               int listenerPort)
Return a list of healthStatus of backend servers with the specified blb and listener port.

Parameters:
blbId - The id of the specified blb.
listenerPort - The specified listener port.
Returns:
The response containing a list healthStatus of backend servers.

listBackendServerStatus

public ListBackendServerStatusResponse listBackendServerStatus(ListBackendServerStatusRequest listBackendServerStatusRequest)
Return a list of healthStatus of backend server with the specified blb and listener port.

Parameters:
listBackendServerStatusRequest - The request containing all options for listing backend server healtStatus.
Returns:
The response containing a list healthStatus of backend servers.

listAppServerGroup

public ListAppSgResponse listAppServerGroup(String blbId,
                                            String name)
Return a list of appServerGroup of the specified blb.

Parameters:
blbId - The id of the blb.
name - The name of the appServerGroup.
Returns:
The response containing a list of backend servers of the specified blb.

listAppServerGroup

public ListAppSgResponse listAppServerGroup(ListAppSgRequest listAppSgRequest)
Return a list of appServerGroup of the specified blb

Parameters:
listAppSgRequest - The request containing all options for listing appServerGroup.
Returns:
The response containing a list of appServerGroup of the specified blb.

listBlbRsMount

public List<AppBackendServer> listBlbRsMount(String blbId,
                                             String sgId)
Return a list of backend server of the specified blb appServerGroup.

Parameters:
blbId - The id of the blb.
sgId - The id of the appServerGroup.
Returns:
The response containing a list of backend servers of the specified blb appServerGroup.

listBlbRsMount

public List<AppBackendServer> listBlbRsMount(ListAppRsRequest listAppRsRequest)
Return a list of backend server of the specified blb appServerGroup

Parameters:
listAppRsRequest - The request containing all options for listing backend server.
Returns:
The response containing a list of backend servers of the specified blb appServerGroup.

listBlbRsUnMount

public List<AppBackendServer> listBlbRsUnMount(String blbId,
                                               String sgId)
Return a list of backend server of the specified blb appServerGroup.

Parameters:
blbId - The id of the blb.
sgId - The id of the appServerGroup.
Returns:
The response containing a list of backend servers of the specified blb appServerGroup.

listBlbRsUnMount

public List<AppBackendServer> listBlbRsUnMount(ListAppRsRequest listAppRsRequest)
Return a list of backend server of the specified blb appServerGroup

Parameters:
listAppRsRequest - The request containing all options for listing backend server.
Returns:
The response containing a list of backend servers of the specified blb appServerGroup.

listBlbRs

public ListAppRsResponse listBlbRs(String blbId,
                                   String sgId)
Return a list of backend server of the specified blb appServerGroup.

Parameters:
blbId - The id of the blb.
sgId - The id of the appServerGroup.
Returns:
The response containing a list of backend servers of the specified blb appServerGroup.

listBlbRs

public ListAppRsResponse listBlbRs(ListAppRsRequest listAppRsRequest)
Return a list of backend server of the specified blb appServerGroup

Parameters:
listAppRsRequest - The request containing all options for listing backend server.
Returns:
The response containing a list of backend servers of the specified blb appServerGroup.

modifyBlbRs

public void modifyBlbRs(String blbId,
                        String sgId,
                        List<AppBackendServer> backendServerList)
Modifying the special backend servers of the specified blb appServerGroup.

Parameters:
blbId - The id of the specified blb.
sgId - The id of blb appServerGroup.
backendServerList - The backend servers to modifying.

modifyBlbRs

public void modifyBlbRs(AppSgRequest appSgRequest)
Modifying the special backend servers of the specified blb appServerGroup.

Parameters:
appSgRequest - The request containing all options for modifying backend servers.

deleteBlbRs

public void deleteBlbRs(String blbId,
                        String sgId,
                        List<String> backendServerIdList)
Delete the specified backend server from the specified blb appServerGroup.

Parameters:
blbId - The id of the blb.
sgId - The id of the appServerGroup.
backendServerIdList - The id list of the backend server id to deleting.

deleteBlbRs

public void deleteBlbRs(AppRsRequest appRsRequest)
Delete the specified backend server from the specified blb appServerGroup.

Parameters:
appRsRequest - The request containing all options for deleting backend server from the specified blb appServerGroup.

createAppServerGroup

public AppSgResponse createAppServerGroup(String blbId,
                                          String name,
                                          String desc,
                                          List<AppBackendServer> backendServerList)
Create a appServerGroup with the specified options.

Parameters:
blbId - The id of blb
name - The name of appServerGroup
desc - The description of appServerGroup
backendServerList - The backendServers of appServerGroup
Returns:
The response contains detail of the appServerGroup.

createAppServerGroup

public AppSgResponse createAppServerGroup(AppSgRequest appSgRequest)
Create a appServerGroup with the specified options. You must fill the field of clientToken,which is especially for keeping idempotent.

Parameters:
appSgRequest - The request containing all options for creating a appSg.

modifyAppServerGroupAttributes

public void modifyAppServerGroupAttributes(String blbId,
                                           String sgId,
                                           String name,
                                           String desc)
Update a appServerGroup with the specified options.

Parameters:
blbId - The id of blb
sgId - The id of appServerGroup
name - The name of appServerGroup
desc - The description of appServerGroup

modifyAppServerGroupAttributes

public void modifyAppServerGroupAttributes(AppSgRequest appSgRequest)
Modifying the special attribute to new appServerGroup.

Parameters:
appSgRequest - The request containing all options for modifying appSgRequest.

deleteAppServerGroup

public void deleteAppServerGroup(String blbId,
                                 String sgId)
Delete a appServerGroup with the specified options.

Parameters:
blbId - The id of blb
sgId - The id of appServerGroup

deleteAppServerGroup

public void deleteAppServerGroup(AppSgRequest appSgRequest)
Delete the special appServerGroup.

Parameters:
appSgRequest - The request containing all options for deleting appSgRequest.

createAppServerGroupPort

public AppSgPortResponse createAppServerGroupPort(AppSgPortRequest appSgPortRequest)
Create a appServerGroupPort with the specified options. You must fill the field of clientToken,which is especially for keeping idempotent.

Parameters:
appSgPortRequest - The request containing all options for creating a appSgPort.

modifyAppServerGroupPortAttributes

public void modifyAppServerGroupPortAttributes(AppSgPortRequest appSgPortRequest)
Modifying the special attribute to new appServerGroupPort.

Parameters:
appSgPortRequest - The request containing all options for modifying appSgPortRequest.

deleteAppServerGroupPort

public void deleteAppServerGroupPort(String blbId,
                                     String sgId,
                                     List<String> portIdList)
Delete a appServerGroup with the specified options.

Parameters:
blbId - The id of blb
sgId - The id of appServerGroup
portIdList - The id of appServerGroupPort list

deleteAppServerGroupPort

public void deleteAppServerGroupPort(AppSgPortRequest appSgPortRequest)
Delete the special appServerGroupPort.

Parameters:
appSgPortRequest - The request containing all options for deleting AppSgPortRequest.

createPolicys

public void createPolicys(String blbId,
                          Integer listenerPort,
                          List<AppPolicy> appPolicyVos)
Create a policy with the specified options.

Parameters:
blbId - The id of blb
listenerPort - The listenerPort of policy
appPolicyVos - The appPolicyVos of policy

createPolicys

public void createPolicys(AppPolicyRequest appPolicyRequest)
Create a policy with the specified options. You must fill the field of clientToken,which is especially for keeping idempotent.

Parameters:
appPolicyRequest - The request containing all options for creating a policy.

listPolicys

public ListAppPolicyResponse listPolicys(String blbId,
                                         Integer port)
Return a list of backend server of the specified blb appServerGroup.

Parameters:
blbId - The id of the blb.
port - The port of the policy.
Returns:
The response containing a list of policy of the specified blb.

listPolicys

public ListAppPolicyResponse listPolicys(ListAppPolicyRequest listAppPolicyRequest)
Return a list of policy of the specified blb

Parameters:
listAppPolicyRequest - The request containing all options for listing policy.
Returns:
The response containing a list of policy of the specified blb.

deletePolicys

public void deletePolicys(String blbId,
                          Integer port,
                          List<String> policyIdList)
Delete a appServerGroup with the specified options.

Parameters:
blbId - The id of blb
port - The port of policy
policyIdList - The id of policy list

deletePolicys

public void deletePolicys(DeleteAppPolicyRequest deleteAppPolicyRequest)
Delete the special policy.

Parameters:
deleteAppPolicyRequest - The request containing all options for deleting policy.


Copyright © 2020. All rights reserved.