类 BlbClient
- java.lang.Object
-
- com.baidubce.AbstractBceClient
-
- com.baidubce.services.blb.BlbClient
-
public class BlbClient extends AbstractBceClient
Provides the client for accessing the Baidu Cloud network Service Baidu Load Balance (BLB).
-
-
字段概要
-
从类继承的字段 com.baidubce.AbstractBceClient
config, DEFAULT_CONTENT_TYPE, DEFAULT_ENCODING, DEFAULT_SERVICE_DOMAIN, URL_PREFIX
-
-
构造器概要
构造器 构造器 说明 BlbClient()Constructs a new client to invoke service methods on blb.BlbClient(BlbClientConfiguration clientConfiguration)Constructs a new blb client using the client configuration to access network.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidaddBackendServers(AddBackendServersRequest addBackendServersRequest)Add backend servers to the specified blb.voidaddBackendServers(String blbId, List<BackendServer> backendServerList)Add backend servers to the specified blb.CreateBlbResponsecreateBlb(CreateBlbRequest createBlbRequest)Create a blb with the specified options.CreateBlbResponsecreateBlb(String name, String desc, String vpcId, String subnetId)Create a blb with the specified options.voidcreateListener(BlbListenerRequest blbListenerRequest)Create a listener with the specified options.voiddeleteBackendServers(DeleteBSRequest deleteBSRequest)Delete the specified backend server from the specified blb.voiddeleteBackendServers(String blbId, List<String> backendServerList)Delete the specified backend server from the specified blb.voiddeleteBlb(DeleteBlbRequest deleteBlbRequest)Delete the specified blb.voiddeleteBlb(String blbId)Delete the specified blb.voiddeleteListener(DeleteListenerRequest deleteListenerRequest)Delete the specified listener.voiddeleteListener(String blbId, List<Integer> portList)Delete the specified listener.protected voidfillPayload(InternalRequest internalRequest, AbstractBceRequest bceRequest)the method to fill the internalRequest's content field with bceRequest only support HttpMethodName.POST or HttpMethodName.PUTListBackendServerResponselistBackendServers(ListBackendServerRequest listBackendServerRequest)Return a list of backend server of the specified blbListBackendServerResponselistBackendServers(String blbId)Return a list of backend server of the specified blb.ListBackendServerStatusResponselistBackendServerStatus(ListBackendServerStatusRequest listBackendServerStatusRequest)Return a list of healthStatus of backend server with the specified blb and listener port.ListBackendServerStatusResponselistBackendServerStatus(String blbId, int listenerPort)Return a list of healthStatus of backend servers with the specified blb and listener port.ListBlbResponselistBlbs(ListBlbRequest listBlbRequest)Return a list of blbs with the specified options.ListBlbResponselistBlbs(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.ListListenerResponselistListener(ListListenerRequest listListenerRequest)Return a list of 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.voidmodifyBackendServerAttributes(ModifyBSAttributesRequest modifyBSAttributesRequest)Modifying the special backend servers of the specified blb.voidmodifyBackendServerAttributes(String blbId, List<BackendServer> backendServerList)Modifying the special backend servers of the specified blb.voidmodifyBlbAttributes(ModifyBlbAttributesRequest modifyBlbAttributesRequest)Modifying the special attribute to new blb.voidmodifyBlbAttributes(String blbId, String name, String desc)Modifying the special attribute to new blb.voidmodifyListenerAttributes(BlbListenerRequest modifyListenerAttributesRequest)Modifying the special attribute to new listener.-
从类继承的方法 com.baidubce.AbstractBceClient
computeBktVirEndpoint, computeServiceId, getBktVirEndpoint, getClient, getEndpoint, getServiceId, invokeHttpClient, isRegionSupported, setClient, shutdown
-
-
-
-
构造器详细资料
-
BlbClient
public BlbClient()
Constructs a new client to invoke service methods on blb.
-
BlbClient
public BlbClient(BlbClientConfiguration clientConfiguration)
Constructs a new blb client using the client configuration to access network.- 参数:
clientConfiguration- The blb client configuration options controlling how this client connects to network (e.g. proxy settings, retry counts, etc).
-
-
方法详细资料
-
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- 参数:
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)
Create a blb with the specified options.- 参数:
name- The name of blbdesc- The description of blbvpcId- The vpcId of blb- 返回:
- 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.- 参数:
createBlbRequest- The request containing all options for creating a blb.- 返回:
- 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.- 参数:
address- The address of the blbname- The name of the blb.blbId- The id of the blb.bccId- The bcc id of the blb.- 返回:
- 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.- 参数:
listBlbRequest- The request containing all options for listing blbs.- 返回:
- 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.- 参数:
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.- 参数:
modifyBlbAttributesRequest- The request containing all options for modifying a blb.
-
deleteBlb
public void deleteBlb(String blbId)
Delete the specified blb.- 参数:
blbId- The id of the blb to delete.
-
deleteBlb
public void deleteBlb(DeleteBlbRequest deleteBlbRequest)
Delete the specified blb.- 参数:
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.- 参数:
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.- 参数:
blbId- The blb id of the listener.- 返回:
- 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.- 参数:
blbId- The blb id of the listener.- 返回:
- 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.- 参数:
blbId- The blb id of the listener.- 返回:
- 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.- 参数:
blbId- The blb id of the listener.- 返回:
- 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.- 参数:
listListenerRequest- The request containing all options for listing listeners.- 返回:
- The response containing a list of listener with the specified options.
-
modifyListenerAttributes
public void modifyListenerAttributes(BlbListenerRequest modifyListenerAttributesRequest)
Modifying the special attribute to new listener.- 参数:
modifyListenerAttributesRequest- The request containing all options for modifying listener.
-
deleteListener
public void deleteListener(String blbId, List<Integer> portList)
Delete the specified listener.- 参数:
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.- 参数:
deleteListenerRequest- The request containing all options for deleting listener.
-
addBackendServers
public void addBackendServers(String blbId, List<BackendServer> backendServerList)
Add backend servers to the specified blb.- 参数:
blbId- The id of blb to add backend server.backendServerList- The backend servers to add.
-
addBackendServers
public void addBackendServers(AddBackendServersRequest addBackendServersRequest)
Add backend servers to the specified blb.- 参数:
addBackendServersRequest- The request containing all backend servers for adding to the specified blb.
-
listBackendServerStatus
public ListBackendServerStatusResponse listBackendServerStatus(String blbId, int listenerPort)
Return a list of healthStatus of backend servers with the specified blb and listener port.- 参数:
blbId- The id of the specified blb.listenerPort- The specified listener port.- 返回:
- 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.- 参数:
listBackendServerStatusRequest- The request containing all options for listing backend server healtStatus.- 返回:
- The response containing a list healthStatus of backend servers.
-
listBackendServers
public ListBackendServerResponse listBackendServers(String blbId)
Return a list of backend server of the specified blb.- 参数:
blbId- The id of the blb.- 返回:
- The response containing a list of backend servers of the specified blb.
-
listBackendServers
public ListBackendServerResponse listBackendServers(ListBackendServerRequest listBackendServerRequest)
Return a list of backend server of the specified blb- 参数:
listBackendServerRequest- The request containing all options for listing backend server.- 返回:
- The response containing a list of backend servers of the specified blb.
-
modifyBackendServerAttributes
public void modifyBackendServerAttributes(String blbId, List<BackendServer> backendServerList)
Modifying the special backend servers of the specified blb.- 参数:
blbId- The id of the specified blb.backendServerList- The backend servers to modifying.
-
modifyBackendServerAttributes
public void modifyBackendServerAttributes(ModifyBSAttributesRequest modifyBSAttributesRequest)
Modifying the special backend servers of the specified blb.- 参数:
modifyBSAttributesRequest- The request containing all options for modifying backend servers.
-
deleteBackendServers
public void deleteBackendServers(String blbId, List<String> backendServerList)
Delete the specified backend server from the specified blb.- 参数:
blbId- The id of the blb.backendServerList- The id list of the backend server to deleting.
-
deleteBackendServers
public void deleteBackendServers(DeleteBSRequest deleteBSRequest)
Delete the specified backend server from the specified blb.- 参数:
deleteBSRequest- The request containing all options for deleting backend server from the specified blb.
-
-