# This file is automatically generated by botocraft.  Do not edit directly.
# mypy: disable-error-code="index, override, assignment, union-attr, misc"
from botocraft.services.ec2 import AMI, AMIManager
from botocraft.services.common import Filter
from botocraft.mixins.tags import TagsDictMixin
from botocraft.mixins.autoscaling import AutoScalingGroupModelMixin
from collections import OrderedDict
from typing import ClassVar, Type, Optional, Literal, Dict, List, Union, Any, cast
from datetime import datetime
from botocraft.services.common import Tag
from pydantic import Field
from botocraft.services.ec2 import SecurityGroup, SecurityGroupManager
from .abstract import PrimaryBoto3ModelQuerySet
from botocraft.services.ec2 import LaunchTemplateVersion, LaunchTemplateVersionManager
from botocraft.services.ec2 import EC2InstanceType, EC2InstanceTypeManager
from .abstract import (
    Boto3Model,
    ReadonlyBoto3Model,
    PrimaryBoto3Model,
    ReadonlyPrimaryBoto3Model,
    Boto3ModelManager,
    ReadonlyBoto3ModelManager,
)
from functools import cached_property

# ===============
# Managers
# ===============


class AutoScalingGroupManager(Boto3ModelManager):
    service_name: str = "autoscaling"

    def create(
        self,
        model: "AutoScalingGroup",
        InstanceId: str | None = None,
        LifecycleHookSpecificationList: List["LifecycleHookSpecification"] | None = None,
        SkipZonalShiftValidation: bool | None = None,
    ) -> None:
        """
        **We strongly recommend using a launch template when calling this operation to
        ensure full functionality for Amazon EC2 Auto Scaling and Amazon EC2.**

        Args:
            model: The :py:class:`AutoScalingGroup` to create.

        Keyword Args:
            InstanceId: The ID of the instance used to base the launch configuration on. If specified, Amazon EC2 Auto Scaling
                uses the configuration values from the specified instance to create a new launch configuration. To get the instance
                ID, use the Amazon EC2 `DescribeInstances
                <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html>`_ API operation. For more
                information, see `Create an Auto Scaling group using parameters from an existing instance
                <https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-asg-from-instance.html>`_ in the *Amazon EC2 Auto
                Scaling User Guide*.
            LifecycleHookSpecificationList: One or more lifecycle hooks to add to the Auto Scaling group before instances are
                launched.
            SkipZonalShiftValidation: If you enable zonal shift with cross-zone disabled load balancers, capacity could become
                imbalanced across Availability Zones. To skip the validation, specify ``true``. For more information, see `Auto
                Scaling group zonal shift <https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-zonal-
                shift.html>`_ in the *Amazon EC2 Auto Scaling User Guide*.
        """
        data = model.model_dump(exclude_none=True, by_alias=True)
        args = dict(
            AutoScalingGroupName=data.get("AutoScalingGroupName"),
            MinSize=data.get("MinSize"),
            MaxSize=data.get("MaxSize"),
            LaunchConfigurationName=data.get("LaunchConfigurationName"),
            LaunchTemplate=data.get("LaunchTemplate"),
            MixedInstancesPolicy=data.get("MixedInstancesPolicy"),
            InstanceId=self.serialize(InstanceId),
            DesiredCapacity=data.get("DesiredCapacity"),
            DefaultCooldown=data.get("DefaultCooldown"),
            AvailabilityZones=data.get("AvailabilityZones"),
            LoadBalancerNames=data.get("LoadBalancerNames"),
            TargetGroupARNs=data.get("TargetGroupARNs"),
            HealthCheckType=data.get("HealthCheckType"),
            HealthCheckGracePeriod=data.get("HealthCheckGracePeriod"),
            PlacementGroup=data.get("PlacementGroup"),
            VPCZoneIdentifier=data.get("VPCZoneIdentifier"),
            TerminationPolicies=data.get("TerminationPolicies"),
            NewInstancesProtectedFromScaleIn=data.get(
                "NewInstancesProtectedFromScaleIn"
            ),
            CapacityRebalance=data.get("CapacityRebalance"),
            LifecycleHookSpecificationList=self.serialize(
                LifecycleHookSpecificationList
            ),
            Tags=data.get("Tags"),
            ServiceLinkedRoleARN=data.get("ServiceLinkedRoleARN"),
            MaxInstanceLifetime=data.get("MaxInstanceLifetime"),
            Context=data.get("Context"),
            DesiredCapacityType=data.get("DesiredCapacityType"),
            DefaultInstanceWarmup=data.get("DefaultInstanceWarmup"),
            TrafficSources=data.get("TrafficSources"),
            InstanceMaintenancePolicy=data.get("InstanceMaintenancePolicy"),
            AvailabilityZoneDistribution=data.get("AvailabilityZoneDistribution"),
            AvailabilityZoneImpairmentPolicy=data.get(
                "AvailabilityZoneImpairmentPolicy"
            ),
            SkipZonalShiftValidation=self.serialize(SkipZonalShiftValidation),
            CapacityReservationSpecification=data.get(
                "CapacityReservationSpecification"
            ),
        )
        self.client.create_auto_scaling_group(
            **{k: v for k, v in args.items() if v is not None}
        )

    def update(
        self, model: "AutoScalingGroup", SkipZonalShiftValidation: bool | None = None
    ) -> None:
        """
        **We strongly recommend that all Auto Scaling groups use launch templates to
        ensure full functionality for Amazon EC2 Auto Scaling and Amazon EC2.**

        Args:
            model: The :py:class:`AutoScalingGroup` to update.

        Keyword Args:
            SkipZonalShiftValidation: If you enable zonal shift with cross-zone disabled load balancers, capacity could become
                imbalanced across Availability Zones. To skip the validation, specify ``true``. For more information, see `Auto
                Scaling group zonal shift <https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-zonal-
                shift.html>`_ in the *Amazon EC2 Auto Scaling User Guide*.
        """
        data = model.model_dump(exclude_none=True, by_alias=True)
        args = dict(
            AutoScalingGroupName=data.get("AutoScalingGroupName"),
            LaunchConfigurationName=data.get("LaunchConfigurationName"),
            LaunchTemplate={
                "LaunchTemplateId": data["LaunchTemplate"]["LaunchTemplateId"],
                "Version": data["LaunchTemplate"]["Version"],
            }
            if "LaunchTemplate" in data
            else None,
            MixedInstancesPolicy=data.get("MixedInstancesPolicy"),
            MinSize=data.get("MinSize"),
            MaxSize=data.get("MaxSize"),
            DesiredCapacity=data.get("DesiredCapacity"),
            DefaultCooldown=data.get("DefaultCooldown"),
            AvailabilityZones=data.get("AvailabilityZones"),
            HealthCheckType=data.get("HealthCheckType"),
            HealthCheckGracePeriod=data.get("HealthCheckGracePeriod"),
            PlacementGroup=data.get("PlacementGroup"),
            VPCZoneIdentifier=data.get("VPCZoneIdentifier"),
            TerminationPolicies=data.get("TerminationPolicies"),
            NewInstancesProtectedFromScaleIn=data.get(
                "NewInstancesProtectedFromScaleIn"
            ),
            ServiceLinkedRoleARN=data.get("ServiceLinkedRoleARN"),
            MaxInstanceLifetime=data.get("MaxInstanceLifetime"),
            CapacityRebalance=data.get("CapacityRebalance"),
            Context=data.get("Context"),
            DesiredCapacityType=data.get("DesiredCapacityType"),
            DefaultInstanceWarmup=data.get("DefaultInstanceWarmup"),
            InstanceMaintenancePolicy=data.get("InstanceMaintenancePolicy"),
            AvailabilityZoneDistribution=data.get("AvailabilityZoneDistribution"),
            AvailabilityZoneImpairmentPolicy=data.get(
                "AvailabilityZoneImpairmentPolicy"
            ),
            SkipZonalShiftValidation=self.serialize(SkipZonalShiftValidation),
            CapacityReservationSpecification=data.get(
                "CapacityReservationSpecification"
            ),
        )
        self.client.update_auto_scaling_group(
            **{k: v for k, v in args.items() if v is not None}
        )

    def delete(
        self, AutoScalingGroupName: str, *, ForceDelete: bool | None = None
    ) -> None:
        """
        Deletes the specified Auto Scaling group.

        Args:
            AutoScalingGroupName: The name of the Auto Scaling group.

        Keyword Args:
            ForceDelete: Specifies that the group is to be deleted along with all instances associated with the group, without
                waiting for all instances to be terminated. This action also deletes any outstanding lifecycle actions associated
                with the group.
        """
        args: Dict[str, Any] = dict(
            AutoScalingGroupName=self.serialize(AutoScalingGroupName),
            ForceDelete=self.serialize(ForceDelete),
        )
        self.client.delete_auto_scaling_group(
            **{k: v for k, v in args.items() if v is not None}
        )

    def get(
        self, AutoScalingGroupName: str, *, IncludeInstances: bool | None = None
    ) -> Optional["AutoScalingGroup"]:
        """
        Gets information about the Auto Scaling groups in the account and Region.

        Args:
            AutoScalingGroupName: The name of the Auto Scaling group. The name can be a maximum of 1600 characters.

        Keyword Args:
            IncludeInstances: Specifies whether to include information about Amazon EC2 instances in the response. When set to
                ``true`` (default), the response includes instance details.
        """
        args: Dict[str, Any] = dict(
            AutoScalingGroupNames=self.serialize([AutoScalingGroupName]),
            IncludeInstances=self.serialize(IncludeInstances),
        )
        _response = self.client.describe_auto_scaling_groups(
            **{k: v for k, v in args.items() if v is not None}
        )
        response = AutoScalingGroupsType(**_response)

        if response and response.AutoScalingGroups:
            self.sessionize(response.AutoScalingGroups[0])
            return response.AutoScalingGroups[0]
        return None

    def list(
        self,
        *,
        AutoScalingGroupNames: List[str] | None = None,
        IncludeInstances: bool | None = None,
        Filters: List[Filter] | None = None,
    ) -> PrimaryBoto3ModelQuerySet:
        """
        Gets information about the Auto Scaling groups in the account and Region.

        Keyword Args:
            AutoScalingGroupNames: The names of the Auto Scaling groups. By default, you can only specify up to 50 names. You
                can optionally increase this limit using the ``MaxRecords`` property.
            IncludeInstances: Specifies whether to include information about Amazon EC2 instances in the response. When set to
                ``true`` (default), the response includes instance details.
            Filters: One or more filters to limit the results based on specific tags.
        """
        paginator = self.client.get_paginator("describe_auto_scaling_groups")
        args: Dict[str, Any] = dict(
            AutoScalingGroupNames=self.serialize(AutoScalingGroupNames),
            IncludeInstances=self.serialize(IncludeInstances),
            Filters=self.serialize(Filters),
        )
        response_iterator = paginator.paginate(
            **{k: v for k, v in args.items() if v is not None}
        )
        results = []
        for _response in response_iterator:
            if list(_response.keys()) == ["ResponseMetadata"]:
                break
            if "ResponseMetadata" in _response:
                del _response["ResponseMetadata"]
            response = AutoScalingGroupsType(**_response)
            if response.AutoScalingGroups:
                results.extend(response.AutoScalingGroups)
            else:
                if getattr(response, "NextToken", None):
                    continue
                break
        self.sessionize(results)
        if results and isinstance(results[0], Boto3Model):
            return PrimaryBoto3ModelQuerySet(results)
        return results

    def scale(self, AutoScalingGroupName: str, DesiredCapacity: int) -> None:
        """
        Sets the size of the specified Auto Scaling group.

        Args:
            AutoScalingGroupName: The name of the Auto Scaling group.
            DesiredCapacity: The desired capacity is the initial capacity of the Auto Scaling group after this operation
                completes and the capacity it attempts to maintain.
        """
        args: Dict[str, Any] = dict(
            AutoScalingGroupName=self.serialize(AutoScalingGroupName),
            DesiredCapacity=self.serialize(DesiredCapacity),
            HonorCooldown=False,
        )
        self.client.set_desired_capacity(
            **{k: v for k, v in args.items() if v is not None}
        )

    def instance_status(
        self, *, InstanceIds: List[str] | None = None
    ) -> List["AutoScalingInstanceDetails"]:
        """
        Gets information about the Auto Scaling instances in the account and Region.

        Keyword Args:
            InstanceIds: The IDs of the instances. If you omit this property, all Auto Scaling instances are described. If you
                specify an ID that does not exist, it is ignored with no error.
        """
        paginator = self.client.get_paginator("describe_auto_scaling_instances")
        args: Dict[str, Any] = dict(InstanceIds=self.serialize(InstanceIds))
        response_iterator = paginator.paginate(
            **{k: v for k, v in args.items() if v is not None}
        )

        results: List["AutoScalingInstanceDetails"] = []

        for _response in response_iterator:
            response = AutoScalingInstancesType(**_response)
            if response.AutoScalingInstances is not None:
                results.extend(response.AutoScalingInstances)
            else:
                break

        self.sessionize(results)
        return cast("List[AutoScalingInstanceDetails]", results)

    def terminate_instance(
        self, InstanceId: str, ShouldDecrementDesiredCapacity: bool
    ) -> "ActivityType":
        """
        Terminates the specified instance and optionally adjusts the desired group size.
        This operation cannot be called on instances in a warm pool.

        Args:
            InstanceId: The ID of the instance.
            ShouldDecrementDesiredCapacity: Indicates whether terminating the instance also decrements the size of the Auto
                Scaling group.
        """
        args: Dict[str, Any] = dict(
            InstanceId=self.serialize(InstanceId),
            ShouldDecrementDesiredCapacity=self.serialize(
                ShouldDecrementDesiredCapacity
            ),
        )
        _response = self.client.terminate_instance_in_auto_scaling_group(
            **{k: v for k, v in args.items() if v is not None}
        )
        response = ActivityType(**_response)

        results: "ActivityType" = None
        if response is not None:
            results = response

        self.sessionize(results)
        return cast("ActivityType", results)


class LaunchConfigurationManager(Boto3ModelManager):
    service_name: str = "autoscaling"

    def create(
        self, model: "LaunchConfiguration", InstanceId: str | None = None
    ) -> None:
        """
        Creates a launch configuration.

        Args:
            model: The :py:class:`LaunchConfiguration` to create.

        Keyword Args:
            InstanceId: The ID of the instance to use to create the launch configuration. The new launch configuration derives
                attributes from the instance, except for the block device mapping.
        """
        data = model.model_dump(exclude_none=True, by_alias=True)
        args = dict(
            LaunchConfigurationName=data.get("LaunchConfigurationName"),
            ImageId=data.get("ImageId"),
            KeyName=data.get("KeyName"),
            SecurityGroups=data.get("SecurityGroups"),
            ClassicLinkVPCId=data.get("ClassicLinkVPCId"),
            ClassicLinkVPCSecurityGroups=data.get("ClassicLinkVPCSecurityGroups"),
            UserData=data.get("UserData"),
            InstanceId=self.serialize(InstanceId),
            InstanceType=data.get("InstanceType"),
            KernelId=data.get("KernelId"),
            RamdiskId=data.get("RamdiskId"),
            BlockDeviceMappings=data.get("BlockDeviceMappings"),
            InstanceMonitoring=data.get("InstanceMonitoring"),
            SpotPrice=data.get("SpotPrice"),
            IamInstanceProfile=data.get("IamInstanceProfile"),
            EbsOptimized=data.get("EbsOptimized"),
            AssociatePublicIpAddress=data.get("AssociatePublicIpAddress"),
            PlacementTenancy=data.get("PlacementTenancy"),
            MetadataOptions=data.get("MetadataOptions"),
        )
        self.client.create_launch_configuration(
            **{k: v for k, v in args.items() if v is not None}
        )

    def delete(self, LaunchConfigurationName: str) -> None:
        """
        Deletes the specified launch configuration.

        Args:
            LaunchConfigurationName: The name of the launch configuration.
        """
        args: Dict[str, Any] = dict(
            LaunchConfigurationName=self.serialize(LaunchConfigurationName)
        )
        self.client.delete_launch_configuration(
            **{k: v for k, v in args.items() if v is not None}
        )

    def get(self, LaunchConfigurationName: str) -> Optional["LaunchConfiguration"]:
        """
        Gets information about the launch configurations in the account and Region.

        Args:
            LaunchConfigurationName: The name of the launch configuration. This name must be unique per Region per account.
        """
        args: Dict[str, Any] = dict(
            LaunchConfigurationNames=self.serialize([LaunchConfigurationName])
        )
        _response = self.client.describe_launch_configurations(
            **{k: v for k, v in args.items() if v is not None}
        )
        response = LaunchConfigurationsType(**_response)

        if response and response.LaunchConfigurations:
            self.sessionize(response.LaunchConfigurations[0])
            return response.LaunchConfigurations[0]
        return None

    def list(
        self, *, LaunchConfigurationNames: List[str] | None = None
    ) -> PrimaryBoto3ModelQuerySet:
        """
        Gets information about the launch configurations in the account and Region.

        Keyword Args:
            LaunchConfigurationNames: The launch configuration names. If you omit this property, all launch configurations are
                described.
        """
        paginator = self.client.get_paginator("describe_launch_configurations")
        args: Dict[str, Any] = dict(
            LaunchConfigurationNames=self.serialize(LaunchConfigurationNames)
        )
        response_iterator = paginator.paginate(
            **{k: v for k, v in args.items() if v is not None}
        )
        results = []
        for _response in response_iterator:
            if list(_response.keys()) == ["ResponseMetadata"]:
                break
            if "ResponseMetadata" in _response:
                del _response["ResponseMetadata"]
            response = LaunchConfigurationsType(**_response)
            if response.LaunchConfigurations:
                results.extend(response.LaunchConfigurations)
            else:
                if getattr(response, "NextToken", None):
                    continue
                break
        self.sessionize(results)
        if results and isinstance(results[0], Boto3Model):
            return PrimaryBoto3ModelQuerySet(results)
        return results


