com.baidubce.services.acl
Class AclClient

java.lang.Object
  extended by com.baidubce.AbstractBceClient
      extended by com.baidubce.services.acl.AclClient

public class AclClient
extends AbstractBceClient

Provides the client for accessing the Baidu Cloud network Service Access Control List (ACL).


Field Summary
 
Fields inherited from class com.baidubce.AbstractBceClient
config, DEFAULT_CONTENT_TYPE, DEFAULT_ENCODING, DEFAULT_SERVICE_DOMAIN, URL_PREFIX
 
Constructor Summary
AclClient()
          Constructs a new client to invoke service methods on network.
AclClient(AclClientConfiguration clientConfiguration)
          Constructs a new network client using the client configuration to access network.
 
Method Summary
 void createAcl(CreateAclRequest createAclRequest)
          Create a acl with the specified options.
 void createAcl(List<AclRule> aclRules)
          Create a acl with the specified options.
 void deleteAcl(DeleteAclRequest deleteAclRequest)
          Delete the specified aclRule.
 void deleteAcl(String aclRuleId)
          Delete the specified aclRule.
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
 GetAclResponse getAcl(GetAclRequest getAclRequest)
          Get the detail acl information of specified vpc.
 GetAclResponse getAcl(String vpcId)
          Get the detail acl information of specified vpc.
 ListAclResponse listAclRules(ListAclRequest listAclRequest)
          Return a list of aclRules owned by the specified subnet.
 ListAclResponse listAclRules(String subnetId)
          Return a list of aclRules owned by the specified subnet.
 void modifyAclRuleAttributes(ModifyAclRuleAttributesRequest modifyAclRuleAttributesRequest)
          Modifying the special attribute to new aclRule owned by the user.
 void modifyAclRuleAttributes(String aclRuleId, AclRule aclRule)
          Modifying the special attribute to new aclRule 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

AclClient

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


AclClient

public AclClient(AclClientConfiguration 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

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.

createAcl

public void createAcl(List<AclRule> aclRules)
Create a acl with the specified options.

Parameters:
aclRules - The rules of acl

createAcl

public void createAcl(CreateAclRequest createAclRequest)
Create a acl with the specified options. You must fill the field of clientToken,which is especially for keeping idempotent.

Parameters:
createAclRequest - The request containing all options for creating a acl.

listAclRules

public ListAclResponse listAclRules(String subnetId)
Return a list of aclRules owned by the specified subnet.

Returns:
The response containing a list of aclRules owned by the subnet.

listAclRules

public ListAclResponse listAclRules(ListAclRequest listAclRequest)
Return a list of aclRules owned by the specified subnet.

Parameters:
listAclRequest - The request containing all options for listing subnet's aclRule.
Returns:
The response containing a list of aclRules owned by the specified subnet.

getAcl

public GetAclResponse getAcl(String vpcId)
Get the detail acl information of specified vpc.

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

getAcl

public GetAclResponse getAcl(GetAclRequest getAclRequest)
Get the detail acl information of specified vpc.

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

deleteAcl

public void deleteAcl(String aclRuleId)
Delete the specified aclRule.

Parameters:
aclRuleId - The id of the aclRule to delete.

deleteAcl

public void deleteAcl(DeleteAclRequest deleteAclRequest)
Delete the specified aclRule.

Parameters:
deleteAclRequest - The request containing all options for deleting aclRule.

modifyAclRuleAttributes

public void modifyAclRuleAttributes(String aclRuleId,
                                    AclRule aclRule)
Modifying the special attribute to new aclRule owned by the user.

Parameters:
aclRuleId - The id of the aclRule
aclRule - the aclRule after modifying

modifyAclRuleAttributes

public void modifyAclRuleAttributes(ModifyAclRuleAttributesRequest modifyAclRuleAttributesRequest)
Modifying the special attribute to new aclRule owned by the user.

Parameters:
modifyAclRuleAttributesRequest - The request containing all options for modifying own's aclRule.


Copyright © 2018. All rights reserved.