"""Raw representations of every data type in the AWS EC2 service.

See Also:
    `AWS developer guide for EC2
    <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/>`_

This file is automatically generated, and should not be directly edited.
"""

from typing import Any
from typing import Dict

from attr import attrib
from attr import attrs

from ..core import ATTRSCONFIG
from ..core import Resource
from ..core import ResourceProperties
from ..core import create_object_converter

__all__ = [
    "CustomerGateway",
    "CustomerGatewayProperties",
    "DHCPOptions",
    "DHCPOptionsProperties",
    "EC2Fleet",
    "EC2FleetProperties",
    "EgressOnlyInternetGateway",
    "EgressOnlyInternetGatewayProperties",
    "EIP",
    "EIPProperties",
    "EIPAssociation",
    "EIPAssociationProperties",
    "FlowLog",
    "FlowLogProperties",
    "Host",
    "HostProperties",
    "Instance",
    "InstanceProperties",
    "InternetGateway",
    "InternetGatewayProperties",
    "LaunchTemplate",
    "LaunchTemplateProperties",
    "NatGateway",
    "NatGatewayProperties",
    "NetworkAcl",
    "NetworkAclProperties",
    "NetworkAclEntry",
    "NetworkAclEntryProperties",
    "NetworkInterface",
    "NetworkInterfaceProperties",
    "NetworkInterfaceAttachment",
    "NetworkInterfaceAttachmentProperties",
    "NetworkInterfacePermission",
    "NetworkInterfacePermissionProperties",
    "PlacementGroup",
    "PlacementGroupProperties",
    "Route",
    "RouteProperties",
    "RouteTable",
    "RouteTableProperties",
    "SecurityGroup",
    "SecurityGroupProperties",
    "SecurityGroupEgress",
    "SecurityGroupEgressProperties",
    "SecurityGroupIngress",
    "SecurityGroupIngressProperties",
    "SpotFleet",
    "SpotFleetProperties",
    "Subnet",
    "SubnetProperties",
    "SubnetCidrBlock",
    "SubnetCidrBlockProperties",
    "SubnetNetworkAclAssociation",
    "SubnetNetworkAclAssociationProperties",
    "SubnetRouteTableAssociation",
    "SubnetRouteTableAssociationProperties",
    "TransitGateway",
    "TransitGatewayProperties",
    "TransitGatewayAttachment",
    "TransitGatewayAttachmentProperties",
    "TransitGatewayRoute",
    "TransitGatewayRouteProperties",
    "TransitGatewayRouteTable",
    "TransitGatewayRouteTableProperties",
    "TransitGatewayRouteTableAssociation",
    "TransitGatewayRouteTableAssociationProperties",
    "TransitGatewayRouteTablePropagation",
    "TransitGatewayRouteTablePropagationProperties",
    "TrunkInterfaceAssociation",
    "TrunkInterfaceAssociationProperties",
    "Volume",
    "VolumeProperties",
    "VolumeAttachment",
    "VolumeAttachmentProperties",
    "VPC",
    "VPCProperties",
    "VPCCidrBlock",
    "VPCCidrBlockProperties",
    "VPCDHCPOptionsAssociation",
    "VPCDHCPOptionsAssociationProperties",
    "VPCEndpoint",
    "VPCEndpointProperties",
    "VPCEndpointConnectionNotification",
    "VPCEndpointConnectionNotificationProperties",
    "VPCEndpointServicePermissions",
    "VPCEndpointServicePermissionsProperties",
    "VPCGatewayAttachment",
    "VPCGatewayAttachmentProperties",
    "VPCPeeringConnection",
    "VPCPeeringConnectionProperties",
    "VPNConnection",
    "VPNConnectionProperties",
    "VPNConnectionRoute",
    "VPNConnectionRouteProperties",
    "VPNGateway",
    "VPNGatewayProperties",
    "VPNGatewayRoutePropagation",
    "VPNGatewayRoutePropagationProperties",
]


@attrs(**ATTRSCONFIG)
class CustomerGatewayProperties(ResourceProperties):
    BgpAsn = attrib(default=None)
    IpAddress = attrib(default=None)
    Tags = attrib(default=None)
    Type = attrib(default=None)


