CfnAutoScalingGroup

class aws_cdk.aws_autoscaling.CfnAutoScalingGroup(scope, id, *, max_size, min_size, auto_scaling_group_name=None, availability_zones=None, capacity_rebalance=None, context=None, cooldown=None, default_instance_warmup=None, desired_capacity=None, desired_capacity_type=None, health_check_grace_period=None, health_check_type=None, instance_id=None, launch_configuration_name=None, launch_template=None, lifecycle_hook_specification_list=None, load_balancer_names=None, max_instance_lifetime=None, metrics_collection=None, mixed_instances_policy=None, new_instances_protected_from_scale_in=None, notification_configurations=None, placement_group=None, service_linked_role_arn=None, tags=None, target_group_arns=None, termination_policies=None, vpc_zone_identifier=None)

Bases: CfnResource

A CloudFormation AWS::AutoScaling::AutoScalingGroup.

The AWS::AutoScaling::AutoScalingGroup resource defines an Amazon EC2 Auto Scaling group, which is a collection of Amazon EC2 instances that are treated as a logical grouping for the purposes of automatic scaling and management.

For more information about Amazon EC2 Auto Scaling, see the Amazon EC2 Auto Scaling User Guide . .. epigraph:

Amazon EC2 Auto Scaling configures instances launched as part of an Auto Scaling group using either a `launch template <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html>`_ or a launch configuration. We strongly recommend that you do not use launch configurations. They do not provide full functionality for Amazon EC2 Auto Scaling or Amazon EC2. For more information, see `Launch configurations <https://docs.aws.amazon.com/autoscaling/ec2/userguide/launch-configurations.html>`_ in the *Amazon EC2 Auto Scaling User Guide* .
CloudformationResource:

AWS::AutoScaling::AutoScalingGroup

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_autoscaling as autoscaling

cfn_auto_scaling_group = autoscaling.CfnAutoScalingGroup(self, "MyCfnAutoScalingGroup",
    max_size="maxSize",
    min_size="minSize",

    # the properties below are optional
    auto_scaling_group_name="autoScalingGroupName",
    availability_zones=["availabilityZones"],
    capacity_rebalance=False,
    context="context",
    cooldown="cooldown",
    default_instance_warmup=123,
    desired_capacity="desiredCapacity",
    desired_capacity_type="desiredCapacityType",
    health_check_grace_period=123,
    health_check_type="healthCheckType",
    instance_id="instanceId",
    launch_configuration_name="launchConfigurationName",
    launch_template=autoscaling.CfnAutoScalingGroup.LaunchTemplateSpecificationProperty(
        version="version",

        # the properties below are optional
        launch_template_id="launchTemplateId",
        launch_template_name="launchTemplateName"
    ),
    lifecycle_hook_specification_list=[autoscaling.CfnAutoScalingGroup.LifecycleHookSpecificationProperty(
        lifecycle_hook_name="lifecycleHookName",
        lifecycle_transition="lifecycleTransition",

        # the properties below are optional
        default_result="defaultResult",
        heartbeat_timeout=123,
        notification_metadata="notificationMetadata",
        notification_target_arn="notificationTargetArn",
        role_arn="roleArn"
    )],
    load_balancer_names=["loadBalancerNames"],
    max_instance_lifetime=123,
    metrics_collection=[autoscaling.CfnAutoScalingGroup.MetricsCollectionProperty(
        granularity="granularity",

        # the properties below are optional
        metrics=["metrics"]
    )],
    mixed_instances_policy=autoscaling.CfnAutoScalingGroup.MixedInstancesPolicyProperty(
        launch_template=autoscaling.CfnAutoScalingGroup.LaunchTemplateProperty(
            launch_template_specification=autoscaling.CfnAutoScalingGroup.LaunchTemplateSpecificationProperty(
                version="version",

                # the properties below are optional
                launch_template_id="launchTemplateId",
                launch_template_name="launchTemplateName"
            ),

            # the properties below are optional
            overrides=[autoscaling.CfnAutoScalingGroup.LaunchTemplateOverridesProperty(
                instance_requirements=autoscaling.CfnAutoScalingGroup.InstanceRequirementsProperty(
                    accelerator_count=autoscaling.CfnAutoScalingGroup.AcceleratorCountRequestProperty(
                        max=123,
                        min=123
                    ),
                    accelerator_manufacturers=["acceleratorManufacturers"],
                    accelerator_names=["acceleratorNames"],
                    accelerator_total_memory_mi_b=autoscaling.CfnAutoScalingGroup.AcceleratorTotalMemoryMiBRequestProperty(
                        max=123,
                        min=123
                    ),
                    accelerator_types=["acceleratorTypes"],
                    allowed_instance_types=["allowedInstanceTypes"],
                    bare_metal="bareMetal",
                    baseline_ebs_bandwidth_mbps=autoscaling.CfnAutoScalingGroup.BaselineEbsBandwidthMbpsRequestProperty(
                        max=123,
                        min=123
                    ),
                    burstable_performance="burstablePerformance",
                    cpu_manufacturers=["cpuManufacturers"],
                    excluded_instance_types=["excludedInstanceTypes"],
                    instance_generations=["instanceGenerations"],
                    local_storage="localStorage",
                    local_storage_types=["localStorageTypes"],
                    memory_gi_bPer_vCpu=autoscaling.CfnAutoScalingGroup.MemoryGiBPerVCpuRequestProperty(
                        max=123,
                        min=123
                    ),
                    memory_mi_b=autoscaling.CfnAutoScalingGroup.MemoryMiBRequestProperty(
                        max=123,
                        min=123
                    ),
                    network_bandwidth_gbps=autoscaling.CfnAutoScalingGroup.NetworkBandwidthGbpsRequestProperty(
                        max=123,
                        min=123
                    ),
                    network_interface_count=autoscaling.CfnAutoScalingGroup.NetworkInterfaceCountRequestProperty(
                        max=123,
                        min=123
                    ),
                    on_demand_max_price_percentage_over_lowest_price=123,
                    require_hibernate_support=False,
                    spot_max_price_percentage_over_lowest_price=123,
                    total_local_storage_gb=autoscaling.CfnAutoScalingGroup.TotalLocalStorageGBRequestProperty(
                        max=123,
                        min=123
                    ),
                    v_cpu_count=autoscaling.CfnAutoScalingGroup.VCpuCountRequestProperty(
                        max=123,
                        min=123
                    )
                ),
                instance_type="instanceType",
                launch_template_specification=autoscaling.CfnAutoScalingGroup.LaunchTemplateSpecificationProperty(
                    version="version",

                    # the properties below are optional
                    launch_template_id="launchTemplateId",
                    launch_template_name="launchTemplateName"
                ),
                weighted_capacity="weightedCapacity"
            )]
        ),

        # the properties below are optional
        instances_distribution=autoscaling.CfnAutoScalingGroup.InstancesDistributionProperty(
            on_demand_allocation_strategy="onDemandAllocationStrategy",
            on_demand_base_capacity=123,
            on_demand_percentage_above_base_capacity=123,
            spot_allocation_strategy="spotAllocationStrategy",
            spot_instance_pools=123,
            spot_max_price="spotMaxPrice"
        )
    ),
    new_instances_protected_from_scale_in=False,
    notification_configurations=[autoscaling.CfnAutoScalingGroup.NotificationConfigurationProperty(
        topic_arn="topicArn",

        # the properties below are optional
        notification_types=["notificationTypes"]
    )],
    placement_group="placementGroup",
    service_linked_role_arn="serviceLinkedRoleArn",
    tags=[autoscaling.CfnAutoScalingGroup.TagPropertyProperty(
        key="key",
        propagate_at_launch=False,
        value="value"
    )],
    target_group_arns=["targetGroupArns"],
    termination_policies=["terminationPolicies"],
    vpc_zone_identifier=["vpcZoneIdentifier"]
)

Create a new AWS::AutoScaling::AutoScalingGroup.