# ==============
# Service Models
# ==============


class AutoScalingLaunchTemplateSpecification(Boto3Model):
    """
    Describes the launch template and the version of the launch template that Amazon EC2
    Auto Scaling uses to launch Amazon EC2 instances.

    For more information about launch templates, see
    `Launch templates <https://docs.aws.amazon.com/autoscaling/ec2/userguide/launch-templates.html>`_
    in the *Amazon EC2 Auto Scaling
    User Guide*.
    """

    LaunchTemplateId: str | None = None
    """
    The ID of the launch template.

    To get the template ID, use the Amazon EC2
    `DescribeLaunchTemplates <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeLaunchTemplates.html>`_
    API    operation. New launch templates can be created using the Amazon EC2
    `CreateLaunchTemplate <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateLaunchTemplate.html>`_
    API.
    """
    LaunchTemplateName: str | None = None
    """
    The name of the launch template.

    To get the template name, use the Amazon EC2
    `DescribeLaunchTemplates <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeLaunchTemplates.html>`_
    API    operation. New launch templates can be created using the Amazon EC2
    `CreateLaunchTemplate <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateLaunchTemplate.html>`_
    API.
    """
    Version: str | None = None
    """
    The version number, ``$Latest``, or ``$Default``.

    To get the version number, use the Amazon EC2 `DescribeLaunchTemplateV
    ersions <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeLaunchTemplateVersions.html>`_ API operation.
    New launch template versions can be created using the Amazon EC2 `CreateLaunchTemplateVersion <https://docs.aws.amazon.c
    om/AWSEC2/latest/APIReference/API_CreateLaunchTemplateVersion.html>`_ API. If the value is ``$Latest``, Amazon EC2 Auto
    Scaling selects the latest version of the launch template when launching instances. If the value is ``$Default``, Amazon
    EC2 Auto Scaling selects the default version of the launch template when launching instances. The default value is
    ``$Default``.
    """


class VCpuCountRequest(Boto3Model):
    """Specifies the minimum and maximum for the ``VCpuCount`` object when you specify
    `InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an
    Auto Scaling group.
    """

    Min: int
    """
    The minimum number of vCPUs.
    """
    Max: int | None = None
    """
    The maximum number of vCPUs.
    """


class AutoScalingMemoryMiBRequest(Boto3Model):
    """Specifies the minimum and maximum for the ``MemoryMiB`` object when you specify
    `InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an
    Auto Scaling group.
    """

    Min: int
    """
    The memory minimum in MiB.
    """
    Max: int | None = None
    """
    The memory maximum in MiB.
    """


class MemoryGiBPerVCpuRequest(Boto3Model):
    """Specifies the minimum and maximum for the ``MemoryGiBPerVCpu`` object when you specify
    `InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an
    Auto Scaling group.
    """

    Min: float | None = None
    """
    The memory minimum in GiB.
    """
    Max: float | None = None
    """
    The memory maximum in GiB.
    """


class AutoScalingNetworkInterfaceCountRequest(Boto3Model):
    """Specifies the minimum and maximum for the ``NetworkInterfaceCount`` object when you specify
    `InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an
    Auto Scaling group.
    """

    Min: int | None = None
    """
    The minimum number of network interfaces.
    """
    Max: int | None = None
    """
    The maximum number of network interfaces.
    """


class AutoScalingTotalLocalStorageGBRequest(Boto3Model):
    """Specifies the minimum and maximum for the ``TotalLocalStorageGB`` object when you specify
    `InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an
    Auto Scaling group.
    """

    Min: float | None = None
    """
    The storage minimum in GB.
    """
    Max: float | None = None
    """
    The storage maximum in GB.
    """


class AutoScalingBaselineEbsBandwidthMbsRequest(Boto3Model):
    """Specifies the minimum and maximum for the ``BaselineEbsBandwidthMbps`` object when you specify
    `InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an
    Auto Scaling group.
    """

    Min: int | None = None
    """
    The minimum value in Mbps.
    """
    Max: int | None = None
    """
    The maximum value in Mbps.
    """


class AutoScalingAcceleratorCountRequest(Boto3Model):
    """Specifies the minimum and maximum for the ``AcceleratorCount`` object when you specify
    `InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an
    Auto Scaling group.
    """

    Min: int | None = None
    """
    The minimum value.
    """
    Max: int | None = None
    """
    The maximum value.
    """


class AutoScalingAcceleratorTotalMemoryMiBRequest(Boto3Model):
    """Specifies the minimum and maximum for the ``AcceleratorTotalMemoryMiB`` object when you specify
    `InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an
    Auto Scaling group.
    """

    Min: int | None = None
    """
    The memory minimum in MiB.
    """
    Max: int | None = None
    """
    The memory maximum in MiB.
    """


class NetworkBandwidthGbpsRequest(Boto3Model):
    """Specifies the minimum and maximum for the ``NetworkBandwidthGbps`` object when you specify
    `InstanceRequirements <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_InstanceRequirements.html>`_ for an
    Auto Scaling group.

    Setting the minimum bandwidth does not guarantee that your instance will achieve the minimum bandwidth. Amazon EC2 will
    identify instance types that support the specified minimum bandwidth, but the actual bandwidth of your instance might go
    below the specified minimum at times. For more information, see `Available instance
    bandwidth <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-network-bandwidth.html#available-instance-
    bandwidth>`_ in the *Amazon EC2 User Guide*.
    """

    Min: float | None = None
    """
    The minimum amount of network bandwidth, in gigabits per second (Gbps).
    """
    Max: float | None = None
    """
    The maximum amount of network bandwidth, in gigabits per second (Gbps).
    """


class AutoScalingPerformanceFactorReferenceRequest(Boto3Model):
    """
    Specify an instance family to use as the baseline reference for CPU performance. All
    instance types that All instance types that match your specified attributes will be
    compared against the CPU performance of the referenced instance family, regardless
    of CPU manufacturer or architecture differences.

    Currently only one instance family can be specified in the list.
    """

    InstanceFamily: str | None = None
    """
    The instance family to use as a baseline reference.
    """


class AutoScalingCpuPerformanceFactorRequest(Boto3Model):
    """
    The CPU performance to consider, using an instance family as the baseline reference.
    """

    References: List["AutoScalingPerformanceFactorReferenceRequest"] | None = None
    """
    Specify an instance family to use as the baseline reference for CPU performance.

    All instance types that match your specified attributes will be compared against the
    CPU performance of the referenced instance family, regardless of CPU manufacturer or
    architecture differences.
    """


class AutoScalingBaselinePerformanceFactorsRequest(Boto3Model):
    """
    The baseline performance to consider, using an instance family as a baseline
    reference. The instance family establishes the lowest acceptable level of
    performance. Auto Scaling uses this baseline to guide instance type selection, but
    there is no guarantee that the selected instance types will always exceed the
    baseline for every application.

    Currently, this parameter only supports CPU performance as a baseline performance factor. For example, specifying
    ``c6i`` uses the CPU performance of the ``c6i`` family as the baseline reference.
    """

    Cpu: AutoScalingCpuPerformanceFactorRequest | None = None
    """
    The CPU performance to consider, using an instance family as the baseline reference.
    """