@attrs(**ATTRSCONFIG)
class CustomerGateway(Resource):
    """A Customer Gateway for EC2.

    See Also:
        `AWS Cloud Formation documentation for CustomerGateway
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-customer-gateway.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::CustomerGateway"

    Properties: CustomerGatewayProperties = attrib(
        factory=CustomerGatewayProperties,
        converter=create_object_converter(CustomerGatewayProperties),
    )


@attrs(**ATTRSCONFIG)
class DHCPOptionsProperties(ResourceProperties):
    DomainName = attrib(default=None)
    DomainNameServers = attrib(default=None)
    NetbiosNameServers = attrib(default=None)
    NetbiosNodeType = attrib(default=None)
    NtpServers = attrib(default=None)
    Tags = attrib(default=None)


@attrs(**ATTRSCONFIG)
class DHCPOptions(Resource):
    """A Dhcp Options for EC2.

    See Also:
        `AWS Cloud Formation documentation for DHCPOptions
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-dhcp-options.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::DHCPOptions"

    Properties: DHCPOptionsProperties = attrib(
        factory=DHCPOptionsProperties,
        converter=create_object_converter(DHCPOptionsProperties),
    )


@attrs(**ATTRSCONFIG)
class EC2FleetProperties(ResourceProperties):
    ExcessCapacityTerminationPolicy = attrib(default=None)
    LaunchTemplateConfigs = attrib(default=None)
    OnDemandOptions = attrib(default=None)
    ReplaceUnhealthyInstances = attrib(default=None)
    SpotOptions = attrib(default=None)
    TagSpecifications = attrib(default=None)
    TargetCapacitySpecification = attrib(default=None)
    TerminateInstancesWithExpiration = attrib(default=None)
    Type = attrib(default=None)
    ValidFrom = attrib(default=None)
    ValidUntil = attrib(default=None)


@attrs(**ATTRSCONFIG)
class EC2Fleet(Resource):
    """A Ec2 Fleet for EC2.

    See Also:
        `AWS Cloud Formation documentation for EC2Fleet
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-ec2fleet.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::EC2Fleet"

    Properties: EC2FleetProperties = attrib(
        factory=EC2FleetProperties,
        converter=create_object_converter(EC2FleetProperties),
    )


@attrs(**ATTRSCONFIG)
class EIPProperties(ResourceProperties):
    Domain = attrib(default=None)
    InstanceId = attrib(default=None)
    PublicIpv4Pool = attrib(default=None)


@attrs(**ATTRSCONFIG)
class EIP(Resource):
    """A Eip for EC2.

    See Also:
        `AWS Cloud Formation documentation for EIP
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-eip.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::EIP"

    Properties: EIPProperties = attrib(
        factory=EIPProperties,
        converter=create_object_converter(EIPProperties),
    )


@attrs(**ATTRSCONFIG)
class EIPAssociationProperties(ResourceProperties):
    AllocationId = attrib(default=None)
    EIP = attrib(default=None)
    InstanceId = attrib(default=None)
    NetworkInterfaceId = attrib(default=None)
    PrivateIpAddress = attrib(default=None)


@attrs(**ATTRSCONFIG)
class EIPAssociation(Resource):
    """A Eip Association for EC2.

    See Also:
        `AWS Cloud Formation documentation for EIPAssociation
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-eip-association.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::EIPAssociation"

    Properties: EIPAssociationProperties = attrib(
        factory=EIPAssociationProperties,
        converter=create_object_converter(EIPAssociationProperties),
    )


@attrs(**ATTRSCONFIG)
class EgressOnlyInternetGatewayProperties(ResourceProperties):
    VpcId = attrib(default=None)


@attrs(**ATTRSCONFIG)
class EgressOnlyInternetGateway(Resource):
    """A Egress Only Internet Gateway for EC2.

    See Also:
        `AWS Cloud Formation documentation for EgressOnlyInternetGateway
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-egressonlyinternetgateway.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::EgressOnlyInternetGateway"

    Properties: EgressOnlyInternetGatewayProperties = attrib(
        factory=EgressOnlyInternetGatewayProperties,
        converter=create_object_converter(EgressOnlyInternetGatewayProperties),
    )


@attrs(**ATTRSCONFIG)
class FlowLogProperties(ResourceProperties):
    DeliverLogsPermissionArn = attrib(default=None)
    LogDestination = attrib(default=None)
    LogDestinationType = attrib(default=None)
    LogGroupName = attrib(default=None)
    ResourceId = attrib(default=None)
    ResourceType = attrib(default=None)
    TrafficType = attrib(default=None)


@attrs(**ATTRSCONFIG)
class FlowLog(Resource):
    """A Flow Log for EC2.

    See Also:
        `AWS Cloud Formation documentation for FlowLog
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-flowlog.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::FlowLog"

    Properties: FlowLogProperties = attrib(
        factory=FlowLogProperties,
        converter=create_object_converter(FlowLogProperties),
    )


@attrs(**ATTRSCONFIG)
class HostProperties(ResourceProperties):
    AutoPlacement = attrib(default=None)
    AvailabilityZone = attrib(default=None)
    InstanceType = attrib(default=None)


@attrs(**ATTRSCONFIG)
class Host(Resource):
    """A Host for EC2.

    See Also:
        `AWS Cloud Formation documentation for Host
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-host.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::Host"

    Properties: HostProperties = attrib(
        factory=HostProperties,
        converter=create_object_converter(HostProperties),
    )


@attrs(**ATTRSCONFIG)
class InstanceProperties(ResourceProperties):
    AdditionalInfo = attrib(default=None)
    Affinity = attrib(default=None)
    AvailabilityZone = attrib(default=None)
    BlockDeviceMappings = attrib(default=None)
    CreditSpecification = attrib(default=None)
    DisableApiTermination = attrib(default=None)
    EbsOptimized = attrib(default=None)
    ElasticGpuSpecifications = attrib(default=None)
    ElasticInferenceAccelerators = attrib(default=None)
    HostId = attrib(default=None)
    IamInstanceProfile = attrib(default=None)
    ImageId = attrib(default=None)
    InstanceInitiatedShutdownBehavior = attrib(default=None)
    InstanceType = attrib(default=None)
    Ipv6AddressCount = attrib(default=None)
    Ipv6Addresses = attrib(default=None)
    KernelId = attrib(default=None)
    KeyName = attrib(default=None)
    LaunchTemplate = attrib(default=None)
    LicenseSpecifications = attrib(default=None)
    Monitoring = attrib(default=None)
    NetworkInterfaces = attrib(default=None)
    PlacementGroupName = attrib(default=None)
    PrivateIpAddress = attrib(default=None)
    RamdiskId = attrib(default=None)
    SecurityGroupIds = attrib(default=None)
    SecurityGroups = attrib(default=None)
    SourceDestCheck = attrib(default=None)
    SsmAssociations = attrib(default=None)
    SubnetId = attrib(default=None)
    Tags = attrib(default=None)
    Tenancy = attrib(default=None)
    UserData = attrib(default=None)
    Volumes = attrib(default=None)


@attrs(**ATTRSCONFIG)
class Instance(Resource):
    """A Instance for EC2.

    See Also:
        `AWS Cloud Formation documentation for Instance
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::Instance"

    Properties: InstanceProperties = attrib(
        factory=InstanceProperties,
        converter=create_object_converter(InstanceProperties),
    )

    # NB: CreationPolicy may be set for Instance
    # (unlike most Resource types)
    CreationPolicy: Dict[str, Any] = attrib(factory=dict)


