CfnVPCBlockPublicAccessExclusionProps Struct
Properties for defining a CfnVPCBlockPublicAccessExclusion.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const cfnVPCBlockPublicAccessExclusionProps: ec2.CfnVPCBlockPublicAccessExclusionProps = {
internetGatewayExclusionMode: 'internetGatewayExclusionMode',
// the properties below are optional
subnetId: 'subnetId',
tags: [{
key: 'key',
value: 'value',
}],
vpcId: 'vpcId',
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ec2 as ec2
cfn_vpc_block_public_access_exclusion_props = ec2.CfnVPCBlockPublicAccessExclusionProps(
internet_gateway_exclusion_mode="internetGatewayExclusionMode",
# the properties below are optional
subnet_id="subnetId",
tags=[CfnTag(
key="key",
value="value"
)],
vpc_id="vpcId"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ec2.*;
CfnVPCBlockPublicAccessExclusionProps cfnVPCBlockPublicAccessExclusionProps = CfnVPCBlockPublicAccessExclusionProps.builder()
.internetGatewayExclusionMode("internetGatewayExclusionMode")
// the properties below are optional
.subnetId("subnetId")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.vpcId("vpcId")
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;
var cfnVPCBlockPublicAccessExclusionProps = new CfnVPCBlockPublicAccessExclusionProps {
InternetGatewayExclusionMode = "internetGatewayExclusionMode",
// the properties below are optional
SubnetId = "subnetId",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
VpcId = "vpcId"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnVPCBlockPublicAccessExclusionProps := &CfnVPCBlockPublicAccessExclusionProps{
InternetGatewayExclusionMode: jsii.String("internetGatewayExclusionMode"),
// the properties below are optional
SubnetId: jsii.String("subnetId"),
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
VpcId: jsii.String("vpcId"),
}
Properties
internetGatewayExclusionModestringinternet_gateway_exclusion_modestrinternetGatewayExclusionModeStringInternetGatewayExclusionModestringInternetGatewayExclusionMode*string required #The desired VPC Block Public Access mode for a specific VPC or subnet exclusion.
notes
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 toblock-bidirectional.
subnetIdoptionalstringsubnet_idoptionalstrsubnetIdoptionalStringSubnetIdoptionalstringSubnetIdoptional*string #The ID of the subnet you want to exclude.
Required only if you don't specify VpcId.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #An array of key-value pairs to apply to this resource.
The ID of the VPC you want to exclude.
Required only if you don't specify SubnetId.