class AutoScalingInstanceRequirements(Boto3Model):
    """
    The attributes for the instance types for a mixed instances policy. Amazon EC2 Auto
    Scaling uses your specified requirements to identify instance types. Then, it uses
    your On-Demand and Spot allocation strategies to launch instances from these
    instance types.

    When you specify multiple attributes, you get instance types that satisfy all of the specified attributes. If you
    specify multiple values for an attribute, you get instance types that satisfy any of the specified values.

    To limit the list of instance types from which Amazon EC2 Auto Scaling can identify matching instance types, you can use
    one of the following parameters, but not both in the same request:

    * ``AllowedInstanceTypes`` - The instance types to include in the list. All other instance types are ignored, even if
      they match your specified attributes.
    * ``ExcludedInstanceTypes`` - The instance types to exclude from the list, even if they match your specified attributes.

    You must specify ``VCpuCount`` and ``MemoryMiB``. All other attributes are optional. Any unspecified optional attribute
    is set to its default.

    For more information, see `Create a mixed instances group using attribute-based instance type
    selection <https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-mixed-instances-group-attribute-based-instance-
    type-selection.html>`_ in the *Amazon EC2 Auto Scaling User Guide*. For help determining which instance types match your
    attributes before you apply them to your Auto Scaling group, see `Preview instance types with specified
    attributes <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-attribute-based-instance-type-
    selection.html#ec2fleet-get-instance-types-from-instance-requirements>`_ in the *Amazon EC2 User Guide*.
    """

    VCpuCount: VCpuCountRequest
    """
    The minimum and maximum number of vCPUs for an instance type.
    """
    MemoryMiB: AutoScalingMemoryMiBRequest
    """
    The minimum and maximum instance memory size for an instance type, in MiB.
    """
    CpuManufacturers: List[Literal["intel", "amd", "amazon-web-services", "apple"]] | None = None
    """
    Lists which specific CPU manufacturers to include.
    """
    MemoryGiBPerVCpu: MemoryGiBPerVCpuRequest | None = None
    """
    The minimum and maximum amount of memory per vCPU for an instance type, in GiB.
    """
    ExcludedInstanceTypes: List[str] | None = None
    """
    The instance types to exclude.

    You can use strings with one or more wild cards, represented by an asterisk (``*``), to
    exclude an instance family, type, size, or generation. The following are examples: ``m5.8xlarge``, ``c5*.*``, ``m5a.*``,
    ``r*``, ``*3*``.
    """
    InstanceGenerations: List[Literal["current", "previous"]] | None = None
    """
    Indicates whether current or previous generation instance types are included.
    """
    SpotMaxPricePercentageOverLowestPrice: int | None = None
    """
    [Price protection] The price protection threshold for Spot Instances, as a
    percentage higher than an identified Spot price.

    The identified Spot price is the price of the lowest priced current generation C, M,
    or R instance type with your specified attributes. If no current generation C, M, or
    R instance type matches your attributes, then the identified price is from either
    the lowest priced current generation instance types or, failing that, the lowest
    priced previous generation instance types that match your attributes. When Amazon
    EC2 Auto Scaling selects instance types with your attributes, we will exclude
    instance types whose price exceeds your specified threshold.
    """
    MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: int | None = None
    """
    [Price protection] The price protection threshold for Spot Instances, as a
    percentage of an identified On-Demand price.

    The identified On-Demand price is the price of the lowest priced current generation
    C, M, or R instance type with your specified attributes. If no current generation C,
    M, or R instance type matches your attributes, then the identified price is from
    either the lowest priced current generation instance types or, failing that, the
    lowest priced previous generation instance types that match your attributes. When
    Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude
    instance types whose price exceeds your specified threshold.
    """
    OnDemandMaxPricePercentageOverLowestPrice: int | None = None
    """
    [Price protection] The price protection threshold for On-Demand Instances, as a
    percentage higher than an identified On- Demand price.

    The identified On-Demand price is the price of the lowest priced current generation
    C, M, or R instance type with your specified attributes. If no current generation C,
    M, or R instance type matches your attributes, then the identified price is from
    either the lowest priced current generation instance types or, failing that, the
    lowest priced previous generation instance types that match your attributes. When
    Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude
    instance types whose price exceeds your specified threshold.
    """
    BareMetal: Literal["included", "excluded", "required"] | None = None
    """
    Indicates whether bare metal instance types are included, excluded, or required.
    """
    BurstablePerformance: Literal["included", "excluded", "required"] | None = None
    """
    Indicates whether burstable performance instance types are included, excluded, or
    required.

    For more information, see
    `Burstable performance instances <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-
    instances.html>`_ in the *Amazon EC2 User Guide*.
    """
    RequireHibernateSupport: bool | None = None
    """
    Indicates whether instance types must provide On-Demand Instance hibernation
    support.
    """
    NetworkInterfaceCount: AutoScalingNetworkInterfaceCountRequest | None = None
    """
    The minimum and maximum number of network interfaces for an instance type.
    """
    LocalStorage: Literal["included", "excluded", "required"] | None = None
    """
    Indicates whether instance types with instance store volumes are included, excluded,
    or required.

    For more information, see
    `Amazon EC2 instance store <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html>`_
    in the *Amazon
    EC2 User Guide*.
    """
    LocalStorageTypes: List[Literal["hdd", "ssd"]] | None = None
    """
    Indicates the type of local storage that is required.
    """
    TotalLocalStorageGB: AutoScalingTotalLocalStorageGBRequest | None = None
    """
    The minimum and maximum total local storage size for an instance type, in GB.
    """
    BaselineEbsBandwidthMbps: AutoScalingBaselineEbsBandwidthMbsRequest | None = None
    """
    The minimum and maximum baseline bandwidth performance for an instance type, in
    Mbps.

    For more information, see `Amazon
    EBS-optimized instances <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html>`_ in the *Amazon EC2 User
    Guide*.
    """
    AcceleratorTypes: List[Literal["gpu", "fpga", "inference"]] | None = None
    """
    Lists the accelerator types that must be on an instance type.
    """
    AcceleratorCount: AutoScalingAcceleratorCountRequest | None = None
    """
    The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services
    Inferentia chips) for an instance type.
    """
    AcceleratorManufacturers: List[Literal["nvidia", "amd", "amazon-web-services", "xilinx"]] | None = None
    """
    Indicates whether instance types must have accelerators by specific manufacturers.
    """
    AcceleratorNames: List[Literal["a100", "v100", "k80", "t4", "m60", "radeon-pro-v520", "vu9p"]] | None = None
    """
    Lists the accelerators that must be on an instance type.
    """
    AcceleratorTotalMemoryMiB: AutoScalingAcceleratorTotalMemoryMiBRequest | None = (
        None
    )
    """
    The minimum and maximum total memory size for the accelerators on an instance type,
    in MiB.
    """
    NetworkBandwidthGbps: NetworkBandwidthGbpsRequest | None = None
    """
    The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps).
    """
    AllowedInstanceTypes: List[str] | None = None
    """
    The instance types to apply your specified attributes against.

    All other instance types are ignored, even if they match your specified attributes.
    """
    BaselinePerformanceFactors: AutoScalingBaselinePerformanceFactorsRequest | None = None
    """
    The baseline performance factors for the instance requirements.
    """


class LaunchTemplateOverrides(Boto3Model):
    """Use this structure to let Amazon EC2 Auto Scaling do the following when the Auto Scaling group has a mixed instances
    policy:

    * Override the instance type that is specified in the launch template.
    * Use multiple instance types.

    Specify the instance types that you want, or define your instance requirements instead and let Amazon EC2 Auto Scaling
    provision the available instance types that meet your requirements. This can provide Amazon EC2 Auto Scaling with a
    larger selection of instance types to choose from when fulfilling Spot and On-Demand capacities. You can view which
    instance types are matched before you apply the instance requirements to your Auto Scaling group.

    After you define your instance requirements, you don't have to keep updating these settings to get new EC2 instance
    types automatically. Amazon EC2 Auto Scaling uses the instance requirements of the Auto Scaling group to determine
    whether a new EC2 instance type can be used.
    """

    InstanceType: str | None = None
    """
    The instance type, such as ``m3.xlarge``.

    You must specify an instance type that is supported in your requested Region and
    Availability Zones. For more information, see
    `Instance types <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html>`_
    in the *Amazon EC2 User Guide*.
    """
    WeightedCapacity: str | None = None
    """
    If you provide a list of instance types to use, you can specify the number of
    capacity units provided by each instance type in terms of virtual CPUs, memory,
    storage, throughput, or other relative performance characteristic.

    When a Spot or
    On-Demand Instance is launched, the capacity units count toward the desired capacity. Amazon EC2 Auto Scaling launches
    instances until the desired capacity is totally fulfilled, even if this results in an overage. For example, if there are
    two units remaining to fulfill capacity, and Amazon EC2 Auto Scaling can only launch an instance with a
    ``WeightedCapacity`` of five units, the instance is launched, and the desired capacity is exceeded by three units. For
    more information, see `Configure an Auto Scaling group to use instance
    weights <https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-mixed-instances-groups-instance-
    weighting.html>`_ in the *Amazon EC2 Auto Scaling User Guide*. Value must be in the range of 1-999.
    """
    LaunchTemplateSpecification: AutoScalingLaunchTemplateSpecification | None = None
    """
    Provides a launch template for the specified instance type or set of instance
    requirements.

    For example, some instance
    types might require a launch template with a different AMI. If not provided, Amazon EC2 Auto Scaling uses the launch
    template that's specified in the ``LaunchTemplate`` definition. For more information, see `Specifying a different launch
    template for an instance type <https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-mixed-instances-
    groups-launch-template-overrides.html>`_ in the *Amazon EC2 Auto Scaling User Guide*.
    """
    InstanceRequirements: AutoScalingInstanceRequirements | None = None
    """
    The instance requirements.

    Amazon EC2 Auto Scaling uses your specified requirements to identify instance types.
    Then, it uses your On-Demand and Spot allocation strategies to launch instances from
    these instance types.
    """


class AutoScalingLaunchTemplate(Boto3Model):
    """
    Use this structure to specify the launch templates and instance types (overrides)
    for a mixed instances policy.
    """

    LaunchTemplateSpecification: AutoScalingLaunchTemplateSpecification | None = None
    """
    The launch template.
    """
    Overrides: List["LaunchTemplateOverrides"] | None = None
    """
    Any properties that you specify override the same properties in the launch template.
    """


