This documentation is for the developer preview release of the AWS CDK. Do not use this version of the AWS CDK in production. Subsequent releases of the AWS CDK will likely include breaking changes.

@aws-cdk/aws-autoscaling

The CDK Construct Library for AWS Auto-Scaling

This module is part of the AWS Cloud Development Kit project.

Fleet

Auto Scaling Group

An AutoScalingGroup represents a number of instances on which you run your code. You pick the size of the fleet, the instance type and the OS image:

import autoscaling = require('@aws-cdk/aws-autoscaling');
import ec2 = require('@aws-cdk/aws-ec2');

new autoscaling.AutoScalingGroup(this, 'ASG', {
    vpc,
    instanceType: new ec2.InstanceTypePair(InstanceClass.Burstable2, InstanceSize.Micro),
    machineImage: new ec2.AmazonLinuxImage() // get the latest Amazon Linux image
});
NOTE: AutoScalingGroup has an property called allowAllOutbound (allowing the instances to contact the internet) which is set to true by default. Be sure to set this to false if you don’t want your instances to be able to start arbitrary connections.

Machine Images (AMIs)

AMIs control the OS that gets launched when you start your EC2 instance. The EC2 library contains constructs to select the AMI you want to use.

Depending on the type of AMI, you select it a different way.

The latest version of Amazon Linux and Microsoft Windows images are selectable by instantiating one of these classes:

// Pick a Windows edition to use
const windows = new ec2.WindowsImage(ec2.WindowsVersion.WindowsServer2019EnglishFullBase);

// Pick the right Amazon Linux edition. All arguments shown are optional
// and will default to these values when omitted.
const amznLinux = new ec2.AmazonLinuxImage({
  generation: ec2.AmazonLinuxGeneration.AmazonLinux,
  edition: ec2.AmazonLinuxEdition.Standard,
  virtualization: ec2.AmazonLinuxVirt.HVM,
  storage: ec2.AmazonLinuxStorage.GeneralPurpose,
});

// For other custom (Linux) images, instantiate a `GenericLinuxImage` with
// a map giving the AMI to in for each region:

const linux = new ec2.GenericLinuxImage({
    'us-east-1': 'ami-97785bed',
    'eu-west-1': 'ami-12345678',
    // ...
});

NOTE: The Amazon Linux images selected will be cached in your cdk.json, so that your AutoScalingGroups don’t automatically change out from under you when you’re making unrelated changes. To update to the latest version of Amazon Linux, remove the cache entry from the context section of your cdk.json.

We will add command-line options to make this step easier in the future.

AutoScaling Instance Counts

AutoScalingGroups make it possible to raise and lower the number of instances in the group, in response to (or in advance of) changes in workload.

When you create your AutoScalingGroup, you specify a minCapacity and a maxCapacity. AutoScaling policies that respond to metrics will never go higher or lower than the indicated capacity (but scheduled scaling actions might, see below).

There are three ways to scale your capacity:

  • In response to a metric (also known as step scaling); for example, you might want to scale out if the CPU usage across your cluster starts to rise, and scale in when it drops again.
  • By trying to keep a certain metric around a given value (also known as target tracking scaling); you might want to automatically scale out and in to keep your CPU usage around 50%.
  • On a schedule; you might want to organize your scaling around traffic flows you expect, by scaling out in the morning and scaling in in the evening.

The general pattern of autoscaling will look like this:

const autoScalingGroup = new autoscaling.AutoScalingGroup(this, 'ASG', {
  minCapacity: 5,
  maxCapacity: 100
  // ...
});

// Step scaling
autoScalingGroup.scaleOnMetric(...);

// Target tracking scaling
autoScalingGroup.scaleOnCpuUtilization(...);
autoScalingGroup.scaleOnIncomingBytes(...);
autoScalingGroup.scaleOnOutgoingBytes(...);
autoScalingGroup.scaleOnRequestCount(...);
autoScalingGroup.scaleToTrackMetric(...);

// Scheduled scaling
autoScalingGroup.scaleOnSchedule(...);

Step Scaling

This type of scaling scales in and out in deterministics steps that you configure, in response to metric values. For example, your scaling strategy to scale in response to a metric that represents your average worker pool usage might look like this:

 Scaling        -1          (no change)          +1       +3
            │        │                       │        │        │
            ├────────┼───────────────────────┼────────┼────────┤
            │        │                       │        │        │
Worker use  0%      10%                     50%       70%     100%

(Note that this is not necessarily a recommended scaling strategy, but it’s a possible one. You will have to determine what thresholds are right for you).

Note that in order to set up this scaling strategy, you will have to emit a metric representing your worker utilization from your instances. After that, you would configure the scaling something like this:

const workerUtilizationMetric = new cloudwatch.Metric({
    namespace: 'MyService',
    metricName: 'WorkerUtilization'
});

capacity.scaleOnMetric('ScaleToCPU', {
  metric: workerUtilizationMetric,
  scalingSteps: [
    { upper: 10, change: -1 },
    { lower: 50, change: +1 },
    { lower: 70, change: +3 },
  ],

  // Change this to AdjustmentType.PercentChangeInCapacity to interpret the
  // 'change' numbers before as percentages instead of capacity counts.
  adjustmentType: autoscaling.AdjustmentType.ChangeInCapacity,
});

The AutoScaling construct library will create the required CloudWatch alarms and AutoScaling policies for you.

Target Tracking Scaling

This type of scaling scales in and out in order to keep a metric around a value you prefer. There are four types of predefined metrics you can track, or you can choose to track a custom metric. If you do choose to track a custom metric, be aware that the metric has to represent instance utilization in some way (AutoScaling will scale out if the metric is higher than the target, and scale in if the metric is lower than the target).

If you configure multiple target tracking policies, AutoScaling will use the one that yields the highest capacity.

The following example scales to keep the CPU usage of your instances around 50% utilization:

autoScalingGroup.scaleOnCpuUtilization('KeepSpareCPU', {
  targetUtilizationPercent: 50
});

To scale on average network traffic in and out of your instances:

autoScalingGroup.scaleOnIncomingBytes('LimitIngressPerInstance', {
    targetBytesPerSecond: 10 * 1024 * 1024 // 10 MB/s
});
autoScalingGroup.scaleOnOutcomingBytes('LimitEgressPerInstance', {
    targetBytesPerSecond: 10 * 1024 * 1024 // 10 MB/s
});

To scale on the average request count per instance (only works for AutoScalingGroups that have been attached to Application Load Balancers):

autoScalingGroup.scaleOnRequestCount('LimitRPS', {
    targetRequestsPerSecond: 1000
});

Scheduled Scaling

This type of scaling is used to change capacities based on time. It works by changing minCapacity, maxCapacity and desiredCapacity of the AutoScalingGroup, and so can be used for two purposes:

  • Scale in and out on a schedule by setting the minCapacity high or the maxCapacity low.
  • Still allow the regular scaling actions to do their job, but restrict the range they can scale over (by setting both minCapacity and maxCapacity but changing their range over time).

A schedule is expressed as a cron expression. There is a Cron helper class to help build cron expressions.

The following example scales the fleet out in the morning, going back to natural scaling (all the way down to 1 instance if necessary) at night:

autoScalingGroup.scaleOnSchedule('PrescaleInTheMorning', {
  schedule: autoscaling.Cron.dailyUtc(8),
  minCapacity: 20,
});

autoScalingGroup.scaleOnSchedule('AllowDownscalingAtNight', {
  schedule: autoscaling.Cron.dailyUtc(20),
  minCapacity: 1
});

Allowing Connections

See the documentation of the @aws-cdk/aws-ec2 package for more information about allowing connections between resources backed by instances.

Future work

  • [ ] CloudWatch Events (impossible to add currently as the AutoScalingGroup ARN is necessary to make this rule and this cannot be accessed from CloudFormation).

Reference

View in Nuget

csproj:

<PackageReference Include="Amazon.CDK.AWS.AutoScaling" Version="0.28.0" />

dotnet:

dotnet add package Amazon.CDK.AWS.AutoScaling --version 0.28.0

packages.config:

<package id="Amazon.CDK.AWS.AutoScaling" version="0.28.0" />

View in Maven Central

Apache Buildr:

'software.amazon.awscdk:autoscaling:jar:0.28.0'

Apache Ivy:

<dependency groupId="software.amazon.awscdk" name="autoscaling" rev="0.28.0"/>

Apache Maven:

<dependency>
  <groupId>software.amazon.awscdk</groupId>
  <artifactId>autoscaling</artifactId>
  <version>0.28.0</version>
</dependency>

Gradle / Grails:

compile 'software.amazon.awscdk:autoscaling:0.28.0'

Groovy Grape:

@Grapes(
@Grab(group='software.amazon.awscdk', module='autoscaling', version='0.28.0')
)

View in NPM

npm:

$ npm i @aws-cdk/aws-autoscaling@0.28.0

package.json:

{
  "@aws-cdk/aws-autoscaling": "^0.28.0"
}

yarn:

$ yarn add @aws-cdk/aws-autoscaling@0.28.0

View in NPM

npm:

$ npm i @aws-cdk/aws-autoscaling@0.28.0

package.json:

{
  "@aws-cdk/aws-autoscaling": "^0.28.0"
}

yarn:

$ yarn add @aws-cdk/aws-autoscaling@0.28.0

AdjustmentTier (interface)

class @aws-cdk/aws-autoscaling.AdjustmentTier

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.AdjustmentTier;
// AdjustmentTier is an interface
import { AdjustmentTier } from '@aws-cdk/aws-autoscaling';

An adjustment

adjustment

What number to adjust the capacity with

The number is interpeted as an added capacity, a new fixed capacity or an

added percentage depending on the AdjustmentType value of the

StepScalingPolicy.

Can be positive or negative.

Type:number (readonly)
lowerBound

Lower bound where this scaling tier applies.

The scaling tier applies if the difference between the metric

value and its alarm threshold is higher than this value.

Type:number (optional) (readonly)
Default:-Infinity if this is the first tier, otherwise the upperBound of the previous tier
upperBound

Upper bound where this scaling tier applies

The scaling tier applies if the difference between the metric

value and its alarm threshold is lower than this value.

Type:number (optional) (readonly)
Default:+Infinity

AdjustmentType (enum)

class @aws-cdk/aws-autoscaling.AdjustmentType

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.AdjustmentType;
const { AdjustmentType } = require('@aws-cdk/aws-autoscaling');
import { AdjustmentType } from '@aws-cdk/aws-autoscaling';

How adjustment numbers are interpreted

ChangeInCapacity

Add the adjustment number to the current capacity.

A positive number increases capacity, a negative number decreases capacity.

PercentChangeInCapacity

Add this percentage of the current capacity to itself.

The number must be between -100 and 100; a positive number increases

capacity and a negative number decreases it.

ExactCapacity

Make the capacity equal to the exact number given.

AutoScalingGroup

class @aws-cdk/aws-autoscaling.AutoScalingGroup(scope, id, props)

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.AutoScalingGroup;
const { AutoScalingGroup } = require('@aws-cdk/aws-autoscaling');
import { AutoScalingGroup } from '@aws-cdk/aws-autoscaling';

A Fleet represents a managed set of EC2 instances

The Fleet models a number of AutoScalingGroups, a launch configuration, a

security group and an instance role.

It allows adding arbitrary commands to the startup scripts of the instances

in the fleet.

The ASG spans all availability zones.

Extends:

@aws-cdk/cdk.Construct

Implements:

IAutoScalingGroup

Implements:

@aws-cdk/aws-elasticloadbalancing.ILoadBalancerTarget

Implements:

@aws-cdk/aws-ec2.IConnectable

Implements:

@aws-cdk/aws-elasticloadbalancingv2.IApplicationLoadBalancerTarget

Implements:

@aws-cdk/aws-elasticloadbalancingv2.INetworkLoadBalancerTarget

Parameters:
addSecurityGroup(securityGroup)

Add the security group to all instances via the launch configuration

security groups array.

Parameters:securityGroup (@aws-cdk/aws-ec2.ISecurityGroup) – : The security group to add
addToRolePolicy(statement)

Adds a statement to the IAM role assumed by instances of this fleet.

Parameters:statement (@aws-cdk/aws-iam.PolicyStatement) –
addUserData(*scriptLines)

Add command to the startup script of fleet instances.

The command must be in the scripting language supported by the fleet’s OS (i.e. Linux/Windows).

Parameters:*scriptLines (string) –
attachToApplicationTargetGroup(targetGroup) → @aws-cdk/aws-elasticloadbalancingv2.LoadBalancerTargetProps

Implements @aws-cdk/aws-elasticloadbalancingv2.IApplicationLoadBalancerTarget.attachToApplicationTargetGroup()

Attach to ELBv2 Application Target Group

Parameters:targetGroup (@aws-cdk/aws-elasticloadbalancingv2.ApplicationTargetGroup) –
Return type:@aws-cdk/aws-elasticloadbalancingv2.LoadBalancerTargetProps
attachToClassicLB(loadBalancer)

Implements @aws-cdk/aws-elasticloadbalancing.ILoadBalancerTarget.attachToClassicLB()

Attach to a classic load balancer

Parameters:loadBalancer (@aws-cdk/aws-elasticloadbalancing.LoadBalancer) –
attachToNetworkTargetGroup(targetGroup) → @aws-cdk/aws-elasticloadbalancingv2.LoadBalancerTargetProps

Implements @aws-cdk/aws-elasticloadbalancingv2.INetworkLoadBalancerTarget.attachToNetworkTargetGroup()

Attach to ELBv2 Application Target Group

Parameters:targetGroup (@aws-cdk/aws-elasticloadbalancingv2.NetworkTargetGroup) –
Return type:@aws-cdk/aws-elasticloadbalancingv2.LoadBalancerTargetProps
onLifecycleTransition(id, props) → @aws-cdk/aws-autoscaling.LifecycleHook

Implements @aws-cdk/aws-autoscaling.IAutoScalingGroup.onLifecycleTransition()

Send a message to either an SQS queue or SNS topic when instances launch or terminate

Parameters:
Return type:

LifecycleHook

scaleOnCpuUtilization(id, props) → @aws-cdk/aws-autoscaling.TargetTrackingScalingPolicy

Implements @aws-cdk/aws-autoscaling.IAutoScalingGroup.scaleOnCpuUtilization()

Scale out or in to achieve a target CPU utilization

Parameters:
Return type:

TargetTrackingScalingPolicy

scaleOnIncomingBytes(id, props) → @aws-cdk/aws-autoscaling.TargetTrackingScalingPolicy

Implements @aws-cdk/aws-autoscaling.IAutoScalingGroup.scaleOnIncomingBytes()

Scale out or in to achieve a target network ingress rate

Parameters:
Return type:

TargetTrackingScalingPolicy

scaleOnMetric(id, props) → @aws-cdk/aws-autoscaling.StepScalingPolicy

Implements @aws-cdk/aws-autoscaling.IAutoScalingGroup.scaleOnMetric()

Scale out or in, in response to a metric

Parameters:
Return type:

StepScalingPolicy

scaleOnOutgoingBytes(id, props) → @aws-cdk/aws-autoscaling.TargetTrackingScalingPolicy

Implements @aws-cdk/aws-autoscaling.IAutoScalingGroup.scaleOnOutgoingBytes()

Scale out or in to achieve a target network egress rate

Parameters:
Return type:

TargetTrackingScalingPolicy

scaleOnRequestCount(id, props) → @aws-cdk/aws-autoscaling.TargetTrackingScalingPolicy

Scale out or in to achieve a target request handling rate

The AutoScalingGroup must have been attached to an Application Load Balancer

in order to be able to call this.

Parameters:
Return type:

TargetTrackingScalingPolicy

scaleOnSchedule(id, props) → @aws-cdk/aws-autoscaling.ScheduledAction

Implements @aws-cdk/aws-autoscaling.IAutoScalingGroup.scaleOnSchedule()

Scale out or in based on time

Parameters:
Return type:

ScheduledAction

scaleToTrackMetric(id, props) → @aws-cdk/aws-autoscaling.TargetTrackingScalingPolicy

Implements @aws-cdk/aws-autoscaling.IAutoScalingGroup.scaleToTrackMetric()

Scale out or in in order to keep a metric around a target value

Parameters:
Return type:

TargetTrackingScalingPolicy

autoScalingGroupName

Implements @aws-cdk/aws-autoscaling.IAutoScalingGroup.autoScalingGroupName()

Name of the AutoScalingGroup

Type:string (readonly)
connections

Implements @aws-cdk/aws-ec2.IConnectable.connections()

Allows specify security group connections for instances of this fleet.

Type:@aws-cdk/aws-ec2.Connections (readonly)
osType

The type of OS instances of this fleet are running.

Type:@aws-cdk/aws-ec2.OperatingSystemType (readonly)
role

The IAM role assumed by instances of this fleet.

Type:@aws-cdk/aws-iam.IRole (readonly)
prepare()

Inherited from @aws-cdk/cdk.Construct

Perform final modifications before synthesis

This method can be implemented by derived constructs in order to perform

final changes before synthesis. prepare() will be called after child

constructs have been prepared.

This is an advanced framework feature. Only use this if you

understand the implications.

Protected method

toString() → string

Inherited from @aws-cdk/cdk.Construct

Returns a string representation of this construct.

Return type:string
validate() → string[]

Inherited from @aws-cdk/cdk.Construct

Validate the current construct.

This method can be implemented by derived constructs in order to perform

validation logic. It is called on all constructs before synthesis.

Protected method

Returns:An array of validation error messages, or an empty array if there the construct is valid.
Return type:string[]
dependencyRoots

Inherited from @aws-cdk/cdk.Construct

The set of constructs that form the root of this dependable

All resources under all returned constructs are included in the ordering

dependency.

Type:@aws-cdk/cdk.IConstruct[] (readonly)
node

Inherited from @aws-cdk/cdk.Construct

Construct node.

Type:@aws-cdk/cdk.ConstructNode (readonly)

AutoScalingGroupProps (interface)

class @aws-cdk/aws-autoscaling.AutoScalingGroupProps

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.AutoScalingGroupProps;
// AutoScalingGroupProps is an interface
import { AutoScalingGroupProps } from '@aws-cdk/aws-autoscaling';

Properties of a Fleet

Extends:CommonAutoScalingGroupProps
instanceType

Type of instance to launch

Type:@aws-cdk/aws-ec2.InstanceType (readonly)
machineImage

AMI to launch

Type:@aws-cdk/aws-ec2.IMachineImageSource (readonly)
vpc

VPC to launch these instances in.

Type:@aws-cdk/aws-ec2.IVpcNetwork (readonly)
role

An IAM role to associate with the instance profile assigned to this Auto Scaling Group.

The role must be assumable by the service principal ec2.amazonaws.com:

Type:@aws-cdk/aws-iam.IRole (optional) (readonly)
Default:A role will automatically be created, it can be accessed via the role property
allowAllOutbound

Inherited from @aws-cdk/aws-autoscaling.CommonAutoScalingGroupProps

Whether the instances can initiate connections to anywhere by default

Type:boolean (optional) (readonly)
Default:true
associatePublicIpAddress

Inherited from @aws-cdk/aws-autoscaling.CommonAutoScalingGroupProps

Whether instances in the Auto Scaling Group should have public

IP addresses associated with them.

Type:boolean (optional) (readonly)
Default:Use subnet setting
cooldownSeconds

Inherited from @aws-cdk/aws-autoscaling.CommonAutoScalingGroupProps

Default scaling cooldown for this AutoScalingGroup

Type:number (optional) (readonly)
Default:300 (5 minutes)
desiredCapacity

Inherited from @aws-cdk/aws-autoscaling.CommonAutoScalingGroupProps

Initial amount of instances in the fleet

Type:number (optional) (readonly)
Default:1
ignoreUnmodifiedSizeProperties

Inherited from @aws-cdk/aws-autoscaling.CommonAutoScalingGroupProps

If the ASG has scheduled actions, don’t reset unchanged group sizes

Only used if the ASG has scheduled actions (which may scale your ASG up

or down regardless of cdk deployments). If true, the size of the group

will only be reset if it has been changed in the CDK app. If false, the

sizes will always be changed back to what they were in the CDK app

on deployment.

Type:boolean (optional) (readonly)
Default:true
keyName

Inherited from @aws-cdk/aws-autoscaling.CommonAutoScalingGroupProps

Name of SSH keypair to grant access to instances

Type:string (optional) (readonly)
Default:No SSH access will be possible
maxCapacity

Inherited from @aws-cdk/aws-autoscaling.CommonAutoScalingGroupProps

Maximum number of instances in the fleet

Type:number (optional) (readonly)
Default:desiredCapacity
minCapacity

Inherited from @aws-cdk/aws-autoscaling.CommonAutoScalingGroupProps

Minimum number of instances in the fleet

Type:number (optional) (readonly)
Default:1
notificationsTopic

Inherited from @aws-cdk/aws-autoscaling.CommonAutoScalingGroupProps

SNS topic to send notifications about fleet changes

Type:@aws-cdk/aws-sns.ITopic (optional) (readonly)
Default:No fleet change notifications will be sent.
replacingUpdateMinSuccessfulInstancesPercent

Inherited from @aws-cdk/aws-autoscaling.CommonAutoScalingGroupProps

Configuration for replacing updates.

Only used if updateType == UpdateType.ReplacingUpdate. Specifies how

many instances must signal success for the update to succeed.

Type:number (optional) (readonly)
resourceSignalCount

Inherited from @aws-cdk/aws-autoscaling.CommonAutoScalingGroupProps

How many ResourceSignal calls CloudFormation expects before the resource is considered created

Type:number (optional) (readonly)
Default:1
resourceSignalTimeoutSec

Inherited from @aws-cdk/aws-autoscaling.CommonAutoScalingGroupProps

The length of time to wait for the resourceSignalCount

The maximum value is 43200 (12 hours).

Type:number (optional) (readonly)
Default:300 (5 minutes)
rollingUpdateConfiguration

Inherited from @aws-cdk/aws-autoscaling.CommonAutoScalingGroupProps

Configuration for rolling updates

Only used if updateType == UpdateType.RollingUpdate.

Type:RollingUpdateConfiguration (optional) (readonly)
updateType

Inherited from @aws-cdk/aws-autoscaling.CommonAutoScalingGroupProps

What to do when an AutoScalingGroup’s instance configuration is changed

This is applied when any of the settings on the ASG are changed that

affect how the instances should be created (VPC, instance type, startup

scripts, etc.). It indicates how the existing instances should be

replaced with new instances matching the new config. By default, nothing

is done and only new instances are launched with the new config.

Type:UpdateType (optional) (readonly)
Default:UpdateType.None
vpcSubnets

Inherited from @aws-cdk/aws-autoscaling.CommonAutoScalingGroupProps

Where to place instances within the VPC

Type:@aws-cdk/aws-ec2.SubnetSelection (optional) (readonly)

BaseTargetTrackingProps (interface)

class @aws-cdk/aws-autoscaling.BaseTargetTrackingProps

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.BaseTargetTrackingProps;
// BaseTargetTrackingProps is an interface
import { BaseTargetTrackingProps } from '@aws-cdk/aws-autoscaling';

Base interface for target tracking props

Contains the attributes that are common to target tracking policies,

except the ones relating to the metric and to the scalable target.

This interface is reused by more specific target tracking props objects.

cooldownSeconds

Period after a scaling completes before another scaling activity can start.

Type:number (optional) (readonly)
Default:The default cooldown configured on the AutoScalingGroup
disableScaleIn

Indicates whether scale in by the target tracking policy is disabled.

If the value is true, scale in is disabled and the target tracking policy

won’t remove capacity from the autoscaling group. Otherwise, scale in is

enabled and the target tracking policy can remove capacity from the

group.

Type:boolean (optional) (readonly)
Default:false
estimatedInstanceWarmupSeconds

Estimated time until a newly launched instance can send metrics to CloudWatch.

Type:number (optional) (readonly)
Default:Same as the cooldown

BasicLifecycleHookProps (interface)

class @aws-cdk/aws-autoscaling.BasicLifecycleHookProps

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.BasicLifecycleHookProps;
// BasicLifecycleHookProps is an interface
import { BasicLifecycleHookProps } from '@aws-cdk/aws-autoscaling';

Basic properties for a lifecycle hook

lifecycleTransition

The state of the Amazon EC2 instance to which you want to attach the lifecycle hook.

Type:LifecycleTransition (readonly)
notificationTarget

The target of the lifecycle hook

Type:@aws-cdk/aws-autoscaling-api.ILifecycleHookTarget (readonly)
defaultResult

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

Type:DefaultResult (optional) (readonly)
Default:Continue
heartbeatTimeoutSec

Maximum time between calls to RecordLifecycleActionHeartbeat for the hook

If the lifecycle hook times out, perform the action in DefaultResult.

Type:number (optional) (readonly)
lifecycleHookName

Name of the lifecycle hook

Type:string (optional) (readonly)
Default:Automatically generated name
notificationMetadata

Additional data to pass to the lifecycle hook target

Type:string (optional) (readonly)
Default:No metadata
role

The role that allows publishing to the notification target

Type:@aws-cdk/aws-iam.IRole (optional) (readonly)
Default:A role is automatically created

BasicScheduledActionProps (interface)

class @aws-cdk/aws-autoscaling.BasicScheduledActionProps

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.BasicScheduledActionProps;
// BasicScheduledActionProps is an interface
import { BasicScheduledActionProps } from '@aws-cdk/aws-autoscaling';

Properties for a scheduled scaling action

schedule

When to perform this action.

Supports cron expressions.

For more information about cron expressions, see https://en.wikipedia.org/wiki/Cron.

Type:string (readonly)
desiredCapacity

The new desired capacity.

At the scheduled time, set the desired capacity to the given capacity.

At least one of maxCapacity, minCapacity, or desiredCapacity must be supplied.

Type:number (optional) (readonly)
endTime

When this scheduled action expires.

Type:date (optional) (readonly)
Default:The rule never expires.
maxCapacity

The new maximum capacity.

At the scheduled time, set the maximum capacity to the given capacity.

At least one of maxCapacity, minCapacity, or desiredCapacity must be supplied.

Type:number (optional) (readonly)
Default:No new maximum capacity
minCapacity

The new minimum capacity.

At the scheduled time, set the minimum capacity to the given capacity.

At least one of maxCapacity, minCapacity, or desiredCapacity must be supplied.

Type:number (optional) (readonly)
Default:No new minimum capacity
startTime

When this scheduled action becomes active.

Type:date (optional) (readonly)
Default:The rule is activate immediately

BasicStepScalingPolicyProps (interface)

class @aws-cdk/aws-autoscaling.BasicStepScalingPolicyProps

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.BasicStepScalingPolicyProps;
// BasicStepScalingPolicyProps is an interface
import { BasicStepScalingPolicyProps } from '@aws-cdk/aws-autoscaling';
metric

Metric to scale on.

Type:@aws-cdk/aws-cloudwatch.Metric (readonly)
scalingSteps

The intervals for scaling.

Maps a range of metric values to a particular scaling behavior.

Type:ScalingInterval[] (readonly)
adjustmentType

How the adjustment numbers inside ‘intervals’ are interpreted.

Type:AdjustmentType (optional) (readonly)
Default:ChangeInCapacity
cooldownSeconds

Grace period after scaling activity.

Type:number (optional) (readonly)
Default:Default cooldown period on your AutoScalingGroup
estimatedInstanceWarmupSeconds

Estimated time until a newly launched instance can send metrics to CloudWatch.

Type:number (optional) (readonly)
Default:Same as the cooldown
minAdjustmentMagnitude

Minimum absolute number to adjust capacity with as result of percentage scaling.

Only when using AdjustmentType = PercentChangeInCapacity, this number controls

the minimum absolute effect size.

Type:number (optional) (readonly)
Default:No minimum scaling effect

BasicTargetTrackingScalingPolicyProps (interface)

class @aws-cdk/aws-autoscaling.BasicTargetTrackingScalingPolicyProps

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.BasicTargetTrackingScalingPolicyProps;
// BasicTargetTrackingScalingPolicyProps is an interface
import { BasicTargetTrackingScalingPolicyProps } from '@aws-cdk/aws-autoscaling';

Properties for a Target Tracking policy that include the metric but exclude the target

Extends:BaseTargetTrackingProps
targetValue

The target value for the metric.

Type:number (readonly)
customMetric

A custom metric for application autoscaling

The metric must track utilization. Scaling out will happen if the metric is higher than

the target value, scaling in will happen in the metric is lower than the target value.

Exactly one of customMetric or predefinedMetric must be specified.

Type:@aws-cdk/aws-cloudwatch.Metric (optional) (readonly)
predefinedMetric

A predefined metric for application autoscaling

The metric must track utilization. Scaling out will happen if the metric is higher than

the target value, scaling in will happen in the metric is lower than the target value.

Exactly one of customMetric or predefinedMetric must be specified.

Type:PredefinedMetric (optional) (readonly)
resourceLabel

The resource label associated with the predefined metric

Should be supplied if the predefined metric is ALBRequestCountPerTarget, and the

format should be:

app/<load-balancer-name>/<load-balancer-id>/targetgroup/<target-group-name>/<target-group-id>

Type:string (optional) (readonly)
Default:No resource label
cooldownSeconds

Inherited from @aws-cdk/aws-autoscaling.BaseTargetTrackingProps

Period after a scaling completes before another scaling activity can start.

Type:number (optional) (readonly)
Default:The default cooldown configured on the AutoScalingGroup
disableScaleIn

Inherited from @aws-cdk/aws-autoscaling.BaseTargetTrackingProps

Indicates whether scale in by the target tracking policy is disabled.

If the value is true, scale in is disabled and the target tracking policy

won’t remove capacity from the autoscaling group. Otherwise, scale in is

enabled and the target tracking policy can remove capacity from the

group.

Type:boolean (optional) (readonly)
Default:false
estimatedInstanceWarmupSeconds

Inherited from @aws-cdk/aws-autoscaling.BaseTargetTrackingProps

Estimated time until a newly launched instance can send metrics to CloudWatch.

Type:number (optional) (readonly)
Default:Same as the cooldown

CfnAutoScalingGroup

class @aws-cdk/aws-autoscaling.CfnAutoScalingGroup(scope, id, props)

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.CfnAutoScalingGroup;
const { CfnAutoScalingGroup } = require('@aws-cdk/aws-autoscaling');
import { CfnAutoScalingGroup } from '@aws-cdk/aws-autoscaling';

A CloudFormation AWS::AutoScaling::AutoScalingGroup

Extends:

@aws-cdk/cdk.CfnResource

Parameters:
renderProperties(properties) → string => any

Overrides @aws-cdk/cdk.CfnResource.renderProperties()

Protected method

Parameters:properties (any) –
Return type:string => any
resourceTypeName

The CloudFormation resource type name for this resource class.

Type:string (readonly) (static)
autoScalingGroupName
Type:string (readonly)
propertyOverrides
Type:CfnAutoScalingGroupProps (readonly)
tags

The TagManager handles setting, removing and formatting tags

Tags should be managed either passing them as properties during

initiation or by calling methods on this object. If both techniques are

used only the tags from the TagManager will be used. Tag (aspect)

will use the manager.

Type:@aws-cdk/cdk.TagManager (readonly)
class InstancesDistributionProperty

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.CfnAutoScalingGroup.InstancesDistributionProperty;
// CfnAutoScalingGroup.InstancesDistributionProperty is an interface
import { CfnAutoScalingGroup.InstancesDistributionProperty } from '@aws-cdk/aws-autoscaling';
onDemandAllocationStrategy

CfnAutoScalingGroup.InstancesDistributionProperty.OnDemandAllocationStrategy

Type:string (optional) (readonly)
onDemandBaseCapacity

CfnAutoScalingGroup.InstancesDistributionProperty.OnDemandBaseCapacity

Type:number or @aws-cdk/cdk.Token (optional) (readonly)
onDemandPercentageAboveBaseCapacity

CfnAutoScalingGroup.InstancesDistributionProperty.OnDemandPercentageAboveBaseCapacity

Type:number or @aws-cdk/cdk.Token (optional) (readonly)
spotAllocationStrategy

CfnAutoScalingGroup.InstancesDistributionProperty.SpotAllocationStrategy

Type:string (optional) (readonly)
spotInstancePools

CfnAutoScalingGroup.InstancesDistributionProperty.SpotInstancePools

Type:number or @aws-cdk/cdk.Token (optional) (readonly)
spotMaxPrice

CfnAutoScalingGroup.InstancesDistributionProperty.SpotMaxPrice

Type:string (optional) (readonly)
class LaunchTemplateOverridesProperty

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.CfnAutoScalingGroup.LaunchTemplateOverridesProperty;
// CfnAutoScalingGroup.LaunchTemplateOverridesProperty is an interface
import { CfnAutoScalingGroup.LaunchTemplateOverridesProperty } from '@aws-cdk/aws-autoscaling';
instanceType

CfnAutoScalingGroup.LaunchTemplateOverridesProperty.InstanceType

Type:string (optional) (readonly)
class LaunchTemplateProperty

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.CfnAutoScalingGroup.LaunchTemplateProperty;
// CfnAutoScalingGroup.LaunchTemplateProperty is an interface
import { CfnAutoScalingGroup.LaunchTemplateProperty } from '@aws-cdk/aws-autoscaling';
launchTemplateSpecification

CfnAutoScalingGroup.LaunchTemplateProperty.LaunchTemplateSpecification

Type:@aws-cdk/cdk.Token or LaunchTemplateSpecificationProperty (readonly)
overrides

CfnAutoScalingGroup.LaunchTemplateProperty.Overrides

Type:@aws-cdk/cdk.Token or (@aws-cdk/cdk.Token or LaunchTemplateOverridesProperty)[] (optional) (readonly)
class LaunchTemplateSpecificationProperty

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.CfnAutoScalingGroup.LaunchTemplateSpecificationProperty;
// CfnAutoScalingGroup.LaunchTemplateSpecificationProperty is an interface
import { CfnAutoScalingGroup.LaunchTemplateSpecificationProperty } from '@aws-cdk/aws-autoscaling';
version

CfnAutoScalingGroup.LaunchTemplateSpecificationProperty.Version

Type:string (readonly)
launchTemplateId

CfnAutoScalingGroup.LaunchTemplateSpecificationProperty.LaunchTemplateId

Type:string (optional) (readonly)
launchTemplateName

CfnAutoScalingGroup.LaunchTemplateSpecificationProperty.LaunchTemplateName

Type:string (optional) (readonly)
class LifecycleHookSpecificationProperty

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.CfnAutoScalingGroup.LifecycleHookSpecificationProperty;
// CfnAutoScalingGroup.LifecycleHookSpecificationProperty is an interface
import { CfnAutoScalingGroup.LifecycleHookSpecificationProperty } from '@aws-cdk/aws-autoscaling';
lifecycleHookName

CfnAutoScalingGroup.LifecycleHookSpecificationProperty.LifecycleHookName

Type:string (readonly)
lifecycleTransition

CfnAutoScalingGroup.LifecycleHookSpecificationProperty.LifecycleTransition

Type:string (readonly)
defaultResult

CfnAutoScalingGroup.LifecycleHookSpecificationProperty.DefaultResult

Type:string (optional) (readonly)
heartbeatTimeout

CfnAutoScalingGroup.LifecycleHookSpecificationProperty.HeartbeatTimeout

Type:number or @aws-cdk/cdk.Token (optional) (readonly)
notificationMetadata

CfnAutoScalingGroup.LifecycleHookSpecificationProperty.NotificationMetadata

Type:string (optional) (readonly)
notificationTargetArn

CfnAutoScalingGroup.LifecycleHookSpecificationProperty.NotificationTargetARN

Type:string (optional) (readonly)
roleArn

CfnAutoScalingGroup.LifecycleHookSpecificationProperty.RoleARN

Type:string (optional) (readonly)
class MetricsCollectionProperty

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.CfnAutoScalingGroup.MetricsCollectionProperty;
// CfnAutoScalingGroup.MetricsCollectionProperty is an interface
import { CfnAutoScalingGroup.MetricsCollectionProperty } from '@aws-cdk/aws-autoscaling';
granularity

CfnAutoScalingGroup.MetricsCollectionProperty.Granularity

Type:string (readonly)
metrics

CfnAutoScalingGroup.MetricsCollectionProperty.Metrics

Type:string[] (optional) (readonly)
class MixedInstancesPolicyProperty

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.CfnAutoScalingGroup.MixedInstancesPolicyProperty;
// CfnAutoScalingGroup.MixedInstancesPolicyProperty is an interface
import { CfnAutoScalingGroup.MixedInstancesPolicyProperty } from '@aws-cdk/aws-autoscaling';
launchTemplate

CfnAutoScalingGroup.MixedInstancesPolicyProperty.LaunchTemplate

Type:@aws-cdk/cdk.Token or LaunchTemplateProperty (readonly)
instancesDistribution

CfnAutoScalingGroup.MixedInstancesPolicyProperty.InstancesDistribution

Type:@aws-cdk/cdk.Token or InstancesDistributionProperty (optional) (readonly)
class NotificationConfigurationProperty

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.CfnAutoScalingGroup.NotificationConfigurationProperty;
// CfnAutoScalingGroup.NotificationConfigurationProperty is an interface
import { CfnAutoScalingGroup.NotificationConfigurationProperty } from '@aws-cdk/aws-autoscaling';
topicArn

CfnAutoScalingGroup.NotificationConfigurationProperty.TopicARN

Type:string (readonly)
notificationTypes

CfnAutoScalingGroup.NotificationConfigurationProperty.NotificationTypes

Type:string[] (optional) (readonly)
class TagPropertyProperty

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.CfnAutoScalingGroup.TagPropertyProperty;
// CfnAutoScalingGroup.TagPropertyProperty is an interface
import { CfnAutoScalingGroup.TagPropertyProperty } from '@aws-cdk/aws-autoscaling';
key

CfnAutoScalingGroup.TagPropertyProperty.Key

Type:string (readonly)
propagateAtLaunch

CfnAutoScalingGroup.TagPropertyProperty.PropagateAtLaunch

Type:boolean or @aws-cdk/cdk.Token (readonly)
value

CfnAutoScalingGroup.TagPropertyProperty.Value

Type:string (readonly)
overrideLogicalId(newLogicalId)

Inherited from @aws-cdk/cdk.CfnElement

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

Parameters:newLogicalId (string) – The new logical ID to use for this stack element.
prepare()

Inherited from @aws-cdk/cdk.CfnElement

Automatically detect references in this CfnElement

Protected method

creationStackTrace

Inherited from @aws-cdk/cdk.CfnElement

Type:string[] (readonly)
logicalId

Inherited from @aws-cdk/cdk.CfnElement

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

Type:string (readonly)
stackPath

Inherited from @aws-cdk/cdk.CfnElement

Return the path with respect to the stack

Type:string (readonly)
ref

Inherited from @aws-cdk/cdk.CfnRefElement

Returns a token to a CloudFormation { Ref } that references this entity based on it’s logical ID.

Type:string (readonly)
referenceToken

Inherited from @aws-cdk/cdk.CfnRefElement

Return a token that will CloudFormation { Ref } this stack element

Protected property

Type:@aws-cdk/cdk.Token (readonly)
addDeletionOverride(path)

Inherited from @aws-cdk/cdk.CfnResource

Syntactic sugar for addOverride(path, undefined).

Parameters:path (string) – The path of the value to delete
addDependsOn(resource)

Inherited from @aws-cdk/cdk.CfnResource

Indicates that this resource depends on another resource and cannot be provisioned

unless the other resource has been successfully provisioned.

Parameters:resource (@aws-cdk/cdk.CfnResource) –
addOverride(path, value)

Inherited from @aws-cdk/cdk.CfnResource

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

Parameters:
  • path (string) – 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.
addPropertyDeletionOverride(propertyPath)

Inherited from @aws-cdk/cdk.CfnResource

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

Parameters:propertyPath (string) – The path to the property.
addPropertyOverride(propertyPath, value)

Inherited from @aws-cdk/cdk.CfnResource

Adds an override to a resource property.

Syntactic sugar for addOverride(“Properties.<…>”, value).

Parameters:
  • propertyPath (string) – The path of the property
  • value (any) – The value
getAtt(attributeName) → @aws-cdk/cdk.CfnReference

Inherited from @aws-cdk/cdk.CfnResource

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:attributeName (string) – The name of the attribute.
Return type:@aws-cdk/cdk.CfnReference
options

Inherited from @aws-cdk/cdk.CfnResource

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

Type:@aws-cdk/cdk.IResourceOptions (readonly)
properties

Inherited from @aws-cdk/cdk.CfnResource

AWS resource properties.

This object is rendered via a call to “renderProperties(this.properties)”.

Protected property

Type:any (readonly)
resourceType

Inherited from @aws-cdk/cdk.CfnResource

AWS resource type.

Type:string (readonly)
untypedPropertyOverrides

Inherited from @aws-cdk/cdk.CfnResource

AWS resource property overrides.

During synthesis, the method “renderProperties(this.overrides)” is called

with this object, and merged on top of the output of

“renderProperties(this.properties)”.

Derived classes should expose a strongly-typed version of this object as

a public property called propertyOverrides.

Protected property

Type:any (readonly)
toString() → string

Inherited from @aws-cdk/cdk.Construct

Returns a string representation of this construct.

Return type:string
validate() → string[]

Inherited from @aws-cdk/cdk.Construct

Validate the current construct.

This method can be implemented by derived constructs in order to perform

validation logic. It is called on all constructs before synthesis.

Protected method

Returns:An array of validation error messages, or an empty array if there the construct is valid.
Return type:string[]
dependencyRoots

Inherited from @aws-cdk/cdk.Construct

The set of constructs that form the root of this dependable

All resources under all returned constructs are included in the ordering

dependency.

Type:@aws-cdk/cdk.IConstruct[] (readonly)
node

Inherited from @aws-cdk/cdk.Construct

Construct node.

Type:@aws-cdk/cdk.ConstructNode (readonly)

CfnAutoScalingGroupProps (interface)

class @aws-cdk/aws-autoscaling.CfnAutoScalingGroupProps

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.CfnAutoScalingGroupProps;
// CfnAutoScalingGroupProps is an interface
import { CfnAutoScalingGroupProps } from '@aws-cdk/aws-autoscaling';

Properties for defining a AWS::AutoScaling::AutoScalingGroup

maxSize

AWS::AutoScaling::AutoScalingGroup.MaxSize

Type:string (readonly)
minSize

AWS::AutoScaling::AutoScalingGroup.MinSize

