# BaseScalableAttribute

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

Extends: [Construct](https://docs.aws.amazon.com/cdk/api/v2/docs/constructs.Construct.html) › BaseScalableAttribute
Implements: [IEnvironmentAware](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.IEnvironmentAware.html), [IScalableTargetRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_applicationautoscaling.IScalableTargetRef.html), [IConstruct](https://docs.aws.amazon.com/cdk/api/v2/docs/constructs.IConstruct.html), [IDependable](https://docs.aws.amazon.com/cdk/api/v2/docs/constructs.IDependable.html)
Superclass of: [ScalableInstanceCount](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-sagemaker-alpha.ScalableInstanceCount.html), [ScalableTaskCount](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.ScalableTaskCount.html)

- Source: [`aws-applicationautoscaling/lib/base-scalable-attribute.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-applicationautoscaling/lib/base-scalable-attribute.ts#L49)
- Type last changed: v2.234.0 · 8 Jan 2026

## Initializer

TypeScript:

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

Python:

```python
BaseScalableAttribute(scope: Construct, id: str, props: BaseScalableAttributeProps)
```

Java:

```java
new BaseScalableAttribute(Construct scope, String id, BaseScalableAttributeProps props)
```

C# / .NET:

```csharp
new BaseScalableAttribute(Construct scope, string id, BaseScalableAttributeProps props)
```

Golang:

```go
NewBaseScalableAttribute(Scope Construct, Id *string, Props BaseScalableAttributeProps)
```

## Construct Props

- `dimension`: string (required) — Scalable dimension of the attribute.

- `maxCapacity`: number (required) — Maximum capacity to scale to.

- `minCapacity`: number = 1 — Minimum capacity to scale to.

- `resourceId`: string (required) — Resource ID of the attribute.

- `role`: [IRole](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) (required) — Role to use for scaling.

- `serviceNamespace`: [ServiceNamespace](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_applicationautoscaling.ServiceNamespace.html) (required) — Service namespace of the scalable attribute.

## Properties

- `env`: [ResourceEnvironment](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.ResourceEnvironment.html) — 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`: [Node](https://docs.aws.amazon.com/cdk/api/v2/docs/constructs.Node.html) — The tree node.

- `scalableTargetRef`: [ScalableTargetReference](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_applicationautoscaling.ScalableTargetReference.html) — A reference to a ScalableTarget resource.

## Methods

- `isConstruct(x: any): boolean` (static) — Checks if `x` is a construct.

  Use this method instead of `instanceof` to properly detect `Construct`
  instances, even when the construct library is symlinked.

  Explanation: in JavaScript, multiple copies of the `constructs` library on
  disk are seen as independent, completely different libraries. As a
  consequence, the class `Construct` in each copy of the `constructs` library
  is seen as a different class, and an instance of one class will not test as
  `instanceof` the other class. `npm install` will not create installations
  like this, but users may manually symlink construct libraries together or
  use a monorepo tool: in those cases, multiple copies of the `constructs`
  library can be accidentally installed, and `instanceof` will behave
  unpredictably. It is safest to avoid using `instanceof`, and using
  this type-testing method instead.

  **Parameters**

  - `x` — Any object.

  **Returns:** true if `x` is an object created from a class which extends `Construct`.

- `toString(): string` — Returns a string representation of this construct.

- `with(...mixins: IMixin[]): IConstruct` — Applies one or more mixins to this construct.

  Mixins are applied in order. The list of constructs is captured at the
  start of the call, so constructs added by a mixin will not be visited.
  Use multiple `with()` calls if subsequent mixins should apply to added
  constructs.

  **Parameters**

  - `mixins` — The mixins to apply.

  **Returns:** This construct for chaining