class AutoScalingInstancesDistribution(Boto3Model):
    """
    Use this structure to specify the distribution of On-Demand Instances and Spot
    Instances and the allocation strategies used to fulfill On-Demand and Spot
    capacities for a mixed instances policy.
    """

    OnDemandAllocationStrategy: str | None = None
    """
    The allocation strategy to apply to your On-Demand Instances when they are launched.

    Possible instance types are determined by the launch template overrides that you
    specify.
    """
    OnDemandBaseCapacity: int | None = None
    """
    The minimum amount of the Auto Scaling group's capacity that must be fulfilled by
    On-Demand Instances.

    This base portion is launched first as your group scales.
    """
    OnDemandPercentageAboveBaseCapacity: int | None = None
    """
    Controls the percentages of On-Demand Instances and Spot Instances for your
    additional capacity beyond ``OnDemandBaseCapacity``.

    Expressed as a number (for example, 20 specifies 20% On-Demand Instances, 80% Spot
    Instances). If set to 100, only On-Demand Instances are used.
    """
    SpotAllocationStrategy: str | None = None
    """
    The allocation strategy to apply to your Spot Instances when they are launched.

    Possible instance types are determined by the launch template overrides that you
    specify.
    """
    SpotInstancePools: int | None = None
    """
    The number of Spot Instance pools across which to allocate your Spot Instances.

    The Spot pools are determined from the
    different instance types in the overrides. Valid only when the ``SpotAllocationStrategy`` is ``lowest-price``. Value
    must be in the range of 1-20.
    """
    SpotMaxPrice: str | None = None
    """
    The maximum price per unit hour that you are willing to pay for a Spot Instance.

    If your maximum price is lower than the Spot price for the instance types that you
    selected, your Spot Instances are not launched. We do not recommend specifying a
    maximum price because it can lead to increased interruptions. When Spot Instances
    launch, you pay the current Spot price. To remove a maximum price that you
    previously set, include the property but specify an empty string ("") for the value.
    """


class AutoScalingMixedInstancesPolicy(Boto3Model):
    """
    Use this structure to launch multiple instance types and On-Demand Instances and
    Spot Instances within a single Auto Scaling group.

    A mixed instances policy contains information that Amazon EC2 Auto Scaling can use
    to launch instances and help optimize your costs. For more information, see
    `Auto Scaling groups with multiple instance types and purchase options <https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-mixed-instances-groups.html>`_
    in the
    *Amazon EC2 Auto Scaling User Guide*.
    """

    LaunchTemplate: AutoScalingLaunchTemplate | None = None
    """
    One or more launch templates and the instance types (overrides) that are used to
    launch EC2 instances to fulfill On- Demand and Spot capacities.
    """
    InstancesDistribution: AutoScalingInstancesDistribution | None = None
    """
    The instances distribution.
    """


class AutoScalingInstanceReference(Boto3Model):
    """
    Describes an EC2 instance.
    """

    InstanceId: str
    """
    The ID of the instance.
    """
    InstanceType: str | None = None
    """
    The instance type of the EC2 instance.
    """
    AvailabilityZone: str
    """
    The Availability Zone in which the instance is running.
    """
    LifecycleState: Literal[
        "Pending",
        "Pending:Wait",
        "Pending:Proceed",
        "Quarantined",
        "InService",
        "Terminating",
        "Terminating:Wait",
        "Terminating:Proceed",
        "Terminated",
        "Detaching",
        "Detached",
        "EnteringStandby",
        "Standby",
        "Warmed:Pending",
        "Warmed:Pending:Wait",
        "Warmed:Pending:Proceed",
        "Warmed:Terminating",
        "Warmed:Terminating:Wait",
        "Warmed:Terminating:Proceed",
        "Warmed:Terminated",
        "Warmed:Stopped",
        "Warmed:Running",
        "Warmed:Hibernated",
    ]
    """
    A description of the current lifecycle state.

    The ``Quarantined`` state is not used. For more information, see `Amazon
    EC2 Auto Scaling instance lifecycle <https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-
    lifecycle.html>`_ in the *Amazon EC2 Auto Scaling User Guide*.
    """
    HealthStatus: str
    """
    The last reported health status of the instance.

    ``Healthy`` means that the instance is healthy and should remain in
    service. ``Unhealthy`` means that the instance is unhealthy and that Amazon EC2 Auto Scaling should terminate and
    replace it.
    """
    LaunchConfigurationName: str | None = None
    """
    The launch configuration associated with the instance.
    """
    LaunchTemplate: AutoScalingLaunchTemplateSpecification | None = None
    """
    The launch template for the instance.
    """
    ProtectedFromScaleIn: bool
    """
    Indicates whether the instance is protected from termination by Amazon EC2 Auto
    Scaling when scaling in.
    """
    WeightedCapacity: str | None = None
    """
    The number of capacity units contributed by the instance based on its instance type.
    """


class SuspendedProcess(Boto3Model):
    """
    Describes an auto scaling process that has been suspended.

    For more information, see
    `Types of processes <https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-suspend-resume-
    processes.html#process-types>`_ in the *Amazon EC2 Auto Scaling User Guide*.
    """

    ProcessName: str | None = None
    """
    The name of the suspended process.
    """
    SuspensionReason: str | None = None
    """
    The reason that the process was suspended.
    """


class EnabledMetric(Boto3Model):
    """
    Describes an enabled Auto Scaling group metric.
    """

    Metric: str | None = None
    """
One of the following metrics:
    """
    Granularity: str | None = None
    """
    The granularity of the metric.

    The only valid value is ``1Minute``.
    """


class AutoScalingTagDescription(Boto3Model):
    """
    Describes a tag for an Auto Scaling group.
    """

    ResourceId: str | None = None
    """
    The name of the group.
    """
    ResourceType: str | None = None
    """
    The type of resource.

    The only supported value is ``auto-scaling-group``.
    """
    Key: str | None = None
    """
    The tag key.
    """
    Value: str | None = None
    """
    The tag value.
    """
    PropagateAtLaunch: bool | None = None
    """
    Determines whether the tag is added to new instances as they are launched in the
    group.
    """


class AutoScalingInstanceReusePolicy(Boto3Model):
    """
    Describes an instance reuse policy for a warm pool.

    For more information, see
    `Warm pools for Amazon EC2 Auto Scaling <https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-warm-pools.html>`_
    in the *Amazon EC2 Auto
    Scaling User Guide*.
    """

    ReuseOnScaleIn: bool | None = None
    """
    Specifies whether instances in the Auto Scaling group can be returned to the warm
    pool on scale in.
    """


class AutoScalingWarmPoolConfiguration(Boto3Model):
    """
    Describes a warm pool configuration.
    """

    MaxGroupPreparedCapacity: int | None = None
    """
    The maximum number of instances that are allowed to be in the warm pool or in any
    state except ``Terminated`` for the Auto Scaling group.
    """
    MinSize: int | None = None
    """
    The minimum number of instances to maintain in the warm pool.
    """
    PoolState: Literal["Stopped", "Running", "Hibernated"] | None = None
    """
    The instance state to transition to after the lifecycle actions are complete.
    """
    Status: Literal["PendingDelete"] | None = None
    """
    The status of a warm pool that is marked for deletion.
    """
    InstanceReusePolicy: AutoScalingInstanceReusePolicy | None = None
    """
    The instance reuse policy.
    """


class TrafficSourceIdentifier(Boto3Model):
    """
    Identifying information for a traffic source.
    """

    Identifier: str
    """
    Identifies the traffic source.
    """
    Type: str | None = None
    """
    Provides additional context for the value of ``Identifier``.
    """


class AutoScalingInstanceMaintenancePolicy(Boto3Model):
    """
    Describes an instance maintenance policy.

    For more information, see
    `Set instance maintenance policy <https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-instance-maintenance-policy.html>`_
    in the
    *Amazon EC2 Auto Scaling User Guide*.
    """

    MinHealthyPercentage: int | None = None
    """
    Specifies the lower threshold as a percentage of the desired capacity of the Auto
    Scaling group.

    It represents the
    minimum percentage of the group to keep in service, healthy, and ready to use to support your workload when replacing
    instances. Value range is 0 to 100. To clear a previously set value, specify a value of ``-1``.
    """
    MaxHealthyPercentage: int | None = None
    """
    Specifies the upper threshold as a percentage of the desired capacity of the Auto
    Scaling group.

    It represents the
    maximum percentage of the group that can be in service and healthy, or pending, to support your workload when replacing
    instances. Value range is 100 to 200. To clear a previously set value, specify a value of ``-1``.
    """


class AutoScalingAvailabilityZoneDistribution(Boto3Model):
    """
    Describes an Availability Zone distribution.
    """

    CapacityDistributionStrategy: Literal["balanced-only", "balanced-best-effort"] | None = None
    """
    If launches fail in an Availability Zone, the following strategies are available.

    The default is ``balanced-best-
    effort``.
    """