Type:string (readonly)
autoScalingGroupName

AWS::AutoScaling::AutoScalingGroup.AutoScalingGroupName

Type:string (optional) (readonly)
availabilityZones

AWS::AutoScaling::AutoScalingGroup.AvailabilityZones

Type:string[] (optional) (readonly)
cooldown

AWS::AutoScaling::AutoScalingGroup.Cooldown

Type:string (optional) (readonly)
desiredCapacity

AWS::AutoScaling::AutoScalingGroup.DesiredCapacity

Type:string (optional) (readonly)
healthCheckGracePeriod

AWS::AutoScaling::AutoScalingGroup.HealthCheckGracePeriod

Type:number or @aws-cdk/cdk.Token (optional) (readonly)
healthCheckType

AWS::AutoScaling::AutoScalingGroup.HealthCheckType

Type:string (optional) (readonly)
instanceId

AWS::AutoScaling::AutoScalingGroup.InstanceId

Type:string (optional) (readonly)
launchConfigurationName

AWS::AutoScaling::AutoScalingGroup.LaunchConfigurationName

Type:string (optional) (readonly)
launchTemplate

AWS::AutoScaling::AutoScalingGroup.LaunchTemplate

Type:@aws-cdk/cdk.Token or LaunchTemplateSpecificationProperty (optional) (readonly)
lifecycleHookSpecificationList

AWS::AutoScaling::AutoScalingGroup.LifecycleHookSpecificationList

Type:@aws-cdk/cdk.Token or (@aws-cdk/cdk.Token or LifecycleHookSpecificationProperty)[] (optional) (readonly)
loadBalancerNames

AWS::AutoScaling::AutoScalingGroup.LoadBalancerNames

Type:string[] (optional) (readonly)
metricsCollection

AWS::AutoScaling::AutoScalingGroup.MetricsCollection

Type:@aws-cdk/cdk.Token or (@aws-cdk/cdk.Token or MetricsCollectionProperty)[] (optional) (readonly)
mixedInstancesPolicy

AWS::AutoScaling::AutoScalingGroup.MixedInstancesPolicy

Type:@aws-cdk/cdk.Token or MixedInstancesPolicyProperty (optional) (readonly)
notificationConfigurations

AWS::AutoScaling::AutoScalingGroup.NotificationConfigurations

Type:@aws-cdk/cdk.Token or (@aws-cdk/cdk.Token or NotificationConfigurationProperty)[] (optional) (readonly)
placementGroup

AWS::AutoScaling::AutoScalingGroup.PlacementGroup

Type:string (optional) (readonly)
serviceLinkedRoleArn

AWS::AutoScaling::AutoScalingGroup.ServiceLinkedRoleARN

Type:string (optional) (readonly)
tags

AWS::AutoScaling::AutoScalingGroup.Tags

Type:TagPropertyProperty[] (optional) (readonly)
targetGroupArns

AWS::AutoScaling::AutoScalingGroup.TargetGroupARNs

Type:string[] (optional) (readonly)
terminationPolicies

AWS::AutoScaling::AutoScalingGroup.TerminationPolicies

Type:string[] (optional) (readonly)
vpcZoneIdentifier

AWS::AutoScaling::AutoScalingGroup.VPCZoneIdentifier

Type:string[] (optional) (readonly)

CfnLaunchConfiguration

class @aws-cdk/aws-autoscaling.CfnLaunchConfiguration(scope, id, props)

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.CfnLaunchConfiguration;
const { CfnLaunchConfiguration } = require('@aws-cdk/aws-autoscaling');
import { CfnLaunchConfiguration } from '@aws-cdk/aws-autoscaling';

A CloudFormation AWS::AutoScaling::LaunchConfiguration

Extends:

@aws-cdk/cdk.CfnResource

Parameters:
renderProperties(properties) → string => any

Overrides @aws-cdk/cdk.CfnResource.renderProperties()

Protected method

Parameters:properties (any) –
Return type:string => any
resourceTypeName

The CloudFormation resource type name for this resource class.

Type:string (readonly) (static)
launchConfigurationName
Type:string (readonly)
propertyOverrides
Type:CfnLaunchConfigurationProps (readonly)
class BlockDeviceMappingProperty

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.CfnLaunchConfiguration.BlockDeviceMappingProperty;
// CfnLaunchConfiguration.BlockDeviceMappingProperty is an interface
import { CfnLaunchConfiguration.BlockDeviceMappingProperty } from '@aws-cdk/aws-autoscaling';
deviceName

CfnLaunchConfiguration.BlockDeviceMappingProperty.DeviceName

Type:string (readonly)
ebs

CfnLaunchConfiguration.BlockDeviceMappingProperty.Ebs

Type:@aws-cdk/cdk.Token or BlockDeviceProperty (optional) (readonly)
noDevice

CfnLaunchConfiguration.BlockDeviceMappingProperty.NoDevice

Type:boolean or @aws-cdk/cdk.Token (optional) (readonly)
virtualName

CfnLaunchConfiguration.BlockDeviceMappingProperty.VirtualName

Type:string (optional) (readonly)
class BlockDeviceProperty

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.CfnLaunchConfiguration.BlockDeviceProperty;
// CfnLaunchConfiguration.BlockDeviceProperty is an interface
import { CfnLaunchConfiguration.BlockDeviceProperty } from '@aws-cdk/aws-autoscaling';
deleteOnTermination

CfnLaunchConfiguration.BlockDeviceProperty.DeleteOnTermination

Type:boolean or @aws-cdk/cdk.Token (optional) (readonly)
encrypted

CfnLaunchConfiguration.BlockDeviceProperty.Encrypted

Type:boolean or @aws-cdk/cdk.Token (optional) (readonly)
iops

CfnLaunchConfiguration.BlockDeviceProperty.Iops

Type:number or @aws-cdk/cdk.Token (optional) (readonly)
snapshotId

CfnLaunchConfiguration.BlockDeviceProperty.SnapshotId

Type:string (optional) (readonly)
volumeSize

CfnLaunchConfiguration.BlockDeviceProperty.VolumeSize

Type:number or @aws-cdk/cdk.Token (optional) (readonly)
volumeType

CfnLaunchConfiguration.BlockDeviceProperty.VolumeType

Type:string (optional) (readonly)
overrideLogicalId(newLogicalId)

Inherited from @aws-cdk/cdk.CfnElement

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

Parameters:newLogicalId (string) – The new logical ID to use for this stack element.
prepare()

Inherited from @aws-cdk/cdk.CfnElement

Automatically detect references in this CfnElement

Protected method

creationStackTrace

Inherited from @aws-cdk/cdk.CfnElement

Type:string[] (readonly)
logicalId

Inherited from @aws-cdk/cdk.CfnElement

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

Type:string (readonly)
stackPath

Inherited from @aws-cdk/cdk.CfnElement

Return the path with respect to the stack

Type:string (readonly)
ref

Inherited from @aws-cdk/cdk.CfnRefElement

Returns a token to a CloudFormation { Ref } that references this entity based on it’s logical ID.

Type:string (readonly)
referenceToken

Inherited from @aws-cdk/cdk.CfnRefElement

Return a token that will CloudFormation { Ref } this stack element

Protected property

Type:@aws-cdk/cdk.Token (readonly)
addDeletionOverride(path)

Inherited from @aws-cdk/cdk.CfnResource

Syntactic sugar for addOverride(path, undefined).

Parameters:path (string) – The path of the value to delete
addDependsOn(resource)

Inherited from @aws-cdk/cdk.CfnResource

Indicates that this resource depends on another resource and cannot be provisioned

unless the other resource has been successfully provisioned.

Parameters:resource (@aws-cdk/cdk.CfnResource) –
addOverride(path, value)

Inherited from @aws-cdk/cdk.CfnResource

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

Parameters:
  • path (string) – 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.
addPropertyDeletionOverride(propertyPath)

Inherited from @aws-cdk/cdk.CfnResource

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

Parameters:propertyPath (string) – The path to the property.
addPropertyOverride(propertyPath, value)

Inherited from @aws-cdk/cdk.CfnResource

Adds an override to a resource property.

Syntactic sugar for addOverride(“Properties.<…>”, value).

Parameters:
  • propertyPath (string) – The path of the property
  • value (any) – The value
getAtt(attributeName) → @aws-cdk/cdk.CfnReference

Inherited from @aws-cdk/cdk.CfnResource

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:attributeName (string) – The name of the attribute.
Return type:@aws-cdk/cdk.CfnReference
options

Inherited from @aws-cdk/cdk.CfnResource

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

Type:@aws-cdk/cdk.IResourceOptions (readonly)
properties

Inherited from @aws-cdk/cdk.CfnResource

AWS resource properties.

This object is rendered via a call to “renderProperties(this.properties)”.

Protected property

Type:any (readonly)
resourceType

Inherited from @aws-cdk/cdk.CfnResource

AWS resource type.

Type:string (readonly)
untypedPropertyOverrides

Inherited from @aws-cdk/cdk.CfnResource

AWS resource property overrides.

During synthesis, the method “renderProperties(this.overrides)” is called

with this object, and merged on top of the output of

“renderProperties(this.properties)”.

Derived classes should expose a strongly-typed version of this object as

a public property called propertyOverrides.

Protected property

Type:any (readonly)
toString() → string

Inherited from @aws-cdk/cdk.Construct

Returns a string representation of this construct.

Return type:string
validate() → string[]

Inherited from @aws-cdk/cdk.Construct

Validate the current construct.

This method can be implemented by derived constructs in order to perform

validation logic. It is called on all constructs before synthesis.

Protected method

Returns:An array of validation error messages, or an empty array if there the construct is valid.
Return type:string[]
dependencyRoots

Inherited from @aws-cdk/cdk.Construct

The set of constructs that form the root of this dependable

All resources under all returned constructs are included in the ordering

dependency.

Type:@aws-cdk/cdk.IConstruct[] (readonly)
node

Inherited from @aws-cdk/cdk.Construct

Construct node.

Type:@aws-cdk/cdk.ConstructNode (readonly)

CfnLaunchConfigurationProps (interface)

class @aws-cdk/aws-autoscaling.CfnLaunchConfigurationProps

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.CfnLaunchConfigurationProps;
// CfnLaunchConfigurationProps is an interface
import { CfnLaunchConfigurationProps } from '@aws-cdk/aws-autoscaling';

Properties for defining a AWS::AutoScaling::LaunchConfiguration

imageId

AWS::AutoScaling::LaunchConfiguration.ImageId

Type:string (readonly)
instanceType

AWS::AutoScaling::LaunchConfiguration.InstanceType

Type:string (readonly)
associatePublicIpAddress

AWS::AutoScaling::LaunchConfiguration.AssociatePublicIpAddress

Type:boolean or @aws-cdk/cdk.Token (optional) (readonly)
blockDeviceMappings

AWS::AutoScaling::LaunchConfiguration.BlockDeviceMappings

Type:@aws-cdk/cdk.Token or (@aws-cdk/cdk.Token or BlockDeviceMappingProperty)[] (optional) (readonly)
classicLinkVpcId

AWS::AutoScaling::LaunchConfiguration.ClassicLinkVPCId

Type:string (optional) (readonly)
classicLinkVpcSecurityGroups

AWS::AutoScaling::LaunchConfiguration.ClassicLinkVPCSecurityGroups

Type:string[] (optional) (readonly)
ebsOptimized

AWS::AutoScaling::LaunchConfiguration.EbsOptimized

Type:boolean or @aws-cdk/cdk.Token (optional) (readonly)
iamInstanceProfile

AWS::AutoScaling::LaunchConfiguration.IamInstanceProfile

Type:string (optional) (readonly)
instanceId

AWS::AutoScaling::LaunchConfiguration.InstanceId

Type:string (optional) (readonly)
instanceMonitoring

AWS::AutoScaling::LaunchConfiguration.InstanceMonitoring

Type:boolean or @aws-cdk/cdk.Token (optional) (readonly)
kernelId

AWS::AutoScaling::LaunchConfiguration.KernelId

Type:string (optional) (readonly)
keyName

AWS::AutoScaling::LaunchConfiguration.KeyName

Type:string (optional) (readonly)
launchConfigurationName

AWS::AutoScaling::LaunchConfiguration.LaunchConfigurationName

Type:string (optional) (readonly)
placementTenancy

AWS::AutoScaling::LaunchConfiguration.PlacementTenancy

Type:string (optional) (readonly)
ramDiskId

AWS::AutoScaling::LaunchConfiguration.RamDiskId

Type:string (optional) (readonly)
securityGroups

AWS::AutoScaling::LaunchConfiguration.SecurityGroups

Type:string[] (optional) (readonly)
spotPrice

AWS::AutoScaling::LaunchConfiguration.SpotPrice

Type:string (optional) (readonly)
userData

AWS::AutoScaling::LaunchConfiguration.UserData

Type:string (optional) (readonly)

CfnLifecycleHook

class @aws-cdk/aws-autoscaling.CfnLifecycleHook(scope, id, props)

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.CfnLifecycleHook;
const { CfnLifecycleHook } = require('@aws-cdk/aws-autoscaling');
import { CfnLifecycleHook } from '@aws-cdk/aws-autoscaling';

A CloudFormation AWS::AutoScaling::LifecycleHook

Extends:

@aws-cdk/cdk.CfnResource

Parameters:
renderProperties(properties) → string => any

Overrides @aws-cdk/cdk.CfnResource.renderProperties()

Protected method

Parameters:properties (any) –
Return type:string => any
resourceTypeName

The CloudFormation resource type name for this resource class.

Type:string (readonly) (static)
lifecycleHookName
Type:string (readonly)
propertyOverrides
Type:CfnLifecycleHookProps (readonly)
overrideLogicalId(newLogicalId)

Inherited from @aws-cdk/cdk.CfnElement

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

Parameters:newLogicalId (string) – The new logical ID to use for this stack element.
prepare()

Inherited from @aws-cdk/cdk.CfnElement

Automatically detect references in this CfnElement

Protected method

creationStackTrace

Inherited from @aws-cdk/cdk.CfnElement

Type:string[] (readonly)
logicalId

Inherited from @aws-cdk/cdk.CfnElement

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

Type:string (readonly)
stackPath

Inherited from @aws-cdk/cdk.CfnElement

Return the path with respect to the stack

Type:string (readonly)
ref

Inherited from @aws-cdk/cdk.CfnRefElement

