class BaseScalableAttribute
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.ApplicationAutoScaling.BaseScalableAttribute |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsapplicationautoscaling#BaseScalableAttribute |
Java | software.amazon.awscdk.services.applicationautoscaling.BaseScalableAttribute |
Python | aws_cdk.aws_applicationautoscaling.BaseScalableAttribute |
TypeScript (source) | aws-cdk-lib » aws_applicationautoscaling » BaseScalableAttribute |
Implements
IConstruct, IDependable, IScalable, IEnvironment
Extends
Construct
Implemented by
Scalable, Scalable
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
BaseScalable Attribute Props
Properties
| Name | Type | Description |
|---|---|---|
| env | Resource | The environment this resource belongs to. |
| node | Node | The tree node. |
| props | Base | |
| scalable | Scalable | A reference to a ScalableTarget resource. |
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed in a Stack (those created by
creating new class instances like new Role(), new Bucket(), etc.), this
is always the same as the environment of the stack they belong to.
For referenced resources (those obtained from referencing methods like
Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be
different than the stack they were imported into.
node
Type:
Node
The tree node.
props
Type:
Base
scalableTargetRef
Type:
Scalable
A reference to a ScalableTarget resource.
Methods
| Name | Description |
|---|---|
| to | Returns a string representation of this construct. |
| protected do | Scale out or in based on a metric value. |
| protected do | Scale out or in based on time. |
| protected do | 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
BasicStep Scaling Policy Props
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
BasicTarget Tracking Scaling Policy Props
Scale out or in in order to keep a metric around a target value.

.NET
Go
Java
Python
TypeScript (