Parameters:
  • scope (Construct) –

    • scope in which this resource is defined.

  • id (str) –

    • scoped id of the resource.

  • max_size (str) – The maximum size of the group. .. epigraph:: With a mixed instances policy that uses instance weighting, Amazon EC2 Auto Scaling may need to go above MaxSize to meet your capacity requirements. In this event, Amazon EC2 Auto Scaling will never go above MaxSize by more than your largest instance weight (weights that define how many units each instance contributes to the desired capacity of the group).

  • min_size (str) – The minimum size of the group.

  • auto_scaling_group_name (Optional[str]) – The name of the Auto Scaling group. This name must be unique per Region per account. The name can contain any ASCII character 33 to 126 including most punctuation characters, digits, and upper and lowercased letters. .. epigraph:: You cannot use a colon (:) in the name.

  • availability_zones (Optional[Sequence[str]]) – A list of Availability Zones where instances in the Auto Scaling group can be created. Used for launching into the default VPC subnet in each Availability Zone when not using the VPCZoneIdentifier property, or for attaching a network interface when an existing network interface ID is specified in a launch template.

  • capacity_rebalance (Union[bool, IResolvable, None]) – Indicates whether Capacity Rebalancing is enabled. Otherwise, Capacity Rebalancing is disabled. When you turn on Capacity Rebalancing, Amazon EC2 Auto Scaling attempts to launch a Spot Instance whenever Amazon EC2 notifies that a Spot Instance is at an elevated risk of interruption. After launching a new instance, it then terminates an old instance. For more information, see Use Capacity Rebalancing to handle Amazon EC2 Spot Interruptions in the in the Amazon EC2 Auto Scaling User Guide .

  • context (Optional[str]) – Reserved.

  • cooldown (Optional[str]) – Only needed if you use simple scaling policies.. The amount of time, in seconds, between one scaling activity ending and another one starting due to simple scaling policies. For more information, see Scaling cooldowns for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide . Default: 300 seconds

  • default_instance_warmup (Union[int, float, None]) – The amount of time, in seconds, until a new instance is considered to have finished initializing and resource consumption to become stable after it enters the InService state. During an instance refresh, Amazon EC2 Auto Scaling waits for the warm-up period after it replaces an instance before it moves on to replacing the next instance. Amazon EC2 Auto Scaling also waits for the warm-up period before aggregating the metrics for new instances with existing instances in the Amazon CloudWatch metrics that are used for scaling, resulting in more reliable usage data. For more information, see Set the default instance warmup for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide . .. epigraph:: To manage various warm-up settings at the group level, we recommend that you set the default instance warmup, even if it is set to 0 seconds . To remove a value that you previously set, include the property but specify -1 for the value. However, we strongly recommend keeping the default instance warmup enabled by specifying a value of 0 or other nominal value. Default: None

  • desired_capacity (Optional[str]) – The desired capacity is the initial capacity of the Auto Scaling group at the time of its creation and the capacity it attempts to maintain. It can scale beyond this capacity if you configure automatic scaling. The number must be greater than or equal to the minimum size of the group and less than or equal to the maximum size of the group. If you do not specify a desired capacity when creating the stack, the default is the minimum size of the group. CloudFormation marks the Auto Scaling group as successful (by setting its status to CREATE_COMPLETE) when the desired capacity is reached. However, if a maximum Spot price is set in the launch template or launch configuration that you specified, then desired capacity is not used as a criteria for success. Whether your request is fulfilled depends on Spot Instance capacity and your maximum price.

  • desired_capacity_type (Optional[str]) – The unit of measurement for the value specified for desired capacity. Amazon EC2 Auto Scaling supports DesiredCapacityType for attribute-based instance type selection only. For more information, see Creating an Auto Scaling group using attribute-based instance type selection in the Amazon EC2 Auto Scaling User Guide . By default, Amazon EC2 Auto Scaling specifies units , which translates into number of instances. Valid values: units | vcpu | memory-mib

  • health_check_grace_period (Union[int, float, None]) – The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before checking the health status of an EC2 instance that has come into service and marking it unhealthy due to a failed health check. This is useful if your instances do not immediately pass their health checks after they enter the InService state. For more information, see Set the health check grace period for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide . Default: 0 seconds

  • health_check_type (Optional[str]) – Determines whether any additional health checks are performed on the instances in this group. Amazon EC2 health checks are always on. For more information, see Health checks for Auto Scaling instances in the Amazon EC2 Auto Scaling User Guide . The valid values are EC2 (default), ELB , and VPC_LATTICE . The VPC_LATTICE health check type is reserved for use with VPC Lattice, which is in preview release and is subject to change.

  • instance_id (Optional[str]) – The ID of the instance used to base the launch configuration on. For more information, see Create an Auto Scaling group using an EC2 instance in the Amazon EC2 Auto Scaling User Guide . If you specify LaunchTemplate , MixedInstancesPolicy , or LaunchConfigurationName , don’t specify InstanceId .

  • launch_configuration_name (Optional[str]) – The name of the launch configuration to use to launch instances. Required only if you don’t specify LaunchTemplate , MixedInstancesPolicy , or InstanceId .

  • launch_template (Union[IResolvable, LaunchTemplateSpecificationProperty, Dict[str, Any], None]) – Information used to specify the launch template and version to use to launch instances. You can alternatively associate a launch template to the Auto Scaling group by specifying a MixedInstancesPolicy . For more information about creating launch templates, see Create a launch template for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide . If you omit this property, you must specify MixedInstancesPolicy , LaunchConfigurationName , or InstanceId .

  • lifecycle_hook_specification_list (Union[IResolvable, Sequence[Union[IResolvable, LifecycleHookSpecificationProperty, Dict[str, Any]]], None]) – One or more lifecycle hooks to add to the Auto Scaling group before instances are launched.

  • load_balancer_names (Optional[Sequence[str]]) – A list of Classic Load Balancers associated with this Auto Scaling group. For Application Load Balancers, Network Load Balancers, and Gateway Load Balancer, specify the TargetGroupARNs property instead.

  • max_instance_lifetime (Union[int, float, None]) – The maximum amount of time, in seconds, that an instance can be in service. The default is null. If specified, the value must be either 0 or a number equal to or greater than 86,400 seconds (1 day). For more information, see Replacing Auto Scaling instances based on maximum instance lifetime in the Amazon EC2 Auto Scaling User Guide .

  • metrics_collection (Union[IResolvable, Sequence[Union[IResolvable, MetricsCollectionProperty, Dict[str, Any]]], None]) – Enables the monitoring of group metrics of an Auto Scaling group. By default, these metrics are disabled.

  • mixed_instances_policy (Union[IResolvable, MixedInstancesPolicyProperty, Dict[str, Any], None]) – An embedded object that specifies a mixed instances policy. The policy includes properties that not only define the distribution of On-Demand Instances and Spot Instances, the maximum price to pay for Spot Instances (optional), and how the Auto Scaling group allocates instance types to fulfill On-Demand and Spot capacities, but also the properties that specify the instance configuration information—the launch template and instance types. The policy can also include a weight for each instance type and different launch templates for individual instance types. For more information, see Auto Scaling groups with multiple instance types and purchase options in the Amazon EC2 Auto Scaling User Guide .

  • new_instances_protected_from_scale_in (Union[bool, IResolvable, 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 Using instance scale-in protection in the Amazon EC2 Auto Scaling User Guide .

  • notification_configurations (Union[IResolvable, Sequence[Union[IResolvable, NotificationConfigurationProperty, Dict[str, Any]]], None]) – Configures an Auto Scaling group to send notifications when specified events take place.

  • placement_group (Optional[str]) – The name of the placement group into which to launch your instances. For more information, see Placement groups in the Amazon EC2 User Guide for Linux Instances . .. epigraph:: A cluster placement group is a logical grouping of instances within a single Availability Zone. You cannot specify multiple Availability Zones and a cluster placement group.

  • service_linked_role_arn (Optional[str]) – The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling group uses to call other AWS service on your behalf. By default, Amazon EC2 Auto Scaling uses a service-linked role named AWSServiceRoleForAutoScaling , which it creates if it does not exist. For more information, see Service-linked roles in the Amazon EC2 Auto Scaling User Guide .

  • tags (Optional[Sequence[Union[TagPropertyProperty, Dict[str, Any]]]]) – One or more tags. You can tag your Auto Scaling group and propagate the tags to the Amazon EC2 instances it launches. Tags are not propagated to Amazon EBS volumes. To add tags to Amazon EBS volumes, specify the tags in a launch template but use caution. If the launch template specifies an instance tag with a key that is also specified for the Auto Scaling group, Amazon EC2 Auto Scaling overrides the value of that instance tag with the value specified by the Auto Scaling group. For more information, see Tag Auto Scaling groups and instances in the Amazon EC2 Auto Scaling User Guide .

  • target_group_arns (Optional[Sequence[str]]) – The Amazon Resource Names (ARN) of the Elastic Load Balancing target groups to associate with the Auto Scaling group. Instances are registered as targets with the target groups. The target groups receive incoming traffic and route requests to one or more registered targets. For more information, see Use Elastic Load Balancing to distribute traffic across the instances in your Auto Scaling group in the Amazon EC2 Auto Scaling User Guide .

  • termination_policies (Optional[Sequence[str]]) – A policy or a list of policies that are used to select the instance to terminate. These policies are executed in the order that you list them. For more information, see Work with Amazon EC2 Auto Scaling termination policies in the Amazon EC2 Auto Scaling User Guide . Valid values: Default | AllocationStrategy | ClosestToNextInstanceHour | NewestInstance | OldestInstance | OldestLaunchConfiguration | OldestLaunchTemplate | arn:aws:lambda:region:account-id:function:my-function:my-alias

  • vpc_zone_identifier (Optional[Sequence[str]]) – A list of subnet IDs for a virtual private cloud (VPC) where instances in the Auto Scaling group can be created. If this resource specifies public subnets and is also in a VPC that is defined in the same stack template, you must use the DependsOn attribute to declare a dependency on the VPC-gateway attachment . .. epigraph:: When you update VPCZoneIdentifier , this retains the same Auto Scaling group and replaces old instances with new ones, according to the specified subnets. You can optionally specify how CloudFormation handles these updates by using an UpdatePolicy attribute . Required to launch instances into a nondefault VPC. If you specify VPCZoneIdentifier with AvailabilityZones , the subnets that you specify for this property must reside in those Availability Zones.

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters:

path (str) – The path of the value to delete.

Return type:

None

add_depends_on(target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters:
  • key (str) –

  • value (Any) –

See:

Return type:

None

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
   "GlobalSecondaryIndexes": [
     {
       "Projection": {
         "NonKeyAttributes": [ "myattribute" ]
         ...
       }
       ...
     },
     {
       "ProjectionType": "INCLUDE"
       ...
     },
   ]
   ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters:
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type:

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters:

property_path (str) – The path to the property.

Return type:

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters:
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type:

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

Parameters:
  • policy (Optional[RemovalPolicy]) –

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resoure, please consult that specific resource’s documentation.

Return type:

None

get_att(attribute_name)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters:

attribute_name (str) – The name of the attribute.

Return type:

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters:

key (str) –

See:

Return type:

Any

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters:

inspector (TreeInspector) –

  • tree inspector to collect and process attributes.

Return type:

None

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters:

new_logical_id (str) – The new logical ID to use for this stack element.

Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

Returns:

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::AutoScaling::AutoScalingGroup'
auto_scaling_group_name

The name of the Auto Scaling group. This name must be unique per Region per account.

The name can contain any ASCII character 33 to 126 including most punctuation characters, digits, and upper and lowercased letters. .. epigraph:

You cannot use a colon (:) in the name.
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-autoscaling-autoscalinggroup-autoscalinggroupname

availability_zones

A list of Availability Zones where instances in the Auto Scaling group can be created.

Used for launching into the default VPC subnet in each Availability Zone when not using the VPCZoneIdentifier property, or for attaching a network interface when an existing network interface ID is specified in a launch template.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-availabilityzones

capacity_rebalance

Indicates whether Capacity Rebalancing is enabled.

Otherwise, Capacity Rebalancing is disabled. When you turn on Capacity Rebalancing, Amazon EC2 Auto Scaling attempts to launch a Spot Instance whenever Amazon EC2 notifies that a Spot Instance is at an elevated risk of interruption. After launching a new instance, it then terminates an old instance. For more information, see Use Capacity Rebalancing to handle Amazon EC2 Spot Interruptions in the in the Amazon EC2 Auto Scaling User Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-capacityrebalance

cfn_options

Options for this resource, such as condition, update policy etc.

cfn_resource_type

AWS resource type.

context

Reserved.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-context

cooldown

Only needed if you use simple scaling policies..

The amount of time, in seconds, between one scaling activity ending and another one starting due to simple scaling policies. For more information, see Scaling cooldowns for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide .

Default: 300 seconds

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-cooldown

creation_stack

return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

default_instance_warmup

The amount of time, in seconds, until a new instance is considered to have finished initializing and resource consumption to become stable after it enters the InService state.

During an instance refresh, Amazon EC2 Auto Scaling waits for the warm-up period after it replaces an instance before it moves on to replacing the next instance. Amazon EC2 Auto Scaling also waits for the warm-up period before aggregating the metrics for new instances with existing instances in the Amazon CloudWatch metrics that are used for scaling, resulting in more reliable usage data. For more information, see Set the default instance warmup for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide . .. epigraph:

To manage various warm-up settings at the group level, we recommend that you set the default instance warmup, *even if it is set to 0 seconds* . To remove a value that you previously set, include the property but specify ``-1`` for the value. However, we strongly recommend keeping the default instance warmup enabled by specifying a value of ``0`` or other nominal value.

Default: None

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-defaultinstancewarmup

desired_capacity

The desired capacity is the initial capacity of the Auto Scaling group at the time of its creation and the capacity it attempts to maintain.

It can scale beyond this capacity if you configure automatic scaling.

The number must be greater than or equal to the minimum size of the group and less than or equal to the maximum size of the group. If you do not specify a desired capacity when creating the stack, the default is the minimum size of the group.

CloudFormation marks the Auto Scaling group as successful (by setting its status to CREATE_COMPLETE) when the desired capacity is reached. However, if a maximum Spot price is set in the launch template or launch configuration that you specified, then desired capacity is not used as a criteria for success. Whether your request is fulfilled depends on Spot Instance capacity and your maximum price.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-desiredcapacity

desired_capacity_type

The unit of measurement for the value specified for desired capacity.

Amazon EC2 Auto Scaling supports DesiredCapacityType for attribute-based instance type selection only. For more information, see Creating an Auto Scaling group using attribute-based instance type selection in the Amazon EC2 Auto Scaling User Guide .

By default, Amazon EC2 Auto Scaling specifies units , which translates into number of instances.

Valid values: units | vcpu | memory-mib

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-desiredcapacitytype

health_check_grace_period

The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before checking the health status of an EC2 instance that has come into service and marking it unhealthy due to a failed health check.

This is useful if your instances do not immediately pass their health checks after they enter the InService state. For more information, see Set the health check grace period for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide .

Default: 0 seconds

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-healthcheckgraceperiod

health_check_type

Determines whether any additional health checks are performed on the instances in this group.

Amazon EC2 health checks are always on. For more information, see Health checks for Auto Scaling instances in the Amazon EC2 Auto Scaling User Guide .

The valid values are EC2 (default), ELB , and VPC_LATTICE . The VPC_LATTICE health check type is reserved for use with VPC Lattice, which is in preview release and is subject to change.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-healthchecktype

instance_id

The ID of the instance used to base the launch configuration on.

For more information, see Create an Auto Scaling group using an EC2 instance in the Amazon EC2 Auto Scaling User Guide .

If you specify LaunchTemplate , MixedInstancesPolicy , or LaunchConfigurationName , don’t specify InstanceId .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-instanceid

launch_configuration_name

The name of the launch configuration to use to launch instances.

Required only if you don’t specify LaunchTemplate , MixedInstancesPolicy , or InstanceId .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-launchconfigurationname

launch_template

Information used to specify the launch template and version to use to launch instances.

You can alternatively associate a launch template to the Auto Scaling group by specifying a MixedInstancesPolicy . For more information about creating launch templates, see Create a launch template for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide .

If you omit this property, you must specify MixedInstancesPolicy , LaunchConfigurationName , or InstanceId .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-launchtemplate

lifecycle_hook_specification_list

One or more lifecycle hooks to add to the Auto Scaling group before instances are launched.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-autoscaling-autoscalinggroup-lifecyclehookspecificationlist

load_balancer_names

A list of Classic Load Balancers associated with this Auto Scaling group.

For Application Load Balancers, Network Load Balancers, and Gateway Load Balancer, specify the TargetGroupARNs property instead.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-loadbalancernames

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Returns:

the logical ID as a stringified token. This value will only get resolved during synthesis.

max_instance_lifetime

The maximum amount of time, in seconds, that an instance can be in service.

The default is null. If specified, the value must be either 0 or a number equal to or greater than 86,400 seconds (1 day). For more information, see Replacing Auto Scaling instances based on maximum instance lifetime in the Amazon EC2 Auto Scaling User Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-maxinstancelifetime

max_size

The maximum size of the group.

With a mixed instances policy that uses instance weighting, Amazon EC2 Auto Scaling may need to go above MaxSize to meet your capacity requirements. In this event, Amazon EC2 Auto Scaling will never go above MaxSize by more than your largest instance weight (weights that define how many units each instance contributes to the desired capacity of the group).

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-maxsize

metrics_collection

Enables the monitoring of group metrics of an Auto Scaling group.

By default, these metrics are disabled.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-metricscollection

min_size

The minimum size of the group.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-minsize

mixed_instances_policy

An embedded object that specifies a mixed instances policy.

The policy includes properties that not only define the distribution of On-Demand Instances and Spot Instances, the maximum price to pay for Spot Instances (optional), and how the Auto Scaling group allocates instance types to fulfill On-Demand and Spot capacities, but also the properties that specify the instance configuration information—the launch template and instance types. The policy can also include a weight for each instance type and different launch templates for individual instance types.

For more information, see Auto Scaling groups with multiple instance types and purchase options in the Amazon EC2 Auto Scaling User Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-mixedinstancespolicy

new_instances_protected_from_scale_in

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 Using instance scale-in protection in the Amazon EC2 Auto Scaling User Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-newinstancesprotectedfromscalein

node

The construct tree node associated with this construct.

notification_configurations

Configures an Auto Scaling group to send notifications when specified events take place.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-notificationconfigurations

placement_group

The name of the placement group into which to launch your instances.

For more information, see Placement groups in the Amazon EC2 User Guide for Linux Instances . .. epigraph:

A *cluster* placement group is a logical grouping of instances within a single Availability Zone. You cannot specify multiple Availability Zones and a cluster placement group.
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-placementgroup

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

service_linked_role_arn

The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling group uses to call other AWS service on your behalf.

By default, Amazon EC2 Auto Scaling uses a service-linked role named AWSServiceRoleForAutoScaling , which it creates if it does not exist. For more information, see Service-linked roles in the Amazon EC2 Auto Scaling User Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-autoscaling-autoscalinggroup-servicelinkedrolearn

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

tags

One or more tags.

You can tag your Auto Scaling group and propagate the tags to the Amazon EC2 instances it launches. Tags are not propagated to Amazon EBS volumes. To add tags to Amazon EBS volumes, specify the tags in a launch template but use caution. If the launch template specifies an instance tag with a key that is also specified for the Auto Scaling group, Amazon EC2 Auto Scaling overrides the value of that instance tag with the value specified by the Auto Scaling group. For more information, see Tag Auto Scaling groups and instances in the Amazon EC2 Auto Scaling User Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-tags

target_group_arns

The Amazon Resource Names (ARN) of the Elastic Load Balancing target groups to associate with the Auto Scaling group.

Instances are registered as targets with the target groups. The target groups receive incoming traffic and route requests to one or more registered targets. For more information, see Use Elastic Load Balancing to distribute traffic across the instances in your Auto Scaling group in the Amazon EC2 Auto Scaling User Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-targetgrouparns

termination_policies

A policy or a list of policies that are used to select the instance to terminate.

These policies are executed in the order that you list them. For more information, see Work with Amazon EC2 Auto Scaling termination policies in the Amazon EC2 Auto Scaling User Guide .

Valid values: Default | AllocationStrategy | ClosestToNextInstanceHour | NewestInstance | OldestInstance | OldestLaunchConfiguration | OldestLaunchTemplate | arn:aws:lambda:region:account-id:function:my-function:my-alias

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-termpolicy

vpc_zone_identifier

A list of subnet IDs for a virtual private cloud (VPC) where instances in the Auto Scaling group can be created.

If this resource specifies public subnets and is also in a VPC that is defined in the same stack template, you must use the DependsOn attribute to declare a dependency on the VPC-gateway attachment . .. epigraph:

When you update ``VPCZoneIdentifier`` , this retains the same Auto Scaling group and replaces old instances with new ones, according to the specified subnets. You can optionally specify how CloudFormation handles these updates by using an `UpdatePolicy attribute <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html>`_ .

Required to launch instances into a nondefault VPC. If you specify VPCZoneIdentifier with AvailabilityZones , the subnets that you specify for this property must reside in those Availability Zones.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-vpczoneidentifier

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters:

x (Any) –

Return type:

bool

Returns:

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(construct)

Check whether the given construct is a CfnResource.

Parameters:

construct (IConstruct) –

Return type:

bool

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters:

x (Any) –

Return type:

bool

AcceleratorCountRequestProperty

class CfnAutoScalingGroup.AcceleratorCountRequestProperty(*, max=None, min=None)

Bases: object

AcceleratorCountRequest is a property of the InstanceRequirements property of the AWS::AutoScaling::AutoScalingGroup LaunchTemplateOverrides property type that describes the minimum and maximum number of accelerators for an instance type.

Parameters:
  • max (Union[int, float, None]) – The maximum value.

  • min (Union[int, float, None]) – The minimum value.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-acceleratorcountrequest.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_autoscaling as autoscaling

accelerator_count_request_property = autoscaling.CfnAutoScalingGroup.AcceleratorCountRequestProperty(
    max=123,
    min=123
)

Attributes

max

The maximum value.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-acceleratorcountrequest.html#cfn-autoscaling-autoscalinggroup-acceleratorcountrequest-max

min

The minimum value.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-acceleratorcountrequest.html#cfn-autoscaling-autoscalinggroup-acceleratorcountrequest-min

AcceleratorTotalMemoryMiBRequestProperty

class CfnAutoScalingGroup.AcceleratorTotalMemoryMiBRequestProperty(*, max=None, min=None)

Bases: object

AcceleratorTotalMemoryMiBRequest is a property of the InstanceRequirements property of the AWS::AutoScaling::AutoScalingGroup LaunchTemplateOverrides property type that describes the minimum and maximum total memory size for the accelerators for an instance type, in MiB.

Parameters:
  • max (Union[int, float, None]) – The memory maximum in MiB.

  • min (Union[int, float, None]) – The memory minimum in MiB.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-acceleratortotalmemorymibrequest.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_autoscaling as autoscaling

accelerator_total_memory_mi_bRequest_property = autoscaling.CfnAutoScalingGroup.AcceleratorTotalMemoryMiBRequestProperty(
    max=123,
    min=123
)

Attributes

max

The memory maximum in MiB.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-acceleratortotalmemorymibrequest.html#cfn-autoscaling-autoscalinggroup-acceleratortotalmemorymibrequest-max

min

The memory minimum in MiB.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-acceleratortotalmemorymibrequest.html#cfn-autoscaling-autoscalinggroup-acceleratortotalmemorymibrequest-min

BaselineEbsBandwidthMbpsRequestProperty

class CfnAutoScalingGroup.BaselineEbsBandwidthMbpsRequestProperty(*, max=None, min=None)

Bases: object

BaselineEbsBandwidthMbpsRequest is a property of the InstanceRequirements property of the AWS::AutoScaling::AutoScalingGroup LaunchTemplateOverrides property type that describes the minimum and maximum baseline bandwidth performance for an instance type, in Mbps.

Parameters:
  • max (Union[int, float, None]) – The maximum value in Mbps.

  • min (Union[int, float, None]) – The minimum value in Mbps.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-baselineebsbandwidthmbpsrequest.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_autoscaling as autoscaling

baseline_ebs_bandwidth_mbps_request_property = autoscaling.CfnAutoScalingGroup.BaselineEbsBandwidthMbpsRequestProperty(
    max=123,
    min=123
)

Attributes

max

The maximum value in Mbps.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-baselineebsbandwidthmbpsrequest.html#cfn-autoscaling-autoscalinggroup-baselineebsbandwidthmbpsrequest-max

min

The minimum value in Mbps.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-baselineebsbandwidthmbpsrequest.html#cfn-autoscaling-autoscalinggroup-baselineebsbandwidthmbpsrequest-min

InstanceRequirementsProperty

class CfnAutoScalingGroup.InstanceRequirementsProperty(*, accelerator_count=None, accelerator_manufacturers=None, accelerator_names=None, accelerator_total_memory_mib=None, accelerator_types=None, allowed_instance_types=None, bare_metal=None, baseline_ebs_bandwidth_mbps=None, burstable_performance=None, cpu_manufacturers=None, excluded_instance_types=None, instance_generations=None, local_storage=None, local_storage_types=None, memory_gib_per_v_cpu=None, memory_mib=None, network_bandwidth_gbps=None, network_interface_count=None, on_demand_max_price_percentage_over_lowest_price=None, require_hibernate_support=None, spot_max_price_percentage_over_lowest_price=None, total_local_storage_gb=None, v_cpu_count=None)

Bases: object

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 an example template, see Auto scaling template snippets .

For more information, see Creating an Auto Scaling group using attribute-based instance type selection 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 in the Amazon EC2 User Guide for Linux Instances .

InstanceRequirements is a property of the LaunchTemplateOverrides property of the AWS::AutoScaling::AutoScalingGroup LaunchTemplate property type.

Parameters:
  • accelerator_count (Union[IResolvable, AcceleratorCountRequestProperty, Dict[str, Any], None]) – The minimum and maximum number of accelerators (GPUs, FPGAs, or AWS Inferentia chips) for an instance type. To exclude accelerator-enabled instance types, set Max to 0 . Default: No minimum or maximum limits

  • accelerator_manufacturers (Optional[Sequence[str]]) – Indicates whether instance types must have accelerators by specific manufacturers. - For instance types with NVIDIA devices, specify nvidia . - For instance types with AMD devices, specify amd . - For instance types with AWS devices, specify amazon-web-services . - For instance types with Xilinx devices, specify xilinx . Default: Any manufacturer

  • accelerator_names (Optional[Sequence[str]]) – Lists the accelerators that must be on an instance type. - For instance types with NVIDIA A100 GPUs, specify a100 . - For instance types with NVIDIA V100 GPUs, specify v100 . - For instance types with NVIDIA K80 GPUs, specify k80 . - For instance types with NVIDIA T4 GPUs, specify t4 . - For instance types with NVIDIA M60 GPUs, specify m60 . - For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520 . - For instance types with Xilinx VU9P FPGAs, specify vu9p . Default: Any accelerator

  • accelerator_total_memory_mib (Union[IResolvable, AcceleratorTotalMemoryMiBRequestProperty, Dict[str, Any], None]) – The minimum and maximum total memory size for the accelerators on an instance type, in MiB. Default: No minimum or maximum limits

  • accelerator_types (Optional[Sequence[str]]) – Lists the accelerator types that must be on an instance type. - For instance types with GPU accelerators, specify gpu . - For instance types with FPGA accelerators, specify fpga . - For instance types with inference accelerators, specify inference . Default: Any accelerator type

  • allowed_instance_types (Optional[Sequence[str]]) – The instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes. You can use strings with one or more wild cards, represented by an asterisk ( * ), to allow an instance type, size, or generation. The following are examples: m5.8xlarge , c5*.* , m5a.* , r* , *3* . For example, if you specify c5* , Amazon EC2 Auto Scaling will allow the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.* , Amazon EC2 Auto Scaling will allow all the M5a instance types, but not the M5n instance types. .. epigraph:: If you specify AllowedInstanceTypes , you can’t specify ExcludedInstanceTypes . Default: All instance types

  • bare_metal (Optional[str]) – Indicates whether bare metal instance types are included, excluded, or required. Default: excluded

  • baseline_ebs_bandwidth_mbps (Union[IResolvable, BaselineEbsBandwidthMbpsRequestProperty, Dict[str, Any], None]) – The minimum and maximum baseline bandwidth performance for an instance type, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide for Linux Instances . Default: No minimum or maximum limits

  • burstable_performance (Optional[str]) – Indicates whether burstable performance instance types are included, excluded, or required. For more information, see Burstable performance instances in the Amazon EC2 User Guide for Linux Instances . Default: excluded

  • cpu_manufacturers (Optional[Sequence[str]]) – Lists which specific CPU manufacturers to include. - For instance types with Intel CPUs, specify intel . - For instance types with AMD CPUs, specify amd . - For instance types with AWS CPUs, specify amazon-web-services . .. epigraph:: Don’t confuse the CPU hardware manufacturer with the CPU hardware architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template. Default: Any manufacturer

  • excluded_instance_types (Optional[Sequence[str]]) – 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* . For example, if you specify c5* , you are excluding the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.* , Amazon EC2 Auto Scaling will exclude all the M5a instance types, but not the M5n instance types. .. epigraph:: If you specify ExcludedInstanceTypes , you can’t specify AllowedInstanceTypes . Default: No excluded instance types

  • instance_generations (Optional[Sequence[str]]) – Indicates whether current or previous generation instance types are included. - For current generation instance types, specify current . The current generation includes EC2 instance types currently recommended for use. This typically includes the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide for Linux Instances . - For previous generation instance types, specify previous . Default: Any current or previous generation

  • local_storage (Optional[str]) – Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, see Amazon EC2 instance store in the Amazon EC2 User Guide for Linux Instances . Default: included

  • local_storage_types (Optional[Sequence[str]]) – Indicates the type of local storage that is required. - For instance types with hard disk drive (HDD) storage, specify hdd . - For instance types with solid state drive (SSD) storage, specify ssd . Default: Any local storage type

  • memory_gib_per_v_cpu (Union[IResolvable, MemoryGiBPerVCpuRequestProperty, Dict[str, Any], None]) – The minimum and maximum amount of memory per vCPU for an instance type, in GiB. Default: No minimum or maximum limits

  • memory_mib (Union[IResolvable, MemoryMiBRequestProperty, Dict[str, Any], None]) – The minimum and maximum instance memory size for an instance type, in MiB.

  • network_bandwidth_gbps (Union[IResolvable, NetworkBandwidthGbpsRequestProperty, Dict[str, Any], None]) – The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps). Default: No minimum or maximum limits

  • network_interface_count (Union[IResolvable, NetworkInterfaceCountRequestProperty, Dict[str, Any], None]) – The minimum and maximum number of network interfaces for an instance type. Default: No minimum or maximum limits

  • on_demand_max_price_percentage_over_lowest_price (Union[int, float, None]) – The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage higher than the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types whose price is higher than your threshold. The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage. To turn off price protection, specify a high value, such as 999999 . If you set DesiredCapacityType to vcpu or memory-mib , the price protection threshold is applied based on the per vCPU or per memory price instead of the per instance price. Default: 20

  • require_hibernate_support (Union[bool, IResolvable, None]) – Indicates whether instance types must provide On-Demand Instance hibernation support. Default: false

  • spot_max_price_percentage_over_lowest_price (Union[int, float, None]) – The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage higher than the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types whose price is higher than your threshold. The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage. To turn off price protection, specify a high value, such as 999999 . If you set DesiredCapacityType to vcpu or memory-mib , the price protection threshold is applied based on the per vCPU or per memory price instead of the per instance price. Default: 100

  • total_local_storage_gb (Union[IResolvable, TotalLocalStorageGBRequestProperty, Dict[str, Any], None]) – The minimum and maximum total local storage size for an instance type, in GB. Default: No minimum or maximum limits

  • v_cpu_count (Union[IResolvable, VCpuCountRequestProperty, Dict[str, Any], None]) – The minimum and maximum number of vCPUs for an instance type.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_autoscaling as autoscaling

instance_requirements_property = autoscaling.CfnAutoScalingGroup.InstanceRequirementsProperty(
    accelerator_count=autoscaling.CfnAutoScalingGroup.AcceleratorCountRequestProperty(
        max=123,
        min=123
    ),
    accelerator_manufacturers=["acceleratorManufacturers"],
    accelerator_names=["acceleratorNames"],
    accelerator_total_memory_mi_b=autoscaling.CfnAutoScalingGroup.AcceleratorTotalMemoryMiBRequestProperty(
        max=123,
        min=123
    ),
    accelerator_types=["acceleratorTypes"],
    allowed_instance_types=["allowedInstanceTypes"],
    bare_metal="bareMetal",
    baseline_ebs_bandwidth_mbps=autoscaling.CfnAutoScalingGroup.BaselineEbsBandwidthMbpsRequestProperty(
        max=123,
        min=123
    ),
    burstable_performance="burstablePerformance",
    cpu_manufacturers=["cpuManufacturers"],
    excluded_instance_types=["excludedInstanceTypes"],
    instance_generations=["instanceGenerations"],
    local_storage="localStorage",
    local_storage_types=["localStorageTypes"],
    memory_gi_bPer_vCpu=autoscaling.CfnAutoScalingGroup.MemoryGiBPerVCpuRequestProperty(
        max=123,
        min=123
    ),
    memory_mi_b=autoscaling.CfnAutoScalingGroup.MemoryMiBRequestProperty(
        max=123,
        min=123
    ),
    network_bandwidth_gbps=autoscaling.CfnAutoScalingGroup.NetworkBandwidthGbpsRequestProperty(
        max=123,
        min=123
    ),
    network_interface_count=autoscaling.CfnAutoScalingGroup.NetworkInterfaceCountRequestProperty(
        max=123,
        min=123
    ),
    on_demand_max_price_percentage_over_lowest_price=123,
    require_hibernate_support=False,
    spot_max_price_percentage_over_lowest_price=123,
    total_local_storage_gb=autoscaling.CfnAutoScalingGroup.TotalLocalStorageGBRequestProperty(
        max=123,
        min=123
    ),
    v_cpu_count=autoscaling.CfnAutoScalingGroup.VCpuCountRequestProperty(
        max=123,
        min=123
    )
)

Attributes

accelerator_count

The minimum and maximum number of accelerators (GPUs, FPGAs, or AWS Inferentia chips) for an instance type.

To exclude accelerator-enabled instance types, set Max to 0 .

Default: No minimum or maximum limits

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-acceleratorcount

accelerator_manufacturers

Indicates whether instance types must have accelerators by specific manufacturers.

  • For instance types with NVIDIA devices, specify nvidia .

  • For instance types with AMD devices, specify amd .

  • For instance types with AWS devices, specify amazon-web-services .

  • For instance types with Xilinx devices, specify xilinx .

Default: Any manufacturer

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-acceleratormanufacturers

accelerator_names

Lists the accelerators that must be on an instance type.

  • For instance types with NVIDIA A100 GPUs, specify a100 .

  • For instance types with NVIDIA V100 GPUs, specify v100 .

  • For instance types with NVIDIA K80 GPUs, specify k80 .

  • For instance types with NVIDIA T4 GPUs, specify t4 .

  • For instance types with NVIDIA M60 GPUs, specify m60 .

  • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520 .

  • For instance types with Xilinx VU9P FPGAs, specify vu9p .

Default: Any accelerator

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-acceleratornames

accelerator_total_memory_mib

The minimum and maximum total memory size for the accelerators on an instance type, in MiB.

Default: No minimum or maximum limits

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-acceleratortotalmemorymib

accelerator_types

Lists the accelerator types that must be on an instance type.

  • For instance types with GPU accelerators, specify gpu .

  • For instance types with FPGA accelerators, specify fpga .

  • For instance types with inference accelerators, specify inference .

Default: Any accelerator type

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-acceleratortypes

allowed_instance_types

The instance types to apply your specified attributes against.

All other instance types are ignored, even if they match your specified attributes.

You can use strings with one or more wild cards, represented by an asterisk ( * ), to allow an instance type, size, or generation. The following are examples: m5.8xlarge , c5*.* , m5a.* , r* , *3* .

For example, if you specify c5* , Amazon EC2 Auto Scaling will allow the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.* , Amazon EC2 Auto Scaling will allow all the M5a instance types, but not the M5n instance types. .. epigraph:

If you specify ``AllowedInstanceTypes`` , you can't specify ``ExcludedInstanceTypes`` .

Default: All instance types

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-allowedinstancetypes

bare_metal

Indicates whether bare metal instance types are included, excluded, or required.

Default: excluded

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-baremetal

baseline_ebs_bandwidth_mbps

The minimum and maximum baseline bandwidth performance for an instance type, in Mbps.

For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide for Linux Instances .

Default: No minimum or maximum limits

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-baselineebsbandwidthmbps

burstable_performance

Indicates whether burstable performance instance types are included, excluded, or required.

For more information, see Burstable performance instances in the Amazon EC2 User Guide for Linux Instances .

Default: excluded

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-burstableperformance

cpu_manufacturers

Lists which specific CPU manufacturers to include.

  • For instance types with Intel CPUs, specify intel .

  • For instance types with AMD CPUs, specify amd .

  • For instance types with AWS CPUs, specify amazon-web-services .

Don’t confuse the CPU hardware manufacturer with the CPU hardware architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

Default: Any manufacturer

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-cpumanufacturers

excluded_instance_types

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* .

For example, if you specify c5* , you are excluding the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.* , Amazon EC2 Auto Scaling will exclude all the M5a instance types, but not the M5n instance types. .. epigraph:

If you specify ``ExcludedInstanceTypes`` , you can't specify ``AllowedInstanceTypes`` .

Default: No excluded instance types

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-excludedinstancetypes

instance_generations

Indicates whether current or previous generation instance types are included.

  • For current generation instance types, specify current . The current generation includes EC2 instance types currently recommended for use. This typically includes the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide for Linux Instances .

  • For previous generation instance types, specify previous .

Default: Any current or previous generation

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-instancegenerations

local_storage

Indicates whether instance types with instance store volumes are included, excluded, or required.

For more information, see Amazon EC2 instance store in the Amazon EC2 User Guide for Linux Instances .

Default: included

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-localstorage

local_storage_types

Indicates the type of local storage that is required.

  • For instance types with hard disk drive (HDD) storage, specify hdd .

  • For instance types with solid state drive (SSD) storage, specify ssd .

Default: Any local storage type

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-localstoragetypes

memory_gib_per_v_cpu

The minimum and maximum amount of memory per vCPU for an instance type, in GiB.

Default: No minimum or maximum limits

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-memorygibpervcpu

memory_mib

The minimum and maximum instance memory size for an instance type, in MiB.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-memorymib

network_bandwidth_gbps

The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps).

Default: No minimum or maximum limits

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-networkbandwidthgbps

network_interface_count

The minimum and maximum number of network interfaces for an instance type.

Default: No minimum or maximum limits

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-networkinterfacecount

on_demand_max_price_percentage_over_lowest_price

The price protection threshold for On-Demand Instances.

This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage higher than the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types whose price is higher than your threshold. The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage. To turn off price protection, specify a high value, such as 999999 .

If you set DesiredCapacityType to vcpu or memory-mib , the price protection threshold is applied based on the per vCPU or per memory price instead of the per instance price.

Default: 20

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-ondemandmaxpricepercentageoverlowestprice

require_hibernate_support

Indicates whether instance types must provide On-Demand Instance hibernation support.

Default: false

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-requirehibernatesupport

spot_max_price_percentage_over_lowest_price

The price protection threshold for Spot Instances.

This is the maximum you’ll pay for a Spot Instance, expressed as a percentage higher than the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 Auto Scaling selects instance types with your attributes, we will exclude instance types whose price is higher than your threshold. The parameter accepts an integer, which Amazon EC2 Auto Scaling interprets as a percentage. To turn off price protection, specify a high value, such as 999999 .

If you set DesiredCapacityType to vcpu or memory-mib , the price protection threshold is applied based on the per vCPU or per memory price instead of the per instance price.

Default: 100

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-spotmaxpricepercentageoverlowestprice

total_local_storage_gb

The minimum and maximum total local storage size for an instance type, in GB.

Default: No minimum or maximum limits

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-totallocalstoragegb

v_cpu_count

The minimum and maximum number of vCPUs for an instance type.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-vcpucount

InstancesDistributionProperty

class CfnAutoScalingGroup.InstancesDistributionProperty(*, on_demand_allocation_strategy=None, on_demand_base_capacity=None, on_demand_percentage_above_base_capacity=None, spot_allocation_strategy=None, spot_instance_pools=None, spot_max_price=None)

Bases: object

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.

For more information, see Auto Scaling groups with multiple instance types and purchase options in the Amazon EC2 Auto Scaling User Guide .

InstancesDistribution is a property of the AWS::AutoScaling::AutoScalingGroup MixedInstancesPolicy property type.

Parameters:
  • on_demand_allocation_strategy (Optional[str]) – 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. The following lists the valid values: - lowest-price - Uses price to determine which instance types are the highest priority, launching the lowest priced instance types within an Availability Zone first. This is the default value for Auto Scaling groups that specify InstanceRequirements . - prioritized - You set the order of instance types for the launch template overrides from highest to lowest priority (from first to last in the list). Amazon EC2 Auto Scaling launches your highest priority instance types first. If all your On-Demand capacity cannot be fulfilled using your highest priority instance type, then Amazon EC2 Auto Scaling launches the remaining capacity using the second priority instance type, and so on. This is the default value for Auto Scaling groups that don’t specify InstanceRequirements and cannot be used for groups that do.

  • on_demand_base_capacity (Union[int, float, 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. This number has the same unit of measurement as the group’s desired capacity. If you change the default unit of measurement (number of instances) by specifying weighted capacity values in your launch template overrides list, or by changing the default desired capacity type setting of the group, you must specify this number using the same unit of measurement. Default: 0 .. epigraph:: An update to this setting means a gradual replacement of instances to adjust the current On-Demand Instance levels. When replacing instances, Amazon EC2 Auto Scaling launches new instances before terminating the previous ones.

  • on_demand_percentage_above_base_capacity (Union[int, float, 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. Default: 100 .. epigraph:: An update to this setting means a gradual replacement of instances to adjust the current On-Demand and Spot Instance levels for your additional capacity higher than the base capacity. When replacing instances, Amazon EC2 Auto Scaling launches new instances before terminating the previous ones.

  • spot_allocation_strategy (Optional[str]) – 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. The following lists the valid values: - capacity-optimized - Requests Spot Instances using pools that are optimally chosen based on the available Spot capacity. This strategy has the lowest risk of interruption. To give certain instance types a higher chance of launching first, use capacity-optimized-prioritized . - capacity-optimized-prioritized - You set the order of instance types for the launch template overrides from highest to lowest priority (from first to last in the list). Amazon EC2 Auto Scaling honors the instance type priorities on a best effort basis but optimizes for capacity first. Note that if the On-Demand allocation strategy is set to prioritized , the same priority is applied when fulfilling On-Demand capacity. This is not a valid value for Auto Scaling groups that specify InstanceRequirements . - lowest-price - Requests Spot Instances using the lowest priced pools within an Availability Zone, across the number of Spot pools that you specify for the SpotInstancePools property. To ensure that your desired capacity is met, you might receive Spot Instances from several pools. This is the default value, but it might lead to high interruption rates because this strategy only considers instance price and not available capacity. - price-capacity-optimized (recommended) - The price and capacity optimized allocation strategy looks at both price and capacity to select the Spot Instance pools that are the least likely to be interrupted and have the lowest possible price.

  • spot_instance_pools (Union[int, float, 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. Default: 2

  • spot_max_price (Optional[str]) – 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. .. epigraph:: If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify one. Valid Range: Minimum value of 0.001

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancesdistribution.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_autoscaling as autoscaling

instances_distribution_property = autoscaling.CfnAutoScalingGroup.InstancesDistributionProperty(
    on_demand_allocation_strategy="onDemandAllocationStrategy",
    on_demand_base_capacity=123,
    on_demand_percentage_above_base_capacity=123,
    spot_allocation_strategy="spotAllocationStrategy",
    spot_instance_pools=123,
    spot_max_price="spotMaxPrice"
)

Attributes

on_demand_allocation_strategy

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.

The following lists the valid values:

  • lowest-price - Uses price to determine which instance types are the highest priority, launching the lowest priced instance types within an Availability Zone first. This is the default value for Auto Scaling groups that specify InstanceRequirements .

  • prioritized - You set the order of instance types for the launch template overrides from highest to lowest priority (from first to last in the list). Amazon EC2 Auto Scaling launches your highest priority instance types first. If all your On-Demand capacity cannot be fulfilled using your highest priority instance type, then Amazon EC2 Auto Scaling launches the remaining capacity using the second priority instance type, and so on. This is the default value for Auto Scaling groups that don’t specify InstanceRequirements and cannot be used for groups that do.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancesdistribution.html#cfn-autoscaling-autoscalinggroup-instancesdistribution-ondemandallocationstrategy

on_demand_base_capacity

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.

This number has the same unit of measurement as the group’s desired capacity. If you change the default unit of measurement (number of instances) by specifying weighted capacity values in your launch template overrides list, or by changing the default desired capacity type setting of the group, you must specify this number using the same unit of measurement.

Default: 0 .. epigraph:

An update to this setting means a gradual replacement of instances to adjust the current On-Demand Instance levels. When replacing instances, Amazon EC2 Auto Scaling launches new instances before terminating the previous ones.
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancesdistribution.html#cfn-autoscaling-autoscalinggroup-instancesdistribution-ondemandbasecapacity

on_demand_percentage_above_base_capacity

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.

Default: 100 .. epigraph:

An update to this setting means a gradual replacement of instances to adjust the current On-Demand and Spot Instance levels for your additional capacity higher than the base capacity. When replacing instances, Amazon EC2 Auto Scaling launches new instances before terminating the previous ones.
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancesdistribution.html#cfn-autoscaling-autoscalinggroup-instancesdistribution-ondemandpercentageabovebasecapacity

spot_allocation_strategy

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.

The following lists the valid values:

  • capacity-optimized - Requests Spot Instances using pools that are optimally chosen based on the available Spot capacity. This strategy has the lowest risk of interruption. To give certain instance types a higher chance of launching first, use capacity-optimized-prioritized .

  • capacity-optimized-prioritized - You set the order of instance types for the launch template overrides from highest to lowest priority (from first to last in the list). Amazon EC2 Auto Scaling honors the instance type priorities on a best effort basis but optimizes for capacity first. Note that if the On-Demand allocation strategy is set to prioritized , the same priority is applied when fulfilling On-Demand capacity. This is not a valid value for Auto Scaling groups that specify InstanceRequirements .

  • lowest-price - Requests Spot Instances using the lowest priced pools within an Availability Zone, across the number of Spot pools that you specify for the SpotInstancePools property. To ensure that your desired capacity is met, you might receive Spot Instances from several pools. This is the default value, but it might lead to high interruption rates because this strategy only considers instance price and not available capacity.

  • price-capacity-optimized (recommended) - The price and capacity optimized allocation strategy looks at both price and capacity to select the Spot Instance pools that are the least likely to be interrupted and have the lowest possible price.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancesdistribution.html#cfn-autoscaling-autoscalinggroup-instancesdistribution-spotallocationstrategy

spot_instance_pools

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.

Default: 2

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancesdistribution.html#cfn-autoscaling-autoscalinggroup-instancesdistribution-spotinstancepools

spot_max_price

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. .. epigraph:

If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify one.

Valid Range: Minimum value of 0.001

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-instancesdistribution.html#cfn-autoscaling-autoscalinggroup-instancesdistribution-spotmaxprice

LaunchTemplateOverridesProperty

class CfnAutoScalingGroup.LaunchTemplateOverridesProperty(*, instance_requirements=None, instance_type=None, launch_template_specification=None, weighted_capacity=None)

Bases: object

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.

LaunchTemplateOverrides is a property of the AWS::AutoScaling::AutoScalingGroup LaunchTemplate property type.

Parameters:
  • instance_requirements (Union[IResolvable, InstanceRequirementsProperty, Dict[str, Any], 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. You can specify up to four separate sets of instance requirements per Auto Scaling group. This is useful for provisioning instances from different Amazon Machine Images (AMIs) in the same Auto Scaling group. To do this, create the AMIs and create a new launch template for each AMI. Then, create a compatible set of instance requirements for each launch template. .. epigraph:: If you specify InstanceRequirements , you can’t specify InstanceType .

  • instance_type (Optional[str]) –

    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 in the Amazon Elastic Compute Cloud User Guide . You can specify up to 40 instance types per Auto Scaling group.

  • launch_template_specification (Union[IResolvable, LaunchTemplateSpecificationProperty, Dict[str, Any], 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 in the Amazon EC2 Auto Scaling User Guide . You can specify up to 20 launch templates per Auto Scaling group. The launch templates specified in the overrides and in the LaunchTemplate definition count towards this limit.

  • weighted_capacity (Optional[str]) – 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 instance weighting for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide . Value must be in the range of 1-999. If you specify a value for WeightedCapacity for one instance type, you must specify a value for WeightedCapacity for all of them. .. epigraph:: Every Auto Scaling group has three size parameters ( DesiredCapacity , MaxSize , and MinSize ). Usually, you set these sizes based on a specific number of instances. However, if you configure a mixed instances policy that defines weights for the instance types, you must specify these sizes with the same units that you use for weighting instances.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplateoverrides.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_autoscaling as autoscaling

launch_template_overrides_property = autoscaling.CfnAutoScalingGroup.LaunchTemplateOverridesProperty(
    instance_requirements=autoscaling.CfnAutoScalingGroup.InstanceRequirementsProperty(
        accelerator_count=autoscaling.CfnAutoScalingGroup.AcceleratorCountRequestProperty(
            max=123,
            min=123
        ),
        accelerator_manufacturers=["acceleratorManufacturers"],
        accelerator_names=["acceleratorNames"],
        accelerator_total_memory_mi_b=autoscaling.CfnAutoScalingGroup.AcceleratorTotalMemoryMiBRequestProperty(
            max=123,
            min=123
        ),
        accelerator_types=["acceleratorTypes"],
        allowed_instance_types=["allowedInstanceTypes"],
        bare_metal="bareMetal",
        baseline_ebs_bandwidth_mbps=autoscaling.CfnAutoScalingGroup.BaselineEbsBandwidthMbpsRequestProperty(
            max=123,
            min=123
        ),
        burstable_performance="burstablePerformance",
        cpu_manufacturers=["cpuManufacturers"],
        excluded_instance_types=["excludedInstanceTypes"],
        instance_generations=["instanceGenerations"],
        local_storage="localStorage",
        local_storage_types=["localStorageTypes"],
        memory_gi_bPer_vCpu=autoscaling.CfnAutoScalingGroup.MemoryGiBPerVCpuRequestProperty(
            max=123,
            min=123
        ),
        memory_mi_b=autoscaling.CfnAutoScalingGroup.MemoryMiBRequestProperty(
            max=123,
            min=123
        ),
        network_bandwidth_gbps=autoscaling.CfnAutoScalingGroup.NetworkBandwidthGbpsRequestProperty(
            max=123,
            min=123
        ),
        network_interface_count=autoscaling.CfnAutoScalingGroup.NetworkInterfaceCountRequestProperty(
            max=123,
            min=123
        ),
        on_demand_max_price_percentage_over_lowest_price=123,
        require_hibernate_support=False,
        spot_max_price_percentage_over_lowest_price=123,
        total_local_storage_gb=autoscaling.CfnAutoScalingGroup.TotalLocalStorageGBRequestProperty(
            max=123,
            min=123
        ),
        v_cpu_count=autoscaling.CfnAutoScalingGroup.VCpuCountRequestProperty(
            max=123,
            min=123
        )
    ),
    instance_type="instanceType",
    launch_template_specification=autoscaling.CfnAutoScalingGroup.LaunchTemplateSpecificationProperty(
        version="version",

        # the properties below are optional
        launch_template_id="launchTemplateId",
        launch_template_name="launchTemplateName"
    ),
    weighted_capacity="weightedCapacity"
)

Attributes

instance_requirements

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.

You can specify up to four separate sets of instance requirements per Auto Scaling group. This is useful for provisioning instances from different Amazon Machine Images (AMIs) in the same Auto Scaling group. To do this, create the AMIs and create a new launch template for each AMI. Then, create a compatible set of instance requirements for each launch template. .. epigraph:

If you specify ``InstanceRequirements`` , you can't specify ``InstanceType`` .
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplateoverrides.html#cfn-as-mixedinstancespolicy-instancerequirements

instance_type

//docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html>`_ in the Amazon Elastic Compute Cloud User Guide .

You can specify up to 40 instance types per Auto Scaling group.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplateoverrides.html#cfn-autoscaling-autoscalinggroup-launchtemplateoverrides-instancetype

Type:

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

launch_template_specification

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 in the Amazon EC2 Auto Scaling User Guide .

You can specify up to 20 launch templates per Auto Scaling group. The launch templates specified in the overrides and in the LaunchTemplate definition count towards this limit.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplateoverrides.html#cfn-autoscaling-autoscalinggroup-launchtemplateoverrides-launchtemplatespecification

weighted_capacity

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 instance weighting for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide . Value must be in the range of 1-999.

If you specify a value for WeightedCapacity for one instance type, you must specify a value for WeightedCapacity for all of them. .. epigraph:

Every Auto Scaling group has three size parameters ( ``DesiredCapacity`` , ``MaxSize`` , and ``MinSize`` ). Usually, you set these sizes based on a specific number of instances. However, if you configure a mixed instances policy that defines weights for the instance types, you must specify these sizes with the same units that you use for weighting instances.
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplateoverrides.html#cfn-autoscaling-autoscalinggroup-launchtemplateoverrides-weightedcapacity

LaunchTemplateProperty

class CfnAutoScalingGroup.LaunchTemplateProperty(*, launch_template_specification, overrides=None)

Bases: object

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

LaunchTemplate is a property of the AWS::AutoScaling::AutoScalingGroup MixedInstancesPolicy property type.

Parameters:
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplate.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_autoscaling as autoscaling

launch_template_property = autoscaling.CfnAutoScalingGroup.LaunchTemplateProperty(
    launch_template_specification=autoscaling.CfnAutoScalingGroup.LaunchTemplateSpecificationProperty(
        version="version",

        # the properties below are optional
        launch_template_id="launchTemplateId",
        launch_template_name="launchTemplateName"
    ),

    # the properties below are optional
    overrides=[autoscaling.CfnAutoScalingGroup.LaunchTemplateOverridesProperty(
        instance_requirements=autoscaling.CfnAutoScalingGroup.InstanceRequirementsProperty(
            accelerator_count=autoscaling.CfnAutoScalingGroup.AcceleratorCountRequestProperty(
                max=123,
                min=123
            ),
            accelerator_manufacturers=["acceleratorManufacturers"],
            accelerator_names=["acceleratorNames"],
            accelerator_total_memory_mi_b=autoscaling.CfnAutoScalingGroup.AcceleratorTotalMemoryMiBRequestProperty(
                max=123,
                min=123
            ),
            accelerator_types=["acceleratorTypes"],
            allowed_instance_types=["allowedInstanceTypes"],
            bare_metal="bareMetal",
            baseline_ebs_bandwidth_mbps=autoscaling.CfnAutoScalingGroup.BaselineEbsBandwidthMbpsRequestProperty(
                max=123,
                min=123
            ),
            burstable_performance="burstablePerformance",
            cpu_manufacturers=["cpuManufacturers"],
            excluded_instance_types=["excludedInstanceTypes"],
            instance_generations=["instanceGenerations"],
            local_storage="localStorage",
            local_storage_types=["localStorageTypes"],
            memory_gi_bPer_vCpu=autoscaling.CfnAutoScalingGroup.MemoryGiBPerVCpuRequestProperty(
                max=123,
                min=123
            ),
            memory_mi_b=autoscaling.CfnAutoScalingGroup.MemoryMiBRequestProperty(
                max=123,
                min=123
            ),
            network_bandwidth_gbps=autoscaling.CfnAutoScalingGroup.NetworkBandwidthGbpsRequestProperty(
                max=123,
                min=123
            ),
            network_interface_count=autoscaling.CfnAutoScalingGroup.NetworkInterfaceCountRequestProperty(
                max=123,
                min=123
            ),
            on_demand_max_price_percentage_over_lowest_price=123,
            require_hibernate_support=False,
            spot_max_price_percentage_over_lowest_price=123,
            total_local_storage_gb=autoscaling.CfnAutoScalingGroup.TotalLocalStorageGBRequestProperty(
                max=123,
                min=123
            ),
            v_cpu_count=autoscaling.CfnAutoScalingGroup.VCpuCountRequestProperty(
                max=123,
                min=123
            )
        ),
        instance_type="instanceType",
        launch_template_specification=autoscaling.CfnAutoScalingGroup.LaunchTemplateSpecificationProperty(
            version="version",

            # the properties below are optional
            launch_template_id="launchTemplateId",
            launch_template_name="launchTemplateName"
        ),
        weighted_capacity="weightedCapacity"
    )]
)

Attributes

launch_template_specification

The launch template.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplate.html#cfn-as-group-launchtemplate

overrides

Any properties that you specify override the same properties in the launch template.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-mixedinstancespolicy-launchtemplate.html#cfn-as-mixedinstancespolicy-overrides

LaunchTemplateSpecificationProperty

class CfnAutoScalingGroup.LaunchTemplateSpecificationProperty(*, version, launch_template_id=None, launch_template_name=None)

Bases: object

Specifies a launch template to use when provisioning EC2 instances for an Auto Scaling group.

You must specify the following:

  • The ID or the name of the launch template, but not both.

  • The version of the launch template.

LaunchTemplateSpecification is property of the AWS::AutoScaling::AutoScalingGroup resource. It is also a property of the AWS::AutoScaling::AutoScalingGroup LaunchTemplate and AWS::AutoScaling::AutoScalingGroup LaunchTemplateOverrides property types.

For information about creating a launch template, see AWS::EC2::LaunchTemplate and Create a launch template for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide .

For examples of launch templates, see Auto scaling template snippets and the Examples section in the AWS::EC2::LaunchTemplate resource.

Parameters:
  • version (str) –

    The version number of the launch template. Specifying $Latest or $Default for the template version number is not supported. However, you can specify LatestVersionNumber or DefaultVersionNumber using the Fn::GetAtt intrinsic function. For more information, see Fn::GetAtt . .. epigraph:: For an example of using the Fn::GetAtt function, see the Examples section of the AWS::AutoScaling::AutoScalingGroup resource.

  • launch_template_id (Optional[str]) – The ID of the launch template. You must specify the LaunchTemplateID or the LaunchTemplateName , but not both.

  • launch_template_name (Optional[str]) – The name of the launch template. You must specify the LaunchTemplateName or the LaunchTemplateID , but not both.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplatespecification.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_autoscaling as autoscaling

launch_template_specification_property = autoscaling.CfnAutoScalingGroup.LaunchTemplateSpecificationProperty(
    version="version",

    # the properties below are optional
    launch_template_id="launchTemplateId",
    launch_template_name="launchTemplateName"
)

Attributes

launch_template_id

The ID of the launch template.

You must specify the LaunchTemplateID or the LaunchTemplateName , but not both.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplatespecification.html#cfn-autoscaling-autoscalinggroup-launchtemplatespecification-launchtemplateid

launch_template_name

The name of the launch template.

You must specify the LaunchTemplateName or the LaunchTemplateID , but not both.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplatespecification.html#cfn-autoscaling-autoscalinggroup-launchtemplatespecification-launchtemplatename

version

The version number of the launch template.

Specifying $Latest or $Default for the template version number is not supported. However, you can specify LatestVersionNumber or DefaultVersionNumber using the Fn::GetAtt intrinsic function. For more information, see Fn::GetAtt . .. epigraph:

For an example of using the ``Fn::GetAtt`` function, see the `Examples <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#aws-properties-as-group--examples>`_ section of the ``AWS::AutoScaling::AutoScalingGroup`` resource.
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplatespecification.html#cfn-autoscaling-autoscalinggroup-launchtemplatespecification-version

LifecycleHookSpecificationProperty

class CfnAutoScalingGroup.LifecycleHookSpecificationProperty(*, lifecycle_hook_name, lifecycle_transition, default_result=None, heartbeat_timeout=None, notification_metadata=None, notification_target_arn=None, role_arn=None)

Bases: object

LifecycleHookSpecification specifies a lifecycle hook for the LifecycleHookSpecificationList property of the AWS::AutoScaling::AutoScalingGroup resource. A lifecycle hook specifies actions to perform when Amazon EC2 Auto Scaling launches or terminates instances.

For more information, see Amazon EC2 Auto Scaling lifecycle hooks in the Amazon EC2 Auto Scaling User Guide . You can find a sample template snippet in the Examples section of the AWS::AutoScaling::LifecycleHook resource.

Parameters:
  • lifecycle_hook_name (str) – The name of the lifecycle hook.

  • lifecycle_transition (str) – The lifecycle transition. For Auto Scaling groups, there are two major lifecycle transitions. - To create a lifecycle hook for scale-out events, specify autoscaling:EC2_INSTANCE_LAUNCHING . - To create a lifecycle hook for scale-in events, specify autoscaling:EC2_INSTANCE_TERMINATING .

  • default_result (Optional[str]) – The action the Auto Scaling group takes when the lifecycle hook timeout elapses or if an unexpected failure occurs. The default value is ABANDON . Valid values: CONTINUE | ABANDON

  • heartbeat_timeout (Union[int, float, 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).

  • notification_metadata (Optional[str]) – Additional information that you want to include any time Amazon EC2 Auto Scaling sends a message to the notification target.

  • notification_target_arn (Optional[str]) – 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.

  • role_arn (Optional[str]) – 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 Configure a notification target for a lifecycle hook in the Amazon EC2 Auto Scaling User Guide . Valid only if the notification target is an Amazon SNS topic or an Amazon SQS queue.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-lifecyclehookspecification.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_autoscaling as autoscaling

lifecycle_hook_specification_property = autoscaling.CfnAutoScalingGroup.LifecycleHookSpecificationProperty(
    lifecycle_hook_name="lifecycleHookName",
    lifecycle_transition="lifecycleTransition",

    # the properties below are optional
    default_result="defaultResult",
    heartbeat_timeout=123,
    notification_metadata="notificationMetadata",
    notification_target_arn="notificationTargetArn",
    role_arn="roleArn"
)

Attributes

default_result

The action the Auto Scaling group takes when the lifecycle hook timeout elapses or if an unexpected failure occurs.

The default value is ABANDON .

Valid values: CONTINUE | ABANDON

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-lifecyclehookspecification.html#cfn-autoscaling-autoscalinggroup-lifecyclehookspecification-defaultresult

heartbeat_timeout

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).

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-lifecyclehookspecification.html#cfn-autoscaling-autoscalinggroup-lifecyclehookspecification-heartbeattimeout

lifecycle_hook_name

The name of the lifecycle hook.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-lifecyclehookspecification.html#cfn-autoscaling-autoscalinggroup-lifecyclehookspecification-lifecyclehookname

lifecycle_transition

The lifecycle transition. For Auto Scaling groups, there are two major lifecycle transitions.

  • To create a lifecycle hook for scale-out events, specify autoscaling:EC2_INSTANCE_LAUNCHING .

  • To create a lifecycle hook for scale-in events, specify autoscaling:EC2_INSTANCE_TERMINATING .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-lifecyclehookspecification.html#cfn-autoscaling-autoscalinggroup-lifecyclehookspecification-lifecycletransition

notification_metadata

Additional information that you want to include any time Amazon EC2 Auto Scaling sends a message to the notification target.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-lifecyclehookspecification.html#cfn-autoscaling-autoscalinggroup-lifecyclehookspecification-notificationmetadata

notification_target_arn

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.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-lifecyclehookspecification.html#cfn-autoscaling-autoscalinggroup-lifecyclehookspecification-notificationtargetarn

role_arn

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 Configure a notification target for a lifecycle hook in the Amazon EC2 Auto Scaling User Guide .

Valid only if the notification target is an Amazon SNS topic or an Amazon SQS queue.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-lifecyclehookspecification.html#cfn-autoscaling-autoscalinggroup-lifecyclehookspecification-rolearn

MemoryGiBPerVCpuRequestProperty

class CfnAutoScalingGroup.MemoryGiBPerVCpuRequestProperty(*, max=None, min=None)

Bases: object

MemoryGiBPerVCpuRequest is a property of the InstanceRequirements property of the AWS::AutoScaling::AutoScalingGroup LaunchTemplateOverrides property type that describes the minimum and maximum amount of memory per vCPU for an instance type, in GiB.

Parameters:
  • max (Union[int, float, None]) – The memory maximum in GiB.

  • min (Union[int, float, None]) – The memory minimum in GiB.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-memorygibpervcpurequest.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_autoscaling as autoscaling

memory_gi_bPer_vCpu_request_property = autoscaling.CfnAutoScalingGroup.MemoryGiBPerVCpuRequestProperty(
    max=123,
    min=123
)

Attributes

max

The memory maximum in GiB.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-memorygibpervcpurequest.html#cfn-autoscaling-autoscalinggroup-memorygibpervcpurequest-max

min

The memory minimum in GiB.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-memorygibpervcpurequest.html#cfn-autoscaling-autoscalinggroup-memorygibpervcpurequest-min

MemoryMiBRequestProperty

class CfnAutoScalingGroup.MemoryMiBRequestProperty(*, max=None, min=None)

Bases: object

MemoryMiBRequest is a property of the InstanceRequirements property of the AWS::AutoScaling::AutoScalingGroup LaunchTemplateOverrides property type that describes the minimum and maximum instance memory size for an instance type, in MiB.

Parameters:
  • max (Union[int, float, None]) – The memory maximum in MiB.

  • min (Union[int, float, None]) – The memory minimum in MiB.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-memorymibrequest.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_autoscaling as autoscaling

memory_mi_bRequest_property = autoscaling.CfnAutoScalingGroup.MemoryMiBRequestProperty(
    max=123,
    min=123
)

Attributes

max

The memory maximum in MiB.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-memorymibrequest.html#cfn-autoscaling-autoscalinggroup-memorymibrequest-max

min

The memory minimum in MiB.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-memorymibrequest.html#cfn-autoscaling-autoscalinggroup-memorymibrequest-min

MetricsCollectionProperty

class CfnAutoScalingGroup.MetricsCollectionProperty(*, granularity, metrics=None)

Bases: object

MetricsCollection is a property of the AWS::AutoScaling::AutoScalingGroup resource that describes the group metrics that an Amazon EC2 Auto Scaling group sends to Amazon CloudWatch. These metrics describe the group rather than any of its instances.

For more information, see Monitor CloudWatch metrics for your Auto Scaling groups and instances in the Amazon EC2 Auto Scaling User Guide . You can find a sample template snippet in the Examples section of the AWS::AutoScaling::AutoScalingGroup resource.

Parameters:
  • granularity (str) – The frequency at which Amazon EC2 Auto Scaling sends aggregated data to CloudWatch. The only valid value is 1Minute .

  • metrics (Optional[Sequence[str]]) – Identifies the metrics to enable. You can specify one or more of the following metrics: - GroupMinSize - GroupMaxSize - GroupDesiredCapacity - GroupInServiceInstances - GroupPendingInstances - GroupStandbyInstances - GroupTerminatingInstances - GroupTotalInstances - GroupInServiceCapacity - GroupPendingCapacity - GroupStandbyCapacity - GroupTerminatingCapacity - GroupTotalCapacity - WarmPoolDesiredCapacity - WarmPoolWarmedCapacity - WarmPoolPendingCapacity - WarmPoolTerminatingCapacity - WarmPoolTotalCapacity - GroupAndWarmPoolDesiredCapacity - GroupAndWarmPoolTotalCapacity If you specify Granularity and don’t specify any metrics, all metrics are enabled. For more information, see Auto Scaling group metrics in the Amazon EC2 Auto Scaling User Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-metricscollection.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_autoscaling as autoscaling

metrics_collection_property = autoscaling.CfnAutoScalingGroup.MetricsCollectionProperty(
    granularity="granularity",

    # the properties below are optional
    metrics=["metrics"]
)

Attributes

granularity

The frequency at which Amazon EC2 Auto Scaling sends aggregated data to CloudWatch.

The only valid value is 1Minute .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-metricscollection.html#cfn-as-metricscollection-granularity

metrics

Identifies the metrics to enable.

You can specify one or more of the following metrics:

  • GroupMinSize

  • GroupMaxSize

  • GroupDesiredCapacity

  • GroupInServiceInstances

  • GroupPendingInstances

  • GroupStandbyInstances

  • GroupTerminatingInstances

  • GroupTotalInstances

  • GroupInServiceCapacity

  • GroupPendingCapacity

  • GroupStandbyCapacity

  • GroupTerminatingCapacity

  • GroupTotalCapacity

  • WarmPoolDesiredCapacity

  • WarmPoolWarmedCapacity

  • WarmPoolPendingCapacity

  • WarmPoolTerminatingCapacity

  • WarmPoolTotalCapacity

  • GroupAndWarmPoolDesiredCapacity

  • GroupAndWarmPoolTotalCapacity

If you specify Granularity and don’t specify any metrics, all metrics are enabled.

For more information, see Auto Scaling group metrics in the Amazon EC2 Auto Scaling User Guide .

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-metricscollection.html#cfn-as-metricscollection-metrics

MixedInstancesPolicyProperty

class CfnAutoScalingGroup.MixedInstancesPolicyProperty(*, launch_template, instances_distribution=None)

Bases: object

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 in the Amazon EC2 Auto Scaling User Guide .

You can create a mixed instances policy for new and existing Auto Scaling groups. You must use a launch template to configure the policy. You cannot use a launch configuration.

There are key differences between Spot Instances and On-Demand Instances:

  • The price for Spot Instances varies based on demand

  • Amazon EC2 can terminate an individual Spot Instance as the availability of, or price for, Spot Instances changes

When a Spot Instance is terminated, Amazon EC2 Auto Scaling group attempts to launch a replacement instance to maintain the desired capacity for the group.

MixedInstancesPolicy is a property of the AWS::AutoScaling::AutoScalingGroup resource.

Parameters:
Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-group-mixedinstancespolicy.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_autoscaling as autoscaling

mixed_instances_policy_property = autoscaling.CfnAutoScalingGroup.MixedInstancesPolicyProperty(
    launch_template=autoscaling.CfnAutoScalingGroup.LaunchTemplateProperty(
        launch_template_specification=autoscaling.CfnAutoScalingGroup.LaunchTemplateSpecificationProperty(
            version="version",

            # the properties below are optional
            launch_template_id="launchTemplateId",
            launch_template_name="launchTemplateName"
        ),

        # the properties below are optional
        overrides=[autoscaling.CfnAutoScalingGroup.LaunchTemplateOverridesProperty(
            instance_requirements=autoscaling.CfnAutoScalingGroup.InstanceRequirementsProperty(
                accelerator_count=autoscaling.CfnAutoScalingGroup.AcceleratorCountRequestProperty(
                    max=123,
                    min=123
                ),
                accelerator_manufacturers=["acceleratorManufacturers"],
                accelerator_names=["acceleratorNames"],
                accelerator_total_memory_mi_b=autoscaling.CfnAutoScalingGroup.AcceleratorTotalMemoryMiBRequestProperty(
                    max=123,
                    min=123
                ),
                accelerator_types=["acceleratorTypes"],
                allowed_instance_types=["allowedInstanceTypes"],
                bare_metal="bareMetal",
                baseline_ebs_bandwidth_mbps=autoscaling.CfnAutoScalingGroup.BaselineEbsBandwidthMbpsRequestProperty(
                    max=123,
                    min=123
                ),
                burstable_performance="burstablePerformance",
                cpu_manufacturers=["cpuManufacturers"],
                excluded_instance_types=["excludedInstanceTypes"],
                instance_generations=["instanceGenerations"],
                local_storage="localStorage",
                local_storage_types=["localStorageTypes"],
                memory_gi_bPer_vCpu=autoscaling.CfnAutoScalingGroup.MemoryGiBPerVCpuRequestProperty(
                    max=123,
                    min=123
                ),
                memory_mi_b=autoscaling.CfnAutoScalingGroup.MemoryMiBRequestProperty(
                    max=123,
                    min=123
                ),
                network_bandwidth_gbps=autoscaling.CfnAutoScalingGroup.NetworkBandwidthGbpsRequestProperty(
                    max=123,
                    min=123
                ),
                network_interface_count=autoscaling.CfnAutoScalingGroup.NetworkInterfaceCountRequestProperty(
                    max=123,
                    min=123
                ),
                on_demand_max_price_percentage_over_lowest_price=123,
                require_hibernate_support=False,
                spot_max_price_percentage_over_lowest_price=123,
                total_local_storage_gb=autoscaling.CfnAutoScalingGroup.TotalLocalStorageGBRequestProperty(
                    max=123,
                    min=123
                ),
                v_cpu_count=autoscaling.CfnAutoScalingGroup.VCpuCountRequestProperty(
                    max=123,
                    min=123
                )
            ),
            instance_type="instanceType",
            launch_template_specification=autoscaling.CfnAutoScalingGroup.LaunchTemplateSpecificationProperty(
                version="version",

                # the properties below are optional
                launch_template_id="launchTemplateId",
                launch_template_name="launchTemplateName"
            ),
            weighted_capacity="weightedCapacity"
        )]
    ),

    # the properties below are optional
    instances_distribution=autoscaling.CfnAutoScalingGroup.InstancesDistributionProperty(
        on_demand_allocation_strategy="onDemandAllocationStrategy",
        on_demand_base_capacity=123,
        on_demand_percentage_above_base_capacity=123,
        spot_allocation_strategy="spotAllocationStrategy",
        spot_instance_pools=123,
        spot_max_price="spotMaxPrice"
    )
)

Attributes

instances_distribution

The instances distribution.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-group-mixedinstancespolicy.html#cfn-as-mixedinstancespolicy-instancesdistribution

launch_template

One or more launch templates and the instance types (overrides) that are used to launch EC2 instances to fulfill On-Demand and Spot capacities.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-as-group-mixedinstancespolicy.html#cfn-as-mixedinstancespolicy-launchtemplate

NetworkBandwidthGbpsRequestProperty

class CfnAutoScalingGroup.NetworkBandwidthGbpsRequestProperty(*, max=None, min=None)

Bases: object

NetworkBandwidthGbpsRequest is a property of the InstanceRequirements property of the AWS::AutoScaling::AutoScalingGroup LaunchTemplateOverrides property type that describes the minimum and maximum network bandwidth for an instance type, in Gbps.

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 in the Amazon EC2 User Guide for Linux Instances .

Parameters:
  • max (Union[int, float, None]) – The maximum amount of network bandwidth, in gigabits per second (Gbps).

  • min (Union[int, float, None]) – The minimum amount of network bandwidth, in gigabits per second (Gbps).

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-networkbandwidthgbpsrequest.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_autoscaling as autoscaling

network_bandwidth_gbps_request_property = autoscaling.CfnAutoScalingGroup.NetworkBandwidthGbpsRequestProperty(
    max=123,
    min=123
)

Attributes

max

The maximum amount of network bandwidth, in gigabits per second (Gbps).

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-networkbandwidthgbpsrequest.html#cfn-autoscaling-autoscalinggroup-networkbandwidthgbpsrequest-max

min

The minimum amount of network bandwidth, in gigabits per second (Gbps).

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-networkbandwidthgbpsrequest.html#cfn-autoscaling-autoscalinggroup-networkbandwidthgbpsrequest-min

NetworkInterfaceCountRequestProperty

class CfnAutoScalingGroup.NetworkInterfaceCountRequestProperty(*, max=None, min=None)

Bases: object

NetworkInterfaceCountRequest is a property of the InstanceRequirements property of the AWS::AutoScaling::AutoScalingGroup LaunchTemplateOverrides property type that describes the minimum and maximum number of network interfaces for an instance type.

Parameters:
  • max (Union[int, float, None]) – The maximum number of network interfaces.

  • min (Union[int, float, None]) – The minimum number of network interfaces.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-networkinterfacecountrequest.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_autoscaling as autoscaling

network_interface_count_request_property = autoscaling.CfnAutoScalingGroup.NetworkInterfaceCountRequestProperty(
    max=123,
    min=123
)

Attributes

max

The maximum number of network interfaces.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-networkinterfacecountrequest.html#cfn-autoscaling-autoscalinggroup-networkinterfacecountrequest-max

min

The minimum number of network interfaces.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-networkinterfacecountrequest.html#cfn-autoscaling-autoscalinggroup-networkinterfacecountrequest-min

NotificationConfigurationProperty

class CfnAutoScalingGroup.NotificationConfigurationProperty(*, topic_arn, notification_types=None)

Bases: object

A structure that specifies an Amazon SNS notification configuration for the NotificationConfigurations property of the AWS::AutoScaling::AutoScalingGroup resource.

For an example template snippet, see Auto scaling template snippets .

For more information, see Get Amazon SNS notifications when your Auto Scaling group scales in the Amazon EC2 Auto Scaling User Guide .

Parameters:
  • topic_arn (str) – The Amazon Resource Name (ARN) of the Amazon SNS topic.

  • notification_types (Optional[Sequence[str]]) – A list of event types that send a notification. Event types can include any of the following types. Allowed values : - autoscaling:EC2_INSTANCE_LAUNCH - autoscaling:EC2_INSTANCE_LAUNCH_ERROR - autoscaling:EC2_INSTANCE_TERMINATE - autoscaling:EC2_INSTANCE_TERMINATE_ERROR - autoscaling:TEST_NOTIFICATION

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-notificationconfigurations.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_autoscaling as autoscaling

notification_configuration_property = autoscaling.CfnAutoScalingGroup.NotificationConfigurationProperty(
    topic_arn="topicArn",

    # the properties below are optional
    notification_types=["notificationTypes"]
)

Attributes

notification_types

A list of event types that send a notification. Event types can include any of the following types.

Allowed values :

  • autoscaling:EC2_INSTANCE_LAUNCH

  • autoscaling:EC2_INSTANCE_LAUNCH_ERROR

  • autoscaling:EC2_INSTANCE_TERMINATE

  • autoscaling:EC2_INSTANCE_TERMINATE_ERROR

  • autoscaling:TEST_NOTIFICATION

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-notificationconfigurations.html#cfn-as-group-notificationconfigurations-notificationtypes

topic_arn

The Amazon Resource Name (ARN) of the Amazon SNS topic.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-notificationconfigurations.html#cfn-autoscaling-autoscalinggroup-notificationconfigurations-topicarn

TagPropertyProperty

class CfnAutoScalingGroup.TagPropertyProperty(*, key, propagate_at_launch, value)

Bases: object

A structure that specifies a tag for the Tags property of AWS::AutoScaling::AutoScalingGroup resource.

For more information, see Tag Auto Scaling groups and instances in the Amazon EC2 Auto Scaling User Guide . You can find a sample template snippet in the Examples section of the AWS::AutoScaling::AutoScalingGroup resource.

CloudFormation adds the following tags to all Auto Scaling groups and associated instances:

  • aws:cloudformation:stack-name

  • aws:cloudformation:stack-id

  • aws:cloudformation:logical-id

Parameters:
  • key (str) – The tag key.

  • propagate_at_launch (Union[bool, IResolvable]) – Set to true if you want CloudFormation to copy the tag to EC2 instances that are launched as part of the Auto Scaling group. Set to false if you want the tag attached only to the Auto Scaling group and not copied to any instances launched as part of the Auto Scaling group.

  • value (str) – The tag value.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-tags.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_autoscaling as autoscaling

tag_property_property = autoscaling.CfnAutoScalingGroup.TagPropertyProperty(
    key="key",
    propagate_at_launch=False,
    value="value"
)

Attributes

key

The tag key.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-tags.html#cfn-as-tags-Key

propagate_at_launch

Set to true if you want CloudFormation to copy the tag to EC2 instances that are launched as part of the Auto Scaling group.

Set to false if you want the tag attached only to the Auto Scaling group and not copied to any instances launched as part of the Auto Scaling group.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-tags.html#cfn-as-tags-PropagateAtLaunch

value

The tag value.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-tags.html#cfn-as-tags-Value

TotalLocalStorageGBRequestProperty

class CfnAutoScalingGroup.TotalLocalStorageGBRequestProperty(*, max=None, min=None)

Bases: object

TotalLocalStorageGBRequest is a property of the InstanceRequirements property of the AWS::AutoScaling::AutoScalingGroup LaunchTemplateOverrides property type that describes the minimum and maximum total local storage size for an instance type, in GB.

Parameters:
  • max (Union[int, float, None]) – The storage maximum in GB.

  • min (Union[int, float, None]) – The storage minimum in GB.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-totallocalstoragegbrequest.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_autoscaling as autoscaling

total_local_storage_gBRequest_property = autoscaling.CfnAutoScalingGroup.TotalLocalStorageGBRequestProperty(
    max=123,
    min=123
)

Attributes

max

The storage maximum in GB.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-totallocalstoragegbrequest.html#cfn-autoscaling-autoscalinggroup-totallocalstoragegbrequest-max

min

The storage minimum in GB.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-totallocalstoragegbrequest.html#cfn-autoscaling-autoscalinggroup-totallocalstoragegbrequest-min

VCpuCountRequestProperty

class CfnAutoScalingGroup.VCpuCountRequestProperty(*, max=None, min=None)

Bases: object

VCpuCountRequest is a property of the InstanceRequirements property of the AWS::AutoScaling::AutoScalingGroup LaunchTemplateOverrides property type that describes the minimum and maximum number of vCPUs for an instance type.

Parameters:
  • max (Union[int, float, None]) – The maximum number of vCPUs.

  • min (Union[int, float, None]) – The minimum number of vCPUs.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-vcpucountrequest.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_autoscaling as autoscaling

v_cpu_count_request_property = autoscaling.CfnAutoScalingGroup.VCpuCountRequestProperty(
    max=123,
    min=123
)

Attributes

max

The maximum number of vCPUs.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-vcpucountrequest.html#cfn-autoscaling-autoscalinggroup-vcpucountrequest-max

min

The minimum number of vCPUs.

Link:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-vcpucountrequest.html#cfn-autoscaling-autoscalinggroup-vcpucountrequest-min