AWS::EC2::VPC¶
Specifies a virtual private cloud (VPC).
Generated by cfn-typegen --out cfn_types AWS::EC2::VPC into cfn_types/ec2.py:
# Generated by cfn-typegen from the CloudFormation registry schemas. Do not edit.
# fmt: off
# ruff: noqa
"""AWS::EC2 resources."""
from collections.abc import Sequence
from typing import Any, Literal, NotRequired, Unpack
from typing_extensions import TypedDict
from cfn_typed.base import DeletionPolicy, DependsOn, ResourceAttrs, Tag, UpdateReplacePolicy, build
from cfn_typed.intrinsics import Expr
CONSTRAINTS:dict[str,Any]={
'AWS::EC2::VPC':{'VpcEncryptionControl':{'P':{'ElasticFileSystemExclusion':{'e':["enable","disable"]},'VirtualPrivateGatewayExclusion':{'e':["enable","disable"]},'Mode':{'e':["monitor","enforce"]},'VpcLatticeExclusion':{'e':["enable","disable"]},'NatGatewayExclusion':{'e':["enable","disable"]},'EgressOnlyInternetGatewayExclusion':{'e':["enable","disable"]},'LambdaExclusion':{'e':["enable","disable"]},'InternetGatewayExclusion':{'e':["enable","disable"]},'VpcPeeringExclusion':{'e':["enable","disable"]}}}},
}
ATTRIBUTES:dict[str,Any]={"AWS::EC2::VPC":["CidrBlockAssociations","DefaultNetworkAcl","DefaultSecurityGroup","Ipv6CidrBlocks","VpcEncryptionControl.ResourceExclusions","VpcEncryptionControl.ResourceExclusions.EgressOnlyInternetGateway","VpcEncryptionControl.ResourceExclusions.EgressOnlyInternetGateway.State","VpcEncryptionControl.ResourceExclusions.EgressOnlyInternetGateway.StateMessage","VpcEncryptionControl.ResourceExclusions.ElasticFileSystem","VpcEncryptionControl.ResourceExclusions.ElasticFileSystem.State","VpcEncryptionControl.ResourceExclusions.ElasticFileSystem.StateMessage","VpcEncryptionControl.ResourceExclusions.InternetGateway","VpcEncryptionControl.ResourceExclusions.InternetGateway.State","VpcEncryptionControl.ResourceExclusions.InternetGateway.StateMessage","VpcEncryptionControl.ResourceExclusions.Lambda","VpcEncryptionControl.ResourceExclusions.Lambda.State","VpcEncryptionControl.ResourceExclusions.Lambda.StateMessage","VpcEncryptionControl.ResourceExclusions.NatGateway","VpcEncryptionControl.ResourceExclusions.NatGateway.State","VpcEncryptionControl.ResourceExclusions.NatGateway.StateMessage","VpcEncryptionControl.ResourceExclusions.VirtualPrivateGateway","VpcEncryptionControl.ResourceExclusions.VirtualPrivateGateway.State","VpcEncryptionControl.ResourceExclusions.VirtualPrivateGateway.StateMessage","VpcEncryptionControl.ResourceExclusions.VpcLattice","VpcEncryptionControl.ResourceExclusions.VpcLattice.State","VpcEncryptionControl.ResourceExclusions.VpcLattice.StateMessage","VpcEncryptionControl.ResourceExclusions.VpcPeering","VpcEncryptionControl.ResourceExclusions.VpcPeering.State","VpcEncryptionControl.ResourceExclusions.VpcPeering.StateMessage","VpcEncryptionControl.State","VpcEncryptionControl.StateMessage","VpcEncryptionControl.VpcEncryptionControlId","VpcEncryptionControl.VpcId","VpcId"]}
RULES:dict[str,Any]={}
Nested types (6)
These are defined above the properties in the generated module.
class VPCVpcEncryptionControlExclusion(TypedDict, closed=True):
'Describes an exclusion configuration for VPC Encryption Control.'
State: NotRequired[Expr[str]]
'The current state of the exclusion configuration.'
StateMessage: NotRequired[Expr[str]]
'A message providing additional information about the exclusion state.'
class VPCVpcEncryptionControlExclusions(TypedDict, closed=True):
'Describes the exclusion configurations for various resource types in VPC Encryption Control.'
ElasticFileSystem: NotRequired[Expr[VPCVpcEncryptionControlExclusion]]
'The exclusion configuration for Elastic File System traffic.'
VpcLattice: NotRequired[Expr[VPCVpcEncryptionControlExclusion]]
'The exclusion configuration for VPC Lattice traffic.'
VpcPeering: NotRequired[Expr[VPCVpcEncryptionControlExclusion]]
'The exclusion configuration for VPC peering connection traffic.'
InternetGateway: NotRequired[Expr[VPCVpcEncryptionControlExclusion]]
'The exclusion configuration for internet gateway traffic.'
EgressOnlyInternetGateway: NotRequired[Expr[VPCVpcEncryptionControlExclusion]]
'The exclusion configuration for egress-only internet gateway traffic.'
VirtualPrivateGateway: NotRequired[Expr[VPCVpcEncryptionControlExclusion]]
'The exclusion configuration for virtual private gateway traffic.'
NatGateway: NotRequired[Expr[VPCVpcEncryptionControlExclusion]]
'The exclusion configuration for NAT gateway traffic.'
Lambda: NotRequired[Expr[VPCVpcEncryptionControlExclusion]]
'The exclusion configuration for Lambda function traffic.'
class VPCVpcEncryptionControl(TypedDict, closed=True):
'Describes the configuration and state of VPC encryption controls.'
ElasticFileSystemExclusion: NotRequired[Expr[str]]
VirtualPrivateGatewayExclusion: NotRequired[Expr[str]]
Mode: NotRequired[Expr[str]]
'The encryption mode for the VPC Encryption Control configuration.'
VpcEncryptionControlId: NotRequired[Expr[str]]
'The ID of the VPC Encryption Control configuration.'
VpcLatticeExclusion: NotRequired[Expr[str]]
VpcId: NotRequired[Expr[str]]
'The ID of the VPC associated with the encryption control configuration.'
State: NotRequired[Expr[str]]
'The current state of the VPC Encryption Control configuration.'
NatGatewayExclusion: NotRequired[Expr[str]]
EgressOnlyInternetGatewayExclusion: NotRequired[Expr[str]]
StateMessage: NotRequired[Expr[str]]
'A message providing additional information about the encryption control state.'
LambdaExclusion: NotRequired[Expr[str]]
ResourceExclusions: NotRequired[Expr[VPCVpcEncryptionControlExclusions]]
'Information about resource exclusions for the VPC Encryption Control configuration.'
InternetGatewayExclusion: NotRequired[Expr[str]]
VpcPeeringExclusion: NotRequired[Expr[str]]
class VPCProps(TypedDict, closed=True):
'Specifies a virtual private cloud (VPC).'
CidrBlock: NotRequired[Expr[str]]
'The IPv4 network range for the VPC, in CIDR notation.'
InstanceTenancy: NotRequired[Expr[str]]
'The allowed tenancy of instances launched into the VPC.'
Ipv4NetmaskLength: NotRequired[Expr[int]]
'The netmask length of the IPv4 CIDR you want to allocate to this VPC from an Amazon VPC IP Address Manager (IPAM) pool.'
Ipv4IpamPoolId: NotRequired[Expr[str]]
"The ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR."
VpcEncryptionControl: NotRequired[Expr[VPCVpcEncryptionControl]]
'Describes the configuration and state of VPC encryption controls.'
EnableDnsSupport: NotRequired[Expr[bool]]
'Indicates whether the DNS resolution is supported for the VPC.'
EnableDnsHostnames: NotRequired[Expr[bool]]
'Indicates whether the instances launched in the VPC get DNS hostnames.'
Tags: NotRequired[Expr[Sequence[Expr[Tag]]]]
'The tags for the VPC.'
class VPC(ResourceAttrs):
'Specifies a virtual private cloud (VPC).'
Type: Literal['AWS::EC2::VPC']
Properties: NotRequired[VPCProps]
def vpc(
*,
depends_on: DependsOn | None = None,
deletion_policy: DeletionPolicy | None = None,
update_replace_policy: UpdateReplacePolicy | None = None,
condition: str | None = None,
metadata: dict[str, Any] | None = None,
**props: Unpack[VPCProps],
) -> VPC:
return build('AWS::EC2::VPC', props, depends_on, deletion_policy, update_replace_policy, condition, metadata)
Attributes¶
Read-only values for get_att(logical_id, attribute). They are not accepted as inputs.
CidrBlockAssociationsDefaultNetworkAclDefaultSecurityGroupIpv6CidrBlocksVpcId