Enum IpProtocol
- All Implemented Interfaces:
Serializable
,Comparable<IpProtocol>
,java.lang.constant.Constable
@Generated(value="jsii-pacmak/1.102.0 (build e354887)",
date="2024-09-06T01:36:27.081Z")
@Stability(Stable)
public enum IpProtocol
extends Enum<IpProtocol>
The types of IP addresses provisioned in the VPC.
Example:
import software.amazon.awscdk.services.elasticloadbalancingv2.*; // The VPC and subnet must have associated IPv6 CIDR blocks. Vpc vpc = Vpc.Builder.create(this, "Vpc") .ipProtocol(IpProtocol.DUAL_STACK) .build(); Cluster cluster = Cluster.Builder.create(this, "EcsCluster").vpc(vpc).build(); ApplicationLoadBalancedFargateService service = ApplicationLoadBalancedFargateService.Builder.create(this, "myService") .cluster(cluster) .taskImageOptions(ApplicationLoadBalancedTaskImageOptions.builder() .image(ContainerImage.fromRegistry("amazon/amazon-ecs-sample")) .build()) .ipAddressType(IpAddressType.DUAL_STACK) .build(); ApplicationLoadBalancedEc2Service applicationLoadBalancedEc2Service = ApplicationLoadBalancedEc2Service.Builder.create(this, "myService") .cluster(cluster) .taskImageOptions(ApplicationLoadBalancedTaskImageOptions.builder() .image(ContainerImage.fromRegistry("amazon/amazon-ecs-sample")) .build()) .ipAddressType(IpAddressType.DUAL_STACK) .build();
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe vpc will have both IPv4 and IPv6 addresses.The vpc will be configured with only IPv4 addresses. -
Method Summary
Modifier and TypeMethodDescriptionstatic IpProtocol
Returns the enum constant of this type with the specified name.static IpProtocol[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
IPV4_ONLY
The vpc will be configured with only IPv4 addresses.This is the default protocol if unset.
-
DUAL_STACK
The vpc will have both IPv4 and IPv6 addresses.Unless specified, public IPv4 addresses will not be auto assigned, an egress only internet gateway (EIGW) will be created and configured, and NATs and internet gateways (IGW) will be configured with IPv6 addresses.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-