AWS::EC2::VPCBlockPublicAccessExclusionCreate a VPC Block Public Access (BPA) exclusion. A VPC BPA exclusion is a mode that can be applied to a single VPC or subnet that exempts it from the account’s BPA mode and will allow bidirectional or egress-only access. You can create BPA exclusions for VPCs and subnets even when BPA is not enabled on the account to ensure that there is no traffic disruption to the exclusions when VPC BPA is turned on. To learn more about VPC BPA, see [Block public access to VPCs and subnets](https://docs.aws.amazon.com/vpc/latest/userguide/security-vpc-bpa.html) in the *Amazon VPC User Guide* .
import { CfnVPCBlockPublicAccessExclusion } from 'aws-cdk-lib/aws-ec2';Or use the module namespace:
import * as ec2 from 'aws-cdk-lib/aws-ec2';
// ec2.CfnVPCBlockPublicAccessExclusionConfiguration passed to the constructor as CfnVPCBlockPublicAccessExclusionProps.
internetGatewayExclusionModeRequiredstringThe desired VPC Block Public Access mode for a specific VPC or subnet exclusion. - `allow-bidirectional` : Allow all internet traffic to and from the excluded VPCs and subnets. - `allow-egress` : Allow outbound internet traffic from the excluded VPCs and subnets. Block inbound internet traffic to the excluded VPCs and subnets. Only applies when VPC Block Public Access is set to `block-bidirectional` .
subnetIdOptionalstringThe ID of the subnet you want to exclude. Required only if you don't specify VpcId.
tagsOptionalCfnTag[]An array of key-value pairs to apply to this resource.
vpcIdOptionalstringThe ID of the VPC you want to exclude. Required only if you don't specify SubnetId.
This L1 construct maps directly to the following CloudFormation resource type.
Everything you need to know about Amazon EC2 on one page. HD quality, print-friendly.
Download Free Infographicaws-ec2AWS::EC2::VPCBlockPublicAccessExclusion