CfnVPCPropsMixin

class aws_cdk.cfn_property_mixins.aws_ec2.CfnVPCPropsMixin(props, *, strategy=None)

Bases: Mixin

Specifies a virtual private cloud (VPC).

A VPC must have an associated IPv4 CIDR block. You can specify an IPv4 CIDR block or an IPAM-allocated IPv4 CIDR block. To associate an IPv6 CIDR block with the VPC, see AWS::EC2::VPCCidrBlock .

For more information, see Virtual private clouds (VPC) in the Amazon VPC User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpc.html

CloudformationResource:

AWS::EC2::VPC

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_ec2 as ec2
import aws_cdk as cdk

# merge_strategy: cdk.IMergeStrategy

cfn_vpc_props_mixin = ec2.CfnVPCPropsMixin(ec2.CfnVPCMixinProps(
    cidr_block="cidrBlock",
    enable_dns_hostnames=False,
    enable_dns_support=False,
    instance_tenancy="instanceTenancy",
    ipv4_ipam_pool_id="ipv4IpamPoolId",
    ipv4_netmask_length=123,
    tags=[cdk.CfnTag(
        key="key",
        value="value"
    )],
    vpc_encryption_control=ec2.CfnVPCPropsMixin.VpcEncryptionControlProperty(
        egress_only_internet_gateway_exclusion="egressOnlyInternetGatewayExclusion",
        elastic_file_system_exclusion="elasticFileSystemExclusion",
        internet_gateway_exclusion="internetGatewayExclusion",
        lambda_exclusion="lambdaExclusion",
        mode="mode",
        nat_gateway_exclusion="natGatewayExclusion",
        resource_exclusions=ec2.CfnVPCPropsMixin.VpcEncryptionControlExclusionsProperty(
            egress_only_internet_gateway=ec2.CfnVPCPropsMixin.VpcEncryptionControlExclusionProperty(
                state="state",
                state_message="stateMessage"
            ),
            elastic_file_system=ec2.CfnVPCPropsMixin.VpcEncryptionControlExclusionProperty(
                state="state",
                state_message="stateMessage"
            ),
            internet_gateway=ec2.CfnVPCPropsMixin.VpcEncryptionControlExclusionProperty(
                state="state",
                state_message="stateMessage"
            ),
            lambda_=ec2.CfnVPCPropsMixin.VpcEncryptionControlExclusionProperty(
                state="state",
                state_message="stateMessage"
            ),
            nat_gateway=ec2.CfnVPCPropsMixin.VpcEncryptionControlExclusionProperty(
                state="state",
                state_message="stateMessage"
            ),
            virtual_private_gateway=ec2.CfnVPCPropsMixin.VpcEncryptionControlExclusionProperty(
                state="state",
                state_message="stateMessage"
            ),
            vpc_lattice=ec2.CfnVPCPropsMixin.VpcEncryptionControlExclusionProperty(
                state="state",
                state_message="stateMessage"
            ),
            vpc_peering=ec2.CfnVPCPropsMixin.VpcEncryptionControlExclusionProperty(
                state="state",
                state_message="stateMessage"
            )
        ),
        state="state",
        state_message="stateMessage",
        virtual_private_gateway_exclusion="virtualPrivateGatewayExclusion",
        vpc_encryption_control_id="vpcEncryptionControlId",
        vpc_id="vpcId",
        vpc_lattice_exclusion="vpcLatticeExclusion",
        vpc_peering_exclusion="vpcPeeringExclusion"
    )
),
    strategy=merge_strategy
)

Create a mixin to apply properties to AWS::EC2::VPC.