@attrs(**ATTRSCONFIG)
class InternetGatewayProperties(ResourceProperties):
    Tags = attrib(default=None)


@attrs(**ATTRSCONFIG)
class InternetGateway(Resource):
    """A Internet Gateway for EC2.

    See Also:
        `AWS Cloud Formation documentation for InternetGateway
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-internetgateway.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::InternetGateway"

    Properties: InternetGatewayProperties = attrib(
        factory=InternetGatewayProperties,
        converter=create_object_converter(InternetGatewayProperties),
    )


@attrs(**ATTRSCONFIG)
class LaunchTemplateProperties(ResourceProperties):
    LaunchTemplateData = attrib(default=None)
    LaunchTemplateName = attrib(default=None)


@attrs(**ATTRSCONFIG)
class LaunchTemplate(Resource):
    """A Launch Template for EC2.

    See Also:
        `AWS Cloud Formation documentation for LaunchTemplate
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::LaunchTemplate"

    Properties: LaunchTemplateProperties = attrib(
        factory=LaunchTemplateProperties,
        converter=create_object_converter(LaunchTemplateProperties),
    )


@attrs(**ATTRSCONFIG)
class NatGatewayProperties(ResourceProperties):
    AllocationId = attrib(default=None)
    SubnetId = attrib(default=None)
    Tags = attrib(default=None)


@attrs(**ATTRSCONFIG)
class NatGateway(Resource):
    """A Nat Gateway for EC2.

    See Also:
        `AWS Cloud Formation documentation for NatGateway
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-natgateway.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::NatGateway"

    Properties: NatGatewayProperties = attrib(
        factory=NatGatewayProperties,
        converter=create_object_converter(NatGatewayProperties),
    )


@attrs(**ATTRSCONFIG)
class NetworkAclProperties(ResourceProperties):
    Tags = attrib(default=None)
    VpcId = attrib(default=None)


@attrs(**ATTRSCONFIG)
class NetworkAcl(Resource):
    """A Network Acl for EC2.

    See Also:
        `AWS Cloud Formation documentation for NetworkAcl
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-acl.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::NetworkAcl"

    Properties: NetworkAclProperties = attrib(
        factory=NetworkAclProperties,
        converter=create_object_converter(NetworkAclProperties),
    )


@attrs(**ATTRSCONFIG)
class NetworkAclEntryProperties(ResourceProperties):
    CidrBlock = attrib(default=None)
    Egress = attrib(default=None)
    Icmp = attrib(default=None)
    Ipv6CidrBlock = attrib(default=None)
    NetworkAclId = attrib(default=None)
    PortRange = attrib(default=None)
    Protocol = attrib(default=None)
    RuleAction = attrib(default=None)
    RuleNumber = attrib(default=None)


@attrs(**ATTRSCONFIG)
class NetworkAclEntry(Resource):
    """A Network Acl Entry for EC2.

    See Also:
        `AWS Cloud Formation documentation for NetworkAclEntry
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-acl-entry.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::NetworkAclEntry"

    Properties: NetworkAclEntryProperties = attrib(
        factory=NetworkAclEntryProperties,
        converter=create_object_converter(NetworkAclEntryProperties),
    )


@attrs(**ATTRSCONFIG)
class NetworkInterfaceProperties(ResourceProperties):
    Description = attrib(default=None)
    GroupSet = attrib(default=None)
    InterfaceType = attrib(default=None)
    Ipv6AddressCount = attrib(default=None)
    Ipv6Addresses = attrib(default=None)
    PrivateIpAddress = attrib(default=None)
    PrivateIpAddresses = attrib(default=None)
    SecondaryPrivateIpAddressCount = attrib(default=None)
    SourceDestCheck = attrib(default=None)
    SubnetId = attrib(default=None)
    Tags = attrib(default=None)


@attrs(**ATTRSCONFIG)
class NetworkInterface(Resource):
    """A Network Interface for EC2.

    See Also:
        `AWS Cloud Formation documentation for NetworkInterface
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::NetworkInterface"

    Properties: NetworkInterfaceProperties = attrib(
        factory=NetworkInterfaceProperties,
        converter=create_object_converter(NetworkInterfaceProperties),
    )


