com.amazonaws.services.ec2.model
Class RevokeSecurityGroupIngressRequest

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

public class RevokeSecurityGroupIngressRequest
extends AmazonWebServiceRequest

Container for the parameters to the RevokeSecurityGroupIngress operation.

The RevokeSecurityGroupIngress operation revokes permissions from a security group. The permissions used to revoke must be specified using the same values used to grant the permissions.

Permissions are specified by 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).

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

See Also:
AmazonEC2.revokeSecurityGroupIngress(RevokeSecurityGroupIngressRequest)

Constructor Summary
RevokeSecurityGroupIngressRequest()
          Default constructor for a new RevokeSecurityGroupIngressRequest object.
RevokeSecurityGroupIngressRequest(String groupName, List<IpPermission> ipPermissions)
          Constructs a new RevokeSecurityGroupIngressRequest object.
 
Method Summary
 String getCidrIp()
          Deprecated - use the list of IP permissions to specify this information instead.
 Integer getFromPort()
          Deprecated - use the list of IP permissions to specify this information instead.
 String getGroupName()
          The name of the security group from which to remove permissions.
 List<IpPermission> getIpPermissions()
          List of IP permissions to revoke on the specified security group.
 String getIpProtocol()
          Deprecated - use the list of IP permissions to specify this information instead.
 String getSourceSecurityGroupName()
          Deprecated - use the list of IP permissions to specify this information instead.
 String getSourceSecurityGroupOwnerId()
          Deprecated - use the list of IP permissions to specify this information instead.
 Integer getToPort()
          Deprecated - use the list of IP permissions to specify this information instead.
 void setCidrIp(String cidrIp)
          Deprecated - use the list of IP permissions to specify this information instead.
 void setFromPort(Integer fromPort)
          Deprecated - use the list of IP permissions to specify this information instead.
 void setGroupName(String groupName)
          The name of the security group from which to remove permissions.
 void setIpPermissions(Collection<IpPermission> ipPermissions)
          List of IP permissions to revoke on the specified security group.
 void setIpProtocol(String ipProtocol)
          Deprecated - use the list of IP permissions to specify this information instead.
 void setSourceSecurityGroupName(String sourceSecurityGroupName)
          Deprecated - use the list of IP permissions to specify this information instead.
 void setSourceSecurityGroupOwnerId(String sourceSecurityGroupOwnerId)
          Deprecated - use the list of IP permissions to specify this information instead.
 void setToPort(Integer toPort)
          Deprecated - use the list of IP permissions to specify this information instead.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 RevokeSecurityGroupIngressRequest withCidrIp(String cidrIp)
          Deprecated - use the list of IP permissions to specify this information instead.
 RevokeSecurityGroupIngressRequest withFromPort(Integer fromPort)
          Deprecated - use the list of IP permissions to specify this information instead.
 RevokeSecurityGroupIngressRequest withGroupName(String groupName)
          The name of the security group from which to remove permissions.
 RevokeSecurityGroupIngressRequest withIpPermissions(Collection<IpPermission> ipPermissions)
          List of IP permissions to revoke on the specified security group.
 RevokeSecurityGroupIngressRequest withIpPermissions(IpPermission... ipPermissions)
          List of IP permissions to revoke on the specified security group.
 RevokeSecurityGroupIngressRequest withIpProtocol(String ipProtocol)
          Deprecated - use the list of IP permissions to specify this information instead.
 RevokeSecurityGroupIngressRequest withSourceSecurityGroupName(String sourceSecurityGroupName)
          Deprecated - use the list of IP permissions to specify this information instead.
 RevokeSecurityGroupIngressRequest withSourceSecurityGroupOwnerId(String sourceSecurityGroupOwnerId)
          Deprecated - use the list of IP permissions to specify this information instead.
 RevokeSecurityGroupIngressRequest withToPort(Integer toPort)
          Deprecated - use the list of IP permissions to specify this information instead.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getRequestCredentials, setRequestCredentials
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RevokeSecurityGroupIngressRequest

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


RevokeSecurityGroupIngressRequest

public RevokeSecurityGroupIngressRequest(String groupName,
                                         List<IpPermission> ipPermissions)
Constructs a new RevokeSecurityGroupIngressRequest 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 from which to remove permissions.
ipPermissions - List of IP permissions to revoke on the specified security group. For an IP permission to be removed, it must exactly match one of the IP permissions you specify in this list. Specifying permissions through IP permissions is the preferred way of revoking permissions since it offers more flexibility and control.
Method Detail

getGroupName

public String getGroupName()
The name of the security group from which to remove permissions.

Returns:
The name of the security group from which to remove permissions.

setGroupName

public void setGroupName(String groupName)
The name of the security group from which to remove permissions.

Parameters:
groupName - The name of the security group from which to remove permissions.

