public class IpPermission extends Object implements Serializable, Cloneable
Describes a security group rule.
| Constructor and Description |
|---|
IpPermission() |
| Modifier and Type | Method and Description |
|---|---|
IpPermission |
clone() |
boolean |
equals(Object obj) |
Integer |
getFromPort()
The start of port range for the TCP and UDP protocols, or an ICMP type number.
|
String |
getIpProtocol()
|
List<String> |
getIpRanges()
One or more IP ranges.
|
List<PrefixListId> |
getPrefixListIds()
(Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and
DescribeSecurityGroups only) One or more prefix list IDs for an AWS service.
|
Integer |
getToPort()
The end of port range for the TCP and UDP protocols, or an ICMP code.
|
List<UserIdGroupPair> |
getUserIdGroupPairs()
One or more security group and AWS account ID pairs.
|
int |
hashCode() |
void |
setFromPort(Integer fromPort)
The start of port range for the TCP and UDP protocols, or an ICMP type number.
|
void |
setIpProtocol(String ipProtocol)
|
void |
setIpRanges(Collection<String> ipRanges)
One or more IP ranges.
|
void |
setPrefixListIds(Collection<PrefixListId> prefixListIds)
(Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and
DescribeSecurityGroups only) One or more prefix list IDs for an AWS service.
|
void |
setToPort(Integer toPort)
The end of port range for the TCP and UDP protocols, or an ICMP code.
|
void |
setUserIdGroupPairs(Collection<UserIdGroupPair> userIdGroupPairs)
One or more security group and AWS account ID pairs.
|
String |
toString()
Returns a string representation of this object; useful for testing and debugging.
|
IpPermission |
withFromPort(Integer fromPort)
The start of port range for the TCP and UDP protocols, or an ICMP type number.
|
IpPermission |
withIpProtocol(String ipProtocol)
|
IpPermission |
withIpRanges(Collection<String> ipRanges)
One or more IP ranges.
|
IpPermission |
withIpRanges(String... ipRanges)
One or more IP ranges.
|
IpPermission |
withPrefixListIds(Collection<PrefixListId> prefixListIds)
(Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and
DescribeSecurityGroups only) One or more prefix list IDs for an AWS service.
|
IpPermission |
withPrefixListIds(PrefixListId... prefixListIds)
(Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and
DescribeSecurityGroups only) One or more prefix list IDs for an AWS service.
|
IpPermission |
withToPort(Integer toPort)
The end of port range for the TCP and UDP protocols, or an ICMP code.
|
IpPermission |
withUserIdGroupPairs(Collection<UserIdGroupPair> userIdGroupPairs)
One or more security group and AWS account ID pairs.
|
IpPermission |
withUserIdGroupPairs(UserIdGroupPair... userIdGroupPairs)
One or more security group and AWS account ID pairs.
|
public void setIpProtocol(String ipProtocol)
The IP protocol name (for tcp, udp, and icmp) or number (see Protocol Numbers).
[EC2-VPC only] When you authorize or revoke security group rules, you can use -1 to specify all.
ipProtocol - The IP protocol name (for tcp, udp, and icmp) or number (see Protocol Numbers).
[EC2-VPC only] When you authorize or revoke security group rules, you can use -1 to specify
all.
public String getIpProtocol()
The IP protocol name (for tcp, udp, and icmp) or number (see Protocol Numbers).
[EC2-VPC only] When you authorize or revoke security group rules, you can use -1 to specify all.
tcp, udp, and icmp) or number (see Protocol Numbers).
[EC2-VPC only] When you authorize or revoke security group rules, you can use -1 to specify
all.
public IpPermission withIpProtocol(String ipProtocol)
The IP protocol name (for tcp, udp, and icmp) or number (see Protocol Numbers).
[EC2-VPC only] When you authorize or revoke security group rules, you can use -1 to specify all.
ipProtocol - The IP protocol name (for tcp, udp, and icmp) or number (see Protocol Numbers).
[EC2-VPC only] When you authorize or revoke security group rules, you can use -1 to specify
all.
public void setFromPort(Integer fromPort)
The start of port range for the TCP and UDP protocols, or an ICMP type number. A value of -1
indicates all ICMP types.
fromPort - The start of port range for the TCP and UDP protocols, or an ICMP type number. A value of -1
indicates all ICMP types.public Integer getFromPort()
The start of port range for the TCP and UDP protocols, or an ICMP type number. A value of -1
indicates all ICMP types.
-1
indicates all ICMP types.public IpPermission withFromPort(Integer fromPort)
The start of port range for the TCP and UDP protocols, or an ICMP type number. A value of -1
indicates all ICMP types.
fromPort - The start of port range for the TCP and UDP protocols, or an ICMP type number. A value of -1
indicates all ICMP types.public void setToPort(Integer toPort)
The end of port range for the TCP and UDP protocols, or an ICMP code. A value of -1 indicates all
ICMP codes for the specified ICMP type.
toPort - The end of port range for the TCP and UDP protocols, or an ICMP code. A value of -1 indicates
all ICMP codes for the specified ICMP type.public Integer getToPort()
The end of port range for the TCP and UDP protocols, or an ICMP code. A value of -1 indicates all
ICMP codes for the specified ICMP type.
-1
indicates all ICMP codes for the specified ICMP type.public IpPermission withToPort(Integer toPort)
The end of port range for the TCP and UDP protocols, or an ICMP code. A value of -1 indicates all
ICMP codes for the specified ICMP type.
toPort - The end of port range for the TCP and UDP protocols, or an ICMP code. A value of -1 indicates
all ICMP codes for the specified ICMP type.public List<UserIdGroupPair> getUserIdGroupPairs()
One or more security group and AWS account ID pairs.
public void setUserIdGroupPairs(Collection<UserIdGroupPair> userIdGroupPairs)
One or more security group and AWS account ID pairs.
userIdGroupPairs - One or more security group and AWS account ID pairs.public IpPermission withUserIdGroupPairs(UserIdGroupPair... userIdGroupPairs)
One or more security group and AWS account ID pairs.
NOTE: This method appends the values to the existing list (if any). Use
setUserIdGroupPairs(java.util.Collection) or withUserIdGroupPairs(java.util.Collection) if you
want to override the existing values.
userIdGroupPairs - One or more security group and AWS account ID pairs.public IpPermission withUserIdGroupPairs(Collection<UserIdGroupPair> userIdGroupPairs)
One or more security group and AWS account ID pairs.
userIdGroupPairs - One or more security group and AWS account ID pairs.public List<String> getIpRanges()
One or more IP ranges.
public void setIpRanges(Collection<String> ipRanges)
One or more IP ranges.
ipRanges - One or more IP ranges.public IpPermission withIpRanges(String... ipRanges)
One or more IP ranges.
NOTE: This method appends the values to the existing list (if any). Use
setIpRanges(java.util.Collection) or withIpRanges(java.util.Collection) if you want to override
the existing values.
ipRanges - One or more IP ranges.public IpPermission withIpRanges(Collection<String> ipRanges)
One or more IP ranges.
ipRanges - One or more IP ranges.public List<PrefixListId> getPrefixListIds()
(Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.
public void setPrefixListIds(Collection<PrefixListId> prefixListIds)
(Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.
prefixListIds - (Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and
DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an
AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC
endpoint from instances associated with the security group.public IpPermission withPrefixListIds(PrefixListId... prefixListIds)
(Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.
NOTE: This method appends the values to the existing list (if any). Use
setPrefixListIds(java.util.Collection) or withPrefixListIds(java.util.Collection) if you want
to override the existing values.
prefixListIds - (Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and
DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an
AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC
endpoint from instances associated with the security group.public IpPermission withPrefixListIds(Collection<PrefixListId> prefixListIds)
(Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.
prefixListIds - (Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and
DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an
AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC
endpoint from instances associated with the security group.public String toString()
toString in class ObjectObject.toString()public IpPermission clone()
Copyright © 2016. All rights reserved.