@attrs(**ATTRSCONFIG)
class NetworkInterfaceAttachmentProperties(ResourceProperties):
    DeleteOnTermination = attrib(default=None)
    DeviceIndex = attrib(default=None)
    InstanceId = attrib(default=None)
    NetworkInterfaceId = attrib(default=None)


@attrs(**ATTRSCONFIG)
class NetworkInterfaceAttachment(Resource):
    """A Network Interface Attachment for EC2.

    See Also:
        `AWS Cloud Formation documentation for NetworkInterfaceAttachment
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-network-interface-attachment.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::NetworkInterfaceAttachment"

    Properties: NetworkInterfaceAttachmentProperties = attrib(
        factory=NetworkInterfaceAttachmentProperties,
        converter=create_object_converter(NetworkInterfaceAttachmentProperties),
    )


@attrs(**ATTRSCONFIG)
class NetworkInterfacePermissionProperties(ResourceProperties):
    AwsAccountId = attrib(default=None)
    NetworkInterfaceId = attrib(default=None)
    Permission = attrib(default=None)


@attrs(**ATTRSCONFIG)
class NetworkInterfacePermission(Resource):
    """A Network Interface Permission for EC2.

    See Also:
        `AWS Cloud Formation documentation for NetworkInterfacePermission
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkinterfacepermission.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::NetworkInterfacePermission"

    Properties: NetworkInterfacePermissionProperties = attrib(
        factory=NetworkInterfacePermissionProperties,
        converter=create_object_converter(NetworkInterfacePermissionProperties),
    )


@attrs(**ATTRSCONFIG)
class PlacementGroupProperties(ResourceProperties):
    Strategy = attrib(default=None)


@attrs(**ATTRSCONFIG)
class PlacementGroup(Resource):
    """A Placement Group for EC2.

    See Also:
        `AWS Cloud Formation documentation for PlacementGroup
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-placementgroup.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::PlacementGroup"

    Properties: PlacementGroupProperties = attrib(
        factory=PlacementGroupProperties,
        converter=create_object_converter(PlacementGroupProperties),
    )


@attrs(**ATTRSCONFIG)
class RouteProperties(ResourceProperties):
    DestinationCidrBlock = attrib(default=None)
    DestinationIpv6CidrBlock = attrib(default=None)
    EgressOnlyInternetGatewayId = attrib(default=None)
    GatewayId = attrib(default=None)
    InstanceId = attrib(default=None)
    NatGatewayId = attrib(default=None)
    NetworkInterfaceId = attrib(default=None)
    RouteTableId = attrib(default=None)
    VpcPeeringConnectionId = attrib(default=None)


@attrs(**ATTRSCONFIG)
class Route(Resource):
    """A Route for EC2.

    See Also:
        `AWS Cloud Formation documentation for Route
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::Route"

    Properties: RouteProperties = attrib(
        factory=RouteProperties,
        converter=create_object_converter(RouteProperties),
    )


@attrs(**ATTRSCONFIG)
class RouteTableProperties(ResourceProperties):
    Tags = attrib(default=None)
    VpcId = attrib(default=None)


@attrs(**ATTRSCONFIG)
class RouteTable(Resource):
    """A Route Table for EC2.

    See Also:
        `AWS Cloud Formation documentation for RouteTable
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-route-table.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::RouteTable"

    Properties: RouteTableProperties = attrib(
        factory=RouteTableProperties,
        converter=create_object_converter(RouteTableProperties),
    )


@attrs(**ATTRSCONFIG)
class SecurityGroupProperties(ResourceProperties):
    GroupDescription = attrib(default=None)
    GroupName = attrib(default=None)
    SecurityGroupEgress = attrib(default=None)
    SecurityGroupIngress = attrib(default=None)
    Tags = attrib(default=None)
    VpcId = attrib(default=None)


@attrs(**ATTRSCONFIG)
class SecurityGroup(Resource):
    """A Security Group for EC2.

    See Also:
        `AWS Cloud Formation documentation for SecurityGroup
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-security-group.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::SecurityGroup"

    Properties: SecurityGroupProperties = attrib(
        factory=SecurityGroupProperties,
        converter=create_object_converter(SecurityGroupProperties),
    )


@attrs(**ATTRSCONFIG)
class SecurityGroupEgressProperties(ResourceProperties):
    CidrIp = attrib(default=None)
    CidrIpv6 = attrib(default=None)
    Description = attrib(default=None)
    DestinationPrefixListId = attrib(default=None)
    DestinationSecurityGroupId = attrib(default=None)
    FromPort = attrib(default=None)
    GroupId = attrib(default=None)
    IpProtocol = attrib(default=None)
    ToPort = attrib(default=None)


