Class NetworkAclProps
Properties to create NetworkAcl.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class NetworkAclProps : INetworkAclProps
Syntax (vb)
Public Class NetworkAclProps Implements INetworkAclProps
Remarks
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 networkAclProps = 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
| NetworkAclProps() | Properties to create NetworkAcl. |
Properties
| NetworkAclName | The name of the NetworkAcl. |
| SubnetSelection | Subnets in the given VPC to associate the ACL with. |
| Vpc | The VPC in which to create the NetworkACL. |
Constructors
NetworkAclProps()
Properties to create NetworkAcl.
public NetworkAclProps()
Remarks
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 networkAclProps = 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
NetworkAclName
The name of the NetworkAcl.
public string? NetworkAclName { get; set; }
Property Value
Remarks
Since the NetworkAcl resource doesn't support providing a physical name, the value provided here will be recorded in the Name tag.
Default: CDK generated name
SubnetSelection
Subnets in the given VPC to associate the ACL with.
public ISubnetSelection? SubnetSelection { get; set; }
Property Value
Remarks
More subnets can always be added later by calling
associateWithSubnets().
Default: - No subnets associated
Vpc
The VPC in which to create the NetworkACL.
public IVpc Vpc { get; set; }
Property Value
Remarks
ExampleMetadata: fixture=_generated