Class IpProtocol
The types of IP addresses provisioned in the VPC.
Inheritance
System.Object
IpProtocol
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public sealed class IpProtocol : Enum
Syntax (vb)
Public NotInheritable Class IpProtocol
Inherits
Enum
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.ElasticLoadBalancingV2;
// The VPC and subnet must have associated IPv6 CIDR blocks.
var vpc = new Vpc(this, "Vpc", new VpcProps {
IpProtocol = IpProtocol.DUAL_STACK
});
var cluster = new Cluster(this, "EcsCluster", new ClusterProps { Vpc = vpc });
var service = new ApplicationLoadBalancedFargateService(this, "myService", new ApplicationLoadBalancedFargateServiceProps {
Cluster = cluster,
TaskImageOptions = new ApplicationLoadBalancedTaskImageOptions {
Image = ContainerImage.FromRegistry("amazon/amazon-ecs-sample")
},
MinHealthyPercent = 100,
IpAddressType = IpAddressType.DUAL_STACK
});
var applicationLoadBalancedEc2Service = new ApplicationLoadBalancedEc2Service(this, "myService", new ApplicationLoadBalancedEc2ServiceProps {
Cluster = cluster,
TaskImageOptions = new ApplicationLoadBalancedTaskImageOptions {
Image = ContainerImage.FromRegistry("amazon/amazon-ecs-sample")
},
MinHealthyPercent = 100,
IpAddressType = IpAddressType.DUAL_STACK
});
Synopsis
Fields
DUAL_STACK | The vpc will have both IPv4 and IPv6 addresses. |
IPV4_ONLY | The vpc will be configured with only IPv4 addresses. |
value__ |
Fields
DUAL_STACK
The vpc will have both IPv4 and IPv6 addresses.
public const IpProtocol DUAL_STACK
Field Value
Type | Description |
---|---|
IpProtocol |
Remarks
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.
IPV4_ONLY
The vpc will be configured with only IPv4 addresses.
public const IpProtocol IPV4_ONLY
Field Value
Type | Description |
---|---|
IpProtocol |
Remarks
This is the default protocol if unset.
value__
public int value__
Field Value
Type | Description |
---|---|
System.Int32 |