Skip to content
v2.275.0

AutoScalingAction Class ​

Use an AutoScaling StepScalingAction as an Alarm Action.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_autoscaling as autoscaling } from 'aws-cdk-lib';
import { aws_cloudwatch_actions as cloudwatch_actions } from 'aws-cdk-lib';

declare const stepScalingAction: autoscaling.StepScalingAction;
const autoScalingAction = new cloudwatch_actions.AutoScalingAction(stepScalingAction);
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_autoscaling as autoscaling
from aws_cdk import aws_cloudwatch_actions as cloudwatch_actions

# step_scaling_action: autoscaling.StepScalingAction

auto_scaling_action = cloudwatch_actions.AutoScalingAction(step_scaling_action)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.autoscaling.*;
import software.amazon.awscdk.services.cloudwatch.actions.*;

StepScalingAction stepScalingAction;

AutoScalingAction autoScalingAction = new AutoScalingAction(stepScalingAction);
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AutoScaling;
using Amazon.CDK.AWS.CloudWatch.Actions;

StepScalingAction stepScalingAction;

var autoScalingAction = new AutoScalingAction(stepScalingAction);
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var stepScalingAction StepScalingAction

autoScalingAction := awscdk.Aws_cloudwatch_actions.NewAutoScalingAction(stepScalingAction)

Initializer ​

ts
new AutoScalingAction(stepScalingAction: StepScalingAction)
python
AutoScalingAction(step_scaling_action: StepScalingAction)
java
new AutoScalingAction(StepScalingAction stepScalingAction)
csharp
new AutoScalingAction(StepScalingAction stepScalingAction)
go
NewAutoScalingAction(StepScalingAction StepScalingAction)

Methods ​

bind(_scope: Construct, _alarm: IAlarm): AlarmActionConfigdef bind(self, _scope: Construct, _alarm: IAlarm) -> AlarmActionConfigpublic AlarmActionConfig bind(Construct _scope, IAlarm _alarm)public AlarmActionConfig Bind(Construct _scope, IAlarm _alarm)func Bind(_scope Construct, _alarm IAlarm) AlarmActionConfig#
Returns an alarm action configuration to use an AutoScaling StepScalingAction as an alarm action.