com.amazonaws.services.ec2.model
Class AuthorizeSecurityGroupIngressRequest

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

public class AuthorizeSecurityGroupIngressRequest
extends AmazonWebServiceRequest

Container for the parameters to the AuthorizeSecurityGroupIngress operation.

The AuthorizeSecurityGroupIngress operation adds permissions to a security group.

Permissions are specified by the IP protocol (TCP, UDP or ICMP), the source of the request (by IP range or an Amazon EC2 user-group pair), the source and destination port ranges (for TCP and UDP), and the ICMP codes and types (for ICMP). When authorizing ICMP, -1 can be used as a wildcard in the type and code fields.

Permission changes are propagated to instances within the security group as quickly as possible. However, depending on the number of instances, a small delay might occur.

See Also:
AmazonEC2.authorizeSecurityGroupIngress(AuthorizeSecurityGroupIngressRequest)

Constructor Summary
AuthorizeSecurityGroupIngressRequest()
          Default constructor for a new AuthorizeSecurityGroupIngressRequest object.
AuthorizeSecurityGroupIngressRequest(String groupName, List<IpPermission> ipPermissions)
          Constructs a new AuthorizeSecurityGroupIngressRequest object.
 
Method Summary
 boolean equals(Object obj)
           
 String getCidrIp()
          Deprecated
 Integer getFromPort()
          Deprecated
 String getGroupId()
          ID of the standard (EC2) or VPC security group to modify.
 String getGroupName()
          Name of the standard (EC2) security group to modify.
 List<IpPermission> getIpPermissions()
          List of IP permissions to authorize on the specified security group.
 String getIpProtocol()
          Deprecated
 String getSourceSecurityGroupName()
          Deprecated
 String getSourceSecurityGroupOwnerId()
          Deprecated
 Integer getToPort()
          Deprecated
 int hashCode()
           
 void setCidrIp(String cidrIp)
          Deprecated
 void setFromPort(Integer fromPort)
          Deprecated
 void setGroupId(String groupId)
          ID of the standard (EC2) or VPC security group to modify.
 void setGroupName(String groupName)
          Name of the standard (EC2) security group to modify.
 void setIpPermissions(Collection<IpPermission> ipPermissions)
          List of IP permissions to authorize on the specified security group.
 void setIpProtocol(String ipProtocol)
          Deprecated
 void setSourceSecurityGroupName(String sourceSecurityGroupName)
          Deprecated
 void setSourceSecurityGroupOwnerId(String sourceSecurityGroupOwnerId)
          Deprecated
 void setToPort(Integer toPort)
          Deprecated
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 AuthorizeSecurityGroupIngressRequest withCidrIp(String cidrIp)
          Deprecated
 AuthorizeSecurityGroupIngressRequest withFromPort(Integer fromPort)
          Deprecated
 AuthorizeSecurityGroupIngressRequest withGroupId(String groupId)
          ID of the standard (EC2) or VPC security group to modify.
 AuthorizeSecurityGroupIngressRequest withGroupName(String groupName)
          Name of the standard (EC2) security group to modify.
 AuthorizeSecurityGroupIngressRequest withIpPermissions(Collection<IpPermission> ipPermissions)
          List of IP permissions to authorize on the specified security group.
 AuthorizeSecurityGroupIngressRequest withIpPermissions(IpPermission... ipPermissions)
          List of IP permissions to authorize on the specified security group.
 AuthorizeSecurityGroupIngressRequest withIpProtocol(String ipProtocol)
          Deprecated
 AuthorizeSecurityGroupIngressRequest withSourceSecurityGroupName(String sourceSecurityGroupName)
          Deprecated
 AuthorizeSecurityGroupIngressRequest withSourceSecurityGroupOwnerId(String sourceSecurityGroupOwnerId)
          Deprecated
 AuthorizeSecurityGroupIngressRequest withToPort(Integer toPort)
          Deprecated
 
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

AuthorizeSecurityGroupIngressRequest

public AuthorizeSecurityGroupIngressRequest()
Default constructor for a new AuthorizeSecurityGroupIngressRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.


AuthorizeSecurityGroupIngressRequest

public AuthorizeSecurityGroupIngressRequest(String groupName,
                                            List<IpPermission> ipPermissions)
Constructs a new AuthorizeSecurityGroupIngressRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
groupName - Name of the standard (EC2) security group to modify. The group must belong to your account. Can be used instead of GroupID for standard (EC2) security groups.
ipPermissions - List of IP permissions to authorize on the specified security group. Specifying permissions through IP permissions is the preferred way of authorizing permissions since it offers more flexibility and control.
Method Detail

getGroupName

public String getGroupName()
Name of the standard (EC2) security group to modify. The group must belong to your account. Can be used instead of GroupID for standard (EC2) security groups.

Returns:
Name of the standard (EC2) security group to modify. The group must belong to your account. Can be used instead of GroupID for standard (EC2) security groups.

setGroupName

public void setGroupName(String groupName)
Name of the standard (EC2) security group to modify. The group must belong to your account. Can be used instead of GroupID for standard (EC2) security groups.

Parameters:
groupName - Name of the standard (EC2) security group to modify. The group must belong to your account. Can be used instead of GroupID for standard (EC2) security groups.

withGroupName

public AuthorizeSecurityGroupIngressRequest withGroupName(String groupName)
Name of the standard (EC2) security group to modify. The group must belong to your account. Can be used instead of GroupID for standard (EC2) security groups.

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

Parameters:
groupName - Name of the standard (EC2) security group to modify. The group must belong to your account. Can be used instead of GroupID for standard (EC2) security groups.
Returns:
A reference to this updated object so that method calls can be chained together.

getGroupId

public String getGroupId()
ID of the standard (EC2) or VPC security group to modify. The group must belong to your account. Required for VPC security groups; can be used instead of GroupName for standard (EC2) security groups.

Returns:
ID of the standard (EC2) or VPC security group to modify. The group must belong to your account. Required for VPC security groups; can be used instead of GroupName for standard (EC2) security groups.

setGroupId

public void setGroupId(String groupId)
ID of the standard (EC2) or VPC security group to modify. The group must belong to your account. Required for VPC security groups; can be used instead of GroupName for standard (EC2) security groups.

Parameters:
groupId - ID of the standard (EC2) or VPC security group to modify. The group must belong to your account. Required for VPC security groups; can be used instead of GroupName for standard (EC2) security groups.

withGroupId

public AuthorizeSecurityGroupIngressRequest withGroupId(String groupId)
ID of the standard (EC2) or VPC security group to modify. The group must belong to your account. Required for VPC security groups; can be used instead of GroupName for standard (EC2) security groups.

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

Parameters:
groupId - ID of the standard (EC2) or VPC security group to modify. The group must belong to your account. Required for VPC security groups; can be used instead of GroupName for standard (EC2) security groups.
Returns:
A reference to this updated object so that method calls can be chained together.

getSourceSecurityGroupName

public String getSourceSecurityGroupName()
Deprecated

Returns:
Deprecated

setSourceSecurityGroupName

public void setSourceSecurityGroupName(String sourceSecurityGroupName)
Deprecated

Parameters:
sourceSecurityGroupName - Deprecated

withSourceSecurityGroupName

public AuthorizeSecurityGroupIngressRequest withSourceSecurityGroupName(String sourceSecurityGroupName)
Deprecated

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

Parameters:
sourceSecurityGroupName - Deprecated
Returns:
A reference to this updated object so that method calls can be chained together.

getSourceSecurityGroupOwnerId

public String getSourceSecurityGroupOwnerId()
Deprecated

Returns:
Deprecated

setSourceSecurityGroupOwnerId

public void setSourceSecurityGroupOwnerId(String sourceSecurityGroupOwnerId)
Deprecated

Parameters:
sourceSecurityGroupOwnerId - Deprecated

withSourceSecurityGroupOwnerId

public AuthorizeSecurityGroupIngressRequest withSourceSecurityGroupOwnerId(String sourceSecurityGroupOwnerId)
Deprecated

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

Parameters:
sourceSecurityGroupOwnerId - Deprecated
Returns:
A reference to this updated object so that method calls can be chained together.

getIpProtocol

public String getIpProtocol()
Deprecated

Returns:
Deprecated

setIpProtocol

public void setIpProtocol(String ipProtocol)
Deprecated

Parameters:
ipProtocol - Deprecated

withIpProtocol

public AuthorizeSecurityGroupIngressRequest withIpProtocol(String ipProtocol)
Deprecated

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

Parameters:
ipProtocol - Deprecated
Returns:
A reference to this updated object so that method calls can be chained together.

getFromPort

public Integer getFromPort()
Deprecated

Returns:
Deprecated

setFromPort

public void setFromPort(Integer fromPort)
Deprecated

Parameters:
fromPort - Deprecated

withFromPort

public AuthorizeSecurityGroupIngressRequest withFromPort(Integer fromPort)
Deprecated

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

Parameters:
fromPort - Deprecated
Returns:
A reference to this updated object so that method calls can be chained together.

getToPort

public Integer getToPort()
Deprecated

Returns:
Deprecated

setToPort

public void setToPort(Integer toPort)
Deprecated

Parameters:
toPort - Deprecated

withToPort

public AuthorizeSecurityGroupIngressRequest withToPort(Integer toPort)
Deprecated

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

Parameters:
toPort - Deprecated
Returns:
A reference to this updated object so that method calls can be chained together.

getCidrIp

public String getCidrIp()
Deprecated

Returns:
Deprecated

setCidrIp

public void setCidrIp(String cidrIp)
Deprecated

Parameters:
cidrIp - Deprecated

withCidrIp

public AuthorizeSecurityGroupIngressRequest withCidrIp(String cidrIp)
Deprecated

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

Parameters:
cidrIp - Deprecated
Returns:
A reference to this updated object so that method calls can be chained together.

getIpPermissions

public List<IpPermission> getIpPermissions()
List of IP permissions to authorize on the specified security group. Specifying permissions through IP permissions is the preferred way of authorizing permissions since it offers more flexibility and control.

Returns:
List of IP permissions to authorize on the specified security group. Specifying permissions through IP permissions is the preferred way of authorizing permissions since it offers more flexibility and control.

setIpPermissions

public void setIpPermissions(Collection<IpPermission> ipPermissions)
List of IP permissions to authorize on the specified security group. Specifying permissions through IP permissions is the preferred way of authorizing permissions since it offers more flexibility and control.

Parameters:
ipPermissions - List of IP permissions to authorize on the specified security group. Specifying permissions through IP permissions is the preferred way of authorizing permissions since it offers more flexibility and control.

withIpPermissions

public AuthorizeSecurityGroupIngressRequest withIpPermissions(IpPermission... ipPermissions)
List of IP permissions to authorize on the specified security group. Specifying permissions through IP permissions is the preferred way of authorizing permissions since it offers more flexibility and control.

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

Parameters:
ipPermissions - List of IP permissions to authorize on the specified security group. Specifying permissions through IP permissions is the preferred way of authorizing permissions since it offers more flexibility and control.
Returns:
A reference to this updated object so that method calls can be chained together.

withIpPermissions

public AuthorizeSecurityGroupIngressRequest withIpPermissions(Collection<IpPermission> ipPermissions)
List of IP permissions to authorize on the specified security group. Specifying permissions through IP permissions is the preferred way of authorizing permissions since it offers more flexibility and control.

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

Parameters:
ipPermissions - List of IP permissions to authorize on the specified security group. Specifying permissions through IP permissions is the preferred way of authorizing permissions since it offers more flexibility and control.
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.