withGroupName

public RevokeSecurityGroupIngressRequest withGroupName(String groupName)
The name of the security group from which to remove permissions.

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

Parameters:
groupName - The name of the security group from which to remove permissions.
Returns:
A reference to this updated object so that method calls can be chained together.

getSourceSecurityGroupName

public String getSourceSecurityGroupName()
Deprecated - use the list of IP permissions to specify this information instead.

Name of the source security group. Cannot be used when specifying a CIDR IP address.

Returns:
Deprecated - use the list of IP permissions to specify this information instead.

Name of the source security group. Cannot be used when specifying a CIDR IP address.


setSourceSecurityGroupName

public void setSourceSecurityGroupName(String sourceSecurityGroupName)
Deprecated - use the list of IP permissions to specify this information instead.

Name of the source security group. Cannot be used when specifying a CIDR IP address.

Parameters:
sourceSecurityGroupName - Deprecated - use the list of IP permissions to specify this information instead.

Name of the source security group. Cannot be used when specifying a CIDR IP address.


withSourceSecurityGroupName

public RevokeSecurityGroupIngressRequest withSourceSecurityGroupName(String sourceSecurityGroupName)
Deprecated - use the list of IP permissions to specify this information instead.

Name of the source security group. Cannot be used when specifying a CIDR IP address.

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

Parameters:
sourceSecurityGroupName - Deprecated - use the list of IP permissions to specify this information instead.

Name of the source security group. Cannot be used when specifying a CIDR IP address.

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

getSourceSecurityGroupOwnerId

public String getSourceSecurityGroupOwnerId()
Deprecated - use the list of IP permissions to specify this information instead.

AWS user ID of an account. Cannot be used when specifying a CIDR IP address.

Returns:
Deprecated - use the list of IP permissions to specify this information instead.

AWS user ID of an account. Cannot be used when specifying a CIDR IP address.


setSourceSecurityGroupOwnerId

public void setSourceSecurityGroupOwnerId(String sourceSecurityGroupOwnerId)
Deprecated - use the list of IP permissions to specify this information instead.

AWS user ID of an account. Cannot be used when specifying a CIDR IP address.

Parameters:
sourceSecurityGroupOwnerId - Deprecated - use the list of IP permissions to specify this information instead.

AWS user ID of an account. Cannot be used when specifying a CIDR IP address.


withSourceSecurityGroupOwnerId

public RevokeSecurityGroupIngressRequest withSourceSecurityGroupOwnerId(String sourceSecurityGroupOwnerId)
Deprecated - use the list of IP permissions to specify this information instead.

AWS user ID of an account. Cannot be used when specifying a CIDR IP address.

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

Parameters:
sourceSecurityGroupOwnerId - Deprecated - use the list of IP permissions to specify this information instead.

AWS user ID of an account. Cannot be used when specifying a CIDR IP address.

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

getIpProtocol

public String getIpProtocol()
Deprecated - use the list of IP permissions to specify this information instead.

IP protocol.

Valid values: tcp, udp, icmp

Returns:
Deprecated - use the list of IP permissions to specify this information instead.

IP protocol.

Valid values: tcp, udp, icmp


setIpProtocol

public void setIpProtocol(String ipProtocol)
Deprecated - use the list of IP permissions to specify this information instead.

IP protocol.

Valid values: tcp, udp, icmp

Parameters:
ipProtocol - Deprecated - use the list of IP permissions to specify this information instead.

IP protocol.

Valid values: tcp, udp, icmp


withIpProtocol

public RevokeSecurityGroupIngressRequest withIpProtocol(String ipProtocol)
Deprecated - use the list of IP permissions to specify this information instead.

IP protocol.

Valid values: tcp, udp, icmp

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

Parameters:
ipProtocol - Deprecated - use the list of IP permissions to specify this information instead.

IP protocol.

Valid values: tcp, udp, icmp

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

getFromPort

public Integer getFromPort()
Deprecated - use the list of IP permissions to specify this information instead.

Start of port range for the TCP and UDP protocols, or an ICMP type number. An ICMP type number of -1 indicates a wildcard (i.e., any ICMP type number).

Returns:
Deprecated - use the list of IP permissions to specify this information instead.

Start of port range for the TCP and UDP protocols, or an ICMP type number. An ICMP type number of -1 indicates a wildcard (i.e., any ICMP type number).


setFromPort

public void setFromPort(Integer fromPort)
Deprecated - use the list of IP permissions to specify this information instead.

Start of port range for the TCP and UDP protocols, or an ICMP type number. An ICMP type number of -1 indicates a wildcard (i.e., any ICMP type number).

Parameters:
fromPort - Deprecated - use the list of IP permissions to specify this information instead.

Start of port range for the TCP and UDP protocols, or an ICMP type number. An ICMP type number of -1 indicates a wildcard (i.e., any ICMP type number).


