Show / Hide Table of Contents

Interface IAddAutoScalingGroupCapacityOptions

The properties for adding an AutoScalingGroup.

Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IAddAutoScalingGroupCapacityOptions
Syntax (vb)
Public Interface IAddAutoScalingGroupCapacityOptions
Remarks

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
            // The values are placeholders you should change.
            using Amazon.CDK.AWS.ECS;
            using Amazon.CDK.AWS.KMS;

            Key key;

            var addAutoScalingGroupCapacityOptions = new AddAutoScalingGroupCapacityOptions {
                CanContainersAccessInstanceRole = false,
                MachineImageType = MachineImageType.AMAZON_LINUX_2,
                SpotInstanceDraining = false,
                TopicEncryptionKey = key
            };

Synopsis

Properties

CanContainersAccessInstanceRole

(deprecated) Specifies whether the containers can access the container instance role.

MachineImageType

What type of machine image this is.

SpotInstanceDraining

Specify whether to enable Automated Draining for Spot Instances running Amazon ECS Services.

TopicEncryptionKey

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 for more information.

Properties

CanContainersAccessInstanceRole

(deprecated) Specifies whether the containers can access the container instance role.

[Obsolete("See https://github.com/aws/aws-cdk/discussions/32609")]
bool? CanContainersAccessInstanceRole { get; }
Property Value

bool?

Remarks

Default: true if

Stability: Deprecated

Aws-cdk: /aws-ecs:disableEcsImdsBlocking is set to false.

MachineImageType

What type of machine image this is.

MachineImageType? MachineImageType { get; }
Property Value

MachineImageType?

Remarks

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 via addAutoScalingGroup(), you must specify this value. If you are adding an autoScalingGroup via addCapacity, this value will be determined from the machineImage you pass.

Default: - Automatically determined from machineImage, if available, otherwise MachineImageType.AMAZON_LINUX_2.

SpotInstanceDraining

Specify whether to enable Automated Draining for Spot Instances running Amazon ECS Services.

bool? SpotInstanceDraining { get; }
Property Value

bool?

Remarks

For more information, see Using Spot Instances.

Default: false

TopicEncryptionKey

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 for more information.

IKey? TopicEncryptionKey { get; }
Property Value

IKey

Remarks

Default: The SNS Topic will not be encrypted.

Back to top Generated by DocFX