Class CreateSecurityGroupRequest

java.lang.Object
com.amazonaws.AmazonWebServiceRequest
com.amazonaws.services.ec2.model.CreateSecurityGroupRequest
All Implemented Interfaces:
ReadLimitInfo, DryRunSupportedRequest<CreateSecurityGroupRequest>, Serializable, Cloneable

public class CreateSecurityGroupRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest<CreateSecurityGroupRequest>

Contains the parameters for CreateSecurityGroup.

See Also:
  • Constructor Details

    • CreateSecurityGroupRequest

      public CreateSecurityGroupRequest()
      Default constructor for CreateSecurityGroupRequest object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it.
    • CreateSecurityGroupRequest

      public CreateSecurityGroupRequest(String groupName, String description)
      Constructs a new CreateSecurityGroupRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.
      Parameters:
      groupName - The name of the security group.

      Constraints: Up to 255 characters in length

      Constraints for EC2-Classic: ASCII characters

      Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=<![CDATA[&]]>;{}!$*

      description - A description for the security group. This is informational only.

      Constraints: Up to 255 characters in length

      Constraints for EC2-Classic: ASCII characters

      Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=<![CDATA[&]]>;{}!$

  • Method Details

    • setGroupName

      public void setGroupName(String groupName)

      The name of the security group.

      Constraints: Up to 255 characters in length

      Constraints for EC2-Classic: ASCII characters

      Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=<![CDATA[&]]>;{}!$*

      Parameters:
      groupName - The name of the security group.

      Constraints: Up to 255 characters in length

      Constraints for EC2-Classic: ASCII characters

      Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=<![CDATA[&]]>;{}!$

    • getGroupName

      public String getGroupName()

      The name of the security group.

      Constraints: Up to 255 characters in length

      Constraints for EC2-Classic: ASCII characters

      Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=<![CDATA[&]]>;{}!$*

      Returns:
      The name of the security group.

      Constraints: Up to 255 characters in length

      Constraints for EC2-Classic: ASCII characters

      Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=<![CDATA[&]]>;{}!$

    • withGroupName

      public CreateSecurityGroupRequest withGroupName(String groupName)

      The name of the security group.

      Constraints: Up to 255 characters in length

      Constraints for EC2-Classic: ASCII characters

      Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=<![CDATA[&]]>;{}!$*

      Parameters:
      groupName - The name of the security group.

      Constraints: Up to 255 characters in length

      Constraints for EC2-Classic: ASCII characters

      Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=<![CDATA[&]]>;{}!$*

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setDescription

      public void setDescription(String description)

      A description for the security group. This is informational only.

      Constraints: Up to 255 characters in length

      Constraints for EC2-Classic: ASCII characters

      Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=<![CDATA[&]]>;{}!$*

      Parameters:
      description - A description for the security group. This is informational only.

      Constraints: Up to 255 characters in length

      Constraints for EC2-Classic: ASCII characters

      Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=<![CDATA[&]]>;{}!$

    • getDescription

      public String getDescription()

      A description for the security group. This is informational only.

      Constraints: Up to 255 characters in length

      Constraints for EC2-Classic: ASCII characters

      Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=<![CDATA[&]]>;{}!$*

      Returns:
      A description for the security group. This is informational only.

      Constraints: Up to 255 characters in length

      Constraints for EC2-Classic: ASCII characters

      Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=<![CDATA[&]]>;{}!$

    • withDescription

      public CreateSecurityGroupRequest withDescription(String description)

      A description for the security group. This is informational only.

      Constraints: Up to 255 characters in length

      Constraints for EC2-Classic: ASCII characters

      Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=<![CDATA[&]]>;{}!$*

      Parameters:
      description - A description for the security group. This is informational only.

      Constraints: Up to 255 characters in length

      Constraints for EC2-Classic: ASCII characters

      Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=<![CDATA[&]]>;{}!$*

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setVpcId

      public void setVpcId(String vpcId)

      [EC2-VPC] The ID of the VPC. Required for EC2-VPC.

      Parameters:
      vpcId - [EC2-VPC] The ID of the VPC. Required for EC2-VPC.
    • getVpcId

      public String getVpcId()

      [EC2-VPC] The ID of the VPC. Required for EC2-VPC.

      Returns:
      [EC2-VPC] The ID of the VPC. Required for EC2-VPC.
    • withVpcId

      public CreateSecurityGroupRequest withVpcId(String vpcId)

      [EC2-VPC] The ID of the VPC. Required for EC2-VPC.

      Parameters:
      vpcId - [EC2-VPC] The ID of the VPC. Required for EC2-VPC.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • getDryRunRequest

      public Request<CreateSecurityGroupRequest> getDryRunRequest()
      This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run.
      Specified by:
      getDryRunRequest in interface DryRunSupportedRequest<CreateSecurityGroupRequest>
    • toString

      public String toString()
      Returns a string representation of this object; useful for testing and debugging.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      Description copied from class: AmazonWebServiceRequest
      Creates a shallow clone of this request. Explicitly does not clone the deep structure of the request object.
      Overrides:
      clone in class AmazonWebServiceRequest
      See Also: