AddAutoScalingGroupCapacityOptions
- class aws_cdk.aws_ecs.AddAutoScalingGroupCapacityOptions(*, can_containers_access_instance_role=None, machine_image_type=None, spot_instance_draining=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
]) – What type of machine image this is. Depending on the setting, different UserData will automatically be added to theAutoScalingGroup
to configure it properly for use with ECS. If you create anAutoScalingGroup
yourself and are adding it viaaddAutoScalingGroup()
, you must specify this value. If you are adding anautoScalingGroup
viaaddCapacity
, this value will be determined from themachineImage
you pass. Default: - Automatically determined frommachineImage
, if available, otherwiseMachineImageType.AMAZON_LINUX_2
.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: falsetopic_encryption_key (
Optional
[IKey
]) – IfAddAutoScalingGroupCapacityOptions.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.
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_ecs as ecs from aws_cdk import aws_kms as kms # key: kms.Key add_auto_scaling_group_capacity_options = ecs.AddAutoScalingGroupCapacityOptions( can_containers_access_instance_role=False, machine_image_type=ecs.MachineImageType.AMAZON_LINUX_2, spot_instance_draining=False, topic_encryption_key=key )
Attributes
- can_containers_access_instance_role
Specifies whether the containers can access the container instance role.
- Default:
false
- machine_image_type
What type of machine image this is.
Depending on the setting, different UserData will automatically be added to the
AutoScalingGroup
to configure it properly for use with ECS.If you create an
AutoScalingGroup
yourself and are adding it viaaddAutoScalingGroup()
, you must specify this value. If you are adding anautoScalingGroup
viaaddCapacity
, this value will be determined from themachineImage
you pass.- Default:
Automatically determined from
machineImage
, if available, otherwiseMachineImageType.AMAZON_LINUX_2
.
- 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
- 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
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