AddAutoScalingGroupCapacityOptions¶
-
class
aws_cdk.aws_ecs.
AddAutoScalingGroupCapacityOptions
(*, can_containers_access_instance_role=None, machine_image_type=None, spot_instance_draining=None, task_drain_time=None, topic_encryption_key=None)¶ Bases:
object
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: falsemachine_image_type (
Optional
[MachineImageType
]) – Specify the machine image type. Default: MachineImageType.AMAZON_LINUX_2spot_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: falsetask_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)topic_encryption_key (
Optional
[IKey
]) – If {@link AddAutoScalingGroupCapacityOptions.taskDrainTime} is non-zero, then the ECS cluster creates an SNS Topic to as part of a system to drain instances of tasks when the instance is being shut down. If this property is provided, then this key will be used to encrypt the contents of that SNS Topic. See SNS Data Encryption for more information. Default: The SNS Topic will not be encrypted.
Attributes
-
can_containers_access_instance_role
¶ Specifies whether the containers can access the container instance role.
- Default
false
- Return type
Optional
[bool
]
-
machine_image_type
¶ Specify the machine image type.
- Default
MachineImageType.AMAZON_LINUX_2
- Return type
Optional
[MachineImageType
]
-
spot_instance_draining
¶ Specify whether to enable Automated Draining for Spot Instances running Amazon ECS Services.
For more information, see Using Spot Instances.
- Default
false
- 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
Duration.minutes(5)
- Return type
Optional
[Duration
]
-
topic_encryption_key
¶ //docs.aws.amazon.com/sns/latest/dg/sns-data-encryption.html>`_ for more information.
- Default
The SNS Topic will not be encrypted.
- Type
If {@link AddAutoScalingGroupCapacityOptions.taskDrainTime} is non-zero, then the ECS cluster creates an SNS Topic to as part of a system to drain instances of tasks when the instance is being shut down. If this property is provided, then this key will be used to encrypt the contents of that SNS Topic. See `SNS Data Encryption <https
- Return type
Optional
[IKey
]