@attrs(**ATTRSCONFIG)
class SecurityGroupEgress(Resource):
    """A Security Group Egress for EC2.

    See Also:
        `AWS Cloud Formation documentation for SecurityGroupEgress
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-security-group-egress.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::SecurityGroupEgress"

    Properties: SecurityGroupEgressProperties = attrib(
        factory=SecurityGroupEgressProperties,
        converter=create_object_converter(SecurityGroupEgressProperties),
    )


@attrs(**ATTRSCONFIG)
class SecurityGroupIngressProperties(ResourceProperties):
    CidrIp = attrib(default=None)
    CidrIpv6 = attrib(default=None)
    Description = attrib(default=None)
    FromPort = attrib(default=None)
    GroupId = attrib(default=None)
    GroupName = attrib(default=None)
    IpProtocol = attrib(default=None)
    SourcePrefixListId = attrib(default=None)
    SourceSecurityGroupId = attrib(default=None)
    SourceSecurityGroupName = attrib(default=None)
    SourceSecurityGroupOwnerId = attrib(default=None)
    ToPort = attrib(default=None)


@attrs(**ATTRSCONFIG)
class SecurityGroupIngress(Resource):
    """A Security Group Ingress for EC2.

    See Also:
        `AWS Cloud Formation documentation for SecurityGroupIngress
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-security-group-ingress.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::SecurityGroupIngress"

    Properties: SecurityGroupIngressProperties = attrib(
        factory=SecurityGroupIngressProperties,
        converter=create_object_converter(SecurityGroupIngressProperties),
    )


@attrs(**ATTRSCONFIG)
class SpotFleetProperties(ResourceProperties):
    SpotFleetRequestConfigData = attrib(default=None)


@attrs(**ATTRSCONFIG)
class SpotFleet(Resource):
    """A Spot Fleet for EC2.

    See Also:
        `AWS Cloud Formation documentation for SpotFleet
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-spotfleet.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::SpotFleet"

    Properties: SpotFleetProperties = attrib(
        factory=SpotFleetProperties,
        converter=create_object_converter(SpotFleetProperties),
    )


@attrs(**ATTRSCONFIG)
class SubnetProperties(ResourceProperties):
    AssignIpv6AddressOnCreation = attrib(default=None)
    AvailabilityZone = attrib(default=None)
    CidrBlock = attrib(default=None)
    Ipv6CidrBlock = attrib(default=None)
    MapPublicIpOnLaunch = attrib(default=None)
    Tags = attrib(default=None)
    VpcId = attrib(default=None)


@attrs(**ATTRSCONFIG)
class Subnet(Resource):
    """A Subnet for EC2.

    See Also:
        `AWS Cloud Formation documentation for Subnet
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::Subnet"

    Properties: SubnetProperties = attrib(
        factory=SubnetProperties,
        converter=create_object_converter(SubnetProperties),
    )


@attrs(**ATTRSCONFIG)
class SubnetCidrBlockProperties(ResourceProperties):
    Ipv6CidrBlock = attrib(default=None)
    SubnetId = attrib(default=None)


@attrs(**ATTRSCONFIG)
class SubnetCidrBlock(Resource):
    """A Subnet Cidr Block for EC2.

    See Also:
        `AWS Cloud Formation documentation for SubnetCidrBlock
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnetcidrblock.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::SubnetCidrBlock"

    Properties: SubnetCidrBlockProperties = attrib(
        factory=SubnetCidrBlockProperties,
        converter=create_object_converter(SubnetCidrBlockProperties),
    )


@attrs(**ATTRSCONFIG)
class SubnetNetworkAclAssociationProperties(ResourceProperties):
    NetworkAclId = attrib(default=None)
    SubnetId = attrib(default=None)


@attrs(**ATTRSCONFIG)
class SubnetNetworkAclAssociation(Resource):
    """A Subnet Network Acl Association for EC2.

    See Also:
        `AWS Cloud Formation documentation for SubnetNetworkAclAssociation
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet-network-acl-assoc.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::SubnetNetworkAclAssociation"

    Properties: SubnetNetworkAclAssociationProperties = attrib(
        factory=SubnetNetworkAclAssociationProperties,
        converter=create_object_converter(SubnetNetworkAclAssociationProperties),
    )


@attrs(**ATTRSCONFIG)
class SubnetRouteTableAssociationProperties(ResourceProperties):
    RouteTableId = attrib(default=None)
    SubnetId = attrib(default=None)