Returns a token to a CloudFormation { Ref } that references this entity based on it’s logical ID.

Type:string (readonly)
referenceToken

Inherited from @aws-cdk/cdk.CfnRefElement

Return a token that will CloudFormation { Ref } this stack element

Protected property

Type:@aws-cdk/cdk.Token (readonly)
addDeletionOverride(path)

Inherited from @aws-cdk/cdk.CfnResource

Syntactic sugar for addOverride(path, undefined).

Parameters:path (string) – The path of the value to delete
addDependsOn(resource)

Inherited from @aws-cdk/cdk.CfnResource

Indicates that this resource depends on another resource and cannot be provisioned

unless the other resource has been successfully provisioned.

Parameters:resource (@aws-cdk/cdk.CfnResource) –
addOverride(path, value)

Inherited from @aws-cdk/cdk.CfnResource

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

Parameters:
  • path (string) – 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.
addPropertyDeletionOverride(propertyPath)

Inherited from @aws-cdk/cdk.CfnResource

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

Parameters:propertyPath (string) – The path to the property.
addPropertyOverride(propertyPath, value)

Inherited from @aws-cdk/cdk.CfnResource

Adds an override to a resource property.

Syntactic sugar for addOverride(“Properties.<…>”, value).

Parameters:
  • propertyPath (string) – The path of the property
  • value (any) – The value
getAtt(attributeName) → @aws-cdk/cdk.CfnReference

Inherited from @aws-cdk/cdk.CfnResource

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:attributeName (string) – The name of the attribute.
Return type:@aws-cdk/cdk.CfnReference
options

Inherited from @aws-cdk/cdk.CfnResource

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

Type:@aws-cdk/cdk.IResourceOptions (readonly)
properties

Inherited from @aws-cdk/cdk.CfnResource

AWS resource properties.

This object is rendered via a call to “renderProperties(this.properties)”.

Protected property

Type:any (readonly)
resourceType

Inherited from @aws-cdk/cdk.CfnResource

AWS resource type.

Type:string (readonly)
untypedPropertyOverrides

Inherited from @aws-cdk/cdk.CfnResource

AWS resource property overrides.

During synthesis, the method “renderProperties(this.overrides)” is called

with this object, and merged on top of the output of

“renderProperties(this.properties)”.

Derived classes should expose a strongly-typed version of this object as

a public property called propertyOverrides.

Protected property

Type:any (readonly)
toString() → string

Inherited from @aws-cdk/cdk.Construct

Returns a string representation of this construct.

Return type:string
validate() → string[]

Inherited from @aws-cdk/cdk.Construct

Validate the current construct.

This method can be implemented by derived constructs in order to perform

validation logic. It is called on all constructs before synthesis.

Protected method

Returns:An array of validation error messages, or an empty array if there the construct is valid.
Return type:string[]
dependencyRoots

Inherited from @aws-cdk/cdk.Construct

The set of constructs that form the root of this dependable

All resources under all returned constructs are included in the ordering

dependency.

Type:@aws-cdk/cdk.IConstruct[] (readonly)
node

Inherited from @aws-cdk/cdk.Construct

Construct node.

Type:@aws-cdk/cdk.ConstructNode (readonly)

CfnLifecycleHookProps (interface)

class @aws-cdk/aws-autoscaling.CfnLifecycleHookProps

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.CfnLifecycleHookProps;
// CfnLifecycleHookProps is an interface
import { CfnLifecycleHookProps } from '@aws-cdk/aws-autoscaling';

Properties for defining a AWS::AutoScaling::LifecycleHook

autoScalingGroupName

AWS::AutoScaling::LifecycleHook.AutoScalingGroupName

Type:string (readonly)
lifecycleTransition

AWS::AutoScaling::LifecycleHook.LifecycleTransition

Type:string (readonly)
defaultResult

AWS::AutoScaling::LifecycleHook.DefaultResult

Type:string (optional) (readonly)
heartbeatTimeout

AWS::AutoScaling::LifecycleHook.HeartbeatTimeout

Type:number or @aws-cdk/cdk.Token (optional) (readonly)
lifecycleHookName

AWS::AutoScaling::LifecycleHook.LifecycleHookName

Type:string (optional) (readonly)
notificationMetadata

AWS::AutoScaling::LifecycleHook.NotificationMetadata

Type:string (optional) (readonly)
notificationTargetArn

AWS::AutoScaling::LifecycleHook.NotificationTargetARN

Type:string (optional) (readonly)
roleArn

AWS::AutoScaling::LifecycleHook.RoleARN

Type:string (optional) (readonly)

CfnScalingPolicy

class @aws-cdk/aws-autoscaling.CfnScalingPolicy(scope, id, props)

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.CfnScalingPolicy;
const { CfnScalingPolicy } = require('@aws-cdk/aws-autoscaling');
import { CfnScalingPolicy } from '@aws-cdk/aws-autoscaling';

A CloudFormation AWS::AutoScaling::ScalingPolicy

Extends:

@aws-cdk/cdk.CfnResource

Parameters:
renderProperties(properties) → string => any

Overrides @aws-cdk/cdk.CfnResource.renderProperties()

Protected method

Parameters:properties (any) –
Return type:string => any
resourceTypeName

The CloudFormation resource type name for this resource class.

Type:string (readonly) (static)
propertyOverrides
Type:CfnScalingPolicyProps (readonly)
scalingPolicyArn
Type:string (readonly)
class CustomizedMetricSpecificationProperty

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.CfnScalingPolicy.CustomizedMetricSpecificationProperty;
// CfnScalingPolicy.CustomizedMetricSpecificationProperty is an interface
import { CfnScalingPolicy.CustomizedMetricSpecificationProperty } from '@aws-cdk/aws-autoscaling';
metricName

CfnScalingPolicy.CustomizedMetricSpecificationProperty.MetricName

Type:string (readonly)
namespace

CfnScalingPolicy.CustomizedMetricSpecificationProperty.Namespace

Type:string (readonly)
statistic

CfnScalingPolicy.CustomizedMetricSpecificationProperty.Statistic

Type:string (readonly)
dimensions

CfnScalingPolicy.CustomizedMetricSpecificationProperty.Dimensions

Type:@aws-cdk/cdk.Token or (@aws-cdk/cdk.Token or MetricDimensionProperty)[] (optional) (readonly)
unit

CfnScalingPolicy.CustomizedMetricSpecificationProperty.Unit

Type:string (optional) (readonly)
class MetricDimensionProperty

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.CfnScalingPolicy.MetricDimensionProperty;
// CfnScalingPolicy.MetricDimensionProperty is an interface
import { CfnScalingPolicy.MetricDimensionProperty } from '@aws-cdk/aws-autoscaling';
name

CfnScalingPolicy.MetricDimensionProperty.Name

Type:string (readonly)
value

CfnScalingPolicy.MetricDimensionProperty.Value

Type:string (readonly)
class PredefinedMetricSpecificationProperty

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.CfnScalingPolicy.PredefinedMetricSpecificationProperty;
// CfnScalingPolicy.PredefinedMetricSpecificationProperty is an interface
import { CfnScalingPolicy.PredefinedMetricSpecificationProperty } from '@aws-cdk/aws-autoscaling';
predefinedMetricType

CfnScalingPolicy.PredefinedMetricSpecificationProperty.PredefinedMetricType

Type:string (readonly)
resourceLabel

CfnScalingPolicy.PredefinedMetricSpecificationProperty.ResourceLabel

Type:string (optional) (readonly)
class StepAdjustmentProperty

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.CfnScalingPolicy.StepAdjustmentProperty;
// CfnScalingPolicy.StepAdjustmentProperty is an interface
import { CfnScalingPolicy.StepAdjustmentProperty } from '@aws-cdk/aws-autoscaling';
scalingAdjustment

CfnScalingPolicy.StepAdjustmentProperty.ScalingAdjustment

Type:number or @aws-cdk/cdk.Token (readonly)
metricIntervalLowerBound

CfnScalingPolicy.StepAdjustmentProperty.MetricIntervalLowerBound

Type:number or @aws-cdk/cdk.Token (optional) (readonly)
metricIntervalUpperBound

CfnScalingPolicy.StepAdjustmentProperty.MetricIntervalUpperBound

Type:number or @aws-cdk/cdk.Token (optional) (readonly)
class TargetTrackingConfigurationProperty

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.CfnScalingPolicy.TargetTrackingConfigurationProperty;
// CfnScalingPolicy.TargetTrackingConfigurationProperty is an interface
import { CfnScalingPolicy.TargetTrackingConfigurationProperty } from '@aws-cdk/aws-autoscaling';
targetValue

CfnScalingPolicy.TargetTrackingConfigurationProperty.TargetValue

Type:number or @aws-cdk/cdk.Token (readonly)
customizedMetricSpecification

CfnScalingPolicy.TargetTrackingConfigurationProperty.CustomizedMetricSpecification

Type:@aws-cdk/cdk.Token or CustomizedMetricSpecificationProperty (optional) (readonly)
disableScaleIn

CfnScalingPolicy.TargetTrackingConfigurationProperty.DisableScaleIn

Type:boolean or @aws-cdk/cdk.Token (optional) (readonly)
predefinedMetricSpecification

CfnScalingPolicy.TargetTrackingConfigurationProperty.PredefinedMetricSpecification

Type:@aws-cdk/cdk.Token or PredefinedMetricSpecificationProperty (optional) (readonly)
overrideLogicalId(newLogicalId)

Inherited from @aws-cdk/cdk.CfnElement

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

Parameters:newLogicalId (string) – The new logical ID to use for this stack element.
prepare()

Inherited from @aws-cdk/cdk.CfnElement

Automatically detect references in this CfnElement

Protected method

creationStackTrace

Inherited from @aws-cdk/cdk.CfnElement

Type:string[] (readonly)
logicalId

Inherited from @aws-cdk/cdk.CfnElement

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

Type:string (readonly)
stackPath

Inherited from @aws-cdk/cdk.CfnElement

Return the path with respect to the stack

Type:string (readonly)
ref

Inherited from @aws-cdk/cdk.CfnRefElement

Returns a token to a CloudFormation { Ref } that references this entity based on it’s logical ID.

Type:string (readonly)
referenceToken

Inherited from @aws-cdk/cdk.CfnRefElement

Return a token that will CloudFormation { Ref } this stack element

Protected property

Type:@aws-cdk/cdk.Token (readonly)
addDeletionOverride(path)

Inherited from @aws-cdk/cdk.CfnResource

Syntactic sugar for addOverride(path, undefined).

Parameters:path (string) – The path of the value to delete
addDependsOn(resource)

Inherited from @aws-cdk/cdk.CfnResource

Indicates that this resource depends on another resource and cannot be provisioned

unless the other resource has been successfully provisioned.

Parameters:resource (@aws-cdk/cdk.CfnResource) –
addOverride(path, value)

Inherited from @aws-cdk/cdk.CfnResource

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

Parameters:
  • path (string) – 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.
addPropertyDeletionOverride(propertyPath)

Inherited from @aws-cdk/cdk.CfnResource

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

Parameters:propertyPath (string) – The path to the property.
addPropertyOverride(propertyPath, value)

Inherited from @aws-cdk/cdk.CfnResource

Adds an override to a resource property.

Syntactic sugar for addOverride(“Properties.<…>”, value).

Parameters:
  • propertyPath (string) – The path of the property
  • value (any) – The value
getAtt(attributeName) → @aws-cdk/cdk.CfnReference

Inherited from @aws-cdk/cdk.CfnResource

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:attributeName (string) – The name of the attribute.
Return type:@aws-cdk/cdk.CfnReference
options

Inherited from @aws-cdk/cdk.CfnResource

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

Type:@aws-cdk/cdk.IResourceOptions (readonly)
properties

Inherited from @aws-cdk/cdk.CfnResource

AWS resource properties.

This object is rendered via a call to “renderProperties(this.properties)”.

Protected property

Type:any (readonly)
resourceType

Inherited from @aws-cdk/cdk.CfnResource

AWS resource type.

Type:string (readonly)
untypedPropertyOverrides

Inherited from @aws-cdk/cdk.CfnResource

AWS resource property overrides.

During synthesis, the method “renderProperties(this.overrides)” is called

with this object, and merged on top of the output of

“renderProperties(this.properties)”.

Derived classes should expose a strongly-typed version of this object as

a public property called propertyOverrides.

Protected property

Type:any (readonly)
toString() → string

Inherited from @aws-cdk/cdk.Construct

Returns a string representation of this construct.

Return type:string
validate() → string[]

Inherited from @aws-cdk/cdk.Construct

Validate the current construct.

This method can be implemented by derived constructs in order to perform

validation logic. It is called on all constructs before synthesis.

Protected method

Returns:An array of validation error messages, or an empty array if there the construct is valid.
Return type:string[]
dependencyRoots

Inherited from @aws-cdk/cdk.Construct

The set of constructs that form the root of this dependable

All resources under all returned constructs are included in the ordering

dependency.

Type:@aws-cdk/cdk.IConstruct[] (readonly)
node

Inherited from @aws-cdk/cdk.Construct

Construct node.

Type:@aws-cdk/cdk.ConstructNode (readonly)

CfnScalingPolicyProps (interface)

class @aws-cdk/aws-autoscaling.CfnScalingPolicyProps

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.CfnScalingPolicyProps;
// CfnScalingPolicyProps is an interface
import { CfnScalingPolicyProps } from '@aws-cdk/aws-autoscaling';

Properties for defining a AWS::AutoScaling::ScalingPolicy

autoScalingGroupName

AWS::AutoScaling::ScalingPolicy.AutoScalingGroupName

Type:string (readonly)
adjustmentType

AWS::AutoScaling::ScalingPolicy.AdjustmentType

Type:string (optional) (readonly)
cooldown

AWS::AutoScaling::ScalingPolicy.Cooldown

Type:string (optional) (readonly)
estimatedInstanceWarmup

AWS::AutoScaling::ScalingPolicy.EstimatedInstanceWarmup

Type:number or @aws-cdk/cdk.Token (optional) (readonly)
metricAggregationType

AWS::AutoScaling::ScalingPolicy.MetricAggregationType

Type:string (optional) (readonly)
minAdjustmentMagnitude

AWS::AutoScaling::ScalingPolicy.MinAdjustmentMagnitude

