Show / Hide Table of Contents

Class NatTrafficDirection

Direction of traffic to allow all by default.

Inheritance
System.Object
NatTrafficDirection
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.AWS.EC2.dll
Syntax (csharp)
public sealed class NatTrafficDirection : Enum
Syntax (vb)
Public NotInheritable Class NatTrafficDirection
    Inherits

     Enum
Remarks

ExampleMetadata: infused

Examples
InstanceType instanceType;


NatInstanceProvider provider = NatProvider.Instance(new NatInstanceProps {
    InstanceType = instanceType,
    DefaultAllowedTraffic = NatTrafficDirection.OUTBOUND_ONLY
});
new Vpc(this, "TheVPC", new VpcProps {
    NatGatewayProvider = provider
});
provider.Connections.AllowFrom(Peer.Ipv4("1.2.3.4/8"), Port.Tcp(80));

Synopsis

Fields

INBOUND_AND_OUTBOUND

Allow all outbound and inbound traffic.

NONE

Disallow all outbound and inbound traffic.

OUTBOUND_ONLY

Allow all outbound traffic and disallow all inbound traffic.

value__

Fields

INBOUND_AND_OUTBOUND

Allow all outbound and inbound traffic.

public const NatTrafficDirection INBOUND_AND_OUTBOUND
Field Value
Type Description
NatTrafficDirection

NONE

Disallow all outbound and inbound traffic.

public const NatTrafficDirection NONE
Field Value
Type Description
NatTrafficDirection

OUTBOUND_ONLY

Allow all outbound traffic and disallow all inbound traffic.

public const NatTrafficDirection OUTBOUND_ONLY
Field Value
Type Description
NatTrafficDirection

value__

public int value__
Field Value
Type Description
System.Int32
Back to top Generated by DocFX