com.baidubce.services.subnet
Class SubnetClient

java.lang.Object
  extended by com.baidubce.AbstractBceClient
      extended by com.baidubce.services.subnet.SubnetClient

public class SubnetClient
extends AbstractBceClient

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


Field Summary
 
Fields inherited from class com.baidubce.AbstractBceClient
config, DEFAULT_CONTENT_TYPE, DEFAULT_ENCODING, DEFAULT_SERVICE_DOMAIN, URL_PREFIX
 
Constructor Summary
SubnetClient()
          Constructs a new client to invoke service methods on network.
SubnetClient(BceClientConfiguration clientConfiguration)
          Constructs a new network client using the client configuration to access network.
 
Method Summary
 CreateSubnetResponse createSubnet(CreateSubnetRequest request)
          Create a subnet with the specified options.
 CreateSubnetResponse createSubnet(String name, String vpcId, String cidr, String zoneName)
           
 void deleteSubnet(DeleteSubnetRequest deleteSubnetRequest)
          Delete the specified subnet owned by the user.
 void deleteSubnet(String subnetId)
          Delete the specified subnet owned by the user.
 GetSubnetResponse getSubnet(GetSubnetRequest getSubnetRequest)
          Get the detail information of specified subnet.
 GetSubnetResponse getSubnet(String subnetId)
          Get the detail information of specified subnet.
 ListSubnetsResponse listSubnets()
          Return a list of subnets owned by the authenticated user.
 ListSubnetsResponse listSubnets(ListSubnetsRequest request)
          Return a list of subnet owned by the authenticated user.
 void modifySubnetAttributes(ModifySubnetAttributesRequest modifySubnetAttributesRequest)
          Modifying the special attribute to new value of the subnet owned by the user.
 void modifySubnetAttributes(String subnetId, String name)
          Modifying the special attribute to new value of the subnet 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

SubnetClient

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


SubnetClient

public SubnetClient(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

createSubnet

public CreateSubnetResponse createSubnet(String name,
                                         String vpcId,
                                         String cidr,
                                         String zoneName)
Parameters:
name - The name of subnet that will be created.
vpcId - The id of vpc which this subnet belong.
cidr - The CIDR of this subnet.
zoneName - the name of available zone which the subnet belong through listZones, we can get all available zone info at current region ee.g. "cn-gz-a" "cn-gz-b"
Returns:

createSubnet

public CreateSubnetResponse createSubnet(CreateSubnetRequest request)
                                  throws BceClientException
Create a subnet 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 subnet.
Returns:
List of subnetId newly created
Throws:
BceClientException

listSubnets

public ListSubnetsResponse listSubnets()
Return a list of subnets owned by the authenticated user.

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

listSubnets

public ListSubnetsResponse listSubnets(ListSubnetsRequest request)
Return a list of subnet owned by the authenticated user.

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

getSubnet

public GetSubnetResponse getSubnet(String subnetId)
Get the detail information of specified subnet.

Parameters:
subnetId - The id of the subnet.
Returns:
A subnet detail model for the subnetId.

getSubnet

public GetSubnetResponse getSubnet(GetSubnetRequest getSubnetRequest)
Get the detail information of specified subnet.

Parameters:
getSubnetRequest - The request containing all options for getting the subnet info.
Returns:
A subnet detail model for the subnetId.

deleteSubnet

public void deleteSubnet(String subnetId)
Delete the specified subnet owned by the user.

Parameters:
subnetId - The id of the subnet to delete.

deleteSubnet

public void deleteSubnet(DeleteSubnetRequest deleteSubnetRequest)
Delete the specified subnet owned by the user.

Parameters:
deleteSubnetRequest - the request containing all options for deleting own's subnet.

modifySubnetAttributes

public void modifySubnetAttributes(String subnetId,
                                   String name)
Modifying the special attribute to new value of the subnet owned by the user.

Parameters:
subnetId - The id of the subnet
name - The name of the subnet after modifying

modifySubnetAttributes

public void modifySubnetAttributes(ModifySubnetAttributesRequest modifySubnetAttributesRequest)
Modifying the special attribute to new value of the subnet owned by the user.

Parameters:
modifySubnetAttributesRequest - The request containing all options for modifying own's subnet.


Copyright © 2018. All rights reserved.