AddAutoScalingGroupCapacityOptions

class aws_cdk.aws_ecs.AddAutoScalingGroupCapacityOptions(*, can_containers_access_instance_role=None, spot_instance_draining=None, task_drain_time=None)

Bases: object

__init__(*, can_containers_access_instance_role=None, spot_instance_draining=None, task_drain_time=None)

The properties for adding an AutoScalingGroup.

Parameters
  • can_containers_access_instance_role (Optional[bool]) – Specifies whether the containers can access the container instance role. Default: false

  • spot_instance_draining (Optional[bool]) – Specify whether to enable Automated Draining for Spot Instances running Amazon ECS Services. For more information, see Using Spot Instances. Default: false

  • task_drain_time (Optional[Duration]) – The time period to wait before force terminating an instance that is draining. This creates a Lambda function that is used by a lifecycle hook for the AutoScalingGroup that will delay instance termination until all ECS tasks have drained from the instance. Set to 0 to disable task draining. Set to 0 to disable task draining. Default: Duration.minutes(5)

Attributes

can_containers_access_instance_role

Specifies whether the containers can access the container instance role.

default :default: false

Return type

Optional[bool]

spot_instance_draining

//docs.aws.amazon.com/AmazonECS/latest/developerguide/container-instance-spot.html>`_.

default :default: false

Type

Specify whether to enable Automated Draining for Spot Instances running Amazon ECS Services. For more information, see `Using Spot Instances <https

Return type

Optional[bool]

task_drain_time

The time period to wait before force terminating an instance that is draining.

This creates a Lambda function that is used by a lifecycle hook for the AutoScalingGroup that will delay instance termination until all ECS tasks have drained from the instance. Set to 0 to disable task draining.

Set to 0 to disable task draining.

default :default: Duration.minutes(5)

Return type

Optional[Duration]