class AutoScalingAvailabilityZoneImpairmentPolicy(Boto3Model):
    """
    Describes an Availability Zone impairment policy.
    """

    ZonalShiftEnabled: bool | None = None
    """
    If ``true``, enable zonal shift for your Auto Scaling group.
    """
    ImpairedZoneHealthCheckBehavior: Literal["ReplaceUnhealthy", "IgnoreUnhealthy"] | None = None
    """
    Specifies the health check behavior for the impaired Availability Zone in an active
    zonal shift.

    If you select ``Replace
    unhealthy``, instances that appear unhealthy will be replaced in all Availability Zones. If you select ``Ignore
    unhealthy``, instances will not be replaced in the Availability Zone with the active zonal shift. For more information,
    see `Auto Scaling group zonal shift <https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-zonal-
    shift.html>`_ in the *Amazon EC2 Auto Scaling User Guide*.
    """


class AutoScalingCapacityReservationTarget(Boto3Model):
    """
    The target for the Capacity Reservation.

    Specify Capacity Reservations IDs or Capacity Reservation resource group ARNs.
    """

    CapacityReservationIds: List[str] | None = None
    """
    The Capacity Reservation IDs to launch instances into.
    """
    CapacityReservationResourceGroupArns: List[str] | None = None
    """
    The resource group ARNs of the Capacity Reservation to launch instances into.
    """


class AutoScalingCapacityReservationSpecification(Boto3Model):
    """
    Describes the Capacity Reservation preference and targeting options.

    If you specify ``open`` or ``none`` for
    ``CapacityReservationPreference``, do not specify a ``CapacityReservationTarget``.
    """

    CapacityReservationPreference: Literal["capacity-reservations-only", "capacity-reservations-first", "none", "default"] | None = None
    """
    The capacity reservation preference.

    The following options are available:
    """
    CapacityReservationTarget: AutoScalingCapacityReservationTarget | None = None
    """
    Describes a target Capacity Reservation or Capacity Reservation resource group.
    """


class AutoScalingGroup(TagsDictMixin, AutoScalingGroupModelMixin, PrimaryBoto3Model):
    """
    Describes an Auto Scaling group.
    """

    tag_class: ClassVar[Type] = AutoScalingTagDescription
    manager_class: ClassVar[Type[Boto3ModelManager]] = AutoScalingGroupManager

    DefaultCooldown: int | None = 300
    """
    The duration of the default cooldown period, in seconds.
    """
    AutoScalingGroupName: str
    """
    The name of the Auto Scaling group.
    """
    AutoScalingGroupARN: str = Field(default=None, frozen=True)
    """
    The Amazon Resource Name (ARN) of the Auto Scaling group.
    """
    LaunchConfigurationName: str | None = None
    """
    The name of the associated launch configuration.
    """
    LaunchTemplate: AutoScalingLaunchTemplateSpecification | None = None
    """
    The launch template for the group.
    """
    MixedInstancesPolicy: AutoScalingMixedInstancesPolicy | None = None
    """
    The mixed instances policy for the group.
    """
    MinSize: int
    """
    The minimum size of the group.
    """
    MaxSize: int
    """
    The maximum size of the group.
    """
    DesiredCapacity: int
    """
    The desired size of the group.
    """
    PredictedCapacity: int = Field(default=None, frozen=True)
    """
    The predicted capacity of the group when it has a predictive scaling policy.
    """
    AvailabilityZones: List[str]
    """
    One or more Availability Zones for the group.
    """
    LoadBalancerNames: List[str] | None = None
    """
    One or more load balancers associated with the group.
    """
    TargetGroupARNs: List[str] | None = None
    """
    The Amazon Resource Names (ARN) of the target groups for your load balancer.
    """
    HealthCheckType: str
    """
    A comma-separated value string of one or more health check types.
    """
    HealthCheckGracePeriod: int | None = None
    """
    The duration of the health check grace period, in seconds.
    """
    Instances: List["AutoScalingInstanceReference"] = Field(
        default_factory=list, frozen=True
    )
    """
    The EC2 instances associated with the group.
    """
    CreatedTime: datetime = Field(frozen=True)
    """
    The date and time the group was created.
    """
    SuspendedProcesses: List["SuspendedProcess"] = Field(
        default_factory=list, frozen=True
    )
    """
    The suspended processes associated with the group.
    """
    PlacementGroup: str | None = None
    """
    The name of the placement group into which to launch your instances, if any.
    """
    VPCZoneIdentifier: str | None = None
    """
    One or more subnet IDs, if applicable, separated by commas.
    """
    EnabledMetrics: List["EnabledMetric"] = Field(default_factory=list, frozen=True)
    """
    The metrics enabled for the group.
    """
    Status: str = Field(default=None, frozen=True)
    """
The current state of the group when the
`DeleteAutoScalingGroup <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_DeleteAutoScalingGroup.html>`_
operation is in progress.
    """
    Tags: List["AutoScalingTagDescription"] | None = None
    """
    The tags for the group.
    """
    TerminationPolicies: List[str] | None = None
    """
    The termination policies for the group.
    """
    NewInstancesProtectedFromScaleIn: bool | None = None
    """
    Indicates whether newly launched instances are protected from termination by Amazon
    EC2 Auto Scaling when scaling in.

    For more information about preventing instances from terminating on scale in, see `Use instance scale-in
    protection <https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-instance-protection.html>`_ in the
    *Amazon EC2 Auto Scaling User Guide*.
    """
    ServiceLinkedRoleARN: str | None = None
    """
    The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling
    group uses to call other Amazon Web Services on your behalf.
    """
    MaxInstanceLifetime: int | None = None
    """
    The maximum amount of time, in seconds, that an instance can be in service.
    """
    CapacityRebalance: bool | None = None
    """
    Indicates whether Capacity Rebalancing is enabled.
    """
    WarmPoolConfiguration: AutoScalingWarmPoolConfiguration = Field(
        default=None, frozen=True
    )
    """
    The warm pool for the group.
    """
    WarmPoolSize: int = Field(default=None, frozen=True)
    """
    The current size of the warm pool.
    """
    Context: str | None = None
    """
    Reserved.
    """
    DesiredCapacityType: str | None = None
    """
    The unit of measurement for the value specified for desired capacity.

    Amazon EC2 Auto Scaling supports
    ``DesiredCapacityType`` for attribute-based instance type selection only.
    """
    DefaultInstanceWarmup: int | None = None
    """
    The duration of the default instance warmup, in seconds.
    """
    TrafficSources: List["TrafficSourceIdentifier"] | None = None
    """
    The traffic sources associated with this Auto Scaling group.
    """
    InstanceMaintenancePolicy: AutoScalingInstanceMaintenancePolicy | None = None
    """
    An instance maintenance policy.
    """
    AvailabilityZoneDistribution: AutoScalingAvailabilityZoneDistribution | None = (
        None
    )
    """
    The instance capacity distribution across Availability Zones.
    """
    AvailabilityZoneImpairmentPolicy: AutoScalingAvailabilityZoneImpairmentPolicy | None = None
    """
    The Availability Zone impairment policy.
    """
    CapacityReservationSpecification: AutoScalingCapacityReservationSpecification | None = None
    """
    The capacity reservation specification.
    """

    @property
    def pk(self) -> str | None:
        """
        Return the primary key of the model.   This is the value of the
        :py:attr:`AutoScalingGroupName` attribute.

        Returns:
            The primary key of the model instance.
        """
        return self.AutoScalingGroupName

    @property
    def arn(self) -> str | None:
        """
        Return the ARN of the model.   This is the value of the
        :py:attr:`AutoScalingGroupARN` attribute.

        Returns:
            The ARN of the model instance.
        """
        return self.AutoScalingGroupARN

    @property
    def name(self) -> str | None:
        """
        Return the name of the model.   This is the value of the
        :py:attr:`AutoScalingGroupName` attribute.

        Returns:
            The name of the model instance.
        """
        return self.AutoScalingGroupName

    def __hash__(self) -> int:
        """
        Return the hash of the model.

        This is the value of the
        :py:attr:`AutoScalingGroupName` attribute.
        """
        return hash(self.AutoScalingGroupName)

    @cached_property
    def launch_configuration(self) -> Optional["LaunchConfiguration"]:
        """
        Return the :py:class:`LaunchConfiguration` object that this group uses, if any.

        .. note::

            The output of this property is cached on the model instance, so
            calling this multiple times will not result in multiple calls to the
            AWS API.   If you need a fresh copy of the data, you can re-get the
            model instance from the manager.
        """

        try:
            pk = OrderedDict(
                {
                    "LaunchConfigurationName": self.LaunchConfigurationName,
                }
            )
        except AttributeError:
            return None
        return LaunchConfiguration.objects.using(self.session).get(**pk)  # type: ignore[arg-type]

    @cached_property
    def launch_template(self) -> Optional["LaunchTemplateVersion"]:
        """
        Return the :py:class:`LaunchTemplate` object that this group uses, if any.

        .. note::

            The output of this property is cached on the model instance, so
            calling this multiple times will not result in multiple calls to the
            AWS API.   If you need a fresh copy of the data, you can re-get the
            model instance from the manager.
        """

        try:
            pk = OrderedDict(
                {
                    "LaunchTemplateId": self.LaunchTemplate.LaunchTemplateId,
                    "Version": self.LaunchTemplate.Version,
                }
            )
        except AttributeError:
            return None
        return LaunchTemplateVersion.objects.using(self.session).get(**pk)  # type: ignore[arg-type]


