CommonAutoScalingGroupProps

class aws_cdk.aws_autoscaling.CommonAutoScalingGroupProps(*, allow_all_outbound=None, associate_public_ip_address=None, cooldown=None, desired_capacity=None, health_check=None, ignore_unmodified_size_properties=None, key_name=None, max_capacity=None, min_capacity=None, notifications_topic=None, replacing_update_min_successful_instances_percent=None, resource_signal_count=None, resource_signal_timeout=None, rolling_update_configuration=None, spot_price=None, update_type=None, vpc_subnets=None)

Bases: object

__init__(*, allow_all_outbound=None, associate_public_ip_address=None, cooldown=None, desired_capacity=None, health_check=None, ignore_unmodified_size_properties=None, key_name=None, max_capacity=None, min_capacity=None, notifications_topic=None, replacing_update_min_successful_instances_percent=None, resource_signal_count=None, resource_signal_timeout=None, rolling_update_configuration=None, spot_price=None, update_type=None, vpc_subnets=None)

Basic properties of an AutoScalingGroup, except the exact machines to run and where they should run.

Constructs that want to create AutoScalingGroups can inherit this interface and specialize the essential parts in various ways.

Parameters
  • allow_all_outbound (Optional[bool]) – Whether the instances can initiate connections to anywhere by default. Default: true

  • associate_public_ip_address (Optional[bool]) – Whether instances in the Auto Scaling Group should have public IP addresses associated with them. Default: - Use subnet setting.

  • cooldown (Optional[Duration]) – Default scaling cooldown for this AutoScalingGroup. Default: Duration.minutes(5)

  • desired_capacity (Union[int, float, None]) – Initial amount of instances in the fleet. Default: 1

  • health_check (Optional[HealthCheck]) – Configuration for health checks. Default: - HealthCheck.ec2 with no grace period

  • ignore_unmodified_size_properties (Optional[bool]) – If the ASG has scheduled actions, don’t reset unchanged group sizes. Only used if the ASG has scheduled actions (which may scale your ASG up or down regardless of cdk deployments). If true, the size of the group will only be reset if it has been changed in the CDK app. If false, the sizes will always be changed back to what they were in the CDK app on deployment. Default: true

  • key_name (Optional[str]) – Name of SSH keypair to grant access to instances. Default: - No SSH access will be possible.

  • max_capacity (Union[int, float, None]) – Maximum number of instances in the fleet. Default: desiredCapacity

  • min_capacity (Union[int, float, None]) – Minimum number of instances in the fleet. Default: 1

  • notifications_topic (Optional[ITopic]) – SNS topic to send notifications about fleet changes. Default: - No fleet change notifications will be sent.

  • replacing_update_min_successful_instances_percent (Union[int, float, None]) – Configuration for replacing updates. Only used if updateType == UpdateType.ReplacingUpdate. Specifies how many instances must signal success for the update to succeed. Default: minSuccessfulInstancesPercent

  • resource_signal_count (Union[int, float, None]) – How many ResourceSignal calls CloudFormation expects before the resource is considered created. Default: 1

  • resource_signal_timeout (Optional[Duration]) – The length of time to wait for the resourceSignalCount. The maximum value is 43200 (12 hours). Default: Duration.minutes(5)

  • rolling_update_configuration (Optional[RollingUpdateConfiguration]) – Configuration for rolling updates. Only used if updateType == UpdateType.RollingUpdate. Default: - RollingUpdateConfiguration with defaults.

  • spot_price (Optional[str]) – The maximum hourly price (in USD) to be paid for any Spot Instance launched to fulfill the request. Spot Instances are launched when the price you specify exceeds the current Spot market price. Default: none

  • update_type (Optional[UpdateType]) – What to do when an AutoScalingGroup’s instance configuration is changed. This is applied when any of the settings on the ASG are changed that affect how the instances should be created (VPC, instance type, startup scripts, etc.). It indicates how the existing instances should be replaced with new instances matching the new config. By default, nothing is done and only new instances are launched with the new config. Default: UpdateType.None

  • vpc_subnets (Optional[SubnetSelection]) – Where to place instances within the VPC. Default: - All Private subnets.

Attributes

allow_all_outbound

Whether the instances can initiate connections to anywhere by default.

default :default: true

Return type

Optional[bool]

associate_public_ip_address

Whether instances in the Auto Scaling Group should have public IP addresses associated with them.

default :default: - Use subnet setting.

Return type

Optional[bool]

cooldown

Default scaling cooldown for this AutoScalingGroup.

default :default: Duration.minutes(5)

Return type

Optional[Duration]

desired_capacity

Initial amount of instances in the fleet.

default :default: 1

Return type

Union[int, float, None]

health_check

Configuration for health checks.

default :default: - HealthCheck.ec2 with no grace period

Return type

Optional[HealthCheck]

ignore_unmodified_size_properties

If the ASG has scheduled actions, don’t reset unchanged group sizes.

Only used if the ASG has scheduled actions (which may scale your ASG up or down regardless of cdk deployments). If true, the size of the group will only be reset if it has been changed in the CDK app. If false, the sizes will always be changed back to what they were in the CDK app on deployment.

default :default: true

Return type

Optional[bool]

key_name

Name of SSH keypair to grant access to instances.

default :default: - No SSH access will be possible.

Return type

Optional[str]

max_capacity

Maximum number of instances in the fleet.

default :default: desiredCapacity

Return type

Union[int, float, None]

min_capacity

Minimum number of instances in the fleet.

default :default: 1

Return type

Union[int, float, None]

notifications_topic

SNS topic to send notifications about fleet changes.

default :default: - No fleet change notifications will be sent.

Return type

Optional[ITopic]

replacing_update_min_successful_instances_percent

Configuration for replacing updates.

Only used if updateType == UpdateType.ReplacingUpdate. Specifies how many instances must signal success for the update to succeed.

default :default: minSuccessfulInstancesPercent

Return type

Union[int, float, None]

resource_signal_count

How many ResourceSignal calls CloudFormation expects before the resource is considered created.

default :default: 1

Return type

Union[int, float, None]

resource_signal_timeout

The length of time to wait for the resourceSignalCount.

The maximum value is 43200 (12 hours).

default :default: Duration.minutes(5)

Return type

Optional[Duration]

rolling_update_configuration

Configuration for rolling updates.

Only used if updateType == UpdateType.RollingUpdate.

default :default: - RollingUpdateConfiguration with defaults.

Return type

Optional[RollingUpdateConfiguration]

spot_price

The maximum hourly price (in USD) to be paid for any Spot Instance launched to fulfill the request.

Spot Instances are launched when the price you specify exceeds the current Spot market price.

default :default: none

Return type

Optional[str]

update_type

What to do when an AutoScalingGroup’s instance configuration is changed.

This is applied when any of the settings on the ASG are changed that affect how the instances should be created (VPC, instance type, startup scripts, etc.). It indicates how the existing instances should be replaced with new instances matching the new config. By default, nothing is done and only new instances are launched with the new config.

default :default: UpdateType.None

Return type

Optional[UpdateType]

vpc_subnets

Where to place instances within the VPC.

default :default: - All Private subnets.

Return type

Optional[SubnetSelection]