@attrs(**ATTRSCONFIG)
class SubnetRouteTableAssociation(Resource):
    """A Subnet Route Table Association for EC2.

    See Also:
        `AWS Cloud Formation documentation for SubnetRouteTableAssociation
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet-route-table-assoc.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::SubnetRouteTableAssociation"

    Properties: SubnetRouteTableAssociationProperties = attrib(
        factory=SubnetRouteTableAssociationProperties,
        converter=create_object_converter(SubnetRouteTableAssociationProperties),
    )


@attrs(**ATTRSCONFIG)
class TransitGatewayProperties(ResourceProperties):
    AmazonSideAsn = attrib(default=None)
    AutoAcceptSharedAttachments = attrib(default=None)
    DefaultRouteTableAssociation = attrib(default=None)
    DefaultRouteTablePropagation = attrib(default=None)
    Description = attrib(default=None)
    DnsSupport = attrib(default=None)
    Tags = attrib(default=None)
    VpnEcmpSupport = attrib(default=None)


@attrs(**ATTRSCONFIG)
class TransitGateway(Resource):
    """A Transit Gateway for EC2.

    See Also:
        `AWS Cloud Formation documentation for TransitGateway
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-transitgateway.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::TransitGateway"

    Properties: TransitGatewayProperties = attrib(
        factory=TransitGatewayProperties,
        converter=create_object_converter(TransitGatewayProperties),
    )


@attrs(**ATTRSCONFIG)
class TransitGatewayAttachmentProperties(ResourceProperties):
    SubnetIds = attrib(default=None)
    Tags = attrib(default=None)
    TransitGatewayId = attrib(default=None)
    VpcId = attrib(default=None)


@attrs(**ATTRSCONFIG)
class TransitGatewayAttachment(Resource):
    """A Transit Gateway Attachment for EC2.

    See Also:
        `AWS Cloud Formation documentation for TransitGatewayAttachment
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-transitgatewayattachment.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::TransitGatewayAttachment"

    Properties: TransitGatewayAttachmentProperties = attrib(
        factory=TransitGatewayAttachmentProperties,
        converter=create_object_converter(TransitGatewayAttachmentProperties),
    )


@attrs(**ATTRSCONFIG)
class TransitGatewayRouteProperties(ResourceProperties):
    Blackhole = attrib(default=None)
    DestinationCidrBlock = attrib(default=None)
    TransitGatewayAttachmentId = attrib(default=None)
    TransitGatewayRouteTableId = attrib(default=None)


@attrs(**ATTRSCONFIG)
class TransitGatewayRoute(Resource):
    """A Transit Gateway Route for EC2.

    See Also:
        `AWS Cloud Formation documentation for TransitGatewayRoute
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-transitgatewayroute.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::TransitGatewayRoute"

    Properties: TransitGatewayRouteProperties = attrib(
        factory=TransitGatewayRouteProperties,
        converter=create_object_converter(TransitGatewayRouteProperties),
    )


@attrs(**ATTRSCONFIG)
class TransitGatewayRouteTableProperties(ResourceProperties):
    Tags = attrib(default=None)
    TransitGatewayId = attrib(default=None)


@attrs(**ATTRSCONFIG)
class TransitGatewayRouteTable(Resource):
    """A Transit Gateway Route Table for EC2.

    See Also:
        `AWS Cloud Formation documentation for TransitGatewayRouteTable
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-transitgatewayroutetable.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::TransitGatewayRouteTable"

    Properties: TransitGatewayRouteTableProperties = attrib(
        factory=TransitGatewayRouteTableProperties,
        converter=create_object_converter(TransitGatewayRouteTableProperties),
    )


@attrs(**ATTRSCONFIG)
class TransitGatewayRouteTableAssociationProperties(ResourceProperties):
    TransitGatewayAttachmentId = attrib(default=None)
    TransitGatewayRouteTableId = attrib(default=None)


@attrs(**ATTRSCONFIG)
class TransitGatewayRouteTableAssociation(Resource):
    """A Transit Gateway Route Table Association for EC2.

    See Also:
        `AWS Cloud Formation documentation for TransitGatewayRouteTableAssociation
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-transitgatewayroutetableassociation.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::TransitGatewayRouteTableAssociation"

    Properties: TransitGatewayRouteTableAssociationProperties = attrib(
        factory=TransitGatewayRouteTableAssociationProperties,
        converter=create_object_converter(TransitGatewayRouteTableAssociationProperties),
    )


@attrs(**ATTRSCONFIG)
class TransitGatewayRouteTablePropagationProperties(ResourceProperties):
    TransitGatewayAttachmentId = attrib(default=None)
    TransitGatewayRouteTableId = attrib(default=None)


@attrs(**ATTRSCONFIG)
class TransitGatewayRouteTablePropagation(Resource):
    """A Transit Gateway Route Table Propagation for EC2.

    See Also:
        `AWS Cloud Formation documentation for TransitGatewayRouteTablePropagation
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-transitgatewayroutetablepropagation.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::TransitGatewayRouteTablePropagation"

    Properties: TransitGatewayRouteTablePropagationProperties = attrib(
        factory=TransitGatewayRouteTablePropagationProperties,
        converter=create_object_converter(TransitGatewayRouteTablePropagationProperties),
    )


@attrs(**ATTRSCONFIG)
class TrunkInterfaceAssociationProperties(ResourceProperties):
    BranchInterfaceId = attrib(default=None)
    GREKey = attrib(default=None)
    TrunkInterfaceId = attrib(default=None)
    VLANId = attrib(default=None)


@attrs(**ATTRSCONFIG)
class TrunkInterfaceAssociation(Resource):
    """A Trunk Interface Association for EC2.

    See Also:
        `AWS Cloud Formation documentation for TrunkInterfaceAssociation
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-trunkinterfaceassociation.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::TrunkInterfaceAssociation"

    Properties: TrunkInterfaceAssociationProperties = attrib(
        factory=TrunkInterfaceAssociationProperties,
        converter=create_object_converter(TrunkInterfaceAssociationProperties),
    )


@attrs(**ATTRSCONFIG)
class VPCProperties(ResourceProperties):
    CidrBlock = attrib(default=None)
    EnableDnsHostnames = attrib(default=None)
    EnableDnsSupport = attrib(default=None)
    InstanceTenancy = attrib(default=None)
    Tags = attrib(default=None)


@attrs(**ATTRSCONFIG)
class VPC(Resource):
    """A Vpc for EC2.

    See Also:
        `AWS Cloud Formation documentation for VPC
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpc.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::VPC"

    Properties: VPCProperties = attrib(
        factory=VPCProperties,
        converter=create_object_converter(VPCProperties),
    )