withFromPort

public RevokeSecurityGroupIngressRequest withFromPort(Integer fromPort)
Deprecated - use the list of IP permissions to specify this information instead.

Start of port range for the TCP and UDP protocols, or an ICMP type number. An ICMP type number of -1 indicates a wildcard (i.e., any ICMP type number).

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

Parameters:
fromPort - Deprecated - use the list of IP permissions to specify this information instead.

Start of port range for the TCP and UDP protocols, or an ICMP type number. An ICMP type number of -1 indicates a wildcard (i.e., any ICMP type number).

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

getToPort

public Integer getToPort()
Deprecated - use the list of IP permissions to specify this information instead.

End of port range for the TCP and UDP protocols, or an ICMP code. An ICMP code of -1 indicates a wildcard (i.e., any ICMP code).

Returns:
Deprecated - use the list of IP permissions to specify this information instead.

End of port range for the TCP and UDP protocols, or an ICMP code. An ICMP code of -1 indicates a wildcard (i.e., any ICMP code).


setToPort

public void setToPort(Integer toPort)
Deprecated - use the list of IP permissions to specify this information instead.

End of port range for the TCP and UDP protocols, or an ICMP code. An ICMP code of -1 indicates a wildcard (i.e., any ICMP code).

Parameters:
toPort - Deprecated - use the list of IP permissions to specify this information instead.

End of port range for the TCP and UDP protocols, or an ICMP code. An ICMP code of -1 indicates a wildcard (i.e., any ICMP code).


withToPort

public RevokeSecurityGroupIngressRequest withToPort(Integer toPort)
Deprecated - use the list of IP permissions to specify this information instead.

End of port range for the TCP and UDP protocols, or an ICMP code. An ICMP code of -1 indicates a wildcard (i.e., any ICMP code).

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

Parameters:
toPort - Deprecated - use the list of IP permissions to specify this information instead.

End of port range for the TCP and UDP protocols, or an ICMP code. An ICMP code of -1 indicates a wildcard (i.e., any ICMP code).

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

getCidrIp

public String getCidrIp()
Deprecated - use the list of IP permissions to specify this information instead.

CIDR range.

Returns:
Deprecated - use the list of IP permissions to specify this information instead.

CIDR range.


setCidrIp

public void setCidrIp(String cidrIp)
Deprecated - use the list of IP permissions to specify this information instead.

CIDR range.

Parameters:
cidrIp - Deprecated - use the list of IP permissions to specify this information instead.

CIDR range.


withCidrIp

public RevokeSecurityGroupIngressRequest withCidrIp(String cidrIp)
Deprecated - use the list of IP permissions to specify this information instead.

CIDR range.

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

Parameters:
cidrIp - Deprecated - use the list of IP permissions to specify this information instead.

CIDR range.

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 revoke on the specified security group. For an IP permission to be removed, it must exactly match one of the IP permissions you specify in this list. Specifying permissions through IP permissions is the preferred way of revoking permissions since it offers more flexibility and control.

Returns:
List of IP permissions to revoke on the specified security group. For an IP permission to be removed, it must exactly match one of the IP permissions you specify in this list. Specifying permissions through IP permissions is the preferred way of revoking permissions since it offers more flexibility and control.

setIpPermissions

public void setIpPermissions(Collection<IpPermission> ipPermissions)
List of IP permissions to revoke on the specified security group. For an IP permission to be removed, it must exactly match one of the IP permissions you specify in this list. Specifying permissions through IP permissions is the preferred way of revoking permissions since it offers more flexibility and control.

Parameters:
ipPermissions - List of IP permissions to revoke on the specified security group. For an IP permission to be removed, it must exactly match one of the IP permissions you specify in this list. Specifying permissions through IP permissions is the preferred way of revoking permissions since it offers more flexibility and control.

withIpPermissions

public RevokeSecurityGroupIngressRequest withIpPermissions(IpPermission... ipPermissions)
List of IP permissions to revoke on the specified security group. For an IP permission to be removed, it must exactly match one of the IP permissions you specify in this list. Specifying permissions through IP permissions is the preferred way of revoking 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 revoke on the specified security group. For an IP permission to be removed, it must exactly match one of the IP permissions you specify in this list. Specifying permissions through IP permissions is the preferred way of revoking 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 RevokeSecurityGroupIngressRequest withIpPermissions(Collection<IpPermission> ipPermissions)
List of IP permissions to revoke on the specified security group. For an IP permission to be removed, it must exactly match one of the IP permissions you specify in this list. Specifying permissions through IP permissions is the preferred way of revoking 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 revoke on the specified security group. For an IP permission to be removed, it must exactly match one of the IP permissions you specify in this list. Specifying permissions through IP permissions is the preferred way of revoking 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()


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