aws-cdk-lib.aws_applicationautoscaling.BaseScalableAttribute

class BaseScalableAttribute

LanguageType name
.NETAmazon.CDK.AWS.ApplicationAutoScaling.BaseScalableAttribute
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsapplicationautoscaling#BaseScalableAttribute
Javasoftware.amazon.awscdk.services.applicationautoscaling.BaseScalableAttribute
Pythonaws_cdk.aws_applicationautoscaling.BaseScalableAttribute
TypeScript (source)aws-cdk-lib » aws_applicationautoscaling » BaseScalableAttribute

Implements IConstruct, IDependable

Extends Construct

Implemented by ScalableTaskCount, ScalableInstanceCount

Represent an attribute for which autoscaling can be configured.

This class is basically a light wrapper around ScalableTarget, but with all methods protected instead of public so they can be selectively exposed and/or more specific versions of them can be exposed by derived classes for individual services support autoscaling.

Typical use cases:

  • Hide away the PredefinedMetric enum for target tracking policies.
  • Don't expose all scaling methods (for example Dynamo tables don't support Step Scaling, so the Dynamo subclass won't expose this method).

Initializer

new BaseScalableAttribute(scope: Construct, id: string, props: BaseScalableAttributeProps)

Parameters

  • scope Construct
  • id string
  • props BaseScalableAttributeProps

Properties

NameTypeDescription
nodeNodeThe tree node.
propsBaseScalableAttributeProps

node

Type: Node

The tree node.


props

Type: BaseScalableAttributeProps

Methods

NameDescription
toString()Returns a string representation of this construct.
protected doScaleOnMetric(id, props)Scale out or in based on a metric value.
protected doScaleOnSchedule(id, props)Scale out or in based on time.
protected doScaleToTrackMetric(id, props)Scale out or in in order to keep a metric around a target value.

toString()

public toString(): string

Returns

  • string

Returns a string representation of this construct.


protected doScaleOnMetric(id, props)

protected doScaleOnMetric(id: string, props: BasicStepScalingPolicyProps): void

Parameters

  • id string
  • props BasicStepScalingPolicyProps

Scale out or in based on a metric value.


protected doScaleOnSchedule(id, props)

protected doScaleOnSchedule(id: string, props: ScalingSchedule): void

Parameters

  • id string
  • props ScalingSchedule

Scale out or in based on time.


protected doScaleToTrackMetric(id, props)

protected doScaleToTrackMetric(id: string, props: BasicTargetTrackingScalingPolicyProps): void

Parameters

  • id string
  • props BasicTargetTrackingScalingPolicyProps

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