Type:number or @aws-cdk/cdk.Token (optional) (readonly)
policyType

AWS::AutoScaling::ScalingPolicy.PolicyType

Type:string (optional) (readonly)
scalingAdjustment

AWS::AutoScaling::ScalingPolicy.ScalingAdjustment

Type:number or @aws-cdk/cdk.Token (optional) (readonly)
stepAdjustments

AWS::AutoScaling::ScalingPolicy.StepAdjustments

Type:@aws-cdk/cdk.Token or (@aws-cdk/cdk.Token or StepAdjustmentProperty)[] (optional) (readonly)
targetTrackingConfiguration

AWS::AutoScaling::ScalingPolicy.TargetTrackingConfiguration

Type:@aws-cdk/cdk.Token or TargetTrackingConfigurationProperty (optional) (readonly)

CfnScheduledAction

class @aws-cdk/aws-autoscaling.CfnScheduledAction(scope, id, props)

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.CfnScheduledAction;
const { CfnScheduledAction } = require('@aws-cdk/aws-autoscaling');
import { CfnScheduledAction } from '@aws-cdk/aws-autoscaling';

A CloudFormation AWS::AutoScaling::ScheduledAction

Extends:

@aws-cdk/cdk.CfnResource

Parameters:
renderProperties(properties) → string => any

Overrides @aws-cdk/cdk.CfnResource.renderProperties()

Protected method

Parameters:properties (any) –
Return type:string => any
resourceTypeName

The CloudFormation resource type name for this resource class.

Type:string (readonly) (static)
propertyOverrides
Type:CfnScheduledActionProps (readonly)
scheduledActionName
Type:string (readonly)
overrideLogicalId(newLogicalId)

Inherited from @aws-cdk/cdk.CfnElement

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

Parameters:newLogicalId (string) – The new logical ID to use for this stack element.
prepare()

Inherited from @aws-cdk/cdk.CfnElement

Automatically detect references in this CfnElement

Protected method

creationStackTrace

Inherited from @aws-cdk/cdk.CfnElement

Type:string[] (readonly)
logicalId

Inherited from @aws-cdk/cdk.CfnElement

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

Type:string (readonly)
stackPath

Inherited from @aws-cdk/cdk.CfnElement

Return the path with respect to the stack

Type:string (readonly)
ref

Inherited from @aws-cdk/cdk.CfnRefElement

Returns a token to a CloudFormation { Ref } that references this entity based on it’s logical ID.

Type:string (readonly)
referenceToken

Inherited from @aws-cdk/cdk.CfnRefElement

Return a token that will CloudFormation { Ref } this stack element

Protected property

Type:@aws-cdk/cdk.Token (readonly)
addDeletionOverride(path)

Inherited from @aws-cdk/cdk.CfnResource

Syntactic sugar for addOverride(path, undefined).

Parameters:path (string) – The path of the value to delete
addDependsOn(resource)

Inherited from @aws-cdk/cdk.CfnResource

Indicates that this resource depends on another resource and cannot be provisioned

unless the other resource has been successfully provisioned.

Parameters:resource (@aws-cdk/cdk.CfnResource) –
addOverride(path, value)

Inherited from @aws-cdk/cdk.CfnResource

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

Parameters:
  • path (string) – 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.
addPropertyDeletionOverride(propertyPath)

Inherited from @aws-cdk/cdk.CfnResource

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

Parameters:propertyPath (string) – The path to the property.
addPropertyOverride(propertyPath, value)

Inherited from @aws-cdk/cdk.CfnResource

Adds an override to a resource property.

Syntactic sugar for addOverride(“Properties.<…>”, value).

Parameters:
  • propertyPath (string) – The path of the property
  • value (any) – The value
getAtt(attributeName) → @aws-cdk/cdk.CfnReference

Inherited from @aws-cdk/cdk.CfnResource

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:attributeName (string) – The name of the attribute.
Return type:@aws-cdk/cdk.CfnReference
options

Inherited from @aws-cdk/cdk.CfnResource

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

Type:@aws-cdk/cdk.IResourceOptions (readonly)
properties

Inherited from @aws-cdk/cdk.CfnResource

AWS resource properties.

This object is rendered via a call to “renderProperties(this.properties)”.

Protected property

Type:any (readonly)
resourceType

Inherited from @aws-cdk/cdk.CfnResource

AWS resource type.

Type:string (readonly)
untypedPropertyOverrides

Inherited from @aws-cdk/cdk.CfnResource

AWS resource property overrides.

During synthesis, the method “renderProperties(this.overrides)” is called

with this object, and merged on top of the output of

“renderProperties(this.properties)”.

Derived classes should expose a strongly-typed version of this object as

a public property called propertyOverrides.

Protected property

Type:any (readonly)
toString() → string

Inherited from @aws-cdk/cdk.Construct

Returns a string representation of this construct.

Return type:string
validate() → string[]

Inherited from @aws-cdk/cdk.Construct

Validate the current construct.

This method can be implemented by derived constructs in order to perform

validation logic. It is called on all constructs before synthesis.

Protected method

Returns:An array of validation error messages, or an empty array if there the construct is valid.
Return type:string[]
dependencyRoots

Inherited from @aws-cdk/cdk.Construct

The set of constructs that form the root of this dependable

All resources under all returned constructs are included in the ordering

dependency.

Type:@aws-cdk/cdk.IConstruct[] (readonly)
node

Inherited from @aws-cdk/cdk.Construct

Construct node.

Type:@aws-cdk/cdk.ConstructNode (readonly)

CfnScheduledActionProps (interface)

class @aws-cdk/aws-autoscaling.CfnScheduledActionProps

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.CfnScheduledActionProps;
// CfnScheduledActionProps is an interface
import { CfnScheduledActionProps } from '@aws-cdk/aws-autoscaling';

Properties for defining a AWS::AutoScaling::ScheduledAction

autoScalingGroupName

AWS::AutoScaling::ScheduledAction.AutoScalingGroupName

Type:string (readonly)
desiredCapacity

AWS::AutoScaling::ScheduledAction.DesiredCapacity

Type:number or @aws-cdk/cdk.Token (optional) (readonly)
endTime

AWS::AutoScaling::ScheduledAction.EndTime

Type:string (optional) (readonly)
maxSize

AWS::AutoScaling::ScheduledAction.MaxSize

Type:number or @aws-cdk/cdk.Token (optional) (readonly)
minSize

AWS::AutoScaling::ScheduledAction.MinSize

Type:number or @aws-cdk/cdk.Token (optional) (readonly)
recurrence

AWS::AutoScaling::ScheduledAction.Recurrence

Type:string (optional) (readonly)
startTime

AWS::AutoScaling::ScheduledAction.StartTime

Type:string (optional) (readonly)

CommonAutoScalingGroupProps (interface)

class @aws-cdk/aws-autoscaling.CommonAutoScalingGroupProps

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.CommonAutoScalingGroupProps;
// CommonAutoScalingGroupProps is an interface
import { CommonAutoScalingGroupProps } from '@aws-cdk/aws-autoscaling';

Basic properties of an AutoScalingGroup, except the exact machines to run and where they should run

Constructs that want to create AutoScalingGroups can inherit

this interface and specialize the essential parts in various ways.

allowAllOutbound

Whether the instances can initiate connections to anywhere by default

Type:boolean (optional) (readonly)
Default:true
associatePublicIpAddress

Whether instances in the Auto Scaling Group should have public

IP addresses associated with them.

Type:boolean (optional) (readonly)
Default:Use subnet setting
cooldownSeconds

Default scaling cooldown for this AutoScalingGroup

Type:number (optional) (readonly)
Default:300 (5 minutes)
desiredCapacity

Initial amount of instances in the fleet

Type:number (optional) (readonly)
Default:1
ignoreUnmodifiedSizeProperties

If the ASG has scheduled actions, don’t reset unchanged group sizes

Only used if the ASG has scheduled actions (which may scale your ASG up

or down regardless of cdk deployments). If true, the size of the group

will only be reset if it has been changed in the CDK app. If false, the

sizes will always be changed back to what they were in the CDK app

on deployment.

Type:boolean (optional) (readonly)
Default:true
keyName

Name of SSH keypair to grant access to instances

Type:string (optional) (readonly)
Default:No SSH access will be possible
maxCapacity

Maximum number of instances in the fleet

Type:number (optional) (readonly)
Default:desiredCapacity
minCapacity

Minimum number of instances in the fleet

Type:number (optional) (readonly)
Default:1
notificationsTopic

SNS topic to send notifications about fleet changes

Type:@aws-cdk/aws-sns.ITopic (optional) (readonly)
Default:No fleet change notifications will be sent.
replacingUpdateMinSuccessfulInstancesPercent

Configuration for replacing updates.

Only used if updateType == UpdateType.ReplacingUpdate. Specifies how

many instances must signal success for the update to succeed.

Type:number (optional) (readonly)
resourceSignalCount

How many ResourceSignal calls CloudFormation expects before the resource is considered created

Type:number (optional) (readonly)
Default:1
resourceSignalTimeoutSec

The length of time to wait for the resourceSignalCount

The maximum value is 43200 (12 hours).

Type:number (optional) (readonly)
Default:300 (5 minutes)
rollingUpdateConfiguration

Configuration for rolling updates

Only used if updateType == UpdateType.RollingUpdate.

Type:RollingUpdateConfiguration (optional) (readonly)
updateType

What to do when an AutoScalingGroup’s instance configuration is changed

This is applied when any of the settings on the ASG are changed that

affect how the instances should be created (VPC, instance type, startup

scripts, etc.). It indicates how the existing instances should be

replaced with new instances matching the new config. By default, nothing

is done and only new instances are launched with the new config.

Type:UpdateType (optional) (readonly)
Default:UpdateType.None
vpcSubnets

Where to place instances within the VPC

Type:@aws-cdk/aws-ec2.SubnetSelection (optional) (readonly)

CpuUtilizationScalingProps (interface)

class @aws-cdk/aws-autoscaling.CpuUtilizationScalingProps

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.CpuUtilizationScalingProps;
// CpuUtilizationScalingProps is an interface
import { CpuUtilizationScalingProps } from '@aws-cdk/aws-autoscaling';

Properties for enabling scaling based on CPU utilization

Extends:BaseTargetTrackingProps
targetUtilizationPercent

Target average CPU utilization across the task

Type:number (readonly)
cooldownSeconds

Inherited from @aws-cdk/aws-autoscaling.BaseTargetTrackingProps

Period after a scaling completes before another scaling activity can start.

Type:number (optional) (readonly)
Default:The default cooldown configured on the AutoScalingGroup
disableScaleIn

Inherited from @aws-cdk/aws-autoscaling.BaseTargetTrackingProps

Indicates whether scale in by the target tracking policy is disabled.

If the value is true, scale in is disabled and the target tracking policy

won’t remove capacity from the autoscaling group. Otherwise, scale in is

enabled and the target tracking policy can remove capacity from the

group.

Type:boolean (optional) (readonly)
Default:false
estimatedInstanceWarmupSeconds

Inherited from @aws-cdk/aws-autoscaling.BaseTargetTrackingProps

Estimated time until a newly launched instance can send metrics to CloudWatch.

Type:number (optional) (readonly)
Default:Same as the cooldown

Cron

class @aws-cdk/aws-autoscaling.Cron

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.Cron;
const { Cron } = require('@aws-cdk/aws-autoscaling');
import { Cron } from '@aws-cdk/aws-autoscaling';

Helper class to generate Cron expressions

static dailyUtc(hour[, minute]) → string

Return a cron expression to run every day at a particular time

The time is specified in UTC.

Parameters:
  • hour (number) – The hour in UTC to schedule this action
  • minute (number (optional)) – The minute in the our to schedule this action (defaults to 0)
Return type:

string

DefaultResult (enum)

class @aws-cdk/aws-autoscaling.DefaultResult

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.DefaultResult;
const { DefaultResult } = require('@aws-cdk/aws-autoscaling');
import { DefaultResult } from '@aws-cdk/aws-autoscaling';
Continue
Abandon

IAutoScalingGroup (interface)

class @aws-cdk/aws-autoscaling.IAutoScalingGroup

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.IAutoScalingGroup;
// IAutoScalingGroup is an interface
import { IAutoScalingGroup } from '@aws-cdk/aws-autoscaling';

An AutoScalingGroup

autoScalingGroupName

The name of the AutoScalingGroup

Type:string (readonly)
onLifecycleTransition(id, props) → @aws-cdk/aws-autoscaling.LifecycleHook

Send a message to either an SQS queue or SNS topic when instances launch or terminate

Parameters:
Return type:

LifecycleHook

Abstract:

Yes

scaleOnCpuUtilization(id, props) → @aws-cdk/aws-autoscaling.TargetTrackingScalingPolicy

Scale out or in to achieve a target CPU utilization

Parameters:
Return type:

TargetTrackingScalingPolicy

Abstract:

Yes

scaleOnIncomingBytes(id, props) → @aws-cdk/aws-autoscaling.TargetTrackingScalingPolicy

Scale out or in to achieve a target network ingress rate

Parameters:
Return type:

TargetTrackingScalingPolicy

Abstract:

Yes

scaleOnMetric(id, props) → @aws-cdk/aws-autoscaling.StepScalingPolicy

Scale out or in, in response to a metric

Parameters:
Return type:

StepScalingPolicy

Abstract:

Yes

scaleOnOutgoingBytes(id, props) → @aws-cdk/aws-autoscaling.TargetTrackingScalingPolicy

Scale out or in to achieve a target network egress rate

Parameters:
Return type:

TargetTrackingScalingPolicy

Abstract:

Yes

scaleOnSchedule(id, props) → @aws-cdk/aws-autoscaling.ScheduledAction

Scale out or in based on time

Parameters:
Return type:

ScheduledAction

Abstract:

Yes

scaleToTrackMetric(id, props) → @aws-cdk/aws-autoscaling.TargetTrackingScalingPolicy

Scale out or in in order to keep a metric around a target value

Parameters:
Return type:

TargetTrackingScalingPolicy

Abstract:

Yes

LifecycleHook

class @aws-cdk/aws-autoscaling.LifecycleHook(scope, id, props)

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.LifecycleHook;
const { LifecycleHook } = require('@aws-cdk/aws-autoscaling');
import { LifecycleHook } from '@aws-cdk/aws-autoscaling';
Extends:

@aws-cdk/cdk.Construct

