aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
703 lines • 246 kB
TypeScript
import * as cdk from "../../core";
import * as constructs from "constructs";
import * as cfn_parse from "../../core/lib/helpers-internal";
/**
* 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](https://docs.aws.amazon.com/autoscaling/ec2/userguide/what-is-amazon-ec2-auto-scaling.html) .
*
* > 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. 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* .
* >
* > For help migrating from launch configurations to launch templates, see [Migrate AWS CloudFormation stacks from launch configurations to launch templates](https://docs.aws.amazon.com/autoscaling/ec2/userguide/migrate-launch-configurations-with-cloudformation.html) in the *Amazon EC2 Auto Scaling User Guide* .
*
* @cloudformationResource AWS::AutoScaling::AutoScalingGroup
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-autoscalinggroup.html
*/
export declare class CfnAutoScalingGroup extends cdk.CfnResource implements cdk.IInspectable, cdk.ITaggable {
/**
* The CloudFormation resource type name for this resource class.
*/
static readonly CFN_RESOURCE_TYPE_NAME: string;
/**
* Build a CfnAutoScalingGroup from CloudFormation properties
*
* A factory method that creates a new instance of this class from an object
* containing the CloudFormation properties of this resource.
* Used in the @aws-cdk/cloudformation-include module.
*
* @internal
*/
static _fromCloudFormation(scope: constructs.Construct, id: string, resourceAttributes: any, options: cfn_parse.FromCloudFormationOptions): CfnAutoScalingGroup;
/**
* The name of the Auto Scaling group. This name must be unique per Region per account.
*/
autoScalingGroupName?: string;
/**
* The instance capacity distribution across Availability Zones.
*/
availabilityZoneDistribution?: CfnAutoScalingGroup.AvailabilityZoneDistributionProperty | cdk.IResolvable;
/**
* The Availability Zone impairment policy.
*/
availabilityZoneImpairmentPolicy?: CfnAutoScalingGroup.AvailabilityZoneImpairmentPolicyProperty | cdk.IResolvable;
/**
* A list of Availability Zones where instances in the Auto Scaling group can be created.
*/
availabilityZones?: Array<string>;
/**
* Indicates whether Capacity Rebalancing is enabled.
*/
capacityRebalance?: boolean | cdk.IResolvable;
/**
* The capacity reservation specification.
*/
capacityReservationSpecification?: CfnAutoScalingGroup.CapacityReservationSpecificationProperty | cdk.IResolvable;
/**
* Reserved.
*/
context?: string;
/**
* *Only needed if you use simple scaling policies.*.
*/
cooldown?: string;
/**
* 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.
*/
defaultInstanceWarmup?: number;
/**
* 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.
*/
desiredCapacity?: string;
/**
* The unit of measurement for the value specified for desired capacity.
*/
desiredCapacityType?: string;
/**
* 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.
*/
healthCheckGracePeriod?: number;
/**
* A comma-separated value string of one or more health check types.
*/
healthCheckType?: string;
/**
* The ID of the instance used to base the launch configuration on.
*/
instanceId?: string;
/**
* An instance maintenance policy.
*/
instanceMaintenancePolicy?: CfnAutoScalingGroup.InstanceMaintenancePolicyProperty | cdk.IResolvable;
/**
* The name of the launch configuration to use to launch instances.
*/
launchConfigurationName?: string;
/**
* Information used to specify the launch template and version to use to launch instances.
*/
launchTemplate?: cdk.IResolvable | CfnAutoScalingGroup.LaunchTemplateSpecificationProperty;
/**
* One or more lifecycle hooks to add to the Auto Scaling group before instances are launched.
*/
lifecycleHookSpecificationList?: Array<cdk.IResolvable | CfnAutoScalingGroup.LifecycleHookSpecificationProperty> | cdk.IResolvable;
/**
* A list of Classic Load Balancers associated with this Auto Scaling group.
*/
loadBalancerNames?: Array<string>;
/**
* The maximum amount of time, in seconds, that an instance can be in service.
*/
maxInstanceLifetime?: number;
/**
* The maximum size of the group.
*/
maxSize: string;
/**
* Enables the monitoring of group metrics of an Auto Scaling group.
*/
metricsCollection?: Array<cdk.IResolvable | CfnAutoScalingGroup.MetricsCollectionProperty> | cdk.IResolvable;
/**
* The minimum size of the group.
*/
minSize: string;
/**
* An embedded object that specifies a mixed instances policy.
*/
mixedInstancesPolicy?: cdk.IResolvable | CfnAutoScalingGroup.MixedInstancesPolicyProperty;
/**
* Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when scaling in.
*/
newInstancesProtectedFromScaleIn?: boolean | cdk.IResolvable;
/**
* A structure that specifies an Amazon SNS notification configuration for the ``NotificationConfigurations`` property of the [AWS::AutoScaling::AutoScalingGroup](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-autoscalinggroup.html) resource. For an example template snippet, see [Configure Amazon EC2 Auto Scaling resources](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/quickref-ec2-auto-scaling.html). For more information, see [Get Amazon SNS notifications when your Auto Scaling group scales](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ASGettingNotifications.html) in the *Amazon EC2 Auto Scaling User Guide*.
*
* @deprecated this property has been deprecated
*/
notificationConfiguration?: cdk.IResolvable | CfnAutoScalingGroup.NotificationConfigurationProperty;
/**
* Configures an Auto Scaling group to send notifications when specified events take place.
*/
notificationConfigurations?: Array<cdk.IResolvable | CfnAutoScalingGroup.NotificationConfigurationProperty> | cdk.IResolvable;
/**
* The name of the placement group into which to launch your instances.
*/
placementGroup?: string;
/**
* The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling group uses to call other AWS service on your behalf.
*/
serviceLinkedRoleArn?: string;
skipZonalShiftValidation?: boolean | cdk.IResolvable;
/**
* Tag Manager which manages the tags for this resource
*/
readonly tags: cdk.TagManager;
/**
* One or more tags.
*/
tagsRaw?: Array<CfnAutoScalingGroup.TagPropertyProperty>;
/**
* The Amazon Resource Names (ARN) of the Elastic Load Balancing target groups to associate with the Auto Scaling group.
*/
targetGroupArns?: Array<string>;
/**
* A policy or a list of policies that are used to select the instance to terminate.
*/
terminationPolicies?: Array<string>;
/**
* The traffic sources associated with this Auto Scaling group.
*/
trafficSources?: Array<cdk.IResolvable | CfnAutoScalingGroup.TrafficSourceIdentifierProperty> | cdk.IResolvable;
/**
* A list of subnet IDs for a virtual private cloud (VPC) where instances in the Auto Scaling group can be created.
*/
vpcZoneIdentifier?: Array<string>;
/**
* @param scope Scope in which this resource is defined
* @param id Construct identifier for this resource (unique in its scope)
* @param props Resource properties
*/
constructor(scope: constructs.Construct, id: string, props: CfnAutoScalingGroupProps);
protected get cfnProperties(): Record<string, any>;
/**
* Examines the CloudFormation resource and discloses attributes
*
* @param inspector tree inspector to collect and process attributes
*/
inspect(inspector: cdk.TreeInspector): void;
protected renderProperties(props: Record<string, any>): Record<string, any>;
}
export declare namespace CfnAutoScalingGroup {
/**
* 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](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-autoscalinggroup.html) resource. It is also a property of the [AWS::AutoScaling::AutoScalingGroup LaunchTemplate](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplate.html) and [AWS::AutoScaling::AutoScalingGroup LaunchTemplateOverrides](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplateoverrides.html) property types.
*
* For information about creating a launch template, see [AWS::EC2::LaunchTemplate](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html) and [Create a launch template for an Auto Scaling group](https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-template.html) in the *Amazon EC2 Auto Scaling User Guide* .
*
* For examples of launch templates, see [Create launch templates](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/quickref-ec2-launch-templates.html) .
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplatespecification.html
*/
interface LaunchTemplateSpecificationProperty {
/**
* The ID of the launch template.
*
* You must specify the `LaunchTemplateID` or the `LaunchTemplateName` , but not both.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplatespecification.html#cfn-autoscaling-autoscalinggroup-launchtemplatespecification-launchtemplateid
*/
readonly launchTemplateId?: string;
/**
* The name of the launch template.
*
* You must specify the `LaunchTemplateName` or the `LaunchTemplateID` , but not both.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplatespecification.html#cfn-autoscaling-autoscalinggroup-launchtemplatespecification-launchtemplatename
*/
readonly launchTemplateName?: string;
/**
* 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](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getatt.html) .
*
* > For an example of using the `Fn::GetAtt` function, see the [Examples](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-autoscalinggroup.html#aws-resource-autoscaling-autoscalinggroup--examples) section of the `AWS::AutoScaling::AutoScalingGroup` resource.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplatespecification.html#cfn-autoscaling-autoscalinggroup-launchtemplatespecification-version
*/
readonly version: string;
}
/**
* `LifecycleHookSpecification` specifies a lifecycle hook for the `LifecycleHookSpecificationList` property of the [AWS::AutoScaling::AutoScalingGroup](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-autoscalinggroup.html) 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](https://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html) in the *Amazon EC2 Auto Scaling User Guide* . You can find a sample template snippet in the [Examples](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-as-lifecyclehook.html#aws-resource-as-lifecyclehook--examples) section of the `AWS::AutoScaling::LifecycleHook` resource.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-lifecyclehookspecification.html
*/
interface LifecycleHookSpecificationProperty {
/**
* 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`
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-lifecyclehookspecification.html#cfn-autoscaling-autoscalinggroup-lifecyclehookspecification-defaultresult
*/
readonly defaultResult?: string;
/**
* 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).
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-lifecyclehookspecification.html#cfn-autoscaling-autoscalinggroup-lifecyclehookspecification-heartbeattimeout
*/
readonly heartbeatTimeout?: number;
/**
* The name of the lifecycle hook.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-lifecyclehookspecification.html#cfn-autoscaling-autoscalinggroup-lifecyclehookspecification-lifecyclehookname
*/
readonly lifecycleHookName: string;
/**
* 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` .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-lifecyclehookspecification.html#cfn-autoscaling-autoscalinggroup-lifecyclehookspecification-lifecycletransition
*/
readonly lifecycleTransition: string;
/**
* Additional information that you want to include any time Amazon EC2 Auto Scaling sends a message to the notification target.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-lifecyclehookspecification.html#cfn-autoscaling-autoscalinggroup-lifecyclehookspecification-notificationmetadata
*/
readonly notificationMetadata?: string;
/**
* 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.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-lifecyclehookspecification.html#cfn-autoscaling-autoscalinggroup-lifecyclehookspecification-notificationtargetarn
*/
readonly notificationTargetArn?: string;
/**
* The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification target.
*
* For information about creating this role, see [Prepare to add a lifecycle hook to your Auto Scaling group](https://docs.aws.amazon.com/autoscaling/ec2/userguide/prepare-for-lifecycle-notifications.html) in the *Amazon EC2 Auto Scaling User Guide* .
*
* Valid only if the notification target is an Amazon SNS topic or an Amazon SQS queue.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-lifecyclehookspecification.html#cfn-autoscaling-autoscalinggroup-lifecyclehookspecification-rolearn
*/
readonly roleArn?: string;
}
/**
* `MetricsCollection` is a property of the [AWS::AutoScaling::AutoScalingGroup](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-autoscalinggroup.html) 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](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-monitoring.html) in the *Amazon EC2 Auto Scaling User Guide* . You can find a sample template snippet in the [Examples](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-autoscalinggroup.html#aws-resource-autoscaling-autoscalinggroup--examples) section of the `AWS::AutoScaling::AutoScalingGroup` resource.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-metricscollection.html
*/
interface MetricsCollectionProperty {
/**
* The frequency at which Amazon EC2 Auto Scaling sends aggregated data to CloudWatch.
*
* The only valid value is `1Minute` .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-metricscollection.html#cfn-autoscaling-autoscalinggroup-metricscollection-granularity
*/
readonly granularity: string;
/**
* 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 [Amazon CloudWatch metrics for Amazon EC2 Auto Scaling](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-metrics.html) in the *Amazon EC2 Auto Scaling User Guide* .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-metricscollection.html#cfn-autoscaling-autoscalinggroup-metricscollection-metrics
*/
readonly metrics?: Array<string>;
}
/**
* Use this structure to launch multiple instance types and On-Demand Instances and Spot Instances within a single Auto Scaling group.
*
* A mixed instances policy contains information that Amazon EC2 Auto Scaling can use to launch instances and help optimize your costs. For more information, see [Auto Scaling groups with multiple instance types and purchase options](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-mixed-instances-groups.html) in the *Amazon EC2 Auto Scaling User Guide* .
*
* 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](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-autoscalinggroup.html) resource.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-mixedinstancespolicy.html
*/
interface MixedInstancesPolicyProperty {
/**
* The instances distribution.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-mixedinstancespolicy.html#cfn-autoscaling-autoscalinggroup-mixedinstancespolicy-instancesdistribution
*/
readonly instancesDistribution?: CfnAutoScalingGroup.InstancesDistributionProperty | cdk.IResolvable;
/**
* One or more launch templates and the instance types (overrides) that are used to launch EC2 instances to fulfill On-Demand and Spot capacities.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-mixedinstancespolicy.html#cfn-autoscaling-autoscalinggroup-mixedinstancespolicy-launchtemplate
*/
readonly launchTemplate: cdk.IResolvable | CfnAutoScalingGroup.LaunchTemplateProperty;
}
/**
* 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](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-mixed-instances-groups.html) in the *Amazon EC2 Auto Scaling User Guide* .
*
* `InstancesDistribution` is a property of the [AWS::AutoScaling::AutoScalingGroup MixedInstancesPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-mixedinstancespolicy.html) property type.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-instancesdistribution.html
*/
interface InstancesDistributionProperty {
/**
* 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.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-instancesdistribution.html#cfn-autoscaling-autoscalinggroup-instancesdistribution-ondemandallocationstrategy
*/
readonly onDemandAllocationStrategy?: string;
/**
* 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
*
* > 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.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-instancesdistribution.html#cfn-autoscaling-autoscalinggroup-instancesdistribution-ondemandbasecapacity
*/
readonly onDemandBaseCapacity?: number;
/**
* 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
*
* > 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.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-instancesdistribution.html#cfn-autoscaling-autoscalinggroup-instancesdistribution-ondemandpercentageabovebasecapacity
*/
readonly onDemandPercentageAboveBaseCapacity?: number;
/**
* 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.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-instancesdistribution.html#cfn-autoscaling-autoscalinggroup-instancesdistribution-spotallocationstrategy
*/
readonly spotAllocationStrategy?: string;
/**
* 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
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-instancesdistribution.html#cfn-autoscaling-autoscalinggroup-instancesdistribution-spotinstancepools
*/
readonly spotInstancePools?: number;
/**
* 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.
*
* > 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
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-instancesdistribution.html#cfn-autoscaling-autoscalinggroup-instancesdistribution-spotmaxprice
*/
readonly spotMaxPrice?: string;
}
/**
* 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](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-mixedinstancespolicy.html) property type.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplate.html
*/
interface LaunchTemplateProperty {
/**
* The launch template.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplate.html#cfn-autoscaling-autoscalinggroup-launchtemplate-launchtemplatespecification
*/
readonly launchTemplateSpecification: cdk.IResolvable | CfnAutoScalingGroup.LaunchTemplateSpecificationProperty;
/**
* Any properties that you specify override the same properties in the launch template.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplate.html#cfn-autoscaling-autoscalinggroup-launchtemplate-overrides
*/
readonly overrides?: Array<cdk.IResolvable | CfnAutoScalingGroup.LaunchTemplateOverridesProperty> | cdk.IResolvable;
}
/**
* 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](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplate.html) property type.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplateoverrides.html
*/
interface LaunchTemplateOverridesProperty {
/**
* 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.
*
* > If you specify `InstanceRequirements` , you can't specify `InstanceType` .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplateoverrides.html#cfn-autoscaling-autoscalinggroup-launchtemplateoverrides-instancerequirements
*/
readonly instanceRequirements?: CfnAutoScalingGroup.InstanceRequirementsProperty | cdk.IResolvable;
/**
* The instance type, such as `m3.xlarge` . You must specify an instance type that is supported in your requested Region and Availability Zones. For more information, see [Instance types](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) in the *Amazon EC2 User Guide for Linux Instances* .
*
* You can specify up to 40 instance types per Auto Scaling group.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplateoverrides.html#cfn-autoscaling-autoscalinggroup-launchtemplateoverrides-instancetype
*/
readonly instanceType?: string;
/**
* Provides a launch template for the specified instance type or set of instance requirements.
*
* For example, some instance types might require a launch template with a different AMI. If not provided, Amazon EC2 Auto Scaling uses the launch template that's specified in the `LaunchTemplate` definition. For more information, see [Specifying a different launch template for an instance type](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-mixed-instances-groups-launch-template-overrides.html) in the *Amazon EC2 Auto Scaling User Guide* .
*
* 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.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplateoverrides.html#cfn-autoscaling-autoscalinggroup-launchtemplateoverrides-launchtemplatespecification
*/
readonly launchTemplateSpecification?: cdk.IResolvable | CfnAutoScalingGroup.LaunchTemplateSpecificationProperty;
/**
* 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](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-mixed-instances-groups-instance-weighting.html) in the *Amazon EC2 Auto Scaling User Guide* . Value must be in the range of 1-999.
*
* If you specify a value for `WeightedCapacity` for one instance type, you must specify a value for `WeightedCapacity` for all of them.
*
* > 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.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplateoverrides.html#cfn-autoscaling-autoscalinggroup-launchtemplateoverrides-weightedcapacity
*/
readonly weightedCapacity?: string;
}
/**
* 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 [Configure Amazon EC2 Auto Scaling resources](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/quickref-ec2-auto-scaling.html) .
*
* For more information, see [Creating an Auto Scaling group using attribute-based instance type selection](https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-asg-instance-type-requirements.html) in the *Amazon EC2 Auto Scaling User Guide* . For help determining which instance types match your attributes before you apply them to your Auto Scaling group, see [Preview instance types with specified attributes](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-attribute-based-instance-type-selection.html#ec2fleet-get-instance-types-from-instance-requirements) in the *Amazon EC2 User Guide for Linux Instances* .
*
* `InstanceRequirements` is a property of the `LaunchTemplateOverrides` property of the [AWS::AutoScaling::AutoScalingGroup LaunchTemplate](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-launchtemplate.html) property type.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-instancerequirements.html
*/
interface InstanceRequirementsProperty {
/**
* 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
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-acceleratorcount
*/
readonly acceleratorCount?: CfnAutoScalingGroup.AcceleratorCountRequestProperty | cdk.IResolvable;
/**
* 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
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-acceleratormanufacturers
*/
readonly acceleratorManufacturers?: Array<string>;
/**
* 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
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-acceleratornames
*/
readonly acceleratorNames?: Array<string>;
/**
* The minimum and maximum total memory size for the accelerators on an instance type, in MiB.
*
* Default: No minimum or maximum limits
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-acceleratortotalmemorymib
*/
readonly acceleratorTotalMemoryMiB?: CfnAutoScalingGroup.AcceleratorTotalMemoryMiBRequestProperty | cdk.IResolvable;
/**
* 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
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-acceleratortypes
*/
readonly acceleratorTypes?: Array<string>;
/**
* 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.
*
* > If you specify `AllowedInstanceTypes` , you can't specify `ExcludedInstanceTypes` .
*
* Default: All instance types
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-allowedinstancetypes
*/
readonly allowedInstanceTypes?: Array<string>;
/**
* Indicates whether bare metal instance types are included, excluded, or required.
*
* Default: `excluded`
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-baremetal
*/
readonly bareMetal?: string;
/**
* The minimum and maximum baseline bandwidth performance for an instance type, in Mbps.
*
* For more information, see [Amazon EBS–optimized instances](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html) in the *Amazon EC2 User Guide for Linux Instances* .
*
* Default: No minimum or maximum limits
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-baselineebsbandwidthmbps
*/
readonly baselineEbsBandwidthMbps?: CfnAutoScalingGroup.BaselineEbsBandwidthMbpsRequestProperty | cdk.IResolvable;
/**
* The baseline performance factors for the instance requirements.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-baselineperformancefactors
*/
readonly baselinePerformanceFactors?: CfnAutoScalingGroup.BaselinePerformanceFactorsRequestProperty | cdk.IResolvable;
/**
* Indicates whether burstable performance instance types are included, excluded, or required.
*
* For more information, see [Burstable performance instances](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html) in the *Amazon EC2 User Guide for Linux Instances* .
*
* Default: `excluded`
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-instancerequirements.html#cfn-autoscaling-autoscalinggroup-instancerequirements-burstableperformance
*/
readonly burstablePerformance?: string;
/**
* 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 bas