ScalableTaskCountProps
- class aws_cdk.aws_ecs.ScalableTaskCountProps(*, max_capacity, min_capacity=None, dimension, resource_id, role, service_namespace)
Bases:
BaseScalableAttributeProps
The properties of a scalable attribute representing task count.
- Parameters:
max_capacity (
Union
[int
,float
]) – Maximum capacity to scale to.min_capacity (
Union
[int
,float
,None
]) – Minimum capacity to scale to. Default: 1dimension (
str
) – Scalable dimension of the attribute.resource_id (
str
) – Resource ID of the attribute.role (
IRole
) – Role to use for scaling.service_namespace (
ServiceNamespace
) – Service namespace of the scalable attribute.
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_applicationautoscaling as appscaling import aws_cdk.aws_ecs as ecs import aws_cdk.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 )
Attributes
- dimension
Scalable dimension of the attribute.
- max_capacity
Maximum capacity to scale to.
- min_capacity
Minimum capacity to scale to.
- Default:
1
- resource_id
Resource ID of the attribute.
- role
Role to use for scaling.
- service_namespace
Service namespace of the scalable attribute.