Class: AWSCDK::Autoscaling::CfnAutoScalingGroupProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
autoscaling/cfn_auto_scaling_group_props.rb

Overview

Properties for defining a CfnAutoScalingGroup.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(max_size:, min_size:, auto_scaling_group_name: nil, availability_zone_distribution: nil, availability_zone_ids: nil, availability_zone_impairment_policy: nil, availability_zones: nil, capacity_rebalance: nil, capacity_reservation_specification: nil, context: nil, cooldown: nil, default_instance_warmup: nil, deletion_protection: nil, desired_capacity: nil, desired_capacity_type: nil, health_check_grace_period: nil, health_check_type: nil, instance_id: nil, instance_lifecycle_policy: nil, instance_maintenance_policy: nil, launch_configuration_name: nil, launch_template: nil, lifecycle_hook_specification_list: nil, load_balancer_names: nil, max_instance_lifetime: nil, metrics_collection: nil, mixed_instances_policy: nil, new_instances_protected_from_scale_in: nil, notification_configuration: nil, notification_configurations: nil, placement_group: nil, service_linked_role_arn: nil, skip_zonal_shift_validation: nil, tags: nil, target_group_arns: nil, termination_policies: nil, traffic_sources: nil, vpc_zone_identifier: nil) ⇒ CfnAutoScalingGroupProps

Returns a new instance of CfnAutoScalingGroupProps.

Parameters:



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 47