Parameters:
  • props (Union[CfnVPCMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[IMergeStrategy]) – Strategy for merging nested properties. Default: - PropertyMergeStrategy.combine()

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

None

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['cidrBlock', 'enableDnsHostnames', 'enableDnsSupport', 'instanceTenancy', 'ipv4IpamPoolId', 'ipv4NetmaskLength', 'tags', 'vpcEncryptionControl']

Static Methods

classmethod is_mixin(x)

Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

VpcEncryptionControlExclusionProperty

class CfnVPCPropsMixin.VpcEncryptionControlExclusionProperty(*, state=None, state_message=None)

Bases: object

Parameters:
  • state (Optional[str]) – The exclusion state of the resource type.

  • state_message (Optional[str]) – A message describing the exclusion state of the resource type.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-vpc-vpcencryptioncontrolexclusion.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_ec2 as ec2

vpc_encryption_control_exclusion_property = ec2.CfnVPCPropsMixin.VpcEncryptionControlExclusionProperty(
    state="state",
    state_message="stateMessage"
)

Attributes

state

The exclusion state of the resource type.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-vpc-vpcencryptioncontrolexclusion.html#cfn-ec2-vpc-vpcencryptioncontrolexclusion-state

state_message

A message describing the exclusion state of the resource type.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-vpc-vpcencryptioncontrolexclusion.html#cfn-ec2-vpc-vpcencryptioncontrolexclusion-statemessage

VpcEncryptionControlExclusionsProperty

class CfnVPCPropsMixin.VpcEncryptionControlExclusionsProperty(*, egress_only_internet_gateway=None, elastic_file_system=None, internet_gateway=None, lambda_=None, nat_gateway=None, virtual_private_gateway=None, vpc_lattice=None, vpc_peering=None)

Bases: object

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-vpc-vpcencryptioncontrolexclusions.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_ec2 as ec2

vpc_encryption_control_exclusions_property = ec2.CfnVPCPropsMixin.VpcEncryptionControlExclusionsProperty(
    egress_only_internet_gateway=ec2.CfnVPCPropsMixin.VpcEncryptionControlExclusionProperty(
        state="state",
        state_message="stateMessage"
    ),
    elastic_file_system=ec2.CfnVPCPropsMixin.VpcEncryptionControlExclusionProperty(
        state="state",
        state_message="stateMessage"
    ),
    internet_gateway=ec2.CfnVPCPropsMixin.VpcEncryptionControlExclusionProperty(
        state="state",
        state_message="stateMessage"
    ),
    lambda_=ec2.CfnVPCPropsMixin.VpcEncryptionControlExclusionProperty(
        state="state",
        state_message="stateMessage"
    ),
    nat_gateway=ec2.CfnVPCPropsMixin.VpcEncryptionControlExclusionProperty(
        state="state",
        state_message="stateMessage"
    ),
    virtual_private_gateway=ec2.CfnVPCPropsMixin.VpcEncryptionControlExclusionProperty(
        state="state",
        state_message="stateMessage"
    ),
    vpc_lattice=ec2.CfnVPCPropsMixin.VpcEncryptionControlExclusionProperty(
        state="state",
        state_message="stateMessage"
    ),
    vpc_peering=ec2.CfnVPCPropsMixin.VpcEncryptionControlExclusionProperty(
        state="state",
        state_message="stateMessage"
    )
)

Attributes

egress_only_internet_gateway

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-vpc-vpcencryptioncontrolexclusions.html#cfn-ec2-vpc-vpcencryptioncontrolexclusions-egressonlyinternetgateway

Type:

see

elastic_file_system

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-vpc-vpcencryptioncontrolexclusions.html#cfn-ec2-vpc-vpcencryptioncontrolexclusions-elasticfilesystem

Type:

see

internet_gateway

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-vpc-vpcencryptioncontrolexclusions.html#cfn-ec2-vpc-vpcencryptioncontrolexclusions-internetgateway

Type:

see

lambda_

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-vpc-vpcencryptioncontrolexclusions.html#cfn-ec2-vpc-vpcencryptioncontrolexclusions-lambda

Type:

see

nat_gateway

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-vpc-vpcencryptioncontrolexclusions.html#cfn-ec2-vpc-vpcencryptioncontrolexclusions-natgateway

Type:

see

virtual_private_gateway

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-vpc-vpcencryptioncontrolexclusions.html#cfn-ec2-vpc-vpcencryptioncontrolexclusions-virtualprivategateway

Type:

see

vpc_lattice

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-vpc-vpcencryptioncontrolexclusions.html#cfn-ec2-vpc-vpcencryptioncontrolexclusions-vpclattice

Type:

see

vpc_peering

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-vpc-vpcencryptioncontrolexclusions.html#cfn-ec2-vpc-vpcencryptioncontrolexclusions-vpcpeering

Type:

see

VpcEncryptionControlProperty

class CfnVPCPropsMixin.VpcEncryptionControlProperty(*, egress_only_internet_gateway_exclusion=None, elastic_file_system_exclusion=None, internet_gateway_exclusion=None, lambda_exclusion=None, mode=None, nat_gateway_exclusion=None, resource_exclusions=None, state=None, state_message=None, virtual_private_gateway_exclusion=None, vpc_encryption_control_id=None, vpc_id=None, vpc_lattice_exclusion=None, vpc_peering_exclusion=None)

Bases: object

Parameters:
  • egress_only_internet_gateway_exclusion (Optional[str]) – The desired exclusion mode for Egress-Only Internet Gateways.

  • elastic_file_system_exclusion (Optional[str]) – The desired exclusion mode for Elastic File System.

  • internet_gateway_exclusion (Optional[str]) – The desired exclusion mode for Internet Gateways.

  • lambda_exclusion (Optional[str]) – The desired exclusion mode for Lambda.

  • mode (Optional[str]) – The mode of the VPC encryption control.

  • nat_gateway_exclusion (Optional[str]) – The desired exclusion mode for NAT Gateways.

  • resource_exclusions (Union[IResolvable, VpcEncryptionControlExclusionsProperty, Dict[str, Any], None])

  • state (Optional[str]) – The state of the VPC encryption control.

  • state_message (Optional[str]) – A message describing the state of the VPC encryption control.

  • virtual_private_gateway_exclusion (Optional[str]) – The desired exclusion mode for Virtual Private Gateways.

  • vpc_encryption_control_id (Optional[str]) – The ID of the VPC encryption control.

  • vpc_id (Optional[str]) – The ID of the VPC.

  • vpc_lattice_exclusion (Optional[str]) – The desired exclusion mode for VPC Lattice.

  • vpc_peering_exclusion (Optional[str]) – The desired exclusion mode for VPC Peering.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-vpc-vpcencryptioncontrol.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_ec2 as ec2

vpc_encryption_control_property = ec2.CfnVPCPropsMixin.VpcEncryptionControlProperty(
    egress_only_internet_gateway_exclusion="egressOnlyInternetGatewayExclusion",
    elastic_file_system_exclusion="elasticFileSystemExclusion",
    internet_gateway_exclusion="internetGatewayExclusion",
    lambda_exclusion="lambdaExclusion",
    mode="mode",
    nat_gateway_exclusion="natGatewayExclusion",
    resource_exclusions=ec2.CfnVPCPropsMixin.VpcEncryptionControlExclusionsProperty(
        egress_only_internet_gateway=ec2.CfnVPCPropsMixin.VpcEncryptionControlExclusionProperty(
            state="state",
            state_message="stateMessage"
        ),
        elastic_file_system=ec2.CfnVPCPropsMixin.VpcEncryptionControlExclusionProperty(
            state="state",
            state_message="stateMessage"
        ),
        internet_gateway=ec2.CfnVPCPropsMixin.VpcEncryptionControlExclusionProperty(
            state="state",
            state_message="stateMessage"
        ),
        lambda_=ec2.CfnVPCPropsMixin.VpcEncryptionControlExclusionProperty(
            state="state",
            state_message="stateMessage"
        ),
        nat_gateway=ec2.CfnVPCPropsMixin.VpcEncryptionControlExclusionProperty(
            state="state",
            state_message="stateMessage"
        ),
        virtual_private_gateway=ec2.CfnVPCPropsMixin.VpcEncryptionControlExclusionProperty(
            state="state",
            state_message="stateMessage"
        ),
        vpc_lattice=ec2.CfnVPCPropsMixin.VpcEncryptionControlExclusionProperty(
            state="state",
            state_message="stateMessage"
        ),
        vpc_peering=ec2.CfnVPCPropsMixin.VpcEncryptionControlExclusionProperty(
            state="state",
            state_message="stateMessage"
        )
    ),
    state="state",
    state_message="stateMessage",
    virtual_private_gateway_exclusion="virtualPrivateGatewayExclusion",
    vpc_encryption_control_id="vpcEncryptionControlId",
    vpc_id="vpcId",
    vpc_lattice_exclusion="vpcLatticeExclusion",
    vpc_peering_exclusion="vpcPeeringExclusion"
)

Attributes

egress_only_internet_gateway_exclusion

The desired exclusion mode for Egress-Only Internet Gateways.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-vpc-vpcencryptioncontrol.html#cfn-ec2-vpc-vpcencryptioncontrol-egressonlyinternetgatewayexclusion

elastic_file_system_exclusion

The desired exclusion mode for Elastic File System.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-vpc-vpcencryptioncontrol.html#cfn-ec2-vpc-vpcencryptioncontrol-elasticfilesystemexclusion

internet_gateway_exclusion

The desired exclusion mode for Internet Gateways.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-vpc-vpcencryptioncontrol.html#cfn-ec2-vpc-vpcencryptioncontrol-internetgatewayexclusion

lambda_exclusion

The desired exclusion mode for Lambda.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-vpc-vpcencryptioncontrol.html#cfn-ec2-vpc-vpcencryptioncontrol-lambdaexclusion

mode

The mode of the VPC encryption control.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-vpc-vpcencryptioncontrol.html#cfn-ec2-vpc-vpcencryptioncontrol-mode

nat_gateway_exclusion

The desired exclusion mode for NAT Gateways.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-vpc-vpcencryptioncontrol.html#cfn-ec2-vpc-vpcencryptioncontrol-natgatewayexclusion

resource_exclusions

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-vpc-vpcencryptioncontrol.html#cfn-ec2-vpc-vpcencryptioncontrol-resourceexclusions

Type:

see

state

The state of the VPC encryption control.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-vpc-vpcencryptioncontrol.html#cfn-ec2-vpc-vpcencryptioncontrol-state

state_message

A message describing the state of the VPC encryption control.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-vpc-vpcencryptioncontrol.html#cfn-ec2-vpc-vpcencryptioncontrol-statemessage

virtual_private_gateway_exclusion

The desired exclusion mode for Virtual Private Gateways.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-vpc-vpcencryptioncontrol.html#cfn-ec2-vpc-vpcencryptioncontrol-virtualprivategatewayexclusion

vpc_encryption_control_id

The ID of the VPC encryption control.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-vpc-vpcencryptioncontrol.html#cfn-ec2-vpc-vpcencryptioncontrol-vpcencryptioncontrolid

vpc_id

The ID of the VPC.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-vpc-vpcencryptioncontrol.html#cfn-ec2-vpc-vpcencryptioncontrol-vpcid

vpc_lattice_exclusion

The desired exclusion mode for VPC Lattice.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-vpc-vpcencryptioncontrol.html#cfn-ec2-vpc-vpcencryptioncontrol-vpclatticeexclusion

vpc_peering_exclusion

The desired exclusion mode for VPC Peering.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-vpc-vpcencryptioncontrol.html#cfn-ec2-vpc-vpcencryptioncontrol-vpcpeeringexclusion