ScalableTargetProps

class aws_cdk.aws_applicationautoscaling.ScalableTargetProps(*, max_capacity, min_capacity, resource_id, scalable_dimension, service_namespace, role=None)

Bases: object

__init__(*, max_capacity, min_capacity, resource_id, scalable_dimension, service_namespace, role=None)

Properties for a scalable target.

Parameters
  • max_capacity (Union[int, float]) – The maximum value that Application Auto Scaling can use to scale a target during a scaling activity.

  • min_capacity (Union[int, float]) – The minimum value that Application Auto Scaling can use to scale a target during a scaling activity.

  • resource_id (str) – The resource identifier to associate with this scalable target. This string consists of the resource type and unique identifier.

  • scalable_dimension (str) – The scalable dimension that’s associated with the scalable target. Specify the service namespace, resource type, and scaling property.

  • service_namespace (ServiceNamespace) – The namespace of the AWS service that provides the resource or custom-resource for a resource provided by your own application or service. For valid AWS service namespace values, see the RegisterScalableTarget action in the Application Auto Scaling API Reference.

  • role (Optional[IRole]) – Role that allows Application Auto Scaling to modify your scalable target. Default: A role is automatically created

Attributes

max_capacity

The maximum value that Application Auto Scaling can use to scale a target during a scaling activity.

Return type

Union[int, float]

min_capacity

The minimum value that Application Auto Scaling can use to scale a target during a scaling activity.

Return type

Union[int, float]

resource_id

The resource identifier to associate with this scalable target.

This string consists of the resource type and unique identifier.

see :see: https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html

Example::

# Example may have issues. See https://github.com/aws/jsii/issues/826 service / ecs_stack - MyECSCluster - AB12CDE3F4GH / ecs_stack - MyECSService - AB12CDE3F4GH

Return type

str

role

Role that allows Application Auto Scaling to modify your scalable target.

default :default: A role is automatically created

Return type

Optional[IRole]

scalable_dimension

The scalable dimension that’s associated with the scalable target.

Specify the service namespace, resource type, and scaling property.

see :see: https://docs.aws.amazon.com/autoscaling/application/APIReference/API_ScalingPolicy.html

Example::

# Example may have issues. See https://github.com/aws/jsii/issues/826 ecs:service:DesiredCount

Return type

str

service_namespace

The namespace of the AWS service that provides the resource or custom-resource for a resource provided by your own application or service.

For valid AWS service namespace values, see the RegisterScalableTarget action in the Application Auto Scaling API Reference.

see :see: https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html

Return type

ServiceNamespace