public class IpPermission
extends java.lang.Object
implements java.io.Serializable
Describes a security group rule.
Constructor and Description |
---|
IpPermission() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.Integer |
getFromPort()
The start of port range for the TCP and UDP protocols, or an ICMP type
number.
|
java.lang.String |
getIpProtocol()
|
java.util.List<java.lang.String> |
getIpRanges()
One or more IP ranges.
|
java.util.List<PrefixListId> |
getPrefixListIds()
(Valid for AuthorizeSecurityGroupEgress,
RevokeSecurityGroupEgress and DescribeSecurityGroups
only) One or more prefix list IDs for an AWS service.
|
java.lang.Integer |
getToPort()
The end of port range for the TCP and UDP protocols, or an ICMP code.
|
java.util.List<UserIdGroupPair> |
getUserIdGroupPairs()
One or more security group and AWS account ID pairs.
|
int |
hashCode() |
void |
setFromPort(java.lang.Integer fromPort)
The start of port range for the TCP and UDP protocols, or an ICMP type
number.
|
void |
setIpProtocol(java.lang.String ipProtocol)
|
void |
setIpRanges(java.util.Collection<java.lang.String> ipRanges)
One or more IP ranges.
|
void |
setPrefixListIds(java.util.Collection<PrefixListId> prefixListIds)
(Valid for AuthorizeSecurityGroupEgress,
RevokeSecurityGroupEgress and DescribeSecurityGroups
only) One or more prefix list IDs for an AWS service.
|
void |
setToPort(java.lang.Integer toPort)
The end of port range for the TCP and UDP protocols, or an ICMP code.
|
void |
setUserIdGroupPairs(java.util.Collection<UserIdGroupPair> userIdGroupPairs)
One or more security group and AWS account ID pairs.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
IpPermission |
withFromPort(java.lang.Integer fromPort)
The start of port range for the TCP and UDP protocols, or an ICMP type
number.
|
IpPermission |
withIpProtocol(java.lang.String ipProtocol)
|
IpPermission |
withIpRanges(java.util.Collection<java.lang.String> ipRanges)
One or more IP ranges.
|
IpPermission |
withIpRanges(java.lang.String... ipRanges)
One or more IP ranges.
|
IpPermission |
withPrefixListIds(java.util.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(java.lang.Integer toPort)
The end of port range for the TCP and UDP protocols, or an ICMP code.
|
IpPermission |
withUserIdGroupPairs(java.util.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 java.lang.String getIpProtocol()
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 void setIpProtocol(java.lang.String ipProtocol)
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 IpPermission withIpProtocol(java.lang.String ipProtocol)
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.
Returns a reference to this object so that method calls can be chained together.
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 java.lang.Integer getFromPort()
-1
indicates all ICMP types.-1
indicates all ICMP types.public void setFromPort(java.lang.Integer fromPort)
-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 IpPermission withFromPort(java.lang.Integer fromPort)
-1
indicates 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. A value of -1
indicates all ICMP types.public java.lang.Integer getToPort()
-1
indicates all ICMP codes for the specified
ICMP type.-1
indicates all ICMP codes for the specified
ICMP type.public void setToPort(java.lang.Integer toPort)
-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 IpPermission withToPort(java.lang.Integer toPort)
-1
indicates all ICMP codes for the specified
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.
A value of -1
indicates all ICMP codes for the specified
ICMP type.public java.util.List<UserIdGroupPair> getUserIdGroupPairs()
public void setUserIdGroupPairs(java.util.Collection<UserIdGroupPair> userIdGroupPairs)
userIdGroupPairs
- One or more security group and AWS account ID pairs.public IpPermission withUserIdGroupPairs(UserIdGroupPair... userIdGroupPairs)
Returns a reference to this object so that method calls can be chained together.
userIdGroupPairs
- One or more security group and AWS account ID pairs.public IpPermission withUserIdGroupPairs(java.util.Collection<UserIdGroupPair> userIdGroupPairs)
Returns a reference to this object so that method calls can be chained together.
userIdGroupPairs
- One or more security group and AWS account ID pairs.public java.util.List<java.lang.String> getIpRanges()
public void setIpRanges(java.util.Collection<java.lang.String> ipRanges)
ipRanges
- One or more IP ranges.public IpPermission withIpRanges(java.lang.String... ipRanges)
Returns a reference to this object so that method calls can be chained together.
ipRanges
- One or more IP ranges.public IpPermission withIpRanges(java.util.Collection<java.lang.String> ipRanges)
Returns a reference to this object so that method calls can be chained together.
ipRanges
- One or more IP ranges.public java.util.List<PrefixListId> getPrefixListIds()
public void setPrefixListIds(java.util.Collection<PrefixListId> prefixListIds)
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)
Returns a reference to this object so that method calls can be chained together.
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(java.util.Collection<PrefixListId> prefixListIds)
Returns a reference to this object so that method calls can be chained together.
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 java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.