@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class AwsEc2SecurityGroupIpPermission extends Object implements Serializable, Cloneable, StructuredPojo
An IP permission for an EC2 security group.
Constructor and Description |
---|
AwsEc2SecurityGroupIpPermission() |
Modifier and Type | Method and Description |
---|---|
AwsEc2SecurityGroupIpPermission |
clone() |
boolean |
equals(Object obj) |
Integer |
getFromPort()
The start of the port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number.
|
String |
getIpProtocol()
The IP protocol name (
tcp , udp , icmp , icmpv6 ) or number. |
List<AwsEc2SecurityGroupIpRange> |
getIpRanges()
The IPv4 ranges.
|
List<AwsEc2SecurityGroupIpv6Range> |
getIpv6Ranges()
The IPv6 ranges.
|
List<AwsEc2SecurityGroupPrefixListId> |
getPrefixListIds()
[VPC only] The prefix list IDs for an Amazon Web Services service.
|
Integer |
getToPort()
The end of the port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
|
List<AwsEc2SecurityGroupUserIdGroupPair> |
getUserIdGroupPairs()
The security group and Amazon Web Services account ID pairs.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setFromPort(Integer fromPort)
The start of the port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number.
|
void |
setIpProtocol(String ipProtocol)
The IP protocol name (
tcp , udp , icmp , icmpv6 ) or number. |
void |
setIpRanges(Collection<AwsEc2SecurityGroupIpRange> ipRanges)
The IPv4 ranges.
|
void |
setIpv6Ranges(Collection<AwsEc2SecurityGroupIpv6Range> ipv6Ranges)
The IPv6 ranges.
|
void |
setPrefixListIds(Collection<AwsEc2SecurityGroupPrefixListId> prefixListIds)
[VPC only] The prefix list IDs for an Amazon Web Services service.
|
void |
setToPort(Integer toPort)
The end of the port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
|
void |
setUserIdGroupPairs(Collection<AwsEc2SecurityGroupUserIdGroupPair> userIdGroupPairs)
The security group and Amazon Web Services account ID pairs.
|
String |
toString()
Returns a string representation of this object.
|
AwsEc2SecurityGroupIpPermission |
withFromPort(Integer fromPort)
The start of the port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number.
|
AwsEc2SecurityGroupIpPermission |
withIpProtocol(String ipProtocol)
The IP protocol name (
tcp , udp , icmp , icmpv6 ) or number. |
AwsEc2SecurityGroupIpPermission |
withIpRanges(AwsEc2SecurityGroupIpRange... ipRanges)
The IPv4 ranges.
|
AwsEc2SecurityGroupIpPermission |
withIpRanges(Collection<AwsEc2SecurityGroupIpRange> ipRanges)
The IPv4 ranges.
|
AwsEc2SecurityGroupIpPermission |
withIpv6Ranges(AwsEc2SecurityGroupIpv6Range... ipv6Ranges)
The IPv6 ranges.
|
AwsEc2SecurityGroupIpPermission |
withIpv6Ranges(Collection<AwsEc2SecurityGroupIpv6Range> ipv6Ranges)
The IPv6 ranges.
|
AwsEc2SecurityGroupIpPermission |
withPrefixListIds(AwsEc2SecurityGroupPrefixListId... prefixListIds)
[VPC only] The prefix list IDs for an Amazon Web Services service.
|
AwsEc2SecurityGroupIpPermission |
withPrefixListIds(Collection<AwsEc2SecurityGroupPrefixListId> prefixListIds)
[VPC only] The prefix list IDs for an Amazon Web Services service.
|
AwsEc2SecurityGroupIpPermission |
withToPort(Integer toPort)
The end of the port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
|
AwsEc2SecurityGroupIpPermission |
withUserIdGroupPairs(AwsEc2SecurityGroupUserIdGroupPair... userIdGroupPairs)
The security group and Amazon Web Services account ID pairs.
|
AwsEc2SecurityGroupIpPermission |
withUserIdGroupPairs(Collection<AwsEc2SecurityGroupUserIdGroupPair> userIdGroupPairs)
The security group and Amazon Web Services account ID pairs.
|
public void setIpProtocol(String ipProtocol)
The IP protocol name (tcp
, udp
, icmp
, icmpv6
) or number.
[VPC only] Use -1
to specify all protocols.
When authorizing security group rules, specifying -1
or a protocol number other than
tcp
, udp
, icmp
, or icmpv6
allows traffic on all ports,
regardless of any port range you specify.
For tcp
, udp
, and icmp
, you must specify a port range.
For icmpv6
, the port range is optional. If you omit the port range, traffic for all types and codes
is allowed.
ipProtocol
- The IP protocol name (tcp
, udp
, icmp
, icmpv6
) or
number.
[VPC only] Use -1
to specify all protocols.
When authorizing security group rules, specifying -1
or a protocol number other than
tcp
, udp
, icmp
, or icmpv6
allows traffic on all ports,
regardless of any port range you specify.
For tcp
, udp
, and icmp
, you must specify a port range.
For icmpv6
, the port range is optional. If you omit the port range, traffic for all types and
codes is allowed.
public String getIpProtocol()
The IP protocol name (tcp
, udp
, icmp
, icmpv6
) or number.
[VPC only] Use -1
to specify all protocols.
When authorizing security group rules, specifying -1
or a protocol number other than
tcp
, udp
, icmp
, or icmpv6
allows traffic on all ports,
regardless of any port range you specify.
For tcp
, udp
, and icmp
, you must specify a port range.
For icmpv6
, the port range is optional. If you omit the port range, traffic for all types and codes
is allowed.
tcp
, udp
, icmp
, icmpv6
) or
number.
[VPC only] Use -1
to specify all protocols.
When authorizing security group rules, specifying -1
or a protocol number other than
tcp
, udp
, icmp
, or icmpv6
allows traffic on all
ports, regardless of any port range you specify.
For tcp
, udp
, and icmp
, you must specify a port range.
For icmpv6
, the port range is optional. If you omit the port range, traffic for all types
and codes is allowed.
public AwsEc2SecurityGroupIpPermission withIpProtocol(String ipProtocol)
The IP protocol name (tcp
, udp
, icmp
, icmpv6
) or number.
[VPC only] Use -1
to specify all protocols.
When authorizing security group rules, specifying -1
or a protocol number other than
tcp
, udp
, icmp
, or icmpv6
allows traffic on all ports,
regardless of any port range you specify.
For tcp
, udp
, and icmp
, you must specify a port range.
For icmpv6
, the port range is optional. If you omit the port range, traffic for all types and codes
is allowed.
ipProtocol
- The IP protocol name (tcp
, udp
, icmp
, icmpv6
) or
number.
[VPC only] Use -1
to specify all protocols.
When authorizing security group rules, specifying -1
or a protocol number other than
tcp
, udp
, icmp
, or icmpv6
allows traffic on all ports,
regardless of any port range you specify.
For tcp
, udp
, and icmp
, you must specify a port range.
For icmpv6
, the port range is optional. If you omit the port range, traffic for all types and
codes is allowed.
public void setFromPort(Integer fromPort)
The start of the port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number.
A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.
fromPort
- The start of the port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number.
A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.
public Integer getFromPort()
The start of the port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number.
A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.
A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.
public AwsEc2SecurityGroupIpPermission withFromPort(Integer fromPort)
The start of the port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number.
A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.
fromPort
- The start of the port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number.
A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.
public void setToPort(Integer toPort)
The end of the port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
A value of -1
indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must
specify all codes.
toPort
- The end of the port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
A value of -1
indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must
specify all codes.
public Integer getToPort()
The end of the port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
A value of -1
indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must
specify all codes.
A value of -1
indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you
must specify all codes.
public AwsEc2SecurityGroupIpPermission withToPort(Integer toPort)
The end of the port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
A value of -1
indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must
specify all codes.
toPort
- The end of the port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
A value of -1
indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must
specify all codes.
public List<AwsEc2SecurityGroupUserIdGroupPair> getUserIdGroupPairs()
The security group and Amazon Web Services account ID pairs.
public void setUserIdGroupPairs(Collection<AwsEc2SecurityGroupUserIdGroupPair> userIdGroupPairs)
The security group and Amazon Web Services account ID pairs.
userIdGroupPairs
- The security group and Amazon Web Services account ID pairs.public AwsEc2SecurityGroupIpPermission withUserIdGroupPairs(AwsEc2SecurityGroupUserIdGroupPair... userIdGroupPairs)
The security group and Amazon Web Services 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
- The security group and Amazon Web Services account ID pairs.public AwsEc2SecurityGroupIpPermission withUserIdGroupPairs(Collection<AwsEc2SecurityGroupUserIdGroupPair> userIdGroupPairs)
The security group and Amazon Web Services account ID pairs.
userIdGroupPairs
- The security group and Amazon Web Services account ID pairs.public List<AwsEc2SecurityGroupIpRange> getIpRanges()
The IPv4 ranges.
public void setIpRanges(Collection<AwsEc2SecurityGroupIpRange> ipRanges)
The IPv4 ranges.
ipRanges
- The IPv4 ranges.public AwsEc2SecurityGroupIpPermission withIpRanges(AwsEc2SecurityGroupIpRange... ipRanges)
The IPv4 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
- The IPv4 ranges.public AwsEc2SecurityGroupIpPermission withIpRanges(Collection<AwsEc2SecurityGroupIpRange> ipRanges)
The IPv4 ranges.
ipRanges
- The IPv4 ranges.public List<AwsEc2SecurityGroupIpv6Range> getIpv6Ranges()
The IPv6 ranges.
public void setIpv6Ranges(Collection<AwsEc2SecurityGroupIpv6Range> ipv6Ranges)
The IPv6 ranges.
ipv6Ranges
- The IPv6 ranges.public AwsEc2SecurityGroupIpPermission withIpv6Ranges(AwsEc2SecurityGroupIpv6Range... ipv6Ranges)
The IPv6 ranges.
NOTE: This method appends the values to the existing list (if any). Use
setIpv6Ranges(java.util.Collection)
or withIpv6Ranges(java.util.Collection)
if you want to
override the existing values.
ipv6Ranges
- The IPv6 ranges.public AwsEc2SecurityGroupIpPermission withIpv6Ranges(Collection<AwsEc2SecurityGroupIpv6Range> ipv6Ranges)
The IPv6 ranges.
ipv6Ranges
- The IPv6 ranges.public List<AwsEc2SecurityGroupPrefixListId> getPrefixListIds()
[VPC only] The prefix list IDs for an Amazon Web Services service. With outbound rules, this is the Amazon Web Services service to access through a VPC endpoint from instances associated with the security group.
public void setPrefixListIds(Collection<AwsEc2SecurityGroupPrefixListId> prefixListIds)
[VPC only] The prefix list IDs for an Amazon Web Services service. With outbound rules, this is the Amazon Web Services service to access through a VPC endpoint from instances associated with the security group.
prefixListIds
- [VPC only] The prefix list IDs for an Amazon Web Services service. With outbound rules, this is the Amazon
Web Services service to access through a VPC endpoint from instances associated with the security group.public AwsEc2SecurityGroupIpPermission withPrefixListIds(AwsEc2SecurityGroupPrefixListId... prefixListIds)
[VPC only] The prefix list IDs for an Amazon Web Services service. With outbound rules, this is the Amazon Web Services service 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
- [VPC only] The prefix list IDs for an Amazon Web Services service. With outbound rules, this is the Amazon
Web Services service to access through a VPC endpoint from instances associated with the security group.public AwsEc2SecurityGroupIpPermission withPrefixListIds(Collection<AwsEc2SecurityGroupPrefixListId> prefixListIds)
[VPC only] The prefix list IDs for an Amazon Web Services service. With outbound rules, this is the Amazon Web Services service to access through a VPC endpoint from instances associated with the security group.
prefixListIds
- [VPC only] The prefix list IDs for an Amazon Web Services service. With outbound rules, this is the Amazon
Web Services service to access through a VPC endpoint from instances associated with the security group.public String toString()
toString
in class Object
Object.toString()
public AwsEc2SecurityGroupIpPermission clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.