com.baidubce.services.bcc.model.securitygroup
Class CreateSecurityGroupRequest

java.lang.Object
  extended by com.baidubce.model.AbstractBceRequest
      extended by com.baidubce.services.bcc.model.securitygroup.CreateSecurityGroupRequest

public class CreateSecurityGroupRequest
extends AbstractBceRequest

The request for creating new SecurityGroup.


Constructor Summary
CreateSecurityGroupRequest()
           
 
Method Summary
 String getClientToken()
           
 String getDesc()
           
 String getName()
           
 List<SecurityGroupRuleModel> getRules()
           
 String getVpcId()
           
 void setClientToken(String clientToken)
           
 void setDesc(String desc)
           
 void setName(String name)
           
 void setRules(List<SecurityGroupRuleModel> rules)
           
 void setVpcId(String vpcId)
           
 CreateSecurityGroupRequest withClientToken(String clientToken)
          Configure optional client token for the request.
 CreateSecurityGroupRequest withDesc(String desc)
          Configure desc for the request.
 CreateSecurityGroupRequest withName(String name)
          Configure name for the request.
 CreateSecurityGroupRequest withRequestCredentials(BceCredentials credentials)
          Configure request credential for the request.
 CreateSecurityGroupRequest withRules(List<SecurityGroupRuleModel> rules)
          Configure rules for the request.
 CreateSecurityGroupRequest withVpcId(String vpcId)
           
 
Methods inherited from class com.baidubce.model.AbstractBceRequest
getRequestCredentials, setRequestCredentials
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateSecurityGroupRequest

public CreateSecurityGroupRequest()
Method Detail

getClientToken

public String getClientToken()

setClientToken

public void setClientToken(String clientToken)

withClientToken

public CreateSecurityGroupRequest withClientToken(String clientToken)
Configure optional client token for the request. The request will be idempotent if client token is provided. If the clientToken is not specified by the user, a random String generated by default algorithm will be used.

Parameters:
clientToken - An ASCII string whose length is less than 64. See more detail at BCE API doc
Returns:
CreateSecurityGroupRequest with specific clientToken

getName

public String getName()

setName

public void setName(String name)

withVpcId

public CreateSecurityGroupRequest withVpcId(String vpcId)

getVpcId

public String getVpcId()

setVpcId

public void setVpcId(String vpcId)

withName

public CreateSecurityGroupRequest withName(String name)
Configure name for the request.

Parameters:
name - The name of SecurityGroup that will be created.
Returns:
CreateSecurityGroupRequest with name.

getDesc

public String getDesc()

setDesc

public void setDesc(String desc)

withDesc

public CreateSecurityGroupRequest withDesc(String desc)
Configure desc for the request.

Parameters:
desc - The optional parameter to describe the SecurityGroup that will be created.
Returns:
CreateSecurityGroupRequest with desc.

getRules

public List<SecurityGroupRuleModel> getRules()

setRules

public void setRules(List<SecurityGroupRuleModel> rules)

withRules

public CreateSecurityGroupRequest withRules(List<SecurityGroupRuleModel> rules)
Configure rules for the request.

Parameters:
rules - The list of rules which define how the SecurityGroup works.
Returns:
CreateSecurityGroupRequest with rules.

withRequestCredentials

public CreateSecurityGroupRequest withRequestCredentials(BceCredentials credentials)
Configure request credential for the request.

Specified by:
withRequestCredentials in class AbstractBceRequest
Parameters:
credentials - a valid instance of BceCredentials.
Returns:
CreateSecurityGroupRequest with credentials.


Copyright © 2018. All rights reserved.