Interface AwsEc2SecurityGroupIpPermission.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<AwsEc2SecurityGroupIpPermission.Builder,
,AwsEc2SecurityGroupIpPermission> SdkBuilder<AwsEc2SecurityGroupIpPermission.Builder,
,AwsEc2SecurityGroupIpPermission> SdkPojo
- Enclosing class:
AwsEc2SecurityGroupIpPermission
-
Method Summary
Modifier and TypeMethodDescriptionThe start of the port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number.ipProtocol
(String ipProtocol) The IP protocol name (tcp
,udp
,icmp
,icmpv6
) or number.ipRanges
(Collection<AwsEc2SecurityGroupIpRange> ipRanges) The IPv4 ranges.ipRanges
(Consumer<AwsEc2SecurityGroupIpRange.Builder>... ipRanges) The IPv4 ranges.ipRanges
(AwsEc2SecurityGroupIpRange... ipRanges) The IPv4 ranges.ipv6Ranges
(Collection<AwsEc2SecurityGroupIpv6Range> ipv6Ranges) The IPv6 ranges.ipv6Ranges
(Consumer<AwsEc2SecurityGroupIpv6Range.Builder>... ipv6Ranges) The IPv6 ranges.ipv6Ranges
(AwsEc2SecurityGroupIpv6Range... ipv6Ranges) The IPv6 ranges.prefixListIds
(Collection<AwsEc2SecurityGroupPrefixListId> prefixListIds) [VPC only] The prefix list IDs for an Amazon Web Services service.prefixListIds
(Consumer<AwsEc2SecurityGroupPrefixListId.Builder>... prefixListIds) [VPC only] The prefix list IDs for an Amazon Web Services service.prefixListIds
(AwsEc2SecurityGroupPrefixListId... prefixListIds) [VPC only] The prefix list IDs for an Amazon Web Services service.The end of the port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.userIdGroupPairs
(Collection<AwsEc2SecurityGroupUserIdGroupPair> userIdGroupPairs) The security group and Amazon Web Services account ID pairs.userIdGroupPairs
(Consumer<AwsEc2SecurityGroupUserIdGroupPair.Builder>... userIdGroupPairs) The security group and Amazon Web Services account ID pairs.userIdGroupPairs
(AwsEc2SecurityGroupUserIdGroupPair... userIdGroupPairs) The security group and Amazon Web Services account ID pairs.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
Method Details
-
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 thantcp
,udp
,icmp
, oricmpv6
allows traffic on all ports, regardless of any port range you specify.For
tcp
,udp
, andicmp
, 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.- Parameters:
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 thantcp
,udp
,icmp
, oricmpv6
allows traffic on all ports, regardless of any port range you specify.For
tcp
,udp
, andicmp
, 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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
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.
- Parameters:
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.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
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.- Parameters:
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
userIdGroupPairs
AwsEc2SecurityGroupIpPermission.Builder userIdGroupPairs(Collection<AwsEc2SecurityGroupUserIdGroupPair> userIdGroupPairs) The security group and Amazon Web Services account ID pairs.
- Parameters:
userIdGroupPairs
- The security group and Amazon Web Services account ID pairs.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
userIdGroupPairs
AwsEc2SecurityGroupIpPermission.Builder userIdGroupPairs(AwsEc2SecurityGroupUserIdGroupPair... userIdGroupPairs) The security group and Amazon Web Services account ID pairs.
- Parameters:
userIdGroupPairs
- The security group and Amazon Web Services account ID pairs.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
userIdGroupPairs
AwsEc2SecurityGroupIpPermission.Builder userIdGroupPairs(Consumer<AwsEc2SecurityGroupUserIdGroupPair.Builder>... userIdGroupPairs) The security group and Amazon Web Services account ID pairs.
This is a convenience method that creates an instance of theAwsEc2SecurityGroupUserIdGroupPair.Builder
avoiding the need to create one manually viaAwsEc2SecurityGroupUserIdGroupPair.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed touserIdGroupPairs(List<AwsEc2SecurityGroupUserIdGroupPair>)
.- Parameters:
userIdGroupPairs
- a consumer that will call methods onAwsEc2SecurityGroupUserIdGroupPair.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
ipRanges
The IPv4 ranges.
- Parameters:
ipRanges
- The IPv4 ranges.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
ipRanges
The IPv4 ranges.
- Parameters:
ipRanges
- The IPv4 ranges.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
ipRanges
AwsEc2SecurityGroupIpPermission.Builder ipRanges(Consumer<AwsEc2SecurityGroupIpRange.Builder>... ipRanges) The IPv4 ranges.
This is a convenience method that creates an instance of theAwsEc2SecurityGroupIpRange.Builder
avoiding the need to create one manually viaAwsEc2SecurityGroupIpRange.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toipRanges(List<AwsEc2SecurityGroupIpRange>)
.- Parameters:
ipRanges
- a consumer that will call methods onAwsEc2SecurityGroupIpRange.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
ipv6Ranges
AwsEc2SecurityGroupIpPermission.Builder ipv6Ranges(Collection<AwsEc2SecurityGroupIpv6Range> ipv6Ranges) The IPv6 ranges.
- Parameters:
ipv6Ranges
- The IPv6 ranges.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
ipv6Ranges
The IPv6 ranges.
- Parameters:
ipv6Ranges
- The IPv6 ranges.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
ipv6Ranges
AwsEc2SecurityGroupIpPermission.Builder ipv6Ranges(Consumer<AwsEc2SecurityGroupIpv6Range.Builder>... ipv6Ranges) The IPv6 ranges.
This is a convenience method that creates an instance of theAwsEc2SecurityGroupIpv6Range.Builder
avoiding the need to create one manually viaAwsEc2SecurityGroupIpv6Range.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toipv6Ranges(List<AwsEc2SecurityGroupIpv6Range>)
.- Parameters:
ipv6Ranges
- a consumer that will call methods onAwsEc2SecurityGroupIpv6Range.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
prefixListIds
AwsEc2SecurityGroupIpPermission.Builder prefixListIds(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.
- Parameters:
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
prefixListIds
AwsEc2SecurityGroupIpPermission.Builder prefixListIds(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.
- Parameters:
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
prefixListIds
AwsEc2SecurityGroupIpPermission.Builder prefixListIds(Consumer<AwsEc2SecurityGroupPrefixListId.Builder>... 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.
This is a convenience method that creates an instance of theAwsEc2SecurityGroupPrefixListId.Builder
avoiding the need to create one manually viaAwsEc2SecurityGroupPrefixListId.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toprefixListIds(List<AwsEc2SecurityGroupPrefixListId>)
.- Parameters:
prefixListIds
- a consumer that will call methods onAwsEc2SecurityGroupPrefixListId.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-