public class RevokeSecurityGroupIngressRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest<RevokeSecurityGroupIngressRequest>
RevokeSecurityGroupIngress operation
.
Removes one or more ingress rules from a security group. The values that you specify in the revoke request (for example, ports) must match the existing rule's values for the rule to be removed.
Each rule consists of the protocol and the CIDR range or source security group. For the TCP and UDP protocols, you must also specify the destination port or range of ports. For the ICMP protocol, you must also specify the ICMP type and code.
Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.
NOOP
Constructor and Description |
---|
RevokeSecurityGroupIngressRequest()
Default constructor for a new RevokeSecurityGroupIngressRequest object.
|
RevokeSecurityGroupIngressRequest(String groupName,
List<IpPermission> ipPermissions)
Constructs a new RevokeSecurityGroupIngressRequest object.
|
Modifier and Type | Method and Description |
---|---|
RevokeSecurityGroupIngressRequest |
clone() |
boolean |
equals(Object obj) |
String |
getCidrIp()
The CIDR IP address range.
|
Request<RevokeSecurityGroupIngressRequest> |
getDryRunRequest()
This method is intended for internal use only.
|
Integer |
getFromPort()
The start of port range for the TCP and UDP protocols, or an ICMP type
number.
|
String |
getGroupId()
The ID of the security group.
|
String |
getGroupName()
[EC2-Classic, default VPC] The name of the security group.
|
List<IpPermission> |
getIpPermissions()
A set of IP permissions.
|
String |
getIpProtocol()
|
String |
getSourceSecurityGroupName()
[EC2-Classic, default VPC] The name of the source security group.
|
String |
getSourceSecurityGroupOwnerId()
[EC2-Classic, default VPC] The AWS account ID of the source security
group.
|
Integer |
getToPort()
The end of port range for the TCP and UDP protocols, or an ICMP code
number.
|
int |
hashCode() |
void |
setCidrIp(String cidrIp)
The CIDR IP address range.
|
void |
setFromPort(Integer fromPort)
The start of port range for the TCP and UDP protocols, or an ICMP type
number.
|
void |
setGroupId(String groupId)
The ID of the security group.
|
void |
setGroupName(String groupName)
[EC2-Classic, default VPC] The name of the security group.
|
void |
setIpPermissions(Collection<IpPermission> ipPermissions)
A set of IP permissions.
|
void |
setIpProtocol(String ipProtocol)
|
void |
setSourceSecurityGroupName(String sourceSecurityGroupName)
[EC2-Classic, default VPC] The name of the source security group.
|
void |
setSourceSecurityGroupOwnerId(String sourceSecurityGroupOwnerId)
[EC2-Classic, default VPC] The AWS account ID of the source security
group.
|
void |
setToPort(Integer toPort)
The end of port range for the TCP and UDP protocols, or an ICMP code
number.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
RevokeSecurityGroupIngressRequest |
withCidrIp(String cidrIp)
The CIDR IP address range.
|
RevokeSecurityGroupIngressRequest |
withFromPort(Integer fromPort)
The start of port range for the TCP and UDP protocols, or an ICMP type
number.
|
RevokeSecurityGroupIngressRequest |
withGroupId(String groupId)
The ID of the security group.
|
RevokeSecurityGroupIngressRequest |
withGroupName(String groupName)
[EC2-Classic, default VPC] The name of the security group.
|
RevokeSecurityGroupIngressRequest |
withIpPermissions(Collection<IpPermission> ipPermissions)
A set of IP permissions.
|
RevokeSecurityGroupIngressRequest |
withIpPermissions(IpPermission... ipPermissions)
A set of IP permissions.
|
RevokeSecurityGroupIngressRequest |
withIpProtocol(String ipProtocol)
|
RevokeSecurityGroupIngressRequest |
withSourceSecurityGroupName(String sourceSecurityGroupName)
[EC2-Classic, default VPC] The name of the source security group.
|
RevokeSecurityGroupIngressRequest |
withSourceSecurityGroupOwnerId(String sourceSecurityGroupOwnerId)
[EC2-Classic, default VPC] The AWS account ID of the source security
group.
|
RevokeSecurityGroupIngressRequest |
withToPort(Integer toPort)
The end of port range for the TCP and UDP protocols, or an ICMP code
number.
|
copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public RevokeSecurityGroupIngressRequest()
public RevokeSecurityGroupIngressRequest(String groupName, List<IpPermission> ipPermissions)
groupName
- [EC2-Classic, default VPC] The name of the security
group.ipPermissions
- A set of IP permissions. You can't specify a
source security group and a CIDR IP address range.public String getGroupName()
public void setGroupName(String groupName)
groupName
- [EC2-Classic, default VPC] The name of the security group.public RevokeSecurityGroupIngressRequest withGroupName(String groupName)
Returns a reference to this object so that method calls can be chained together.
groupName
- [EC2-Classic, default VPC] The name of the security group.public String getGroupId()
public void setGroupId(String groupId)
groupId
- The ID of the security group. Required for a security group in a
nondefault VPC.public RevokeSecurityGroupIngressRequest withGroupId(String groupId)
Returns a reference to this object so that method calls can be chained together.
groupId
- The ID of the security group. Required for a security group in a
nondefault VPC.public String getSourceSecurityGroupName()
public void setSourceSecurityGroupName(String sourceSecurityGroupName)
sourceSecurityGroupName
- [EC2-Classic, default VPC] The name of the source security group. You
can't specify this parameter in combination with the following
parameters: the CIDR IP address range, the start of the port range,
the IP protocol, and the end of the port range. For EC2-VPC, the
source security group must be in the same VPC.public RevokeSecurityGroupIngressRequest withSourceSecurityGroupName(String sourceSecurityGroupName)
Returns a reference to this object so that method calls can be chained together.
sourceSecurityGroupName
- [EC2-Classic, default VPC] The name of the source security group. You
can't specify this parameter in combination with the following
parameters: the CIDR IP address range, the start of the port range,
the IP protocol, and the end of the port range. For EC2-VPC, the
source security group must be in the same VPC.public String getSourceSecurityGroupOwnerId()
public void setSourceSecurityGroupOwnerId(String sourceSecurityGroupOwnerId)
sourceSecurityGroupOwnerId
- [EC2-Classic, default VPC] The AWS account ID of the source security
group. For EC2-VPC, the source security group must be in the same VPC.
You can't specify this parameter in combination with the following
parameters: the CIDR IP address range, the IP protocol, the start of
the port range, and the end of the port range. To revoke a specific
rule for an IP protocol and port range, use a set of IP permissions
instead.public RevokeSecurityGroupIngressRequest withSourceSecurityGroupOwnerId(String sourceSecurityGroupOwnerId)
Returns a reference to this object so that method calls can be chained together.
sourceSecurityGroupOwnerId
- [EC2-Classic, default VPC] The AWS account ID of the source security
group. For EC2-VPC, the source security group must be in the same VPC.
You can't specify this parameter in combination with the following
parameters: the CIDR IP address range, the IP protocol, the start of
the port range, and the end of the port range. To revoke a specific
rule for an IP protocol and port range, use a set of IP permissions
instead.public String getIpProtocol()
tcp
, udp
,
icmp
) or number (see Protocol
Numbers). Use -1
to specify all.public void setIpProtocol(String ipProtocol)
ipProtocol
- The IP protocol name (tcp
, udp
,
icmp
) or number (see Protocol
Numbers). Use -1
to specify all.public RevokeSecurityGroupIngressRequest withIpProtocol(String ipProtocol)
tcp
, udp
,
icmp
) or number (see Protocol
Numbers). Use -1
to specify all.
Returns a reference to this object so that method calls can be chained together.
ipProtocol
- The IP protocol name (tcp
, udp
,
icmp
) or number (see Protocol
Numbers). Use -1
to specify all.public Integer getFromPort()
-1
to specify all
ICMP types.-1
to specify all
ICMP types.public void setFromPort(Integer fromPort)
-1
to specify all
ICMP types.fromPort
- The start of port range for the TCP and UDP protocols, or an ICMP type
number. For the ICMP type number, use -1
to specify all
ICMP types.public RevokeSecurityGroupIngressRequest withFromPort(Integer fromPort)
-1
to specify all
ICMP types.
Returns a reference to this object so that method calls can be chained together.
fromPort
- The start of port range for the TCP and UDP protocols, or an ICMP type
number. For the ICMP type number, use -1
to specify all
ICMP types.public Integer getToPort()
-1
to specify all
ICMP codes for the ICMP type.-1
to specify all
ICMP codes for the ICMP type.public void setToPort(Integer toPort)
-1
to specify all
ICMP codes for the ICMP type.toPort
- The end of port range for the TCP and UDP protocols, or an ICMP code
number. For the ICMP code number, use -1
to specify all
ICMP codes for the ICMP type.public RevokeSecurityGroupIngressRequest withToPort(Integer toPort)
-1
to specify all
ICMP codes for the ICMP type.
Returns a reference to this object so that method calls can be chained together.
toPort
- The end of port range for the TCP and UDP protocols, or an ICMP code
number. For the ICMP code number, use -1
to specify all
ICMP codes for the ICMP type.public String getCidrIp()
public void setCidrIp(String cidrIp)
cidrIp
- The CIDR IP address range. You can't specify this parameter when
specifying a source security group.public RevokeSecurityGroupIngressRequest withCidrIp(String cidrIp)
Returns a reference to this object so that method calls can be chained together.
cidrIp
- The CIDR IP address range. You can't specify this parameter when
specifying a source security group.public List<IpPermission> getIpPermissions()
public void setIpPermissions(Collection<IpPermission> ipPermissions)
ipPermissions
- A set of IP permissions. You can't specify a source security group and
a CIDR IP address range.public RevokeSecurityGroupIngressRequest withIpPermissions(IpPermission... ipPermissions)
NOTE: This method appends the values to the existing list (if
any). Use setIpPermissions(java.util.Collection)
or withIpPermissions(java.util.Collection)
if you want to override the
existing values.
Returns a reference to this object so that method calls can be chained together.
ipPermissions
- A set of IP permissions. You can't specify a source security group and
a CIDR IP address range.public RevokeSecurityGroupIngressRequest withIpPermissions(Collection<IpPermission> ipPermissions)
Returns a reference to this object so that method calls can be chained together.
ipPermissions
- A set of IP permissions. You can't specify a source security group and
a CIDR IP address range.public Request<RevokeSecurityGroupIngressRequest> getDryRunRequest()
getDryRunRequest
in interface DryRunSupportedRequest<RevokeSecurityGroupIngressRequest>
public String toString()
toString
in class Object
Object.toString()
public RevokeSecurityGroupIngressRequest clone()
clone
in class AmazonWebServiceRequest
Copyright © 2015. All rights reserved.