Implements:

@aws-cdk/aws-autoscaling-api.ILifecycleHook

Parameters:
lifecycleHookName

The name of this lifecycle hook

Type:string (readonly)
role

Implements @aws-cdk/aws-autoscaling-api.ILifecycleHook.role()

The role that allows the ASG to publish to the notification target

Type:@aws-cdk/aws-iam.IRole (readonly)
prepare()

Inherited from @aws-cdk/cdk.Construct

Perform final modifications before synthesis

This method can be implemented by derived constructs in order to perform

final changes before synthesis. prepare() will be called after child

constructs have been prepared.

This is an advanced framework feature. Only use this if you

understand the implications.

Protected method

toString() → string

Inherited from @aws-cdk/cdk.Construct

Returns a string representation of this construct.

Return type:string
validate() → string[]

Inherited from @aws-cdk/cdk.Construct

Validate the current construct.

This method can be implemented by derived constructs in order to perform

validation logic. It is called on all constructs before synthesis.

Protected method

Returns:An array of validation error messages, or an empty array if there the construct is valid.
Return type:string[]
dependencyRoots

Inherited from @aws-cdk/cdk.Construct

The set of constructs that form the root of this dependable

All resources under all returned constructs are included in the ordering

dependency.

Type:@aws-cdk/cdk.IConstruct[] (readonly)
node

Inherited from @aws-cdk/cdk.Construct

Construct node.

Type:@aws-cdk/cdk.ConstructNode (readonly)

LifecycleHookProps (interface)

class @aws-cdk/aws-autoscaling.LifecycleHookProps

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.LifecycleHookProps;
// LifecycleHookProps is an interface
import { LifecycleHookProps } from '@aws-cdk/aws-autoscaling';

Properties for a Lifecycle hook

Extends:BasicLifecycleHookProps
autoScalingGroup

The AutoScalingGroup to add the lifecycle hook to

Type:IAutoScalingGroup (readonly)
lifecycleTransition

Inherited from @aws-cdk/aws-autoscaling.BasicLifecycleHookProps

The state of the Amazon EC2 instance to which you want to attach the lifecycle hook.

Type:LifecycleTransition (readonly)
notificationTarget

Inherited from @aws-cdk/aws-autoscaling.BasicLifecycleHookProps

The target of the lifecycle hook

Type:@aws-cdk/aws-autoscaling-api.ILifecycleHookTarget (readonly)
defaultResult

Inherited from @aws-cdk/aws-autoscaling.BasicLifecycleHookProps

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

Type:DefaultResult (optional) (readonly)
Default:Continue
heartbeatTimeoutSec

Inherited from @aws-cdk/aws-autoscaling.BasicLifecycleHookProps

Maximum time between calls to RecordLifecycleActionHeartbeat for the hook

If the lifecycle hook times out, perform the action in DefaultResult.

Type:number (optional) (readonly)
lifecycleHookName

Inherited from @aws-cdk/aws-autoscaling.BasicLifecycleHookProps

Name of the lifecycle hook

Type:string (optional) (readonly)
Default:Automatically generated name
notificationMetadata

Inherited from @aws-cdk/aws-autoscaling.BasicLifecycleHookProps

Additional data to pass to the lifecycle hook target

Type:string (optional) (readonly)
Default:No metadata
role

Inherited from @aws-cdk/aws-autoscaling.BasicLifecycleHookProps

The role that allows publishing to the notification target

Type:@aws-cdk/aws-iam.IRole (optional) (readonly)
Default:A role is automatically created

LifecycleTransition (enum)

class @aws-cdk/aws-autoscaling.LifecycleTransition

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.LifecycleTransition;
const { LifecycleTransition } = require('@aws-cdk/aws-autoscaling');
import { LifecycleTransition } from '@aws-cdk/aws-autoscaling';

What instance transition to attach the hook to

InstanceLaunching

Execute the hook when an instance is about to be added

InstanceTerminating

Execute the hook when an instance is about to be terminated

MetricAggregationType (enum)

class @aws-cdk/aws-autoscaling.MetricAggregationType

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.MetricAggregationType;
const { MetricAggregationType } = require('@aws-cdk/aws-autoscaling');
import { MetricAggregationType } from '@aws-cdk/aws-autoscaling';

How the scaling metric is going to be aggregated

Average

Average

Minimum

Minimum

Maximum

Maximum

MetricTargetTrackingProps (interface)

class @aws-cdk/aws-autoscaling.MetricTargetTrackingProps

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.MetricTargetTrackingProps;
// MetricTargetTrackingProps is an interface
import { MetricTargetTrackingProps } from '@aws-cdk/aws-autoscaling';

Properties for enabling tracking of an arbitrary metric

Extends:BaseTargetTrackingProps
metric

Metric to track

The metric must represent a utilization, so that if it’s higher than the

target value, your ASG should scale out, and if it’s lower it should

scale in.

Type:@aws-cdk/aws-cloudwatch.Metric (readonly)
targetValue

Value to keep the metric around

Type:number (readonly)
cooldownSeconds

Inherited from @aws-cdk/aws-autoscaling.BaseTargetTrackingProps

Period after a scaling completes before another scaling activity can start.

Type:number (optional) (readonly)
Default:The default cooldown configured on the AutoScalingGroup
disableScaleIn

Inherited from @aws-cdk/aws-autoscaling.BaseTargetTrackingProps

Indicates whether scale in by the target tracking policy is disabled.

If the value is true, scale in is disabled and the target tracking policy

won’t remove capacity from the autoscaling group. Otherwise, scale in is

enabled and the target tracking policy can remove capacity from the

group.

Type:boolean (optional) (readonly)
Default:false
estimatedInstanceWarmupSeconds

Inherited from @aws-cdk/aws-autoscaling.BaseTargetTrackingProps

Estimated time until a newly launched instance can send metrics to CloudWatch.

Type:number (optional) (readonly)
Default:Same as the cooldown

NetworkUtilizationScalingProps (interface)

class @aws-cdk/aws-autoscaling.NetworkUtilizationScalingProps

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.NetworkUtilizationScalingProps;
// NetworkUtilizationScalingProps is an interface
import { NetworkUtilizationScalingProps } from '@aws-cdk/aws-autoscaling';

Properties for enabling scaling based on network utilization

Extends:BaseTargetTrackingProps
targetBytesPerSecond

Target average bytes/seconds on each instance

Type:number (readonly)
cooldownSeconds

Inherited from @aws-cdk/aws-autoscaling.BaseTargetTrackingProps

Period after a scaling completes before another scaling activity can start.

Type:number (optional) (readonly)
Default:The default cooldown configured on the AutoScalingGroup
disableScaleIn

Inherited from @aws-cdk/aws-autoscaling.BaseTargetTrackingProps

Indicates whether scale in by the target tracking policy is disabled.

If the value is true, scale in is disabled and the target tracking policy

won’t remove capacity from the autoscaling group. Otherwise, scale in is

enabled and the target tracking policy can remove capacity from the

group.

Type:boolean (optional) (readonly)
Default:false
estimatedInstanceWarmupSeconds

Inherited from @aws-cdk/aws-autoscaling.BaseTargetTrackingProps

Estimated time until a newly launched instance can send metrics to CloudWatch.

Type:number (optional) (readonly)
Default:Same as the cooldown

PredefinedMetric (enum)

class @aws-cdk/aws-autoscaling.PredefinedMetric

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.PredefinedMetric;
const { PredefinedMetric } = require('@aws-cdk/aws-autoscaling');
import { PredefinedMetric } from '@aws-cdk/aws-autoscaling';

One of the predefined autoscaling metrics

ASGAverageCPUUtilization

Average CPU utilization of the Auto Scaling group

ASGAverageNetworkIn

Average number of bytes received on all network interfaces by the Auto Scaling group

ASGAverageNetworkOut

Average number of bytes sent out on all network interfaces by the Auto Scaling group

ALBRequestCountPerTarget

Number of requests completed per target in an Application Load Balancer target group

Specify the ALB to look at in the resourceLabel field.

RequestCountScalingProps (interface)

class @aws-cdk/aws-autoscaling.RequestCountScalingProps

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.RequestCountScalingProps;
// RequestCountScalingProps is an interface
import { RequestCountScalingProps } from '@aws-cdk/aws-autoscaling';

Properties for enabling scaling based on request/second

Extends:BaseTargetTrackingProps
targetRequestsPerSecond

Target average requests/seconds on each instance

Type:number (readonly)
cooldownSeconds

Inherited from @aws-cdk/aws-autoscaling.BaseTargetTrackingProps

Period after a scaling completes before another scaling activity can start.

Type:number (optional) (readonly)
Default:The default cooldown configured on the AutoScalingGroup
disableScaleIn

Inherited from @aws-cdk/aws-autoscaling.BaseTargetTrackingProps

Indicates whether scale in by the target tracking policy is disabled.

If the value is true, scale in is disabled and the target tracking policy

won’t remove capacity from the autoscaling group. Otherwise, scale in is

enabled and the target tracking policy can remove capacity from the

group.

Type:boolean (optional) (readonly)
Default:false
estimatedInstanceWarmupSeconds

Inherited from @aws-cdk/aws-autoscaling.BaseTargetTrackingProps

Estimated time until a newly launched instance can send metrics to CloudWatch.

Type:number (optional) (readonly)
Default:Same as the cooldown

RollingUpdateConfiguration (interface)

class @aws-cdk/aws-autoscaling.RollingUpdateConfiguration

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.RollingUpdateConfiguration;
// RollingUpdateConfiguration is an interface
import { RollingUpdateConfiguration } from '@aws-cdk/aws-autoscaling';

Additional settings when a rolling update is selected

maxBatchSize

The maximum number of instances that AWS CloudFormation updates at once.

Type:number (optional) (readonly)
Default:1
minInstancesInService

The minimum number of instances that must be in service before more instances are replaced.

This number affects the speed of the replacement.

Type:number (optional) (readonly)
Default:0
minSuccessfulInstancesPercent

The percentage of instances that must signal success for an update to succeed.

If an instance doesn’t send a signal within the time specified in the

pauseTime property, AWS CloudFormation assumes that the instance wasn’t

updated.

This number affects the success of the replacement.

If you specify this property, you must also enable the

waitOnResourceSignals and pauseTime properties.

Type:number (optional) (readonly)
Default:100
pauseTimeSec

The pause time after making a change to a batch of instances.

This is intended to give those instances time to start software applications.

Specify PauseTime in the ISO8601 duration format (in the format

PT#H#M#S, where each # is the number of hours, minutes, and seconds,

respectively). The maximum PauseTime is one hour (PT1H).

Type:number (optional) (readonly)
Default:300 if the waitOnResourceSignals property is true, otherwise 0
suspendProcesses

Specifies the Auto Scaling processes to suspend during a stack update.

Suspending processes prevents Auto Scaling from interfering with a stack

update.

Type:ScalingProcess[] (optional) (readonly)
Default:HealthCheck, ReplaceUnhealthy, AZRebalance, AlarmNotification, ScheduledActions.
waitOnResourceSignals

Specifies whether the Auto Scaling group waits on signals from new instances during an update.

AWS CloudFormation must receive a signal from each new instance within

the specified PauseTime before continuing the update.

To have instances wait for an Elastic Load Balancing health check before

they signal success, add a health-check verification by using the

cfn-init helper script. For an example, see the verify_instance_health

command in the Auto Scaling rolling updates sample template.

Type:boolean (optional) (readonly)
Default:true if you specified the minSuccessfulInstancesPercent property, false otherwise

ScalingInterval (interface)

class @aws-cdk/aws-autoscaling.ScalingInterval

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.ScalingInterval;
// ScalingInterval is an interface
import { ScalingInterval } from '@aws-cdk/aws-autoscaling';

A range of metric values in which to apply a certain scaling operation

change

The capacity adjustment to apply in this interval

The number is interpreted differently based on AdjustmentType:

  • ChangeInCapacity: add the adjustment to the current capacity.

    The number can be positive or negative.

  • PercentChangeInCapacity: add or remove the given percentage of the current

    capacity to itself. The number can be in the range [-100..100].

  • ExactCapacity: set the capacity to this number. The number must

    be positive.

Type:number (readonly)
lower

The lower bound of the interval.

The scaling adjustment will be applied if the metric is higher than this value.

Type:number (optional) (readonly)
Default:Threshold automatically derived from neighbouring intervals
upper

The upper bound of the interval.

The scaling adjustment will be applied if the metric is lower than this value.

Type:number (optional) (readonly)
Default:Threshold automatically derived from neighbouring intervals

ScalingProcess (enum)

class @aws-cdk/aws-autoscaling.ScalingProcess

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.ScalingProcess;
const { ScalingProcess } = require('@aws-cdk/aws-autoscaling');
import { ScalingProcess } from '@aws-cdk/aws-autoscaling';
Launch
Terminate
HealthCheck
ReplaceUnhealthy
AZRebalance
AlarmNotification
ScheduledActions
AddToLoadBalancer

ScheduledAction

class @aws-cdk/aws-autoscaling.ScheduledAction(scope, id, props)

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.ScheduledAction;
const { ScheduledAction } = require('@aws-cdk/aws-autoscaling');
import { ScheduledAction } from '@aws-cdk/aws-autoscaling';

Define a scheduled scaling action

Extends:

@aws-cdk/cdk.Construct

Parameters:
prepare()

Inherited from @aws-cdk/cdk.Construct

Perform final modifications before synthesis

This method can be implemented by derived constructs in order to perform

final changes before synthesis. prepare() will be called after child

constructs have been prepared.

This is an advanced framework feature. Only use this if you

understand the implications.

Protected method

toString() → string

Inherited from @aws-cdk/cdk.Construct

Returns a string representation of this construct.

Return type:string
validate() → string[]

Inherited from @aws-cdk/cdk.Construct

Validate the current construct.

This method can be implemented by derived constructs in order to perform

validation logic. It is called on all constructs before synthesis.

Protected method

Returns:An array of validation error messages, or an empty array if there the construct is valid.
Return type:string[]
dependencyRoots

Inherited from @aws-cdk/cdk.Construct

The set of constructs that form the root of this dependable

All resources under all returned constructs are included in the ordering

dependency.

Type:@aws-cdk/cdk.IConstruct[] (readonly)
node

Inherited from @aws-cdk/cdk.Construct

Construct node.