class EbsMapping(Boto3Model):
    """
    Describes information used to set up an Amazon EBS volume specified in a block
    device mapping.
    """

    SnapshotId: str | None = None
    """
    The snapshot ID of the volume to use.
    """
    VolumeSize: int | None = None
    """
    The volume size, in GiBs.

    The following are the supported volumes sizes for each volume type:
    """
    VolumeType: str | None = None
    """
    The volume type.

    For more information, see
    `Amazon EBS volume types <https://docs.aws.amazon.com/ebs/latest/userguide/ebs-volume-types.html>`_
    in the *Amazon EBS User Guide*.
    """
    DeleteOnTermination: bool | None = None
    """
    Indicates whether the volume is deleted on instance termination.

    For Amazon EC2 Auto Scaling, the default value is
    ``true``.
    """
    Iops: int | None = None
    """
    The number of input/output (I/O) operations per second (IOPS) to provision for the
    volume.

    For ``gp3`` and ``io1``
    volumes, this represents the number of IOPS that are provisioned for the volume. For ``gp2`` volumes, this represents
    the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.
    """
    Encrypted: bool | None = None
    """
    Specifies whether the volume should be encrypted.

    Encrypted EBS volumes can only be attached to instances that support Amazon EBS
    encryption. For more information, see
    `Requirements for Amazon EBS encryption <https://docs.aws.amazon.com/ebs/latest/userguide/ebs-encryption-requirements.html>`_
    in the *Amazon EBS User
    Guide*. If your AMI uses encrypted volumes, you can also only launch it on supported instance types.
    """
    Throughput: int | None = None
    """
    The throughput (MiBps) to provision for a ``gp3`` volume.
    """


class AutoScalingBlockDeviceMapping(Boto3Model):
    """
    Describes a block device mapping.
    """

    VirtualName: str | None = None
    """
    The name of the instance store volume (virtual device) to attach to an instance at
    launch.

    The name must be in the form
    ephemeral*X* where *X* is a number starting from zero (0), for example, ``ephemeral0``.
    """
    DeviceName: str
    """
    The device name assigned to the volume (for example, ``/dev/sdh`` or ``xvdh``).

    For more information, see
    `Device naming on Linux instances <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/device_naming.html>`_
    in the *Amazon EC2 User
    Guide*.
    """
    Ebs: EbsMapping | None = None
    """
    Information to attach an EBS volume to an instance at launch.
    """
    NoDevice: bool | None = None
    """
    Setting this value to ``true`` prevents a volume that is included in the block
    device mapping of the AMI from being mapped to the specified device name at launch.
    """


class AutoScalingInstanceMonitoring(Boto3Model):
    """
    Describes whether detailed monitoring is enabled for the Auto Scaling instances.
    """

    Enabled: bool | None = None
    """
    If ``true``, detailed monitoring is enabled.

    Otherwise, basic monitoring is enabled.
    """


class InstanceMetadataOptions(Boto3Model):
    """
    The metadata options for the instances.

    For more information, see
    `Configure the instance metadata options <https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-config.html#launch-configurations-imds>`_
    in
    the *Amazon EC2 Auto Scaling User Guide*.
    """

    HttpTokens: Literal["optional", "required"] | None = None
    """
    The state of token usage for your instance metadata requests.

    If the parameter is not specified in the request, the
    default state is ``optional``.
    """
    HttpPutResponseHopLimit: int | None = None
    """
    The desired HTTP PUT response hop limit for instance metadata requests.

    The larger the number, the further instance metadata requests can travel.
    """
    HttpEndpoint: Literal["disabled", "enabled"] | None = None
    """
    This parameter enables or disables the HTTP metadata endpoint on your instances.

    If the parameter is not specified, the
    default state is ``enabled``.
    """


class LaunchConfiguration(PrimaryBoto3Model):
    """
    Describes a launch configuration.
    """

    manager_class: ClassVar[Type[Boto3ModelManager]] = LaunchConfigurationManager

    LaunchConfigurationName: str
    """
    The name of the launch configuration.
    """
    LaunchConfigurationARN: str = Field(default=None, frozen=True)
    """
    The Amazon Resource Name (ARN) of the launch configuration.
    """
    ImageId: str
    """
    The ID of the Amazon Machine Image (AMI) to use to launch your EC2 instances.

    For more information, see
    `Find a Linux AMI <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html>`_
    in the *Amazon EC2 User Guide*.
    """
    KeyName: str | None = None
    """
    The name of the key pair.
    """
    SecurityGroups: List[str] | None = None
    """
    A list that contains the security groups to assign to the instances in the Auto
    Scaling group.

    For more information, see
    `Control traffic to your Amazon Web Services resources using security groups <https://docs.aws.amazon.com/vpc/latest/userguide/vpc-security-groups.html>`_
    in the *Amazon Virtual Private Cloud
    User Guide*.
    """
    ClassicLinkVPCId: str | None = None
    """
    Available for backward compatibility.
    """
    ClassicLinkVPCSecurityGroups: List[str] | None = None
    """
    Available for backward compatibility.
    """
    UserData: str | None = None
    """
    The user data to make available to the launched EC2 instances.

    For more information, see
    `Instance metadata and user data <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html>`_
    in the *Amazon EC2 User Guide*. If
    you are using a command line tool, base64-encoding is performed for you, and you can load the text from a file.
    Otherwise, you must provide base64-encoded text. User data is limited to 16 KB.
    """
    InstanceType: str
    """
    The instance type for the instances.

    For information about available instance types, see
    `Available instance types <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#AvailableInstanceTypes>`_
    in the *Amazon
    EC2 User Guide*.
    """
    KernelId: str | None = None
    """
    The ID of the kernel associated with the AMI.
    """
    RamdiskId: str | None = None
    """
    The ID of the RAM disk associated with the AMI.
    """
    BlockDeviceMappings: List["AutoScalingBlockDeviceMapping"] | None = None
    """
    The block device mapping entries that define the block devices to attach to the
    instances at launch.

    By default, the block devices specified in the block device mapping for the AMI are
    used. For more information, see
    `Block device mappings <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html>`_
    in the *Amazon EC2
    User Guide*.
    """
    InstanceMonitoring: AutoScalingInstanceMonitoring | None = None
    """
    Controls whether instances in this group are launched with detailed (``true``) or
    basic (``false``) monitoring.
    """
    SpotPrice: str | None = None
    """
    The maximum hourly price to be paid for any Spot Instance launched to fulfill the
    request.

    Spot Instances are launched
    when the price you specify exceeds the current Spot price. For more information, see `Requesting Spot Instances for
    fault-tolerant and flexible applications <https://docs.aws.amazon.com/autoscaling/ec2/userguide/launch-template-spot-
    instances.html>`_ in the *Amazon EC2 Auto Scaling User Guide*.
    """
    IamInstanceProfile: str | None = None
    """
    The name or the Amazon Resource Name (ARN) of the instance profile associated with
    the IAM role for the instance.

    The instance profile contains the IAM role. For more information, see
    `IAM role for applications that run on Amazon EC2 instances <https://docs.aws.amazon.com/autoscaling/ec2/userguide/us-iam-role.html>`_
    in the *Amazon EC2 Auto Scaling User
    Guide*.
    """
    CreatedTime: datetime = Field(frozen=True)
    """
    The creation date and time for the launch configuration.
    """
    EbsOptimized: bool | None = None
    """
    Specifies whether the launch configuration is optimized for EBS I/O (``true``) or
    not (``false``).

    For more information,
    see `Amazon EBS-optimized instances <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html>`_ in the
    *Amazon EC2 User Guide*.
    """
    AssociatePublicIpAddress: bool | None = None
    """
    Specifies whether to assign a public IPv4 address to the group's instances.

    If the instance is launched into a default subnet, the default is to assign a public
    IPv4 address, unless you disabled the option to assign a public IPv4 address on the
    subnet. If the instance is launched into a nondefault subnet, the default is not to
    assign a public IPv4 address, unless you enabled the option to assign a public IPv4
    address on the subnet. For more information, see
    `Provide network connectivity for your Auto Scaling instances using Amazon VPC <https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html>`_
    in the *Amazon EC2 Auto Scaling User Guide*.
    """
    PlacementTenancy: str | None = None
    """
    The tenancy of the instance, either ``default`` or ``dedicated``.

    An instance with ``dedicated`` tenancy runs on
    isolated, single-tenant hardware and can only be launched into a VPC.
    """
    MetadataOptions: InstanceMetadataOptions | None = None
    """
    The metadata options for the instances.

    For more information, see
    `Configure the instance metadata options <https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-config.html#launch-configurations-imds>`_
    in
    the *Amazon EC2 Auto Scaling User Guide*.
    """

    @property
    def pk(self) -> str | None:
        """
        Return the primary key of the model.   This is the value of the
        :py:attr:`LaunchConfigurationName` attribute.

        Returns:
            The primary key of the model instance.
        """
        return self.LaunchConfigurationName

    @property
    def arn(self) -> str | None:
        """
        Return the ARN of the model.   This is the value of the
        :py:attr:`LaunchConfigurationARN` attribute.

        Returns:
            The ARN of the model instance.
        """
        return self.LaunchConfigurationARN

    @property
    def name(self) -> str | None:
        """
        Return the name of the model.   This is the value of the
        :py:attr:`LaunchConfigurationName` attribute.

        Returns:
            The name of the model instance.
        """
        return self.LaunchConfigurationName

    def __hash__(self) -> int:
        """
        Return the hash of the model.

        This is the value of the
        :py:attr:`LaunchConfigurationName` attribute.
        """
        return hash(self.LaunchConfigurationName)

    @cached_property
    def security_groups(self) -> List["SecurityGroup"] | None:
        """
        Return the security groups that this launch configuration uses.

        .. note::

            The output of this property is cached on the model instance, so
            calling this multiple times will not result in multiple calls to the
            AWS API.   If you need a fresh copy of the data, you can re-get the
            model instance from the manager.
        """

        try:
            pk = OrderedDict(
                {
                    "SecurityGroups": self.SecurityGroups,
                }
            )
        except AttributeError:
            return []
        return SecurityGroup.objects.using(self.session).list(**pk)  # type: ignore[arg-type]

    @cached_property
    def ami(self) -> Optional["AMI"]:
        """
        Return the :py:class:`AMI` object that this launch configuration uses.

        .. note::

            The output of this property is cached on the model instance, so
            calling this multiple times will not result in multiple calls to the
            AWS API.   If you need a fresh copy of the data, you can re-get the
            model instance from the manager.
        """

        try:
            pk = OrderedDict(
                {
                    "ImageId": self.ImageId,
                }
            )
        except AttributeError:
            return None
        return AMI.objects.using(self.session).get(**pk)  # type: ignore[arg-type]

    @cached_property
    def instance_type(self) -> Optional["EC2InstanceType"]:
        """
        Return the :py:class:`EC2InstanceType` object that this launch configuration
        uses.

        .. note::

            The output of this property is cached on the model instance, so
            calling this multiple times will not result in multiple calls to the
            AWS API.   If you need a fresh copy of the data, you can re-get the
            model instance from the manager.
        """

        try:
            pk = OrderedDict(
                {
                    "InstanceType": self.InstanceType,
                }
            )
        except AttributeError:
            return None
        return EC2InstanceType.objects.using(self.session).get(**pk)  # type: ignore[arg-type]


