com.baidubce.services.vpc
Class VpcClient

java.lang.Object
  extended by com.baidubce.AbstractBceClient
      extended by com.baidubce.services.vpc.VpcClient

public class VpcClient
extends AbstractBceClient

Provides the client for accessing the Baidu Cloud network Service vpc part.


Field Summary
 
Fields inherited from class com.baidubce.AbstractBceClient
config, DEFAULT_CONTENT_TYPE, DEFAULT_ENCODING, DEFAULT_SERVICE_DOMAIN, URL_PREFIX
 
Constructor Summary
VpcClient()
          Constructs a new client to invoke service methods on network.
VpcClient(BceClientConfiguration clientConfiguration)
          Constructs a new network client using the client configuration to access network.
 
Method Summary
 CreateVpcResponse createVpc(CreateVpcRequest request)
          Create a vpc with the specified options.
 CreateVpcResponse createVpc(String name, String cidr)
          Create a vpc with the specified options.
 void deleteVpc(DeleteVpcRequest deleteVpcRequest)
          Delete the specified vpc owned by the user.All resource in the vpc must be deleted before the vpc itself can be deleted.
 void deleteVpc(String vpcId)
          Delete the specified vpc owned by the user.All resource in the vpc must be deleted before the vpc itself can be deleted.
 GetVpcResponse getVpc(GetVpcRequest getVpcRequest)
          Get the detail information of specified vpc.
 GetVpcResponse getVpc(String vpcId)
          Get the detail information of specified vpc.
 ListVpcResponse listVpcs()
          Return a list of vpcs owned by the authenticated user.
 ListVpcResponse listVpcs(ListVpcRequest request)
          Return a list of vpcs owned by the authenticated user.
 void modifyInstanceAttributes(ModifyVpcAttributesRequest modifyVpcAttributesRequest)
          Modifying the special attribute to new value of the vpc owned by the user.
 void modifyInstanceAttributes(String name, String vpcId)
          Modifying the special attribute to new value of the vpc owned by the user.
 
Methods inherited from class com.baidubce.AbstractBceClient
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

VpcClient

public VpcClient()
Constructs a new client to invoke service methods on network.


VpcClient

public VpcClient(BceClientConfiguration clientConfiguration)
Constructs a new network client using the client configuration to access network.

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

createVpc

public CreateVpcResponse createVpc(String name,
                                   String cidr)
Create a vpc with the specified options.

Parameters:
name - The name of vpc
cidr - The CIDR of vpc
Returns:
List of vpcId newly created

createVpc

public CreateVpcResponse createVpc(CreateVpcRequest request)
                            throws BceClientException
Create a vpc with the specified options. You must fill the field of clientToken,which is especially for keeping idempotent.

Parameters:
request - The request containing all options for creating a vpc.
Returns:
List of vpcId newly created
Throws:
BceClientException

listVpcs

public ListVpcResponse listVpcs()
Return a list of vpcs owned by the authenticated user.

Returns:
The response containing a list of vpcs owned by the authenticated user.

listVpcs

public ListVpcResponse listVpcs(ListVpcRequest request)
Return a list of vpcs owned by the authenticated user.

Parameters:
request - The request containing all options for listing own's vpc.
Returns:
The response containing a list of vpcs owned by the authenticated user.

getVpc

public GetVpcResponse getVpc(String vpcId)
Get the detail information of specified vpc.

Parameters:
vpcId - The id of the network.
Returns:
A vpc detail model for the vpcId.

getVpc

public GetVpcResponse getVpc(GetVpcRequest getVpcRequest)
Get the detail information of specified vpc.

Parameters:
getVpcRequest - The request containing all options for getting the vpc info.
Returns:
A vpc detail model for the vpcId.

deleteVpc

public void deleteVpc(String vpcId)
Delete the specified vpc owned by the user.All resource in the vpc must be deleted before the vpc itself can be deleted.

Parameters:
vpcId - The id of the vpc to delete.

deleteVpc

public void deleteVpc(DeleteVpcRequest deleteVpcRequest)
Delete the specified vpc owned by the user.All resource in the vpc must be deleted before the vpc itself can be deleted.

Parameters:
deleteVpcRequest - The request containing all options for deleting own's vpc.

modifyInstanceAttributes

public void modifyInstanceAttributes(String name,
                                     String vpcId)
Modifying the special attribute to new value of the vpc owned by the user.

Parameters:
name - The name of the vpc after modifying
vpcId - the id of the vpc

modifyInstanceAttributes

public void modifyInstanceAttributes(ModifyVpcAttributesRequest modifyVpcAttributesRequest)
Modifying the special attribute to new value of the vpc owned by the user.

Parameters:
modifyVpcAttributesRequest - The request containing all options for modifying own's vpc.


Copyright © 2018. All rights reserved.