Type:@aws-cdk/cdk.ConstructNode (readonly)

ScheduledActionProps (interface)

class @aws-cdk/aws-autoscaling.ScheduledActionProps

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.ScheduledActionProps;
// ScheduledActionProps is an interface
import { ScheduledActionProps } from '@aws-cdk/aws-autoscaling';

Properties for a scheduled action on an AutoScalingGroup

Extends:BasicScheduledActionProps
autoScalingGroup

The AutoScalingGroup to apply the scheduled actions to

Type:IAutoScalingGroup (readonly)
schedule

Inherited from @aws-cdk/aws-autoscaling.BasicScheduledActionProps

When to perform this action.

Supports cron expressions.

For more information about cron expressions, see https://en.wikipedia.org/wiki/Cron.

Type:string (readonly)
desiredCapacity

Inherited from @aws-cdk/aws-autoscaling.BasicScheduledActionProps

The new desired capacity.

At the scheduled time, set the desired capacity to the given capacity.

At least one of maxCapacity, minCapacity, or desiredCapacity must be supplied.

Type:number (optional) (readonly)
endTime

Inherited from @aws-cdk/aws-autoscaling.BasicScheduledActionProps

When this scheduled action expires.

Type:date (optional) (readonly)
Default:The rule never expires.
maxCapacity

Inherited from @aws-cdk/aws-autoscaling.BasicScheduledActionProps

The new maximum capacity.

At the scheduled time, set the maximum capacity to the given capacity.

At least one of maxCapacity, minCapacity, or desiredCapacity must be supplied.

Type:number (optional) (readonly)
Default:No new maximum capacity
minCapacity

Inherited from @aws-cdk/aws-autoscaling.BasicScheduledActionProps

The new minimum capacity.

At the scheduled time, set the minimum capacity to the given capacity.

At least one of maxCapacity, minCapacity, or desiredCapacity must be supplied.

Type:number (optional) (readonly)
Default:No new minimum capacity
startTime

Inherited from @aws-cdk/aws-autoscaling.BasicScheduledActionProps

When this scheduled action becomes active.

Type:date (optional) (readonly)
Default:The rule is activate immediately

StepScalingAction

class @aws-cdk/aws-autoscaling.StepScalingAction(scope, id, props)

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.StepScalingAction;
const { StepScalingAction } = require('@aws-cdk/aws-autoscaling');
import { StepScalingAction } from '@aws-cdk/aws-autoscaling';

Define a step scaling action

This kind of scaling policy adjusts the target capacity in configurable

steps. The size of the step is configurable based on the metric’s distance

to its alarm threshold.

This Action must be used as the target of a CloudWatch alarm to take effect.

Extends:

@aws-cdk/cdk.Construct

Implements:

@aws-cdk/aws-cloudwatch.IAlarmAction

Parameters:
addAdjustment(adjustment)

Add an adjusment interval to the ScalingAction

Parameters:adjustment (AdjustmentTier) –
alarmActionArn

Implements @aws-cdk/aws-cloudwatch.IAlarmAction.alarmActionArn()

ARN when this scaling policy is used as an Alarm action

Type:string (readonly)
scalingPolicyArn

ARN of the scaling policy

Type:string (readonly)
prepare()

Inherited from @aws-cdk/cdk.Construct

Perform final modifications before synthesis

This method can be implemented by derived constructs in order to perform

final changes before synthesis. prepare() will be called after child

constructs have been prepared.

This is an advanced framework feature. Only use this if you

understand the implications.

Protected method

toString() → string

Inherited from @aws-cdk/cdk.Construct

Returns a string representation of this construct.

Return type:string
validate() → string[]

Inherited from @aws-cdk/cdk.Construct

Validate the current construct.

This method can be implemented by derived constructs in order to perform

validation logic. It is called on all constructs before synthesis.

Protected method

Returns:An array of validation error messages, or an empty array if there the construct is valid.
Return type:string[]
dependencyRoots

Inherited from @aws-cdk/cdk.Construct

The set of constructs that form the root of this dependable

All resources under all returned constructs are included in the ordering

dependency.

Type:@aws-cdk/cdk.IConstruct[] (readonly)
node

Inherited from @aws-cdk/cdk.Construct

Construct node.

Type:@aws-cdk/cdk.ConstructNode (readonly)

StepScalingActionProps (interface)

class @aws-cdk/aws-autoscaling.StepScalingActionProps

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.StepScalingActionProps;
// StepScalingActionProps is an interface
import { StepScalingActionProps } from '@aws-cdk/aws-autoscaling';

Properties for a scaling policy

autoScalingGroup

The auto scaling group

Type:IAutoScalingGroup (readonly)
adjustmentType

How the adjustment numbers are interpreted

Type:AdjustmentType (optional) (readonly)
Default:ChangeInCapacity
cooldownSeconds

Period after a scaling completes before another scaling activity can start.

Type:number (optional) (readonly)
Default:The default cooldown configured on the AutoScalingGroup
estimatedInstanceWarmupSeconds

Estimated time until a newly launched instance can send metrics to CloudWatch.

Type:number (optional) (readonly)
Default:Same as the cooldown
metricAggregationType

The aggregation type for the CloudWatch metrics.

Type:MetricAggregationType (optional) (readonly)
Default:Average
minAdjustmentMagnitude

Minimum absolute number to adjust capacity with as result of percentage scaling.

Only when using AdjustmentType = PercentChangeInCapacity, this number controls

the minimum absolute effect size.

Type:number (optional) (readonly)
Default:No minimum scaling effect

StepScalingPolicy

class @aws-cdk/aws-autoscaling.StepScalingPolicy(scope, id, props)

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.StepScalingPolicy;
const { StepScalingPolicy } = require('@aws-cdk/aws-autoscaling');
import { StepScalingPolicy } from '@aws-cdk/aws-autoscaling';

Define a acaling strategy which scales depending on absolute values of some metric.

You can specify the scaling behavior for various values of the metric.

Implemented using one or more CloudWatch alarms and Step Scaling Policies.

Extends:

@aws-cdk/cdk.Construct

Parameters:
lowerAction
Type:StepScalingAction (optional) (readonly)
lowerAlarm
Type:@aws-cdk/aws-cloudwatch.Alarm (optional) (readonly)
upperAction
Type:StepScalingAction (optional) (readonly)
upperAlarm
Type:@aws-cdk/aws-cloudwatch.Alarm (optional) (readonly)
prepare()

Inherited from @aws-cdk/cdk.Construct

Perform final modifications before synthesis

This method can be implemented by derived constructs in order to perform

final changes before synthesis. prepare() will be called after child

constructs have been prepared.

This is an advanced framework feature. Only use this if you

understand the implications.

Protected method

toString() → string

Inherited from @aws-cdk/cdk.Construct

Returns a string representation of this construct.

Return type:string
validate() → string[]

Inherited from @aws-cdk/cdk.Construct

Validate the current construct.

This method can be implemented by derived constructs in order to perform

validation logic. It is called on all constructs before synthesis.

Protected method

Returns:An array of validation error messages, or an empty array if there the construct is valid.
Return type:string[]
dependencyRoots

Inherited from @aws-cdk/cdk.Construct

The set of constructs that form the root of this dependable

All resources under all returned constructs are included in the ordering

dependency.

Type:@aws-cdk/cdk.IConstruct[] (readonly)
node

Inherited from @aws-cdk/cdk.Construct

Construct node.

Type:@aws-cdk/cdk.ConstructNode (readonly)

StepScalingPolicyProps (interface)

class @aws-cdk/aws-autoscaling.StepScalingPolicyProps

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.StepScalingPolicyProps;
// StepScalingPolicyProps is an interface
import { StepScalingPolicyProps } from '@aws-cdk/aws-autoscaling';
Extends:BasicStepScalingPolicyProps
autoScalingGroup

The auto scaling group

Type:IAutoScalingGroup (readonly)
metric

Inherited from @aws-cdk/aws-autoscaling.BasicStepScalingPolicyProps

Metric to scale on.

Type:@aws-cdk/aws-cloudwatch.Metric (readonly)
scalingSteps

Inherited from @aws-cdk/aws-autoscaling.BasicStepScalingPolicyProps

The intervals for scaling.

Maps a range of metric values to a particular scaling behavior.

Type:ScalingInterval[] (readonly)
adjustmentType

Inherited from @aws-cdk/aws-autoscaling.BasicStepScalingPolicyProps

How the adjustment numbers inside ‘intervals’ are interpreted.

Type:AdjustmentType (optional) (readonly)
Default:ChangeInCapacity
cooldownSeconds

Inherited from @aws-cdk/aws-autoscaling.BasicStepScalingPolicyProps

Grace period after scaling activity.

Type:number (optional) (readonly)
Default:Default cooldown period on your AutoScalingGroup
estimatedInstanceWarmupSeconds

Inherited from @aws-cdk/aws-autoscaling.BasicStepScalingPolicyProps

Estimated time until a newly launched instance can send metrics to CloudWatch.

Type:number (optional) (readonly)
Default:Same as the cooldown
minAdjustmentMagnitude

Inherited from @aws-cdk/aws-autoscaling.BasicStepScalingPolicyProps

Minimum absolute number to adjust capacity with as result of percentage scaling.

Only when using AdjustmentType = PercentChangeInCapacity, this number controls

the minimum absolute effect size.

Type:number (optional) (readonly)
Default:No minimum scaling effect

TargetTrackingScalingPolicy

class @aws-cdk/aws-autoscaling.TargetTrackingScalingPolicy(scope, id, props)

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.TargetTrackingScalingPolicy;
const { TargetTrackingScalingPolicy } = require('@aws-cdk/aws-autoscaling');
import { TargetTrackingScalingPolicy } from '@aws-cdk/aws-autoscaling';
Extends:

@aws-cdk/cdk.Construct

Parameters:
scalingPolicyArn

ARN of the scaling policy

Type:string (readonly)
prepare()

Inherited from @aws-cdk/cdk.Construct

Perform final modifications before synthesis

This method can be implemented by derived constructs in order to perform

final changes before synthesis. prepare() will be called after child

constructs have been prepared.

This is an advanced framework feature. Only use this if you

understand the implications.

Protected method

toString() → string

Inherited from @aws-cdk/cdk.Construct

Returns a string representation of this construct.

Return type:string
validate() → string[]

Inherited from @aws-cdk/cdk.Construct

Validate the current construct.

This method can be implemented by derived constructs in order to perform

validation logic. It is called on all constructs before synthesis.

Protected method

Returns:An array of validation error messages, or an empty array if there the construct is valid.
Return type:string[]
dependencyRoots

Inherited from @aws-cdk/cdk.Construct

The set of constructs that form the root of this dependable

All resources under all returned constructs are included in the ordering

dependency.

Type:@aws-cdk/cdk.IConstruct[] (readonly)
node

Inherited from @aws-cdk/cdk.Construct

Construct node.

Type:@aws-cdk/cdk.ConstructNode (readonly)

TargetTrackingScalingPolicyProps (interface)

class @aws-cdk/aws-autoscaling.TargetTrackingScalingPolicyProps

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.TargetTrackingScalingPolicyProps;
// TargetTrackingScalingPolicyProps is an interface
import { TargetTrackingScalingPolicyProps } from '@aws-cdk/aws-autoscaling';

Properties for a concrete TargetTrackingPolicy

Adds the scalingTarget.

Extends:BasicTargetTrackingScalingPolicyProps
autoScalingGroup
Type:IAutoScalingGroup (readonly)
cooldownSeconds

Inherited from @aws-cdk/aws-autoscaling.BaseTargetTrackingProps

Period after a scaling completes before another scaling activity can start.

Type:number (optional) (readonly)
Default:The default cooldown configured on the AutoScalingGroup
disableScaleIn

Inherited from @aws-cdk/aws-autoscaling.BaseTargetTrackingProps

Indicates whether scale in by the target tracking policy is disabled.

If the value is true, scale in is disabled and the target tracking policy

won’t remove capacity from the autoscaling group. Otherwise, scale in is

enabled and the target tracking policy can remove capacity from the

group.

Type:boolean (optional) (readonly)
Default:false
estimatedInstanceWarmupSeconds

Inherited from @aws-cdk/aws-autoscaling.BaseTargetTrackingProps

Estimated time until a newly launched instance can send metrics to CloudWatch.

Type:number (optional) (readonly)
Default:Same as the cooldown
targetValue

Inherited from @aws-cdk/aws-autoscaling.BasicTargetTrackingScalingPolicyProps

The target value for the metric.

Type:number (readonly)
customMetric

Inherited from @aws-cdk/aws-autoscaling.BasicTargetTrackingScalingPolicyProps

A custom metric for application autoscaling

The metric must track utilization. Scaling out will happen if the metric is higher than

the target value, scaling in will happen in the metric is lower than the target value.

Exactly one of customMetric or predefinedMetric must be specified.

Type:@aws-cdk/aws-cloudwatch.Metric (optional) (readonly)
predefinedMetric

Inherited from @aws-cdk/aws-autoscaling.BasicTargetTrackingScalingPolicyProps

A predefined metric for application autoscaling

The metric must track utilization. Scaling out will happen if the metric is higher than

the target value, scaling in will happen in the metric is lower than the target value.

Exactly one of customMetric or predefinedMetric must be specified.

Type:PredefinedMetric (optional) (readonly)
resourceLabel

Inherited from @aws-cdk/aws-autoscaling.BasicTargetTrackingScalingPolicyProps

The resource label associated with the predefined metric

Should be supplied if the predefined metric is ALBRequestCountPerTarget, and the

format should be:

app/<load-balancer-name>/<load-balancer-id>/targetgroup/<target-group-name>/<target-group-id>

Type:string (optional) (readonly)
Default:No resource label

UpdateType (enum)

class @aws-cdk/aws-autoscaling.UpdateType

Language-specific names:

using Amazon.CDK.AWS.AutoScaling;
import software.amazon.awscdk.services.autoscaling.UpdateType;
const { UpdateType } = require('@aws-cdk/aws-autoscaling');
import { UpdateType } from '@aws-cdk/aws-autoscaling';

The type of update to perform on instances in this AutoScalingGroup

None

Don’t do anything

ReplacingUpdate

Replace the entire AutoScalingGroup

Builds a new AutoScalingGroup first, then delete the old one.

RollingUpdate

Replace the instances in the AutoScalingGroup.