# ScalableTaskCountProps

The properties of a scalable attribute representing task count.

Extends: [BaseScalableAttributeProps](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_applicationautoscaling.BaseScalableAttributeProps.html)
Used as props by: [ScalableTaskCount](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.ScalableTaskCount.html)

- Source: [`aws-ecs/lib/base/scalable-task-count.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/aws-ecs/lib/base/scalable-task-count.ts#L9)

## Example

TypeScript:

```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_ecs as ecs } from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';

declare const role: iam.Role;
const scalableTaskCountProps: ecs.ScalableTaskCountProps = {
  dimension: 'dimension',
  maxCapacity: 123,
  resourceId: 'resourceId',
  role: role,
  serviceNamespace: appscaling.ServiceNamespace.ECS,

  // the properties below are optional
  minCapacity: 123,
};
```

Python:

```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_ecs as ecs
from aws_cdk import aws_iam as iam

# role: iam.Role

scalable_task_count_props = ecs.ScalableTaskCountProps(
    dimension="dimension",
    max_capacity=123,
    resource_id="resourceId",
    role=role,
    service_namespace=appscaling.ServiceNamespace.ECS,

    # the properties below are optional
    min_capacity=123
)
```

Java:

```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.ecs.*;
import software.amazon.awscdk.services.iam.*;

Role role;

ScalableTaskCountProps scalableTaskCountProps = ScalableTaskCountProps.builder()
        .dimension("dimension")
        .maxCapacity(123)
        .resourceId("resourceId")
        .role(role)
        .serviceNamespace(ServiceNamespace.ECS)

        // the properties below are optional
        .minCapacity(123)
        .build();
```

C# / .NET:

```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.ECS;
using Amazon.CDK.AWS.IAM;

Role role;

var scalableTaskCountProps = new ScalableTaskCountProps {
    Dimension = "dimension",
    MaxCapacity = 123,
    ResourceId = "resourceId",
    Role = role,
    ServiceNamespace = ServiceNamespace.ECS,

    // the properties below are optional
    MinCapacity = 123
};
```

Golang:

```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"
import "github.com/aws/aws-cdk-go/awscdk"

var role Role

scalableTaskCountProps := &ScalableTaskCountProps{
	Dimension: jsii.String("dimension"),
	MaxCapacity: jsii.Number(123),
	ResourceId: jsii.String("resourceId"),
	Role: role,
	ServiceNamespace: awscdk.Aws_applicationautoscaling.ServiceNamespace_ECS,

	// the properties below are optional
	MinCapacity: jsii.Number(123),
}
```

## Properties

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