Show / Hide Table of Contents

Class NetworkAcl

Define a new custom network ACL.

Inheritance
object
Resource
NetworkAcl
Implements
INetworkAcl
IResource
INetworkAclRef
IConstruct
IDependable
IEnvironmentAware
Inherited Members
Resource.IsOwnedResource(IConstruct)
Resource.IsResource(IConstruct)
Resource.ApplyRemovalPolicy(RemovalPolicy)
Resource.GeneratePhysicalName()
Resource.GetResourceArnAttribute(string, IArnComponents)
Resource.GetResourceNameAttribute(string)
Resource.Env
Resource.PhysicalName
Resource.Stack
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class NetworkAcl : Resource, INetworkAcl, IResource, INetworkAclRef, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class NetworkAcl Inherits Resource Implements INetworkAcl, IResource, INetworkAclRef, IConstruct, IDependable, IEnvironmentAware
Remarks

By default, will deny all inbound and outbound traffic unless entries are added explicitly allowing it.

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK.AWS.EC2;

             Subnet subnet;
             SubnetFilter subnetFilter;
             Vpc vpc;

             var networkAcl = new NetworkAcl(this, "MyNetworkAcl", new NetworkAclProps {
                 Vpc = vpc,

                 // the properties below are optional
                 NetworkAclName = "networkAclName",
                 SubnetSelection = new SubnetSelection {
                     AvailabilityZones = new [] { "availabilityZones" },
                     OnePerAz = false,
                     SubnetFilters = new [] { subnetFilter },
                     SubnetGroupName = "subnetGroupName",
                     Subnets = new [] { subnet },
                     SubnetType = SubnetType.PRIVATE_ISOLATED
                 }
             });

Synopsis

Constructors

NetworkAcl(Construct, string, INetworkAclProps)

Define a new custom network ACL.

Properties

NetworkAclId

The ID of the NetworkACL.

NetworkAclRef

A reference to a NetworkAcl resource.

NetworkAclVpcId

The VPC ID for this NetworkACL.

PROPERTY_INJECTION_ID

Uniquely identifies this class.

Methods

AddEntry(string, ICommonNetworkAclEntryOptions)

Add a new entry to the ACL.

AssociateWithSubnet(string, ISubnetSelection)

Associate the ACL with a given set of subnets.

FromNetworkAclId(Construct, string, string)

Import an existing NetworkAcl into this app.

Constructors

NetworkAcl(Construct, string, INetworkAclProps)

Define a new custom network ACL.

public NetworkAcl(Construct scope, string id, INetworkAclProps props)
Parameters
scope Construct
id string
props INetworkAclProps
Remarks

By default, will deny all inbound and outbound traffic unless entries are added explicitly allowing it.

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK.AWS.EC2;

             Subnet subnet;
             SubnetFilter subnetFilter;
             Vpc vpc;

             var networkAcl = new NetworkAcl(this, "MyNetworkAcl", new NetworkAclProps {
                 Vpc = vpc,

                 // the properties below are optional
                 NetworkAclName = "networkAclName",
                 SubnetSelection = new SubnetSelection {
                     AvailabilityZones = new [] { "availabilityZones" },
                     OnePerAz = false,
                     SubnetFilters = new [] { subnetFilter },
                     SubnetGroupName = "subnetGroupName",
                     Subnets = new [] { subnet },
                     SubnetType = SubnetType.PRIVATE_ISOLATED
                 }
             });

Properties

NetworkAclId

The ID of the NetworkACL.

public virtual string NetworkAclId { get; }
Property Value

string

Remarks

Attribute: true

NetworkAclRef

A reference to a NetworkAcl resource.

public virtual INetworkAclReference NetworkAclRef { get; }
Property Value

INetworkAclReference

Remarks

By default, will deny all inbound and outbound traffic unless entries are added explicitly allowing it.

ExampleMetadata: fixture=_generated

NetworkAclVpcId

The VPC ID for this NetworkACL.

public virtual string NetworkAclVpcId { get; }
Property Value

string

Remarks

Attribute: true

PROPERTY_INJECTION_ID

Uniquely identifies this class.

public static string PROPERTY_INJECTION_ID { get; }
Property Value

string

Remarks

By default, will deny all inbound and outbound traffic unless entries are added explicitly allowing it.

ExampleMetadata: fixture=_generated

Methods

AddEntry(string, ICommonNetworkAclEntryOptions)

Add a new entry to the ACL.

public virtual NetworkAclEntry AddEntry(string id, ICommonNetworkAclEntryOptions options)
Parameters
id string
options ICommonNetworkAclEntryOptions
Returns

NetworkAclEntry

Remarks

By default, will deny all inbound and outbound traffic unless entries are added explicitly allowing it.

ExampleMetadata: fixture=_generated

AssociateWithSubnet(string, ISubnetSelection)

Associate the ACL with a given set of subnets.

public virtual void AssociateWithSubnet(string id, ISubnetSelection selection)
Parameters
id string
selection ISubnetSelection
Remarks

By default, will deny all inbound and outbound traffic unless entries are added explicitly allowing it.

ExampleMetadata: fixture=_generated

FromNetworkAclId(Construct, string, string)

Import an existing NetworkAcl into this app.

public static INetworkAcl FromNetworkAclId(Construct scope, string id, string networkAclId)
Parameters
scope Construct
id string
networkAclId string
Returns

INetworkAcl

Remarks

By default, will deny all inbound and outbound traffic unless entries are added explicitly allowing it.

ExampleMetadata: fixture=_generated

Implements

INetworkAcl
IResource
INetworkAclRef
Constructs.IConstruct
Constructs.IDependable
IEnvironmentAware
Back to top Generated by DocFX