类 VpcClient


  • public class VpcClient
    extends AbstractBceClient
    Provides the client for accessing the Baidu Cloud network Service vpc part.
    • 构造器详细资料

      • 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.
        参数:
        clientConfiguration - The network client configuration options controlling how this client connects to network (e.g. proxy settings, retry counts, etc).
    • 方法详细资料

      • createVpc

        public CreateVpcResponse createVpc​(String name,
                                           String cidr)
        Create a vpc with the specified options.
        参数:
        name - The name of vpc
        cidr - The CIDR of vpc
        返回:
        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.

        参数:
        request - The request containing all options for creating a vpc.
        返回:
        List of vpcId newly created
        抛出:
        BceClientException
      • listVpcs

        public ListVpcResponse listVpcs()
        Return a list of vpcs owned by the authenticated user.
        返回:
        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.
        参数:
        request - The request containing all options for listing own's vpc.
        返回:
        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.
        参数:
        vpcId - The id of the network.
        返回:
        A vpc detail model for the vpcId.
      • getVpc

        public GetVpcResponse getVpc​(GetVpcRequest getVpcRequest)
        Get the detail information of specified vpc.
        参数:
        getVpcRequest - The request containing all options for getting the vpc info.
        返回:
        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.

        参数:
        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.

        参数:
        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.
        参数:
        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.

        参数:
        modifyVpcAttributesRequest - The request containing all options for modifying own's vpc.
      • getVpcPrivateIpAddressInfo

        public GetVpcPrivateAddressInfoResponse getVpcPrivateIpAddressInfo​(GetVpcPrivateIpAddressInfoRequest request)
        Return a list of vpc private ip address info which belongs to the corresponding vpc by vpc id.
        参数:
        request - The request contains vpc id, list of private ip addresses and private ip range to be queried.