# =======================
# Request/Response Models
# =======================


class LifecycleHookSpecification(Boto3Model):
    """
    Describes information used to specify a lifecycle hook for an Auto Scaling group.

    For more information, see
    `Amazon EC2 Auto Scaling lifecycle hooks <https://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html>`_
    in the *Amazon EC2 Auto Scaling User
    Guide*.
    """

    LifecycleHookName: str
    """
    The name of the lifecycle hook.
    """
    LifecycleTransition: str
    """
    The lifecycle transition.

    For Auto Scaling groups, there are two major lifecycle transitions.
    """
    NotificationMetadata: str | None = None
    """
    Additional information that you want to include any time Amazon EC2 Auto Scaling
    sends a message to the notification target.
    """
    HeartbeatTimeout: int | None = None
    """
    The maximum time, in seconds, that can elapse before the lifecycle hook times out.

    The range is from ``30`` to ``7200``
    seconds. The default value is ``3600`` seconds (1 hour).
    """
    DefaultResult: str | None = None
    """
    The action the Auto Scaling group takes when the lifecycle hook timeout elapses or
    if an unexpected failure occurs.

    The
    default value is ``ABANDON``.
    """
    NotificationTargetARN: str | None = None
    """
    The Amazon Resource Name (ARN) of the notification target that Amazon EC2 Auto
    Scaling sends notifications to when an instance is in a wait state for the lifecycle
    hook.

    You can specify an Amazon SNS topic or an Amazon SQS queue.
    """
    RoleARN: str | None = None
    """
    The ARN of the IAM role that allows the Auto Scaling group to publish to the
    specified notification target.

    For information about creating this role, see
    `Prepare to add a lifecycle hook to your Auto Scaling group <https://docs.aws.amazon.com/autoscaling/ec2/userguide/prepare-for-lifecycle-notifications.html>`_
    in the *Amazon
    EC2 Auto Scaling User Guide*.
    """


class AutoScalingGroupsType(Boto3Model):
    AutoScalingGroups: List["AutoScalingGroup"]
    """
    The groups.
    """
    NextToken: str | None = None
    """
    A string that indicates that the response contains more items than can be returned
    in a single response.

    To receive
    additional items, specify this string for the ``NextToken`` value when requesting the next set of items. This value is
    null when there are no more items to return.
    """


class AutoScalingInstanceDetails(Boto3Model):
    """
    Describes an EC2 instance associated with an Auto Scaling group.
    """

    InstanceId: str
    """
    The ID of the instance.
    """
    InstanceType: str | None = None
    """
    The instance type of the EC2 instance.
    """
    AutoScalingGroupName: str
    """
    The name of the Auto Scaling group for the instance.
    """
    AvailabilityZone: str
    """
    The Availability Zone for the instance.
    """
    LifecycleState: str
    """
    The lifecycle state for the instance.

    The ``Quarantined`` state is not used. For more information, see `Amazon EC2 Auto
    Scaling instance lifecycle <https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-lifecycle.html>`_ in
    the *Amazon EC2 Auto Scaling User Guide*.
    """
    HealthStatus: str
    """
    The last reported health status of this instance.

    ``Healthy`` means that the instance is healthy and should remain in
    service. ``Unhealthy`` means that the instance is unhealthy and Amazon EC2 Auto Scaling should terminate and replace it.
    """
    LaunchConfigurationName: str | None = None
    """
    The launch configuration used to launch the instance.

    This value is not available if you attached the instance to the Auto Scaling group.
    """
    LaunchTemplate: AutoScalingLaunchTemplateSpecification | None = None
    """
    The launch template for the instance.
    """
    ProtectedFromScaleIn: bool
    """
    Indicates whether the instance is protected from termination by Amazon EC2 Auto
    Scaling when scaling in.
    """
    WeightedCapacity: str | None = None
    """
    The number of capacity units contributed by the instance based on its instance type.
    """


class AutoScalingInstancesType(Boto3Model):
    AutoScalingInstances: List["AutoScalingInstanceDetails"] | None = None
    """
    The instances.
    """
    NextToken: str | None = None
    """
    A string that indicates that the response contains more items than can be returned
    in a single response.

    To receive
    additional items, specify this string for the ``NextToken`` value when requesting the next set of items. This value is
    null when there are no more items to return.
    """


class AutoScalingActivity(Boto3Model):
    """
    Describes scaling activity, which is a long-running process that represents a change
    to your Auto Scaling group, such as changing its size or replacing an instance.
    """

    ActivityId: str
    """
    The ID of the activity.
    """
    AutoScalingGroupName: str
    """
    The name of the Auto Scaling group.
    """
    Description: str | None = None
    """
    A friendly, more verbose description of the activity.
    """
    Cause: str
    """
    The reason the activity began.
    """
    StartTime: datetime
    """
    The start time of the activity.
    """
    EndTime: datetime | None = None
    """
    The end time of the activity.
    """
    StatusCode: Literal[
        "PendingSpotBidPlacement",
        "WaitingForSpotInstanceRequestId",
        "WaitingForSpotInstanceId",
        "WaitingForInstanceId",
        "PreInService",
        "InProgress",
        "WaitingForELBConnectionDraining",
        "MidLifecycleAction",
        "WaitingForInstanceWarmup",
        "Successful",
        "Failed",
        "Cancelled",
        "WaitingForConnectionDraining",
    ]
    """
    The current status of the activity.
    """
    StatusMessage: str | None = None
    """
    A friendly, more verbose description of the activity status.
    """
    Progress: int | None = None
    """
    A value between 0 and 100 that indicates the progress of the activity.
    """
    Details: str | None = None
    """
    The details about the activity.
    """
    AutoScalingGroupState: str | None = None
    """
    The state of the Auto Scaling group, which is either ``InService`` or ``Deleted``.
    """
    AutoScalingGroupARN: str | None = None
    """
    The Amazon Resource Name (ARN) of the Auto Scaling group.
    """


class ActivityType(Boto3Model):
    Activity: AutoScalingActivity | None = None
    """
    A scaling activity.
    """


class LaunchConfigurationsType(Boto3Model):
    LaunchConfigurations: List["LaunchConfiguration"]
    """
    The launch configurations.
    """
    NextToken: str | None = None
    """
    A string that indicates that the response contains more items than can be returned
    in a single response.

    To receive
    additional items, specify this string for the ``NextToken`` value when requesting the next set of items. This value is
    null when there are no more items to return.
    """
