Skip to content
v2.278.0

ApplicationScalingAction Class ​

Use an ApplicationAutoScaling 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_applicationautoscaling as appscaling } from 'aws-cdk-lib';
import { aws_cloudwatch_actions as cloudwatch_actions } from 'aws-cdk-lib';

declare const stepScalingAction: appscaling.StepScalingAction;
const applicationScalingAction = new cloudwatch_actions.ApplicationScalingAction(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_applicationautoscaling as appscaling
from aws_cdk import aws_cloudwatch_actions as cloudwatch_actions

# step_scaling_action: appscaling.StepScalingAction

application_scaling_action = cloudwatch_actions.ApplicationScalingAction(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.applicationautoscaling.*;
import software.amazon.awscdk.services.cloudwatch.actions.*;

StepScalingAction stepScalingAction;

ApplicationScalingAction applicationScalingAction = new ApplicationScalingAction(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.ApplicationAutoScaling;
using Amazon.CDK.AWS.CloudWatch.Actions;

StepScalingAction stepScalingAction;

var applicationScalingAction = new ApplicationScalingAction(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

applicationScalingAction := awscdk.Aws_cloudwatch_actions.NewApplicationScalingAction(stepScalingAction)

Initializer ​

ts
new ApplicationScalingAction(stepScalingAction: StepScalingAction)
python
ApplicationScalingAction(step_scaling_action: StepScalingAction)
java
new ApplicationScalingAction(StepScalingAction stepScalingAction)
csharp
new ApplicationScalingAction(StepScalingAction stepScalingAction)
go
NewApplicationScalingAction(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 ApplicationScaling StepScalingAction as an alarm action.