CapacityOptions

class aws_cdk.aws_eks_legacy.CapacityOptions(*, 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, instance_type, bootstrap_enabled=None, bootstrap_options=None, map_role=None)

Bases: aws_cdk.aws_autoscaling.CommonAutoScalingGroupProps

__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, instance_type, bootstrap_enabled=None, bootstrap_options=None, map_role=None)

Options for adding worker nodes.

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. If this is set to a number, every deployment will reset the amount of instances to this number. It is recommended to leave this value blank. Default: minCapacity, and leave unchanged during deployment

  • 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.

  • instance_type (InstanceType) – Instance type of the instances to start.

  • bootstrap_enabled (Optional[bool]) – Configures the EC2 user-data script for instances in this autoscaling group to bootstrap the node (invoke /etc/eks/bootstrap.sh) and associate it with the EKS cluster. If you wish to provide a custom user data script, set this to false and manually invoke autoscalingGroup.addUserData(). Default: true

  • bootstrap_options (Optional[BootstrapOptions]) – EKS node bootstrapping options. Default: - none

  • map_role (Optional[bool]) – Will automatically update the aws-auth ConfigMap to map the IAM instance role to RBAC. This cannot be explicitly set to true if the cluster has kubectl disabled. Default: - true if the cluster has kubectl enabled (which is the default).

stability :stability: deprecated

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]

bootstrap_enabled

Configures the EC2 user-data script for instances in this autoscaling group to bootstrap the node (invoke /etc/eks/bootstrap.sh) and associate it with the EKS cluster.

If you wish to provide a custom user data script, set this to false and manually invoke autoscalingGroup.addUserData().

default :default: true

stability :stability: deprecated

Return type

Optional[bool]

bootstrap_options

EKS node bootstrapping options.

default :default: - none

stability :stability: deprecated

Return type

Optional[BootstrapOptions]

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.

If this is set to a number, every deployment will reset the amount of instances to this number. It is recommended to leave this value blank.

default :default: minCapacity, and leave unchanged during deployment

see :see: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-desiredcapacity

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]

instance_type

Instance type of the instances to start.

stability :stability: deprecated

Return type

InstanceType

key_name

Name of SSH keypair to grant access to instances.

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

Return type

Optional[str]

map_role

Will automatically update the aws-auth ConfigMap to map the IAM instance role to RBAC.

This cannot be explicitly set to true if the cluster has kubectl disabled.

default :default: - true if the cluster has kubectl enabled (which is the default).

stability :stability: deprecated

Return type

Optional[bool]

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]