@attrs(**ATTRSCONFIG)
class VPCCidrBlockProperties(ResourceProperties):
    AmazonProvidedIpv6CidrBlock = attrib(default=None)
    CidrBlock = attrib(default=None)
    VpcId = attrib(default=None)


@attrs(**ATTRSCONFIG)
class VPCCidrBlock(Resource):
    """A Vpc Cidr Block for EC2.

    See Also:
        `AWS Cloud Formation documentation for VPCCidrBlock
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpccidrblock.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::VPCCidrBlock"

    Properties: VPCCidrBlockProperties = attrib(
        factory=VPCCidrBlockProperties,
        converter=create_object_converter(VPCCidrBlockProperties),
    )


@attrs(**ATTRSCONFIG)
class VPCDHCPOptionsAssociationProperties(ResourceProperties):
    DhcpOptionsId = attrib(default=None)
    VpcId = attrib(default=None)


@attrs(**ATTRSCONFIG)
class VPCDHCPOptionsAssociation(Resource):
    """A Vpcdhcp Options Association for EC2.

    See Also:
        `AWS Cloud Formation documentation for VPCDHCPOptionsAssociation
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpc-dhcp-options-assoc.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::VPCDHCPOptionsAssociation"

    Properties: VPCDHCPOptionsAssociationProperties = attrib(
        factory=VPCDHCPOptionsAssociationProperties,
        converter=create_object_converter(VPCDHCPOptionsAssociationProperties),
    )


@attrs(**ATTRSCONFIG)
class VPCEndpointProperties(ResourceProperties):
    PolicyDocument = attrib(default=None)
    PrivateDnsEnabled = attrib(default=None)
    RouteTableIds = attrib(default=None)
    SecurityGroupIds = attrib(default=None)
    ServiceName = attrib(default=None)
    SubnetIds = attrib(default=None)
    VpcEndpointType = attrib(default=None)
    VpcId = attrib(default=None)


@attrs(**ATTRSCONFIG)
class VPCEndpoint(Resource):
    """A Vpc Endpoint for EC2.

    See Also:
        `AWS Cloud Formation documentation for VPCEndpoint
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcendpoint.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::VPCEndpoint"

    Properties: VPCEndpointProperties = attrib(
        factory=VPCEndpointProperties,
        converter=create_object_converter(VPCEndpointProperties),
    )


@attrs(**ATTRSCONFIG)
class VPCEndpointConnectionNotificationProperties(ResourceProperties):
    ConnectionEvents = attrib(default=None)
    ConnectionNotificationArn = attrib(default=None)
    ServiceId = attrib(default=None)
    VPCEndpointId = attrib(default=None)


@attrs(**ATTRSCONFIG)
class VPCEndpointConnectionNotification(Resource):
    """A Vpc Endpoint Connection Notification for EC2.

    See Also:
        `AWS Cloud Formation documentation for VPCEndpointConnectionNotification
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcendpointconnectionnotification.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::VPCEndpointConnectionNotification"

    Properties: VPCEndpointConnectionNotificationProperties = attrib(
        factory=VPCEndpointConnectionNotificationProperties,
        converter=create_object_converter(VPCEndpointConnectionNotificationProperties),
    )


@attrs(**ATTRSCONFIG)
class VPCEndpointServicePermissionsProperties(ResourceProperties):
    AllowedPrincipals = attrib(default=None)
    ServiceId = attrib(default=None)


@attrs(**ATTRSCONFIG)
class VPCEndpointServicePermissions(Resource):
    """A Vpc Endpoint Service Permissions for EC2.

    See Also:
        `AWS Cloud Formation documentation for VPCEndpointServicePermissions
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcendpointservicepermissions.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::VPCEndpointServicePermissions"

    Properties: VPCEndpointServicePermissionsProperties = attrib(
        factory=VPCEndpointServicePermissionsProperties,
        converter=create_object_converter(VPCEndpointServicePermissionsProperties),
    )


@attrs(**ATTRSCONFIG)
class VPCGatewayAttachmentProperties(ResourceProperties):
    InternetGatewayId = attrib(default=None)
    VpcId = attrib(default=None)
    VpnGatewayId = attrib(default=None)


@attrs(**ATTRSCONFIG)
class VPCGatewayAttachment(Resource):
    """A Vpc Gateway Attachment for EC2.

    See Also:
        `AWS Cloud Formation documentation for VPCGatewayAttachment
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpc-gateway-attachment.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::VPCGatewayAttachment"

    Properties: VPCGatewayAttachmentProperties = attrib(
        factory=VPCGatewayAttachmentProperties,
        converter=create_object_converter(VPCGatewayAttachmentProperties),
    )