def initialize(max_size:, min_size:, auto_scaling_group_name: nil, availability_zone_distribution: nil, availability_zone_ids: nil, availability_zone_impairment_policy: nil, availability_zones: nil, capacity_rebalance: nil, capacity_reservation_specification: nil, context: nil, cooldown: nil, default_instance_warmup: nil, deletion_protection: nil, desired_capacity: nil, desired_capacity_type: nil, health_check_grace_period: nil, health_check_type: nil, instance_id: nil, instance_lifecycle_policy: nil, instance_maintenance_policy: nil, launch_configuration_name: nil, launch_template: nil, lifecycle_hook_specification_list: nil, load_balancer_names: nil, max_instance_lifetime: nil, metrics_collection: nil, mixed_instances_policy: nil, new_instances_protected_from_scale_in: nil, notification_configuration: nil, notification_configurations: nil, placement_group: nil, service_linked_role_arn: nil, skip_zonal_shift_validation: nil, tags: nil, target_group_arns: nil, termination_policies: nil, traffic_sources: nil, vpc_zone_identifier: nil)
  @max_size = max_size
  Jsii::Type.check_type(@max_size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "maxSize")
  @min_size = min_size
  Jsii::Type.check_type(@min_size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "minSize")
  @auto_scaling_group_name = auto_scaling_group_name
  Jsii::Type.check_type(@auto_scaling_group_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "autoScalingGroupName") unless @auto_scaling_group_name.nil?
  @availability_zone_distribution = availability_zone_distribution.is_a?(Hash) ? ::AWSCDK::Autoscaling::CfnAutoScalingGroup::AvailabilityZoneDistributionProperty.new(**availability_zone_distribution.transform_keys(&:to_sym)) : availability_zone_distribution
  Jsii::Type.check_type(@availability_zone_distribution, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hdXRvc2NhbGluZy5DZm5BdXRvU2NhbGluZ0dyb3VwLkF2YWlsYWJpbGl0eVpvbmVEaXN0cmlidXRpb25Qcm9wZXJ0eSJ9XX19")), "availabilityZoneDistribution") unless @availability_zone_distribution.nil?
  @availability_zone_ids = availability_zone_ids
  Jsii::Type.check_type(@availability_zone_ids, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "availabilityZoneIds") unless @availability_zone_ids.nil?
  @availability_zone_impairment_policy = availability_zone_impairment_policy.is_a?(Hash) ? ::AWSCDK::Autoscaling::CfnAutoScalingGroup::AvailabilityZoneImpairmentPolicyProperty.new(**availability_zone_impairment_policy.transform_keys(&:to_sym)) : availability_zone_impairment_policy
  Jsii::Type.check_type(@availability_zone_impairment_policy, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hdXRvc2NhbGluZy5DZm5BdXRvU2NhbGluZ0dyb3VwLkF2YWlsYWJpbGl0eVpvbmVJbXBhaXJtZW50UG9saWN5UHJvcGVydHkifV19fQ==")), "availabilityZoneImpairmentPolicy") unless @availability_zone_impairment_policy.nil?
  @availability_zones = availability_zones
  Jsii::Type.check_type(@availability_zones, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "availabilityZones") unless @availability_zones.nil?
  @capacity_rebalance = capacity_rebalance
  Jsii::Type.check_type(@capacity_rebalance, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "capacityRebalance") unless @capacity_rebalance.nil?
  @capacity_reservation_specification = capacity_reservation_specification.is_a?(Hash) ? ::AWSCDK::Autoscaling::CfnAutoScalingGroup::CapacityReservationSpecificationProperty.new(**capacity_reservation_specification.transform_keys(&:to_sym)) : capacity_reservation_specification
  Jsii::Type.check_type(@capacity_reservation_specification, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hdXRvc2NhbGluZy5DZm5BdXRvU2NhbGluZ0dyb3VwLkNhcGFjaXR5UmVzZXJ2YXRpb25TcGVjaWZpY2F0aW9uUHJvcGVydHkifV19fQ==")), "capacityReservationSpecification") unless @capacity_reservation_specification.nil?
  @context = context
  Jsii::Type.check_type(@context, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "context") unless @context.nil?
  @cooldown = cooldown
  Jsii::Type.check_type(@cooldown, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cooldown") unless @cooldown.nil?
  @default_instance_warmup = default_instance_warmup
  Jsii::Type.check_type(@default_instance_warmup, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "defaultInstanceWarmup") unless @default_instance_warmup.nil?
  @deletion_protection = deletion_protection
  Jsii::Type.check_type(@deletion_protection, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "deletionProtection") unless @deletion_protection.nil?
  @desired_capacity = desired_capacity
  Jsii::Type.check_type(@desired_capacity, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "desiredCapacity") unless @desired_capacity.nil?
  @desired_capacity_type = desired_capacity_type
  Jsii::Type.check_type(@desired_capacity_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "desiredCapacityType") unless @desired_capacity_type.nil?
  @health_check_grace_period = health_check_grace_period
  Jsii::Type.check_type(@health_check_grace_period, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "healthCheckGracePeriod") unless @health_check_grace_period.nil?
  @health_check_type = health_check_type
  Jsii::Type.check_type(@health_check_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "healthCheckType") unless @health_check_type.nil?
  @instance_id = instance_id
  Jsii::Type.check_type(@instance_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instanceId") unless @instance_id.nil?
  @instance_lifecycle_policy = instance_lifecycle_policy.is_a?(Hash) ? ::AWSCDK::Autoscaling::CfnAutoScalingGroup::InstanceLifecyclePolicyProperty.new(**instance_lifecycle_policy.transform_keys(&:to_sym)) : instance_lifecycle_policy
  Jsii::Type.check_type(@instance_lifecycle_policy, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hdXRvc2NhbGluZy5DZm5BdXRvU2NhbGluZ0dyb3VwLkluc3RhbmNlTGlmZWN5Y2xlUG9saWN5UHJvcGVydHkifV19fQ==")), "instanceLifecyclePolicy") unless @instance_lifecycle_policy.nil?
  @instance_maintenance_policy = instance_maintenance_policy.is_a?(Hash) ? ::AWSCDK::Autoscaling::CfnAutoScalingGroup::InstanceMaintenancePolicyProperty.new(**instance_maintenance_policy.transform_keys(&:to_sym)) : instance_maintenance_policy
  Jsii::Type.check_type(@instance_maintenance_policy, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hdXRvc2NhbGluZy5DZm5BdXRvU2NhbGluZ0dyb3VwLkluc3RhbmNlTWFpbnRlbmFuY2VQb2xpY3lQcm9wZXJ0eSJ9XX19")), "instanceMaintenancePolicy") unless @instance_maintenance_policy.nil?
  @launch_configuration_name = launch_configuration_name
  Jsii::Type.check_type(@launch_configuration_name, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19hdXRvc2NhbGluZy5JTGF1bmNoQ29uZmlndXJhdGlvblJlZiJ9XX19")), "launchConfigurationName") unless @launch_configuration_name.nil?
  @launch_template = launch_template.is_a?(Hash) ? ::AWSCDK::Autoscaling::CfnAutoScalingGroup::LaunchTemplateSpecificationProperty.new(**launch_template.transform_keys(&:to_sym)) : launch_template
  Jsii::Type.check_type(@launch_template, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hdXRvc2NhbGluZy5DZm5BdXRvU2NhbGluZ0dyb3VwLkxhdW5jaFRlbXBsYXRlU3BlY2lmaWNhdGlvblByb3BlcnR5In1dfX0=")), "launchTemplate") unless @launch_template.nil?
  @lifecycle_hook_specification_list = lifecycle_hook_specification_list
  Jsii::Type.check_type(@lifecycle_hook_specification_list, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXV0b3NjYWxpbmcuQ2ZuQXV0b1NjYWxpbmdHcm91cC5MaWZlY3ljbGVIb29rU3BlY2lmaWNhdGlvblByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "lifecycleHookSpecificationList") unless @lifecycle_hook_specification_list.nil?
  @load_balancer_names = load_balancer_names
  Jsii::Type.check_type(@load_balancer_names, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "loadBalancerNames") unless @load_balancer_names.nil?
  @max_instance_lifetime = max_instance_lifetime
  Jsii::Type.check_type(@max_instance_lifetime, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxInstanceLifetime") unless @max_instance_lifetime.nil?
  @metrics_collection = metrics_collection
  Jsii::Type.check_type(@metrics_collection, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXV0b3NjYWxpbmcuQ2ZuQXV0b1NjYWxpbmdHcm91cC5NZXRyaWNzQ29sbGVjdGlvblByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "metricsCollection") unless @metrics_collection.nil?
  @mixed_instances_policy = mixed_instances_policy.is_a?(Hash) ? ::AWSCDK::Autoscaling::CfnAutoScalingGroup::MixedInstancesPolicyProperty.new(**mixed_instances_policy.transform_keys(&:to_sym)) : mixed_instances_policy
  Jsii::Type.check_type(@mixed_instances_policy, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hdXRvc2NhbGluZy5DZm5BdXRvU2NhbGluZ0dyb3VwLk1peGVkSW5zdGFuY2VzUG9saWN5UHJvcGVydHkifV19fQ==")), "mixedInstancesPolicy") unless @mixed_instances_policy.nil?
  @new_instances_protected_from_scale_in = new_instances_protected_from_scale_in
  Jsii::Type.check_type(@new_instances_protected_from_scale_in, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "newInstancesProtectedFromScaleIn") unless @new_instances_protected_from_scale_in.nil?
  @notification_configuration = notification_configuration.is_a?(Hash) ? ::AWSCDK::Autoscaling::CfnAutoScalingGroup::NotificationConfigurationProperty.new(**notification_configuration.transform_keys(&:to_sym)) : notification_configuration
  Jsii::Type.check_type(@notification_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hdXRvc2NhbGluZy5DZm5BdXRvU2NhbGluZ0dyb3VwLk5vdGlmaWNhdGlvbkNvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "notificationConfiguration") unless @notification_configuration.nil?
  @notification_configurations = notification_configurations
  Jsii::Type.check_type(@notification_configurations, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXV0b3NjYWxpbmcuQ2ZuQXV0b1NjYWxpbmdHcm91cC5Ob3RpZmljYXRpb25Db25maWd1cmF0aW9uUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "notificationConfigurations") unless @notification_configurations.nil?
  @placement_group = placement_group
  Jsii::Type.check_type(@placement_group, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "placementGroup") unless @placement_group.nil?
  @service_linked_role_arn = service_linked_role_arn
  Jsii::Type.check_type(@service_linked_role_arn, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19pYW0uSVJvbGVSZWYifV19fQ==")), "serviceLinkedRoleArn") unless @service_linked_role_arn.nil?
  @skip_zonal_shift_validation = skip_zonal_shift_validation
  Jsii::Type.check_type(@skip_zonal_shift_validation, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "skipZonalShiftValidation") unless @skip_zonal_shift_validation.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::Autoscaling::CfnAutoScalingGroup::TagPropertyProperty.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hdXRvc2NhbGluZy5DZm5BdXRvU2NhbGluZ0dyb3VwLlRhZ1Byb3BlcnR5UHJvcGVydHkifSwia2luZCI6ImFycmF5In19")), "tags") unless @tags.nil?
  @target_group_arns = target_group_arns
  Jsii::Type.check_type(@target_group_arns, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InVuaW9uIjp7InR5cGVzIjpbeyJwcmltaXRpdmUiOiJzdHJpbmcifSx7ImZxbiI6ImF3cy1jZGstbGliLmludGVyZmFjZXMuYXdzX2VsYXN0aWNsb2FkYmFsYW5jaW5ndjIuSVRhcmdldEdyb3VwUmVmIn1dfX0sImtpbmQiOiJhcnJheSJ9fQ==")), "targetGroupArns") unless @target_group_arns.nil?
  @termination_policies = termination_policies
  Jsii::Type.check_type(@termination_policies, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "terminationPolicies") unless @termination_policies.nil?
  @traffic_sources = traffic_sources
  Jsii::Type.check_type(@traffic_sources, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXV0b3NjYWxpbmcuQ2ZuQXV0b1NjYWxpbmdHcm91cC5UcmFmZmljU291cmNlSWRlbnRpZmllclByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "trafficSources") unless @traffic_sources.nil?
  @vpc_zone_identifier = vpc_zone_identifier
  Jsii::Type.check_type(@vpc_zone_identifier, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InVuaW9uIjp7InR5cGVzIjpbeyJwcmltaXRpdmUiOiJzdHJpbmcifSx7ImZxbiI6ImF3cy1jZGstbGliLmludGVyZmFjZXMuYXdzX2VjMi5JU3VibmV0UmVmIn1dfX0sImtpbmQiOiJhcnJheSJ9fQ==")), "vpcZoneIdentifier") unless @vpc_zone_identifier.nil?
end

Instance Attribute Details

#auto_scaling_group_nameString? (readonly)

The name of the Auto Scaling group. This name must be unique per Region per account.

The name can contain any ASCII character 33 to 126 including most punctuation characters, digits, and upper and lowercased letters.

You cannot use a colon (:) in the name.



146
147
148
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 146

def auto_scaling_group_name
  @auto_scaling_group_name
end

#availability_zone_distributionAWSCDK::IResolvable, ... (readonly)

The EC2 instance capacity distribution across Availability Zones for the Auto Scaling group.



151
152
153
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 151

def availability_zone_distribution
  @availability_zone_distribution
end

#availability_zone_idsArray<String>? (readonly)

The Availability Zone IDs where the Auto Scaling group can launch instances.



156
157
158
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 156

def availability_zone_ids
  @availability_zone_ids
end

#availability_zone_impairment_policyAWSCDK::IResolvable, ... (readonly)

The Availability Zone impairment policy for the Auto Scaling group.



161
162
163
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 161

def availability_zone_impairment_policy
  @availability_zone_impairment_policy
end

#availability_zonesArray<String>? (readonly)

A list of Availability Zones where instances in the Auto Scaling group can be created.

Used for launching into the default VPC subnet in each Availability Zone when not using the VPCZoneIdentifier property, or for attaching a network interface when an existing network interface ID is specified in a launch template.



168
169
170
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 168

def availability_zones
  @availability_zones
end

#capacity_rebalanceBoolean, ... (readonly)

Indicates whether Capacity Rebalancing is enabled.

Otherwise, Capacity Rebalancing is disabled. When you turn on Capacity Rebalancing, Amazon EC2 Auto Scaling attempts to launch a Spot Instance whenever Amazon EC2 notifies that a Spot Instance is at an elevated risk of interruption. After launching a new instance, it then terminates an old instance. For more information, see Use Capacity Rebalancing to handle Amazon EC2 Spot Interruptions in the in the Amazon EC2 Auto Scaling User Guide .



175
176
177
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 175

def capacity_rebalance
  @capacity_rebalance
end

#capacity_reservation_specificationAWSCDK::IResolvable, ... (readonly)

The capacity reservation specification for the Auto Scaling group.



180
181
182
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 180

def capacity_reservation_specification
  @capacity_reservation_specification
end

#contextString? (readonly)

Reserved.



185
186
187
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 185

def context
  @context
end

#cooldownString? (readonly)

Only needed if you use simple scaling policies..

The amount of time, in seconds, between one scaling activity ending and another one starting due to simple scaling policies. For more information, see Scaling cooldowns for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide .

Default: 300 seconds



194
195
196
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 194

def cooldown
  @cooldown
end

#default_instance_warmupNumeric? (readonly)

The amount of time, in seconds, until a new instance is considered to have finished initializing and resource consumption to become stable after it enters the InService state.

During an instance refresh, Amazon EC2 Auto Scaling waits for the warm-up period after it replaces an instance before it moves on to replacing the next instance. Amazon EC2 Auto Scaling also waits for the warm-up period before aggregating the metrics for new instances with existing instances in the Amazon CloudWatch metrics that are used for scaling, resulting in more reliable usage data. For more information, see Set the default instance warmup for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide .

To manage various warm-up settings at the group level, we recommend that you set the default instance warmup, even if it is set to 0 seconds . To remove a value that you previously set, include the property but specify -1 for the value. However, we strongly recommend keeping the default instance warmup enabled by specifying a value of 0 or other nominal value.

Default: None



205
206
207
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 205

def default_instance_warmup
  @default_instance_warmup
end

#deletion_protectionString? (readonly)

The deletion protection setting for the Auto Scaling group.



210
211
212
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 210

def deletion_protection
  @deletion_protection
end

#desired_capacityString? (readonly)

The desired capacity is the initial capacity of the Auto Scaling group at the time of its creation and the capacity it attempts to maintain.

It can scale beyond this capacity if you configure automatic scaling.

The number must be greater than or equal to the minimum size of the group and less than or equal to the maximum size of the group. If you do not specify a desired capacity when creating the stack, the default is the minimum size of the group.

CloudFormation marks the Auto Scaling group as successful (by setting its status to CREATE_COMPLETE) when the desired capacity is reached. However, if a maximum Spot price is set in the launch template or launch configuration that you specified, then desired capacity is not used as a criteria for success. Whether your request is fulfilled depends on Spot Instance capacity and your maximum price.



221
222
223
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 221

def desired_capacity
  @desired_capacity
end

#desired_capacity_typeString? (readonly)

The unit of measurement for the value specified for desired capacity.

Amazon EC2 Auto Scaling supports DesiredCapacityType for attribute-based instance type selection only. For more information, see Create a mixed instances group using attribute-based instance type selection in the Amazon EC2 Auto Scaling User Guide .

By default, Amazon EC2 Auto Scaling specifies units , which translates into number of instances.

Valid values: units | vcpu | memory-mib



232
233
234
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 232

def desired_capacity_type
  @desired_capacity_type
end

#health_check_grace_periodNumeric? (readonly)

The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before checking the health status of an EC2 instance that has come into service and marking it unhealthy due to a failed health check.

This is useful if your instances do not immediately pass their health checks after they enter the InService state. For more information, see Set the health check grace period for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide .

Default: 0 seconds



241
242
243
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 241

def health_check_grace_period
  @health_check_grace_period
end

#health_check_typeString? (readonly)

A comma-separated value string of one or more health check types.

The valid values are EC2 , EBS , ELB , and VPC_LATTICE . EC2 is the default health check and cannot be disabled. For more information, see Health checks for instances in an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide .

Only specify EC2 if you must clear a value that was previously set.



250
251
252
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 250

def health_check_type
  @health_check_type
end

#instance_idString? (readonly)

The ID of the instance used to base the launch configuration on.

For more information, see Create an Auto Scaling group using an EC2 instance in the Amazon EC2 Auto Scaling User Guide .

If you specify LaunchTemplate , MixedInstancesPolicy , or LaunchConfigurationName , don't specify InstanceId .



259
260
261
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 259

def instance_id
  @instance_id
end

#instance_lifecycle_policyAWSCDK::IResolvable, ... (readonly)

The instance lifecycle policy for the Auto Scaling group.



264
265
266
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 264

def instance_lifecycle_policy
  @instance_lifecycle_policy
end

#instance_maintenance_policyAWSCDK::IResolvable, ... (readonly)

An instance maintenance policy.

For more information, see Set instance maintenance policy in the Amazon EC2 Auto Scaling User Guide .



271
272
273
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 271

def instance_maintenance_policy
  @instance_maintenance_policy
end

#launch_configuration_nameString, ... (readonly)

The name of the launch configuration to use to launch instances.

Required only if you don't specify LaunchTemplate , MixedInstancesPolicy , or InstanceId .



278
279
280
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 278

def launch_configuration_name
  @launch_configuration_name
end

#launch_templateAWSCDK::IResolvable, ... (readonly)

Information used to specify the launch template and version to use to launch instances.

You can alternatively associate a launch template to the Auto Scaling group by specifying a MixedInstancesPolicy . For more information about creating launch templates, see Create a launch template for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide .

If you omit this property, you must specify MixedInstancesPolicy , LaunchConfigurationName , or InstanceId .



287
288
289
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 287

def launch_template
  @launch_template
end

#lifecycle_hook_specification_listAWSCDK::IResolvable, ... (readonly)

One or more lifecycle hooks to add to the Auto Scaling group before instances are launched.



292
293
294
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 292

def lifecycle_hook_specification_list
  @lifecycle_hook_specification_list
end

#load_balancer_namesArray<String>? (readonly)

A list of Classic Load Balancers associated with this Auto Scaling group.

For Application Load Balancers, Network Load Balancers, and Gateway Load Balancers, specify the TargetGroupARNs property instead.



299
300
301
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 299

def load_balancer_names
  @load_balancer_names
end

#max_instance_lifetimeNumeric? (readonly)

The maximum amount of time, in seconds, that an instance can be in service.

The default is null. If specified, the value must be either 0 or a number equal to or greater than 86,400 seconds (1 day). For more information, see Replace Auto Scaling instances based on maximum instance lifetime in the Amazon EC2 Auto Scaling User Guide .



306
307
308
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 306

def max_instance_lifetime
  @max_instance_lifetime
end

#max_sizeString (readonly)

The maximum size of the group.

With a mixed instances policy that uses instance weighting, Amazon EC2 Auto Scaling may need to go above MaxSize to meet your capacity requirements. In this event, Amazon EC2 Auto Scaling will never go above MaxSize by more than your largest instance weight (weights that define how many units each instance contributes to the desired capacity of the group).



132
133
134
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 132

def max_size
  @max_size
end

#metrics_collectionAWSCDK::IResolvable, ... (readonly)

Enables the monitoring of group metrics of an Auto Scaling group.

By default, these metrics are disabled.



313
314
315
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 313

def metrics_collection
  @metrics_collection
end

#min_sizeString (readonly)

The minimum size of the group.



137
138
139
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 137

def min_size
  @min_size
end

#mixed_instances_policyAWSCDK::IResolvable, ... (readonly)

An embedded object that specifies a mixed instances policy.

The policy includes properties that not only define the distribution of On-Demand Instances and Spot Instances, the maximum price to pay for Spot Instances (optional), and how the Auto Scaling group allocates instance types to fulfill On-Demand and Spot capacities, but also the properties that specify the instance configuration information—the launch template and instance types. The policy can also include a weight for each instance type and different launch templates for individual instance types.

For more information, see Auto Scaling groups with multiple instance types and purchase options in the Amazon EC2 Auto Scaling User Guide .



322
323
324
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 322

def mixed_instances_policy
  @mixed_instances_policy
end

#new_instances_protected_from_scale_inBoolean, ... (readonly)

Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when scaling in.

For more information about preventing instances from terminating on scale in, see Use instance scale-in protection in the Amazon EC2 Auto Scaling User Guide .



329
330
331
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 329

def new_instances_protected_from_scale_in
  @new_instances_protected_from_scale_in
end

#notification_configurationAWSCDK::IResolvable, ... (readonly)

Deprecated.

this property has been deprecated

A structure that specifies an Amazon SNS notification configuration for the NotificationConfigurations property of the AWS::AutoScaling::AutoScalingGroup resource. For an example template snippet, see Configure Amazon EC2 Auto Scaling resources. For more information, see Get Amazon SNS notifications when your Auto Scaling group scales in the Amazon EC2 Auto Scaling User Guide.



335
336
337
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 335

def notification_configuration
  @notification_configuration
end

#notification_configurationsAWSCDK::IResolvable, ... (readonly)

Configures an Auto Scaling group to send notifications when specified events take place.



340
341
342
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 340

def notification_configurations
  @notification_configurations
end

#placement_groupString? (readonly)

The name of the placement group into which to launch your instances.

For more information, see Placement groups in the Amazon EC2 User Guide .

A cluster placement group is a logical grouping of instances within a single Availability Zone. You cannot specify multiple Availability Zones and a cluster placement group.



349
350
351
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 349

def placement_group
  @placement_group
end

#service_linked_role_arnString, ... (readonly)

The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling group uses to call other AWS service on your behalf.

By default, Amazon EC2 Auto Scaling uses a service-linked role named AWSServiceRoleForAutoScaling , which it creates if it does not exist. For more information, see Service-linked roles in the Amazon EC2 Auto Scaling User Guide .



356
357
358
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 356

def service_linked_role_arn
  @service_linked_role_arn
end

#skip_zonal_shift_validationBoolean, ... (readonly)



359
360
361
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 359

def skip_zonal_shift_validation
  @skip_zonal_shift_validation
end

#tagsArray<AWSCDK::Autoscaling::CfnAutoScalingGroup::TagPropertyProperty>? (readonly)

One or more tags.

You can tag your Auto Scaling group and propagate the tags to the Amazon EC2 instances it launches. Tags are not propagated to Amazon EBS volumes. To add tags to Amazon EBS volumes, specify the tags in a launch template but use caution. If the launch template specifies an instance tag with a key that is also specified for the Auto Scaling group, Amazon EC2 Auto Scaling overrides the value of that instance tag with the value specified by the Auto Scaling group. For more information, see Tag Auto Scaling groups and instances in the Amazon EC2 Auto Scaling User Guide .



366
367
368
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 366

def tags
  @tags
end

#target_group_arnsArray<String, AWSCDK::Interfaces::AWSElasticloadbalancingv2::ITargetGroupRef>? (readonly)

The Amazon Resource Names (ARN) of the Elastic Load Balancing target groups to associate with the Auto Scaling group.

Instances are registered as targets with the target groups. The target groups receive incoming traffic and route requests to one or more registered targets. For more information, see Use Elastic Load Balancing to distribute traffic across the instances in your Auto Scaling group in the Amazon EC2 Auto Scaling User Guide .



373
374
375
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 373

def target_group_arns
  @target_group_arns
end

#termination_policiesArray<String>? (readonly)

A policy or a list of policies that are used to select the instance to terminate.

These policies are executed in the order that you list them. For more information, see Configure termination policies for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide .

Valid values: Default | AllocationStrategy | ClosestToNextInstanceHour | NewestInstance | OldestInstance | OldestLaunchConfiguration | OldestLaunchTemplate | arn:aws:lambda:region:account-id:function:my-function:my-alias



382
383
384
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 382

def termination_policies
  @termination_policies
end

#traffic_sourcesAWSCDK::IResolvable, ... (readonly)

The traffic sources associated with this Auto Scaling group.



387
388
389
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 387

def traffic_sources
  @traffic_sources
end

#vpc_zone_identifierArray<String, AWSCDK::Interfaces::AWSEC2::ISubnetRef>? (readonly)

A list of subnet IDs for a virtual private cloud (VPC) where instances in the Auto Scaling group can be created.

If this resource specifies public subnets and is also in a VPC that is defined in the same stack template, you must use the DependsOn attribute to declare a dependency on the VPC-gateway attachment .

When you update VPCZoneIdentifier , this retains the same Auto Scaling group and replaces old instances with new ones, according to the specified subnets. You can optionally specify how CloudFormation handles these updates by using an UpdatePolicy attribute .

Required to launch instances into a nondefault VPC. If you specify VPCZoneIdentifier with AvailabilityZones , the subnets that you specify for this property must reside in those Availability Zones.



398
399
400
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 398

def vpc_zone_identifier
  @vpc_zone_identifier
end

Class Method Details

.jsii_propertiesObject



400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 400

def self.jsii_properties
  {
    :max_size => "maxSize",
    :min_size => "minSize",
    :auto_scaling_group_name => "autoScalingGroupName",
    :availability_zone_distribution => "availabilityZoneDistribution",
    :availability_zone_ids => "availabilityZoneIds",
    :availability_zone_impairment_policy => "availabilityZoneImpairmentPolicy",
    :availability_zones => "availabilityZones",
    :capacity_rebalance => "capacityRebalance",
    :capacity_reservation_specification => "capacityReservationSpecification",
    :context => "context",
    :cooldown => "cooldown",
    :default_instance_warmup => "defaultInstanceWarmup",
    :deletion_protection => "deletionProtection",
    :desired_capacity => "desiredCapacity",
    :desired_capacity_type => "desiredCapacityType",
    :health_check_grace_period => "healthCheckGracePeriod",
    :health_check_type => "healthCheckType",
    :instance_id => "instanceId",
    :instance_lifecycle_policy => "instanceLifecyclePolicy",
    :instance_maintenance_policy => "instanceMaintenancePolicy",
    :launch_configuration_name => "launchConfigurationName",
    :launch_template => "launchTemplate",
    :lifecycle_hook_specification_list => "lifecycleHookSpecificationList",
    :load_balancer_names => "loadBalancerNames",
    :max_instance_lifetime => "maxInstanceLifetime",
    :metrics_collection => "metricsCollection",
    :mixed_instances_policy => "mixedInstancesPolicy",
    :new_instances_protected_from_scale_in => "newInstancesProtectedFromScaleIn",
    :notification_configuration => "notificationConfiguration",
    :notification_configurations => "notificationConfigurations",
    :placement_group => "placementGroup",
    :service_linked_role_arn => "serviceLinkedRoleArn",
    :skip_zonal_shift_validation => "skipZonalShiftValidation",
    :tags => "tags",
    :target_group_arns => "targetGroupArns",
    :termination_policies => "terminationPolicies",
    :traffic_sources => "trafficSources",
    :vpc_zone_identifier => "vpcZoneIdentifier",
  }
end

Instance Method Details

#to_jsiiObject



443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
# File 'autoscaling/cfn_auto_scaling_group_props.rb', line 443

def to_jsii
  result = {}
  result.merge!({
    "maxSize" => @max_size,
    "minSize" => @min_size,
    "autoScalingGroupName" => @auto_scaling_group_name,
    "availabilityZoneDistribution" => @availability_zone_distribution,
    "availabilityZoneIds" => @availability_zone_ids,
    "availabilityZoneImpairmentPolicy" => @availability_zone_impairment_policy,
    "availabilityZones" => @availability_zones,
    "capacityRebalance" => @capacity_rebalance,
    "capacityReservationSpecification" => @capacity_reservation_specification,
    "context" => @context,
    "cooldown" => @cooldown,
    "defaultInstanceWarmup" => @default_instance_warmup,
    "deletionProtection" => @deletion_protection,
    "desiredCapacity" => @desired_capacity,
    "desiredCapacityType" => @desired_capacity_type,
    "healthCheckGracePeriod" => @health_check_grace_period,
    "healthCheckType" => @health_check_type,
    "instanceId" => @instance_id,
    "instanceLifecyclePolicy" => @instance_lifecycle_policy,
    "instanceMaintenancePolicy" => @instance_maintenance_policy,
    "launchConfigurationName" => @launch_configuration_name,
    "launchTemplate" => @launch_template,
    "lifecycleHookSpecificationList" => @lifecycle_hook_specification_list,
    "loadBalancerNames" => @load_balancer_names,
    "maxInstanceLifetime" => @max_instance_lifetime,
    "metricsCollection" => @metrics_collection,
    "mixedInstancesPolicy" => @mixed_instances_policy,
    "newInstancesProtectedFromScaleIn" => @new_instances_protected_from_scale_in,
    "notificationConfiguration" => @notification_configuration,
    "notificationConfigurations" => @notification_configurations,
    "placementGroup" => @placement_group,
    "serviceLinkedRoleArn" => @service_linked_role_arn,
    "skipZonalShiftValidation" => @skip_zonal_shift_validation,
    "tags" => @tags,
    "targetGroupArns" => @target_group_arns,
    "terminationPolicies" => @termination_policies,
    "trafficSources" => @traffic_sources,
    "vpcZoneIdentifier" => @vpc_zone_identifier,
  })
  result.compact
end