interface NetworkAclProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.EC2.NetworkAclProps |
Java | software.amazon.awscdk.services.ec2.NetworkAclProps |
Python | aws_cdk.aws_ec2.NetworkAclProps |
TypeScript (source) | @aws-cdk/aws-ec2 » NetworkAclProps |
Properties to create NetworkAcl.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as ec2 from '@aws-cdk/aws-ec2';
declare const subnet: ec2.Subnet;
declare const subnetFilter: ec2.SubnetFilter;
declare const vpc: ec2.Vpc;
const networkAclProps: ec2.NetworkAclProps = {
vpc: vpc,
// the properties below are optional
networkAclName: 'networkAclName',
subnetSelection: {
availabilityZones: ['availabilityZones'],
onePerAz: false,
subnetFilters: [subnetFilter],
subnetGroupName: 'subnetGroupName',
subnetName: 'subnetName',
subnets: [subnet],
subnetType: ec2.SubnetType.ISOLATED,
},
};
Properties
Name | Type | Description |
---|---|---|
vpc | IVpc | The VPC in which to create the NetworkACL. |
network | string | The name of the NetworkAcl. |
subnet | Subnet | Subnets in the given VPC to associate the ACL with. |
vpc
Type:
IVpc
The VPC in which to create the NetworkACL.
networkAclName?
Type:
string
(optional, default: If you don't specify a networkAclName, AWS CloudFormation generates a
unique physical ID and uses that ID for the group name.)
The name of the NetworkAcl.
It is not recommended to use an explicit name.
subnetSelection?
Type:
Subnet
(optional, default: No subnets associated)
Subnets in the given VPC to associate the ACL with.
More subnets can always be added later by calling
associateWithSubnets()
.