@attrs(**ATTRSCONFIG)
class VPCPeeringConnectionProperties(ResourceProperties):
    PeerOwnerId = attrib(default=None)
    PeerRegion = attrib(default=None)
    PeerRoleArn = attrib(default=None)
    PeerVpcId = attrib(default=None)
    Tags = attrib(default=None)
    VpcId = attrib(default=None)


@attrs(**ATTRSCONFIG)
class VPCPeeringConnection(Resource):
    """A Vpc Peering Connection for EC2.

    See Also:
        `AWS Cloud Formation documentation for VPCPeeringConnection
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpcpeeringconnection.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::VPCPeeringConnection"

    Properties: VPCPeeringConnectionProperties = attrib(
        factory=VPCPeeringConnectionProperties,
        converter=create_object_converter(VPCPeeringConnectionProperties),
    )


@attrs(**ATTRSCONFIG)
class VPNConnectionProperties(ResourceProperties):
    CustomerGatewayId = attrib(default=None)
    StaticRoutesOnly = attrib(default=None)
    Tags = attrib(default=None)
    Type = attrib(default=None)
    VpnGatewayId = attrib(default=None)
    VpnTunnelOptionsSpecifications = attrib(default=None)


@attrs(**ATTRSCONFIG)
class VPNConnection(Resource):
    """A Vpn Connection for EC2.

    See Also:
        `AWS Cloud Formation documentation for VPNConnection
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpn-connection.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::VPNConnection"

    Properties: VPNConnectionProperties = attrib(
        factory=VPNConnectionProperties,
        converter=create_object_converter(VPNConnectionProperties),
    )


@attrs(**ATTRSCONFIG)
class VPNConnectionRouteProperties(ResourceProperties):
    DestinationCidrBlock = attrib(default=None)
    VpnConnectionId = attrib(default=None)


@attrs(**ATTRSCONFIG)
class VPNConnectionRoute(Resource):
    """A Vpn Connection Route for EC2.

    See Also:
        `AWS Cloud Formation documentation for VPNConnectionRoute
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpn-connection-route.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::VPNConnectionRoute"

    Properties: VPNConnectionRouteProperties = attrib(
        factory=VPNConnectionRouteProperties,
        converter=create_object_converter(VPNConnectionRouteProperties),
    )


@attrs(**ATTRSCONFIG)
class VPNGatewayProperties(ResourceProperties):
    AmazonSideAsn = attrib(default=None)
    Tags = attrib(default=None)
    Type = attrib(default=None)


@attrs(**ATTRSCONFIG)
class VPNGateway(Resource):
    """A Vpn Gateway for EC2.

    See Also:
        `AWS Cloud Formation documentation for VPNGateway
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpn-gateway.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::VPNGateway"

    Properties: VPNGatewayProperties = attrib(
        factory=VPNGatewayProperties,
        converter=create_object_converter(VPNGatewayProperties),
    )


@attrs(**ATTRSCONFIG)
class VPNGatewayRoutePropagationProperties(ResourceProperties):
    RouteTableIds = attrib(default=None)
    VpnGatewayId = attrib(default=None)


@attrs(**ATTRSCONFIG)
class VPNGatewayRoutePropagation(Resource):
    """A Vpn Gateway Route Propagation for EC2.

    See Also:
        `AWS Cloud Formation documentation for VPNGatewayRoutePropagation
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpn-gatewayrouteprop.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::VPNGatewayRoutePropagation"

    Properties: VPNGatewayRoutePropagationProperties = attrib(
        factory=VPNGatewayRoutePropagationProperties,
        converter=create_object_converter(VPNGatewayRoutePropagationProperties),
    )


@attrs(**ATTRSCONFIG)
class VolumeProperties(ResourceProperties):
    AutoEnableIO = attrib(default=None)
    AvailabilityZone = attrib(default=None)
    Encrypted = attrib(default=None)
    Iops = attrib(default=None)
    KmsKeyId = attrib(default=None)
    Size = attrib(default=None)
    SnapshotId = attrib(default=None)
    Tags = attrib(default=None)
    VolumeType = attrib(default=None)


@attrs(**ATTRSCONFIG)
class Volume(Resource):
    """A Volume for EC2.

    See Also:
        `AWS Cloud Formation documentation for Volume
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::Volume"

    Properties: VolumeProperties = attrib(
        factory=VolumeProperties,
        converter=create_object_converter(VolumeProperties),
    )


@attrs(**ATTRSCONFIG)
class VolumeAttachmentProperties(ResourceProperties):
    Device = attrib(default=None)
    InstanceId = attrib(default=None)
    VolumeId = attrib(default=None)


@attrs(**ATTRSCONFIG)
class VolumeAttachment(Resource):
    """A Volume Attachment for EC2.

    See Also:
        `AWS Cloud Formation documentation for VolumeAttachment
        <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volumeattachment.html>`_
    """

    RESOURCE_TYPE = "AWS::EC2::VolumeAttachment"

    Properties: VolumeAttachmentProperties = attrib(
        factory=VolumeAttachmentProperties,
        converter=create_object_converter(VolumeAttachmentProperties),
    )
