com.amazonaws.services.ec2.model
Class CreateSecurityGroupRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.ec2.model.CreateSecurityGroupRequest

public class CreateSecurityGroupRequest
extends AmazonWebServiceRequest

Container for the parameters to the CreateSecurityGroup operation.

The CreateSecurityGroup operation creates a new security group.

Every instance is launched in a security group. If no security group is specified during launch, the instances are launched in the default security group. Instances within the same security group have unrestricted network access to each other. Instances will reject network access attempts from other instances in a different security group. As the owner of instances you can grant or revoke specific permissions using the AuthorizeSecurityGroupIngress and RevokeSecurityGroupIngress operations.

See Also:
AmazonEC2.createSecurityGroup(CreateSecurityGroupRequest)

Constructor Summary
CreateSecurityGroupRequest()
          Default constructor for a new CreateSecurityGroupRequest object.
CreateSecurityGroupRequest(String groupName, String description)
          Constructs a new CreateSecurityGroupRequest object.
 
Method Summary
 boolean equals(Object obj)
           
 String getDescription()
          Description of the group.
 String getGroupName()
          Name of the security group.
 String getVpcId()
          ID of the VPC.
 int hashCode()
           
 void setDescription(String description)
          Description of the group.
 void setGroupName(String groupName)
          Name of the security group.
 void setVpcId(String vpcId)
          ID of the VPC.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 CreateSecurityGroupRequest withDescription(String description)
          Description of the group.
 CreateSecurityGroupRequest withGroupName(String groupName)
          Name of the security group.
 CreateSecurityGroupRequest withVpcId(String vpcId)
          ID of the VPC.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, setDelegationToken, setRequestCredentials
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CreateSecurityGroupRequest

public CreateSecurityGroupRequest()
Default constructor for a new CreateSecurityGroupRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this 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 - Name of the security group.
description - Description of the group. This is informational only.
Method Detail

getGroupName

public String getGroupName()
Name of the security group.

Returns:
Name of the security group.

setGroupName

public void setGroupName(String groupName)
Name of the security group.

Parameters:
groupName - Name of the security group.

withGroupName

public CreateSecurityGroupRequest withGroupName(String groupName)
Name of the security group.

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

Parameters:
groupName - Name of the security group.
Returns:
A reference to this updated object so that method calls can be chained together.

getDescription

public String getDescription()
Description of the group. This is informational only.

Returns:
Description of the group. This is informational only.

setDescription

public void setDescription(String description)
Description of the group. This is informational only.

Parameters:
description - Description of the group. This is informational only.

withDescription

public CreateSecurityGroupRequest withDescription(String description)
Description of the group. This is informational only.

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

Parameters:
description - Description of the group. This is informational only.
Returns:
A reference to this updated object so that method calls can be chained together.

getVpcId

public String getVpcId()
ID of the VPC.

Returns:
ID of the VPC.

setVpcId

public void setVpcId(String vpcId)
ID of the VPC.

Parameters:
vpcId - ID of the VPC.

withVpcId

public CreateSecurityGroupRequest withVpcId(String vpcId)
ID of the VPC.

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

Parameters:
vpcId - ID of the VPC.
Returns:
A reference to this updated object so that method calls can be chained together.

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:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.