aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
834 lines • 283 kB
TypeScript
import * as cdk from "../../core/lib";
import * as constructs from "constructs";
import * as cfn_parse from "../../core/lib/helpers-internal";
import { aws_autoscaling as autoScalingRefs, aws_ec2 as ec2Refs, aws_elasticloadbalancingv2 as elasticLoadBalancingV2Refs, aws_iam as iamRefs, aws_sns as snsRefs, aws_sqs as sqsRefs } from "../../interfaces";
import { AutoScalingGroupReference, IAutoScalingGroupRef, ILaunchConfigurationRef, ILifecycleHookRef, IScalingPolicyRef, IScheduledActionRef, IWarmPoolRef, LaunchConfigurationReference, LifecycleHookReference, ScalingPolicyReference, ScheduledActionReference, WarmPoolReference } from "../../interfaces/generated/aws-autoscaling-interfaces.generated";
/**
* 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, IAutoScalingGroupRef, 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;
/**
* Checks whether the given object is a CfnAutoScalingGroup
*/
static isCfnAutoScalingGroup(x: any): x is CfnAutoScalingGroup;
static arnForAutoScalingGroup(resource: IAutoScalingGroupRef): string;
/**
* The name of the Auto Scaling group. This name must be unique per Region per account.
*/
private _autoScalingGroupName?;
/**
* The EC2 instance capacity distribution across Availability Zones for the Auto Scaling group.
*/
private _availabilityZoneDistribution?;
private _availabilityZoneIds?;
/**
* The Availability Zone impairment policy for the Auto Scaling group.
*/
private _availabilityZoneImpairmentPolicy?;
/**
* A list of Availability Zones where instances in the Auto Scaling group can be created.
*/
private _availabilityZones?;
/**
* Indicates whether Capacity Rebalancing is enabled.
*/
private _capacityRebalance?;
/**
* The capacity reservation specification for the Auto Scaling group.
*/
private _capacityReservationSpecification?;
/**
* Reserved.
*/
private _context?;
/**
* *Only needed if you use simple scaling policies.*.
*/
private _cooldown?;
/**
* 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.
*/
private _defaultInstanceWarmup?;
/**
* The deletion protection setting for the Auto Scaling group.
*/
private _deletionProtection?;
/**
* 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.
*/
private _desiredCapacity?;
/**
* The unit of measurement for the value specified for desired capacity.
*/
private _desiredCapacityType?;
/**
* 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.
*/
private _healthCheckGracePeriod?;
/**
* A comma-separated value string of one or more health check types.
*/
private _healthCheckType?;
/**
* The ID of the instance used to base the launch configuration on.
*/
private _instanceId?;
/**
* The instance lifecycle policy for the Auto Scaling group.
*/
private _instanceLifecyclePolicy?;
/**
* An instance maintenance policy.
*/
private _instanceMaintenancePolicy?;
/**
* The name of the launch configuration to use to launch instances.
*/
private _launchConfigurationName?;
/**
* Information used to specify the launch template and version to use to launch instances.
*/
private _launchTemplate?;
/**
* One or more lifecycle hooks to add to the Auto Scaling group before instances are launched.
*/
private _lifecycleHookSpecificationList?;
/**
* A list of Classic Load Balancers associated with this Auto Scaling group.
*/
private _loadBalancerNames?;
/**
* The maximum amount of time, in seconds, that an instance can be in service.
*/
private _maxInstanceLifetime?;
/**
* The maximum size of the group.
*/
private _maxSize;
/**
* Enables the monitoring of group metrics of an Auto Scaling group.
*/
private _metricsCollection?;
/**
* The minimum size of the group.
*/
private _minSize;
/**
* An embedded object that specifies a mixed instances policy.
*/
private _mixedInstancesPolicy?;
/**
* Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when scaling in.
*/
private _newInstancesProtectedFromScaleIn?;
/**
* 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
*/
private _notificationConfiguration?;
/**
* Configures an Auto Scaling group to send notifications when specified events take place.
*/
private _notificationConfigurations?;
/**
* The name of the placement group into which to launch your instances.
*/
private _placementGroup?;
/**
* The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling group uses to call other AWS service on your behalf.
*/
private _serviceLinkedRoleArn?;
private _skipZonalShiftValidation?;
/**
* Tag Manager which manages the tags for this resource
*/
readonly tags: cdk.TagManager;
/**
* One or more tags.
*/
private _tagsRaw?;
/**
* The Amazon Resource Names (ARN) of the Elastic Load Balancing target groups to associate with the Auto Scaling group.
*/
private _targetGroupArns?;
/**
* A policy or a list of policies that are used to select the instance to terminate.
*/
private _terminationPolicies?;
/**
* The traffic sources associated with this Auto Scaling group.
*/
private _trafficSources?;
/**
* A list of subnet IDs for a virtual private cloud (VPC) where instances in the Auto Scaling group can be created.
*/
private _vpcZoneIdentifier?;
protected readonly cfnPropertyNames: Record<string, string>;
/**
* Create a new `AWS::AutoScaling::AutoScalingGroup`.
*
* @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);
get autoScalingGroupRef(): AutoScalingGroupReference;
/**
* The name of the Auto Scaling group. This name must be unique per Region per account.
*/
get autoScalingGroupName(): string | undefined;
/**
* The name of the Auto Scaling group. This name must be unique per Region per account.
*/
set autoScalingGroupName(value: string | undefined);
/**
* The EC2 instance capacity distribution across Availability Zones for the Auto Scaling group.
*/
get availabilityZoneDistribution(): CfnAutoScalingGroup.AvailabilityZoneDistributionProperty | cdk.IResolvable | undefined;
/**
* The EC2 instance capacity distribution across Availability Zones for the Auto Scaling group.
*/
set availabilityZoneDistribution(value: CfnAutoScalingGroup.AvailabilityZoneDistributionProperty | cdk.IResolvable | undefined);
get availabilityZoneIds(): Array<string> | undefined;
set availabilityZoneIds(value: Array<string> | undefined);
/**
* The Availability Zone impairment policy for the Auto Scaling group.
*/
get availabilityZoneImpairmentPolicy(): CfnAutoScalingGroup.AvailabilityZoneImpairmentPolicyProperty | cdk.IResolvable | undefined;
/**
* The Availability Zone impairment policy for the Auto Scaling group.
*/
set availabilityZoneImpairmentPolicy(value: CfnAutoScalingGroup.AvailabilityZoneImpairmentPolicyProperty | cdk.IResolvable | undefined);
/**
* A list of Availability Zones where instances in the Auto Scaling group can be created.
*/
get availabilityZones(): Array<string> | undefined;
/**
* A list of Availability Zones where instances in the Auto Scaling group can be created.
*/
set availabilityZones(value: Array<string> | undefined);
/**
* Indicates whether Capacity Rebalancing is enabled.
*/
get capacityRebalance(): boolean | cdk.IResolvable | undefined;
/**
* Indicates whether Capacity Rebalancing is enabled.
*/
set capacityRebalance(value: boolean | cdk.IResolvable | undefined);
/**
* The capacity reservation specification for the Auto Scaling group.
*/
get capacityReservationSpecification(): CfnAutoScalingGroup.CapacityReservationSpecificationProperty | cdk.IResolvable | undefined;
/**
* The capacity reservation specification for the Auto Scaling group.
*/
set capacityReservationSpecification(value: CfnAutoScalingGroup.CapacityReservationSpecificationProperty | cdk.IResolvable | undefined);
/**
* Reserved.
*/
get context(): string | undefined;
/**
* Reserved.
*/
set context(value: string | undefined);
/**
* *Only needed if you use simple scaling policies.*.
*/
get cooldown(): string | undefined;
/**
* *Only needed if you use simple scaling policies.*.
*/
set cooldown(value: string | undefined);
/**
* 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.
*/
get defaultInstanceWarmup(): number | undefined;
/**
* 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.
*/
set defaultInstanceWarmup(value: number | undefined);
/**
* The deletion protection setting for the Auto Scaling group.
*/
get deletionProtection(): string | undefined;
/**
* The deletion protection setting for the Auto Scaling group.
*/
set deletionProtection(value: string | undefined);
/**
* 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.
*/
get desiredCapacity(): string | undefined;
/**
* 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.
*/
set desiredCapacity(value: string | undefined);
/**
* The unit of measurement for the value specified for desired capacity.
*/
get desiredCapacityType(): string | undefined;
/**
* The unit of measurement for the value specified for desired capacity.
*/
set desiredCapacityType(value: string | undefined);
/**
* 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.
*/
get healthCheckGracePeriod(): number | undefined;
/**
* 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.
*/
set healthCheckGracePeriod(value: number | undefined);
/**
* A comma-separated value string of one or more health check types.
*/
get healthCheckType(): string | undefined;
/**
* A comma-separated value string of one or more health check types.
*/
set healthCheckType(value: string | undefined);
/**
* The ID of the instance used to base the launch configuration on.
*/
get instanceId(): string | undefined;
/**
* The ID of the instance used to base the launch configuration on.
*/
set instanceId(value: string | undefined);
/**
* The instance lifecycle policy for the Auto Scaling group.
*/
get instanceLifecyclePolicy(): CfnAutoScalingGroup.InstanceLifecyclePolicyProperty | cdk.IResolvable | undefined;
/**
* The instance lifecycle policy for the Auto Scaling group.
*/
set instanceLifecyclePolicy(value: CfnAutoScalingGroup.InstanceLifecyclePolicyProperty | cdk.IResolvable | undefined);
/**
* An instance maintenance policy.
*/
get instanceMaintenancePolicy(): CfnAutoScalingGroup.InstanceMaintenancePolicyProperty | cdk.IResolvable | undefined;
/**
* An instance maintenance policy.
*/
set instanceMaintenancePolicy(value: CfnAutoScalingGroup.InstanceMaintenancePolicyProperty | cdk.IResolvable | undefined);
/**
* The name of the launch configuration to use to launch instances.
*/
get launchConfigurationName(): string | undefined;
/**
* The name of the launch configuration to use to launch instances.
*/
set launchConfigurationName(value: string | undefined);
/**
* Information used to specify the launch template and version to use to launch instances.
*/
get launchTemplate(): cdk.IResolvable | CfnAutoScalingGroup.LaunchTemplateSpecificationProperty | undefined;
/**
* Information used to specify the launch template and version to use to launch instances.
*/
set launchTemplate(value: cdk.IResolvable | CfnAutoScalingGroup.LaunchTemplateSpecificationProperty | undefined);
/**
* One or more lifecycle hooks to add to the Auto Scaling group before instances are launched.
*/
get lifecycleHookSpecificationList(): Array<cdk.IResolvable | CfnAutoScalingGroup.LifecycleHookSpecificationProperty> | cdk.IResolvable | undefined;
/**
* One or more lifecycle hooks to add to the Auto Scaling group before instances are launched.
*/
set lifecycleHookSpecificationList(value: Array<cdk.IResolvable | CfnAutoScalingGroup.LifecycleHookSpecificationProperty> | cdk.IResolvable | undefined);
/**
* A list of Classic Load Balancers associated with this Auto Scaling group.
*/
get loadBalancerNames(): Array<string> | undefined;
/**
* A list of Classic Load Balancers associated with this Auto Scaling group.
*/
set loadBalancerNames(value: Array<string> | undefined);
/**
* The maximum amount of time, in seconds, that an instance can be in service.
*/
get maxInstanceLifetime(): number | undefined;
/**
* The maximum amount of time, in seconds, that an instance can be in service.
*/
set maxInstanceLifetime(value: number | undefined);
/**
* The maximum size of the group.
*/
get maxSize(): string;
/**
* The maximum size of the group.
*/
set maxSize(value: string);
/**
* Enables the monitoring of group metrics of an Auto Scaling group.
*/
get metricsCollection(): Array<cdk.IResolvable | CfnAutoScalingGroup.MetricsCollectionProperty> | cdk.IResolvable | undefined;
/**
* Enables the monitoring of group metrics of an Auto Scaling group.
*/
set metricsCollection(value: Array<cdk.IResolvable | CfnAutoScalingGroup.MetricsCollectionProperty> | cdk.IResolvable | undefined);
/**
* The minimum size of the group.
*/
get minSize(): string;
/**
* The minimum size of the group.
*/
set minSize(value: string);
/**
* An embedded object that specifies a mixed instances policy.
*/
get mixedInstancesPolicy(): cdk.IResolvable | CfnAutoScalingGroup.MixedInstancesPolicyProperty | undefined;
/**
* An embedded object that specifies a mixed instances policy.
*/
set mixedInstancesPolicy(value: cdk.IResolvable | CfnAutoScalingGroup.MixedInstancesPolicyProperty | undefined);
/**
* Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when scaling in.
*/
get newInstancesProtectedFromScaleIn(): boolean | cdk.IResolvable | undefined;
/**
* Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when scaling in.
*/
set newInstancesProtectedFromScaleIn(value: boolean | cdk.IResolvable | undefined);
/**
* 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
*/
get notificationConfiguration(): cdk.IResolvable | CfnAutoScalingGroup.NotificationConfigurationProperty | undefined;
/**
* 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
*/
set notificationConfiguration(value: cdk.IResolvable | CfnAutoScalingGroup.NotificationConfigurationProperty | undefined);
/**
* Configures an Auto Scaling group to send notifications when specified events take place.
*/
get notificationConfigurations(): Array<cdk.IResolvable | CfnAutoScalingGroup.NotificationConfigurationProperty> | cdk.IResolvable | undefined;
/**
* Configures an Auto Scaling group to send notifications when specified events take place.
*/
set notificationConfigurations(value: Array<cdk.IResolvable | CfnAutoScalingGroup.NotificationConfigurationProperty> | cdk.IResolvable | undefined);
/**
* The name of the placement group into which to launch your instances.
*/
get placementGroup(): string | undefined;
/**
* The name of the placement group into which to launch your instances.
*/
set placementGroup(value: string | undefined);
/**
* The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling group uses to call other AWS service on your behalf.
*/
get serviceLinkedRoleArn(): string | undefined;
/**
* The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling group uses to call other AWS service on your behalf.
*/
set serviceLinkedRoleArn(value: string | undefined);
get skipZonalShiftValidation(): boolean | cdk.IResolvable | undefined;
set skipZonalShiftValidation(value: boolean | cdk.IResolvable | undefined);
/**
* One or more tags.
*/
get tagsRaw(): Array<CfnAutoScalingGroup.TagPropertyProperty> | undefined;
/**
* One or more tags.
*/
set tagsRaw(value: Array<CfnAutoScalingGroup.TagPropertyProperty> | undefined);
/**
* The Amazon Resource Names (ARN) of the Elastic Load Balancing target groups to associate with the Auto Scaling group.
*/
get targetGroupArns(): Array<string> | undefined;
/**
* The Amazon Resource Names (ARN) of the Elastic Load Balancing target groups to associate with the Auto Scaling group.
*/
set targetGroupArns(value: Array<string> | undefined);
/**
* A policy or a list of policies that are used to select the instance to terminate.
*/
get terminationPolicies(): Array<string> | undefined;
/**
* A policy or a list of policies that are used to select the instance to terminate.
*/
set terminationPolicies(value: Array<string> | undefined);
/**
* The traffic sources associated with this Auto Scaling group.
*/
get trafficSources(): Array<cdk.IResolvable | CfnAutoScalingGroup.TrafficSourceIdentifierProperty> | cdk.IResolvable | undefined;
/**
* The traffic sources associated with this Auto Scaling group.
*/
set trafficSources(value: Array<cdk.IResolvable | CfnAutoScalingGroup.TrafficSourceIdentifierProperty> | cdk.IResolvable | undefined);
/**
* A list of subnet IDs for a virtual private cloud (VPC) where instances in the Auto Scaling group can be created.
*/
get vpcZoneIdentifier(): Array<string> | undefined;
/**
* A list of subnet IDs for a virtual private cloud (VPC) where instances in the Auto Scaling group can be created.
*/
set vpcZoneIdentifier(value: Array<string> | undefined);
/**
* The Amazon Resource Name (ARN) of the Auto Scaling group.
*
* @cloudformationAttribute AutoScalingGroupARN
*/
get attrAutoScalingGroupArn(): string;
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