Class: AWSCDK::Autoscaling::CfnAutoScalingGroup

Inherits:
CfnResource
  • Object
show all
Includes:
IInspectable, ITaggable, Interfaces::AWSAutoscaling::IAutoScalingGroupRef
Defined in:
autoscaling/cfn_auto_scaling_group.rb

Overview

The AWS::AutoScaling::AutoScalingGroup resource defines an Amazon EC2 Auto Scaling group, which is a collection of Amazon EC2 instances that are treated as a logical grouping for the purposes of automatic scaling and management.

For more information about Amazon EC2 Auto Scaling, see the Amazon EC2 Auto Scaling User Guide .

Amazon EC2 Auto Scaling configures instances launched as part of an Auto Scaling group using either a launch template or a launch configuration. We strongly recommend that you do not use launch configurations. For more information, see Launch configurations in the Amazon EC2 Auto Scaling User Guide .

For help migrating from launch configurations to launch templates, see Migrate AWS CloudFormation stacks from launch configurations to launch templates in the Amazon EC2 Auto Scaling User Guide .

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scope, id, props) ⇒ CfnAutoScalingGroup

Create a new AWS::AutoScaling::AutoScalingGroup.

Parameters:

  • scope (Constructs::Construct)

    Scope in which this resource is defined.

  • id (String)

    Construct identifier for this resource (unique in its scope).

  • props (AWSCDK::Autoscaling::CfnAutoScalingGroupProps)

    Resource properties.



24
25
26
27
28
29
30
# File 'autoscaling/cfn_auto_scaling_group.rb', line 24

def initialize(scope, id, props)
  props = props.is_a?(Hash) ? ::AWSCDK::Autoscaling::CfnAutoScalingGroupProps.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope")
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXV0b3NjYWxpbmcuQ2ZuQXV0b1NjYWxpbmdHcm91cFByb3BzIn0=")), "props")
  Jsii::Object.instance_method(:initialize).bind(self).call(scope, id, props)
end

Class Method Details

.arn_for_auto_scaling_group(resource) ⇒ String

Parameters:

Returns:

  • (String)


115
116
117
118
# File 'autoscaling/cfn_auto_scaling_group.rb', line 115

def self.arn_for_auto_scaling_group(resource)
  Jsii::Type.check_type(resource, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19hdXRvc2NhbGluZy5JQXV0b1NjYWxpbmdHcm91cFJlZiJ9")), "resource")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup", "arnForAutoScalingGroup", [resource])
end

.CFN_RESOURCE_TYPE_NAMEString

The CloudFormation resource type name for this resource class.

Returns:

  • (String)


222
223
224
# File 'autoscaling/cfn_auto_scaling_group.rb', line 222

def self.CFN_RESOURCE_TYPE_NAME()
  Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup", "CFN_RESOURCE_TYPE_NAME")
end

.is_cfn_auto_scaling_group(x) ⇒ Boolean

Checks whether the given object is a CfnAutoScalingGroup.

Parameters:

  • x (Object)

Returns:

  • (Boolean)


124
125
126
127
# File 'autoscaling/cfn_auto_scaling_group.rb', line 124

def self.is_cfn_auto_scaling_group(x)
  Jsii::Type.check_type(x, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "x")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_autoscaling.CfnAutoScalingGroup", "isCfnAutoScalingGroup", [x])
end

.jsii_overridable_methodsObject



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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
# File 'autoscaling/cfn_auto_scaling_group.rb', line 32

def self.jsii_overridable_methods
  {
    :node => { kind: :property, name: "node", is_optional: false },
    :creation_stack => { kind: :property, name: "creationStack", is_optional: false },
    :logical_id => { kind: :property, name: "logicalId", is_optional: false },
    :stack => { kind: :property, name: "stack", is_optional: false },
    :ref => { kind: :property, name: "ref", is_optional: false },
    :cfn_options => { kind: :property, name: "cfnOptions", is_optional: false },
    :cfn_properties => { kind: :property, name: "cfnProperties", is_optional: false },
    :cfn_property_names => { kind: :property, name: "cfnPropertyNames", is_optional: false },
    :cfn_resource_type => { kind: :property, name: "cfnResourceType", is_optional: false },
    :env => { kind: :property, name: "env", is_optional: false },
    :updated_properites => { kind: :property, name: "updatedProperites", is_optional: false },
    :updated_properties => { kind: :property, name: "updatedProperties", is_optional: false },
    :attr_auto_scaling_group_arn => { kind: :property, name: "attrAutoScalingGroupArn", is_optional: false },
    :auto_scaling_group_ref => { kind: :property, name: "autoScalingGroupRef", is_optional: false },
    :tags => { kind: :property, name: "tags", is_optional: false },
    :max_size => { kind: :property, name: "maxSize", is_optional: false },
    :min_size => { kind: :property, name: "minSize", is_optional: false },
    :auto_scaling_group_name => { kind: :property, name: "autoScalingGroupName", is_optional: true },
    :availability_zone_distribution => { kind: :property, name: "availabilityZoneDistribution", is_optional: true },
    :availability_zone_ids => { kind: :property, name: "availabilityZoneIds", is_optional: true },
    :availability_zone_impairment_policy => { kind: :property, name: "availabilityZoneImpairmentPolicy", is_optional: true },
    :availability_zones => { kind: :property, name: "availabilityZones", is_optional: true },
    :capacity_rebalance => { kind: :property, name: "capacityRebalance", is_optional: true },
    :capacity_reservation_specification => { kind: :property, name: "capacityReservationSpecification", is_optional: true },
    :context => { kind: :property, name: "context", is_optional: true },
    :cooldown => { kind: :property, name: "cooldown", is_optional: true },
    :default_instance_warmup => { kind: :property, name: "defaultInstanceWarmup", is_optional: true },
    :deletion_protection => { kind: :property, name: "deletionProtection", is_optional: true },
    :desired_capacity => { kind: :property, name: "desiredCapacity", is_optional: true },
    :desired_capacity_type => { kind: :property, name: "desiredCapacityType", is_optional: true },
    :health_check_grace_period => { kind: :property, name: "healthCheckGracePeriod", is_optional: true },
    :health_check_type => { kind: :property, name: "healthCheckType", is_optional: true },
    :instance_id => { kind: :property, name: "instanceId", is_optional: true },
    :instance_lifecycle_policy => { kind: :property, name: "instanceLifecyclePolicy", is_optional: true },
    :instance_maintenance_policy => { kind: :property, name: "instanceMaintenancePolicy", is_optional: true },
    :launch_configuration_name => { kind: :property, name: "launchConfigurationName", is_optional: true },
    :launch_template => { kind: :property, name: "launchTemplate", is_optional: true },
    :lifecycle_hook_specification_list => { kind: :property, name: "lifecycleHookSpecificationList", is_optional: true },
    :load_balancer_names => { kind: :property, name: "loadBalancerNames", is_optional: true },
    :max_instance_lifetime => { kind: :property, name: "maxInstanceLifetime", is_optional: true },
    :metrics_collection => { kind: :property, name: "metricsCollection", is_optional: true },
    :mixed_instances_policy => { kind: :property, name: "mixedInstancesPolicy", is_optional: true },
    :new_instances_protected_from_scale_in => { kind: :property, name: "newInstancesProtectedFromScaleIn", is_optional: true },
    :notification_configuration => { kind: :property, name: "notificationConfiguration", is_optional: true },
    :notification_configurations => { kind: :property, name: "notificationConfigurations", is_optional: true },
    :placement_group => { kind: :property, name: "placementGroup", is_optional: true },
    :service_linked_role_arn => { kind: :property, name: "serviceLinkedRoleArn", is_optional: true },
    :skip_zonal_shift_validation => { kind: :property, name: "skipZonalShiftValidation", is_optional: true },
    :tags_raw => { kind: :property, name: "tagsRaw", is_optional: true },
    :target_group_arns => { kind: :property, name: "targetGroupArns", is_optional: true },
    :termination_policies => { kind: :property, name: "terminationPolicies", is_optional: true },
    :traffic_sources => { kind: :property, name: "trafficSources", is_optional: true },
    :vpc_zone_identifier => { kind: :property, name: "vpcZoneIdentifier", is_optional: true },
    :to_string => { kind: :method, name: "toString", is_optional: false },
    :with => { kind: :method, name: "with", is_optional: false },
    :override_logical_id => { kind: :method, name: "overrideLogicalId", is_optional: false },
    :add_deletion_override => { kind: :method, name: "addDeletionOverride", is_optional: false },
    :add_dependency => { kind: :method, name: "addDependency", is_optional: false },
    :add_depends_on => { kind: :method, name: "addDependsOn", is_optional: false },
    :add_metadata => { kind: :method, name: "addMetadata", is_optional: false },
    :add_override => { kind: :method, name: "addOverride", is_optional: false },
    :add_property_deletion_override => { kind: :method, name: "addPropertyDeletionOverride", is_optional: false },
    :add_property_override => { kind: :method, name: "addPropertyOverride", is_optional: false },
    :apply_cross_stack_reference_strength => { kind: :method, name: "applyCrossStackReferenceStrength", is_optional: false },
    :apply_removal_policy => { kind: :method, name: "applyRemovalPolicy", is_optional: false },
    :cfn_property_name => { kind: :method, name: "cfnPropertyName", is_optional: false },
    :get_att => { kind: :method, name: "getAtt", is_optional: false },
    :get_metadata => { kind: :method, name: "getMetadata", is_optional: false },
    :obtain_dependencies => { kind: :method, name: "obtainDependencies", is_optional: false },
    :obtain_resource_dependencies => { kind: :method, name: "obtainResourceDependencies", is_optional: false },
    :remove_dependency => { kind: :method, name: "removeDependency", is_optional: false },
    :render_properties => { kind: :method, name: "renderProperties", is_optional: false },
    :replace_dependency => { kind: :method, name: "replaceDependency", is_optional: false },
    :should_synthesize => { kind: :method, name: "shouldSynthesize", is_optional: false },
    :validate_properties => { kind: :method, name: "validateProperties", is_optional: false },
    :inspect => { kind: :method, name: "inspect", is_optional: false },
  }
end

Instance Method Details

#add_deletion_override(path) ⇒ void

This method returns an undefined value.

Syntactic sugar for addOverride(path, undefined).

Parameters:

  • path (String)

    The path of the value to delete.



749
750
751
752
# File 'autoscaling/cfn_auto_scaling_group.rb', line 749

def add_deletion_override(path)
  Jsii::Type.check_type(path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path")
  jsii_call_method("addDeletionOverride", [path])
end

#add_dependency(target) ⇒ void

This method returns an undefined value.

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters:



761
762
763
764
# File 'autoscaling/cfn_auto_scaling_group.rb', line 761

def add_dependency(target)
  Jsii::Type.check_type(target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5SZXNvdXJjZSJ9")), "target")
  jsii_call_method("addDependency", [target])
end

#add_depends_on(target) ⇒ void

Deprecated.

use addDependency

This method returns an undefined value.

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

Parameters:



771
772
773
774
# File 'autoscaling/cfn_auto_scaling_group.rb', line 771

def add_depends_on(target)
  Jsii::Type.check_type(target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5SZXNvdXJjZSJ9")), "target")
  jsii_call_method("addDependsOn", [target])
end

#add_metadata(key, value) ⇒ void

This method returns an undefined value.

Add a value to the CloudFormation Resource Metadata.



782
783
784
785
786
# File 'autoscaling/cfn_auto_scaling_group.rb', line 782

def (key, value)
  Jsii::Type.check_type(key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key")
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "value")
  jsii_call_method("addMetadata", [key, value])
end

#add_override(path, value) ⇒ void

This method returns an undefined value.

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use add_property_override or prefix path with "Properties." (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example,

# Example automatically generated from non-compiling source. May contain errors.
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides

"Properties": {
  "GlobalSecondaryIndexes": [
    {
      "Projection": {
        "NonKeyAttributes": [ "myattribute" ]
        ...
      }
      ...
    },
    {
      "ProjectionType": "INCLUDE"
      ...
    },
  ]
  ...
}

The value argument to add_override will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters:

  • path (String)
    • The path of the property, you can use dot notation to override values in complex types.
  • value (Object)
    • The value.


839
840
841
842
843
# File 'autoscaling/cfn_auto_scaling_group.rb', line 839

def add_override(path, value)
  Jsii::Type.check_type(path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path")
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "value")
  jsii_call_method("addOverride", [path, value])
end

#add_property_deletion_override(property_path) ⇒ void

This method returns an undefined value.

Adds an override that deletes the value of a property from the resource definition.

Parameters:

  • property_path (String)

    The path to the property.



849
850
851
852
# File 'autoscaling/cfn_auto_scaling_group.rb', line 849

def add_property_deletion_override(property_path)
  Jsii::Type.check_type(property_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "propertyPath")
  jsii_call_method("addPropertyDeletionOverride", [property_path])
end

#add_property_override(property_path, value) ⇒ void

This method returns an undefined value.

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters:

  • property_path (String)

    The path of the property.

  • value (Object)

    The value.



861
862
863
864
865
# File 'autoscaling/cfn_auto_scaling_group.rb', line 861

def add_property_override(property_path, value)
  Jsii::Type.check_type(property_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "propertyPath")
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "value")
  jsii_call_method("addPropertyOverride", [property_path, value])
end

#apply_cross_stack_reference_strength(strength) ⇒ void

This method returns an undefined value.

Sets the cross-stack reference strength for this resource.

When set, any cross-stack reference to this resource will use the specified strength instead of the global default from the consuming stack's context.

Parameters:



874
875
876
877
# File 'autoscaling/cfn_auto_scaling_group.rb', line 874

def apply_cross_stack_reference_strength(strength)
  Jsii::Type.check_type(strength, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZWZlcmVuY2VTdHJlbmd0aCJ9")), "strength")
  jsii_call_method("applyCrossStackReferenceStrength", [strength])
end

#apply_removal_policy(policy = nil, options = nil) ⇒ void

This method returns an undefined value.

Sets the deletion policy of the resource based on the removal policy specified.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:



896
897
898
899
900
901
# File 'autoscaling/cfn_auto_scaling_group.rb', line 896

def apply_removal_policy(policy = nil, options = nil)
  Jsii::Type.check_type(policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "policy") unless policy.nil?
  options = options.is_a?(Hash) ? ::AWSCDK::RemovalPolicyOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5T3B0aW9ucyJ9")), "options") unless options.nil?
  jsii_call_method("applyRemovalPolicy", [policy, options])
end

#attr_auto_scaling_group_arnString

The Amazon Resource Name (ARN) of the Auto Scaling group.

Returns:

  • (String)


229
230
231
# File 'autoscaling/cfn_auto_scaling_group.rb', line 229

def attr_auto_scaling_group_arn()
  jsii_get_property("attrAutoScalingGroupArn")
end

#auto_scaling_group_nameString?

The name of the Auto Scaling group.

This name must be unique per Region per account.

Returns:

  • (String, nil)


276
277
278
# File 'autoscaling/cfn_auto_scaling_group.rb', line 276

def auto_scaling_group_name()
  jsii_get_property("autoScalingGroupName")
end

#auto_scaling_group_name=(value) ⇒ Object



280
281
282
283
# File 'autoscaling/cfn_auto_scaling_group.rb', line 280

def auto_scaling_group_name=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "autoScalingGroupName") unless value.nil?
  jsii_set_property("autoScalingGroupName", value)
end

#auto_scaling_group_refAWSCDK::Interfaces::AWSAutoscaling::AutoScalingGroupReference

A reference to a AutoScalingGroup resource.



236
237
238
# File 'autoscaling/cfn_auto_scaling_group.rb', line 236

def auto_scaling_group_ref()
  jsii_get_property("autoScalingGroupRef")
end

#availability_zone_distributionAWSCDK::IResolvable, ...

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



288
289
290
# File 'autoscaling/cfn_auto_scaling_group.rb', line 288

def availability_zone_distribution()
  jsii_get_property("availabilityZoneDistribution")
end

#availability_zone_distribution=(value) ⇒ Object



292
293
294
295
296
# File 'autoscaling/cfn_auto_scaling_group.rb', line 292

def availability_zone_distribution=(value)
  value = value.is_a?(Hash) ? ::AWSCDK::Autoscaling::CfnAutoScalingGroup::AvailabilityZoneDistributionProperty.new(**value.transform_keys(&:to_sym)) : value
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hdXRvc2NhbGluZy5DZm5BdXRvU2NhbGluZ0dyb3VwLkF2YWlsYWJpbGl0eVpvbmVEaXN0cmlidXRpb25Qcm9wZXJ0eSJ9XX19")), "availabilityZoneDistribution") unless value.nil?
  jsii_set_property("availabilityZoneDistribution", value)
end

#availability_zone_idsArray<String>?

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

Returns:

  • (Array<String>, nil)


301
302
303
# File 'autoscaling/cfn_auto_scaling_group.rb', line 301

def availability_zone_ids()
  jsii_get_property("availabilityZoneIds")
end

#availability_zone_ids=(value) ⇒ Object



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

def availability_zone_ids=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "availabilityZoneIds") unless value.nil?
  jsii_set_property("availabilityZoneIds", value)
end

#availability_zone_impairment_policyAWSCDK::IResolvable, ...

The Availability Zone impairment policy for the Auto Scaling group.



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

def availability_zone_impairment_policy()
  jsii_get_property("availabilityZoneImpairmentPolicy")
end

#availability_zone_impairment_policy=(value) ⇒ Object



317
318
319
320
321
# File 'autoscaling/cfn_auto_scaling_group.rb', line 317

def availability_zone_impairment_policy=(value)
  value = value.is_a?(Hash) ? ::AWSCDK::Autoscaling::CfnAutoScalingGroup::AvailabilityZoneImpairmentPolicyProperty.new(**value.transform_keys(&:to_sym)) : value
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hdXRvc2NhbGluZy5DZm5BdXRvU2NhbGluZ0dyb3VwLkF2YWlsYWJpbGl0eVpvbmVJbXBhaXJtZW50UG9saWN5UHJvcGVydHkifV19fQ==")), "availabilityZoneImpairmentPolicy") unless value.nil?
  jsii_set_property("availabilityZoneImpairmentPolicy", value)
end

#availability_zonesArray<String>?

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

Returns:

  • (Array<String>, nil)


326
327
328
# File 'autoscaling/cfn_auto_scaling_group.rb', line 326

def availability_zones()
  jsii_get_property("availabilityZones")
end

#availability_zones=(value) ⇒ Object



330
331
332
333
# File 'autoscaling/cfn_auto_scaling_group.rb', line 330

def availability_zones=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "availabilityZones") unless value.nil?
  jsii_set_property("availabilityZones", value)
end

#capacity_rebalanceBoolean, ...

Indicates whether Capacity Rebalancing is enabled.

Returns:



338
339
340
# File 'autoscaling/cfn_auto_scaling_group.rb', line 338

def capacity_rebalance()
  jsii_get_property("capacityRebalance")
end

#capacity_rebalance=(value) ⇒ Object



342
343
344
345
# File 'autoscaling/cfn_auto_scaling_group.rb', line 342

def capacity_rebalance=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "capacityRebalance") unless value.nil?
  jsii_set_property("capacityRebalance", value)
end

#capacity_reservation_specificationAWSCDK::IResolvable, ...

The capacity reservation specification for the Auto Scaling group.



350
351
352
# File 'autoscaling/cfn_auto_scaling_group.rb', line 350

def capacity_reservation_specification()
  jsii_get_property("capacityReservationSpecification")
end

#capacity_reservation_specification=(value) ⇒ Object



354
355
356
357
358
# File 'autoscaling/cfn_auto_scaling_group.rb', line 354

def capacity_reservation_specification=(value)
  value = value.is_a?(Hash) ? ::AWSCDK::Autoscaling::CfnAutoScalingGroup::CapacityReservationSpecificationProperty.new(**value.transform_keys(&:to_sym)) : value
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hdXRvc2NhbGluZy5DZm5BdXRvU2NhbGluZ0dyb3VwLkNhcGFjaXR5UmVzZXJ2YXRpb25TcGVjaWZpY2F0aW9uUHJvcGVydHkifV19fQ==")), "capacityReservationSpecification") unless value.nil?
  jsii_set_property("capacityReservationSpecification", value)
end

#cfn_optionsAWSCDK::ICfnResourceOptions

Options for this resource, such as condition, update policy etc.



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

def cfn_options()
  jsii_get_property("cfnOptions")
end

#cfn_propertiesHash{String => Object}

Returns:

  • (Hash{String => Object})


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

def cfn_properties()
  jsii_get_property("cfnProperties")
end

#cfn_property_name(cdk_property_name) ⇒ String?

Parameters:

  • cdk_property_name (String)

Returns:

  • (String, nil)


905
906
907
908
# File 'autoscaling/cfn_auto_scaling_group.rb', line 905

def cfn_property_name(cdk_property_name)
  Jsii::Type.check_type(cdk_property_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cdkPropertyName")
  jsii_call_method("cfnPropertyName", [cdk_property_name])
end

#cfn_property_namesHash{String => String}

Returns:

  • (Hash{String => String})


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

def cfn_property_names()
  jsii_get_property("cfnPropertyNames")
end

#cfn_resource_typeString

AWS resource type.

Returns:

  • (String)


192
193
194
# File 'autoscaling/cfn_auto_scaling_group.rb', line 192

def cfn_resource_type()
  jsii_get_property("cfnResourceType")
end

#contextString?

Reserved.

Returns:

  • (String, nil)


363
364
365
# File 'autoscaling/cfn_auto_scaling_group.rb', line 363

def context()
  jsii_get_property("context")
end

#context=(value) ⇒ Object



367
368
369
370
# File 'autoscaling/cfn_auto_scaling_group.rb', line 367

def context=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "context") unless value.nil?
  jsii_set_property("context", value)
end

#cooldownString?

Only needed if you use simple scaling policies..

Returns:

  • (String, nil)


375
376
377
# File 'autoscaling/cfn_auto_scaling_group.rb', line 375

def cooldown()
  jsii_get_property("cooldown")
end

#cooldown=(value) ⇒ Object



379
380
381
382
# File 'autoscaling/cfn_auto_scaling_group.rb', line 379

def cooldown=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cooldown") unless value.nil?
  jsii_set_property("cooldown", value)
end

#creation_stackArray<String>

Returns:

  • (Array<String>)


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

def creation_stack()
  jsii_get_property("creationStack")
end

#default_instance_warmupNumeric?

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.

Returns:

  • (Numeric, nil)


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

def default_instance_warmup()
  jsii_get_property("defaultInstanceWarmup")
end

#default_instance_warmup=(value) ⇒ Object



391
392
393
394
# File 'autoscaling/cfn_auto_scaling_group.rb', line 391

def default_instance_warmup=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "defaultInstanceWarmup") unless value.nil?
  jsii_set_property("defaultInstanceWarmup", value)
end

#deletion_protectionString?

The deletion protection setting for the Auto Scaling group.

Returns:

  • (String, nil)


399
400
401
# File 'autoscaling/cfn_auto_scaling_group.rb', line 399

def deletion_protection()
  jsii_get_property("deletionProtection")
end

#deletion_protection=(value) ⇒ Object



403
404
405
406
# File 'autoscaling/cfn_auto_scaling_group.rb', line 403

def deletion_protection=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "deletionProtection") unless value.nil?
  jsii_set_property("deletionProtection", value)
end

#desired_capacityString?

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.

Returns:

  • (String, nil)


411
412
413
# File 'autoscaling/cfn_auto_scaling_group.rb', line 411

def desired_capacity()
  jsii_get_property("desiredCapacity")
end

#desired_capacity=(value) ⇒ Object



415
416
417
418
# File 'autoscaling/cfn_auto_scaling_group.rb', line 415

def desired_capacity=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "desiredCapacity") unless value.nil?
  jsii_set_property("desiredCapacity", value)
end

#desired_capacity_typeString?

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

Returns:

  • (String, nil)


423
424
425
# File 'autoscaling/cfn_auto_scaling_group.rb', line 423

def desired_capacity_type()
  jsii_get_property("desiredCapacityType")
end

#desired_capacity_type=(value) ⇒ Object



427
428
429
430
# File 'autoscaling/cfn_auto_scaling_group.rb', line 427

def desired_capacity_type=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "desiredCapacityType") unless value.nil?
  jsii_set_property("desiredCapacityType", value)
end

#envAWSCDK::Interfaces::ResourceEnvironment



197
198
199
# File 'autoscaling/cfn_auto_scaling_group.rb', line 197

def env()
  jsii_get_property("env")
end

#get_att(attribute_name, type_hint = nil) ⇒ AWSCDK::Reference

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters:

Returns:



918
919
920
921
922
# File 'autoscaling/cfn_auto_scaling_group.rb', line 918

def get_att(attribute_name, type_hint = nil)
  Jsii::Type.check_type(attribute_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "attributeName")
  Jsii::Type.check_type(type_hint, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZXNvbHV0aW9uVHlwZUhpbnQifQ==")), "typeHint") unless type_hint.nil?
  jsii_call_method("getAtt", [attribute_name, type_hint])
end

#get_metadata(key) ⇒ Object

Retrieve a value value from the CloudFormation Resource Metadata.



929
930
931
932
# File 'autoscaling/cfn_auto_scaling_group.rb', line 929

def (key)
  Jsii::Type.check_type(key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key")
  jsii_call_method("getMetadata", [key])
end

#health_check_grace_periodNumeric?

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.

Returns:

  • (Numeric, nil)


435
436
437
# File 'autoscaling/cfn_auto_scaling_group.rb', line 435

def health_check_grace_period()
  jsii_get_property("healthCheckGracePeriod")
end

#health_check_grace_period=(value) ⇒ Object



439
440
441
442
# File 'autoscaling/cfn_auto_scaling_group.rb', line 439

def health_check_grace_period=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "healthCheckGracePeriod") unless value.nil?
  jsii_set_property("healthCheckGracePeriod", value)
end

#health_check_typeString?

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

Returns:

  • (String, nil)


447
448
449
# File 'autoscaling/cfn_auto_scaling_group.rb', line 447

def health_check_type()
  jsii_get_property("healthCheckType")
end

#health_check_type=(value) ⇒ Object



451
452
453
454
# File 'autoscaling/cfn_auto_scaling_group.rb', line 451

def health_check_type=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "healthCheckType") unless value.nil?
  jsii_set_property("healthCheckType", value)
end

#inspect(inspector) ⇒ void

This method returns an undefined value.

Examines the CloudFormation resource and discloses attributes.

Parameters:



999
1000
1001
1002
# File 'autoscaling/cfn_auto_scaling_group.rb', line 999

def inspect(inspector)
  Jsii::Type.check_type(inspector, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5UcmVlSW5zcGVjdG9yIn0=")), "inspector")
  jsii_call_method("inspect", [inspector])
end

#instance_idString?

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

Returns:

  • (String, nil)


459
460
461
# File 'autoscaling/cfn_auto_scaling_group.rb', line 459

def instance_id()
  jsii_get_property("instanceId")
end

#instance_id=(value) ⇒ Object



463
464
465
466
# File 'autoscaling/cfn_auto_scaling_group.rb', line 463

def instance_id=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instanceId") unless value.nil?
  jsii_set_property("instanceId", value)
end

#instance_lifecycle_policyAWSCDK::IResolvable, ...

The instance lifecycle policy for the Auto Scaling group.



471
472
473
# File 'autoscaling/cfn_auto_scaling_group.rb', line 471

def instance_lifecycle_policy()
  jsii_get_property("instanceLifecyclePolicy")
end

#instance_lifecycle_policy=(value) ⇒ Object



475
476
477
478
479
# File 'autoscaling/cfn_auto_scaling_group.rb', line 475

def instance_lifecycle_policy=(value)
  value = value.is_a?(Hash) ? ::AWSCDK::Autoscaling::CfnAutoScalingGroup::InstanceLifecyclePolicyProperty.new(**value.transform_keys(&:to_sym)) : value
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hdXRvc2NhbGluZy5DZm5BdXRvU2NhbGluZ0dyb3VwLkluc3RhbmNlTGlmZWN5Y2xlUG9saWN5UHJvcGVydHkifV19fQ==")), "instanceLifecyclePolicy") unless value.nil?
  jsii_set_property("instanceLifecyclePolicy", value)
end

#instance_maintenance_policyAWSCDK::IResolvable, ...

An instance maintenance policy.



484
485
486
# File 'autoscaling/cfn_auto_scaling_group.rb', line 484

def instance_maintenance_policy()
  jsii_get_property("instanceMaintenancePolicy")
end

#instance_maintenance_policy=(value) ⇒ Object



488
489
490
491
492
# File 'autoscaling/cfn_auto_scaling_group.rb', line 488

def instance_maintenance_policy=(value)
  value = value.is_a?(Hash) ? ::AWSCDK::Autoscaling::CfnAutoScalingGroup::InstanceMaintenancePolicyProperty.new(**value.transform_keys(&:to_sym)) : value
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hdXRvc2NhbGluZy5DZm5BdXRvU2NhbGluZ0dyb3VwLkluc3RhbmNlTWFpbnRlbmFuY2VQb2xpY3lQcm9wZXJ0eSJ9XX19")), "instanceMaintenancePolicy") unless value.nil?
  jsii_set_property("instanceMaintenancePolicy", value)
end

#launch_configuration_nameString?

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

Returns:

  • (String, nil)


497
498
499
# File 'autoscaling/cfn_auto_scaling_group.rb', line 497

def launch_configuration_name()
  jsii_get_property("launchConfigurationName")
end

#launch_configuration_name=(value) ⇒ Object



501
502
503
504
# File 'autoscaling/cfn_auto_scaling_group.rb', line 501

def launch_configuration_name=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "launchConfigurationName") unless value.nil?
  jsii_set_property("launchConfigurationName", value)
end

#launch_templateAWSCDK::IResolvable, ...

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



509
510
511
# File 'autoscaling/cfn_auto_scaling_group.rb', line 509

def launch_template()
  jsii_get_property("launchTemplate")
end

#launch_template=(value) ⇒ Object



513
514
515
516
517
# File 'autoscaling/cfn_auto_scaling_group.rb', line 513

def launch_template=(value)
  value = value.is_a?(Hash) ? ::AWSCDK::Autoscaling::CfnAutoScalingGroup::LaunchTemplateSpecificationProperty.new(**value.transform_keys(&:to_sym)) : value
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hdXRvc2NhbGluZy5DZm5BdXRvU2NhbGluZ0dyb3VwLkxhdW5jaFRlbXBsYXRlU3BlY2lmaWNhdGlvblByb3BlcnR5In1dfX0=")), "launchTemplate") unless value.nil?
  jsii_set_property("launchTemplate", value)
end

#lifecycle_hook_specification_listAWSCDK::IResolvable, ...

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



522
523
524
# File 'autoscaling/cfn_auto_scaling_group.rb', line 522

def lifecycle_hook_specification_list()
  jsii_get_property("lifecycleHookSpecificationList")
end

#lifecycle_hook_specification_list=(value) ⇒ Object



526
527
528
529
# File 'autoscaling/cfn_auto_scaling_group.rb', line 526

def lifecycle_hook_specification_list=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXV0b3NjYWxpbmcuQ2ZuQXV0b1NjYWxpbmdHcm91cC5MaWZlY3ljbGVIb29rU3BlY2lmaWNhdGlvblByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "lifecycleHookSpecificationList") unless value.nil?
  jsii_set_property("lifecycleHookSpecificationList", value)
end

#load_balancer_namesArray<String>?

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

Returns:

  • (Array<String>, nil)


534
535
536
# File 'autoscaling/cfn_auto_scaling_group.rb', line 534

def load_balancer_names()
  jsii_get_property("loadBalancerNames")
end

#load_balancer_names=(value) ⇒ Object



538
539
540
541
# File 'autoscaling/cfn_auto_scaling_group.rb', line 538

def load_balancer_names=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "loadBalancerNames") unless value.nil?
  jsii_set_property("loadBalancerNames", value)
end

#logical_idString

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use override_logical_id(new_logical_id).

Returns:

  • (String)


149
150
151
# File 'autoscaling/cfn_auto_scaling_group.rb', line 149

def logical_id()
  jsii_get_property("logicalId")
end

#max_instance_lifetimeNumeric?

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

Returns:

  • (Numeric, nil)


546
547
548
# File 'autoscaling/cfn_auto_scaling_group.rb', line 546

def max_instance_lifetime()
  jsii_get_property("maxInstanceLifetime")
end

#max_instance_lifetime=(value) ⇒ Object



550
551
552
553
# File 'autoscaling/cfn_auto_scaling_group.rb', line 550

def max_instance_lifetime=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxInstanceLifetime") unless value.nil?
  jsii_set_property("maxInstanceLifetime", value)
end

#max_sizeString

The maximum size of the group.

Returns:

  • (String)


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

def max_size()
  jsii_get_property("maxSize")
end

#max_size=(value) ⇒ Object



254
255
256
257
# File 'autoscaling/cfn_auto_scaling_group.rb', line 254

def max_size=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "maxSize")
  jsii_set_property("maxSize", value)
end

#metrics_collectionAWSCDK::IResolvable, ...

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



558
559
560
# File 'autoscaling/cfn_auto_scaling_group.rb', line 558

def metrics_collection()
  jsii_get_property("metricsCollection")
end

#metrics_collection=(value) ⇒ Object



562
563
564
565
# File 'autoscaling/cfn_auto_scaling_group.rb', line 562

def metrics_collection=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXV0b3NjYWxpbmcuQ2ZuQXV0b1NjYWxpbmdHcm91cC5NZXRyaWNzQ29sbGVjdGlvblByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "metricsCollection") unless value.nil?
  jsii_set_property("metricsCollection", value)
end

#min_sizeString

The minimum size of the group.

Returns:

  • (String)


262
263
264
# File 'autoscaling/cfn_auto_scaling_group.rb', line 262

def min_size()
  jsii_get_property("minSize")
end

#min_size=(value) ⇒ Object



266
267
268
269
# File 'autoscaling/cfn_auto_scaling_group.rb', line 266

def min_size=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "minSize")
  jsii_set_property("minSize", value)
end

#mixed_instances_policyAWSCDK::IResolvable, ...

An embedded object that specifies a mixed instances policy.



570
571
572
# File 'autoscaling/cfn_auto_scaling_group.rb', line 570

def mixed_instances_policy()
  jsii_get_property("mixedInstancesPolicy")
end

#mixed_instances_policy=(value) ⇒ Object



574
575
576
577
578
# File 'autoscaling/cfn_auto_scaling_group.rb', line 574

def mixed_instances_policy=(value)
  value = value.is_a?(Hash) ? ::AWSCDK::Autoscaling::CfnAutoScalingGroup::MixedInstancesPolicyProperty.new(**value.transform_keys(&:to_sym)) : value
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hdXRvc2NhbGluZy5DZm5BdXRvU2NhbGluZ0dyb3VwLk1peGVkSW5zdGFuY2VzUG9saWN5UHJvcGVydHkifV19fQ==")), "mixedInstancesPolicy") unless value.nil?
  jsii_set_property("mixedInstancesPolicy", value)
end

#new_instances_protected_from_scale_inBoolean, ...

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

Returns:



583
584
585
# File 'autoscaling/cfn_auto_scaling_group.rb', line 583

def new_instances_protected_from_scale_in()
  jsii_get_property("newInstancesProtectedFromScaleIn")
end

#new_instances_protected_from_scale_in=(value) ⇒ Object



587
588
589
590
# File 'autoscaling/cfn_auto_scaling_group.rb', line 587

def new_instances_protected_from_scale_in=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "newInstancesProtectedFromScaleIn") unless value.nil?
  jsii_set_property("newInstancesProtectedFromScaleIn", value)
end

#nodeConstructs::Node

The tree node.

Returns:

  • (Constructs::Node)


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

def node()
  jsii_get_property("node")
end

#notification_configurationAWSCDK::IResolvable, ...

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.



596
597
598
# File 'autoscaling/cfn_auto_scaling_group.rb', line 596

def notification_configuration()
  jsii_get_property("notificationConfiguration")
end

#notification_configuration=(value) ⇒ Object



600
601
602
603
604
# File 'autoscaling/cfn_auto_scaling_group.rb', line 600

def notification_configuration=(value)
  value = value.is_a?(Hash) ? ::AWSCDK::Autoscaling::CfnAutoScalingGroup::NotificationConfigurationProperty.new(**value.transform_keys(&:to_sym)) : value
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hdXRvc2NhbGluZy5DZm5BdXRvU2NhbGluZ0dyb3VwLk5vdGlmaWNhdGlvbkNvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "notificationConfiguration") unless value.nil?
  jsii_set_property("notificationConfiguration", value)
end

#notification_configurationsAWSCDK::IResolvable, ...

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



609
610
611
# File 'autoscaling/cfn_auto_scaling_group.rb', line 609

def notification_configurations()
  jsii_get_property("notificationConfigurations")
end

#notification_configurations=(value) ⇒ Object



613
614
615
616
# File 'autoscaling/cfn_auto_scaling_group.rb', line 613

def notification_configurations=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXV0b3NjYWxpbmcuQ2ZuQXV0b1NjYWxpbmdHcm91cC5Ob3RpZmljYXRpb25Db25maWd1cmF0aW9uUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "notificationConfigurations") unless value.nil?
  jsii_set_property("notificationConfigurations", value)
end

#obtain_dependenciesArray<AWSCDK::CfnResource, AWSCDK::Stack>

Retrieves an array of resources this resource depends on.

This assembles dependencies on resources across stacks (including nested stacks) automatically.

Returns:



940
941
942
# File 'autoscaling/cfn_auto_scaling_group.rb', line 940

def obtain_dependencies()
  jsii_call_method("obtainDependencies", [])
end

#obtain_resource_dependenciesArray<AWSCDK::CfnResource>

Get a shallow copy of dependencies between this resource and other resources in the same stack.

Returns:



947
948
949
# File 'autoscaling/cfn_auto_scaling_group.rb', line 947

def obtain_resource_dependencies()
  jsii_call_method("obtainResourceDependencies", [])
end

#override_logical_id(new_logical_id) ⇒ void

This method returns an undefined value.

Overrides the auto-generated logical ID with a specific ID.

Parameters:

  • new_logical_id (String)

    The new logical ID to use for this stack element.



740
741
742
743
# File 'autoscaling/cfn_auto_scaling_group.rb', line 740

def override_logical_id(new_logical_id)
  Jsii::Type.check_type(new_logical_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "newLogicalId")
  jsii_call_method("overrideLogicalId", [new_logical_id])
end

#placement_groupString?

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

Returns:

  • (String, nil)


621
622
623
# File 'autoscaling/cfn_auto_scaling_group.rb', line 621

def placement_group()
  jsii_get_property("placementGroup")
end

#placement_group=(value) ⇒ Object



625
626
627
628
# File 'autoscaling/cfn_auto_scaling_group.rb', line 625

def placement_group=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "placementGroup") unless value.nil?
  jsii_set_property("placementGroup", value)
end

#refString

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

Returns:

  • (String)


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

def ref()
  jsii_get_property("ref")
end

#remove_dependency(target) ⇒ void

This method returns an undefined value.

Indicates that this resource no longer depends on another resource.

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

Parameters:



958
959
960
961
# File 'autoscaling/cfn_auto_scaling_group.rb', line 958

def remove_dependency(target)
  Jsii::Type.check_type(target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5SZXNvdXJjZSJ9")), "target")
  jsii_call_method("removeDependency", [target])
end

#render_properties(props) ⇒ Hash{String => Object}

Parameters:

  • props (Hash{String => Object})

Returns:

  • (Hash{String => Object})


965
966
967
968
# File 'autoscaling/cfn_auto_scaling_group.rb', line 965

def render_properties(props)
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6ImFueSJ9LCJraW5kIjoibWFwIn19")), "props")
  jsii_call_method("renderProperties", [props])
end

#replace_dependency(target, new_target) ⇒ void

This method returns an undefined value.

Replaces one dependency with another.

Parameters:



975
976
977
978
979
# File 'autoscaling/cfn_auto_scaling_group.rb', line 975

def replace_dependency(target, new_target)
  Jsii::Type.check_type(target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5SZXNvdXJjZSJ9")), "target")
  Jsii::Type.check_type(new_target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5SZXNvdXJjZSJ9")), "newTarget")
  jsii_call_method("replaceDependency", [target, new_target])
end

#service_linked_role_arnString?

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

Returns:

  • (String, nil)


633
634
635
# File 'autoscaling/cfn_auto_scaling_group.rb', line 633

def service_linked_role_arn()
  jsii_get_property("serviceLinkedRoleArn")
end

#service_linked_role_arn=(value) ⇒ Object



637
638
639
640
# File 'autoscaling/cfn_auto_scaling_group.rb', line 637

def service_linked_role_arn=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serviceLinkedRoleArn") unless value.nil?
  jsii_set_property("serviceLinkedRoleArn", value)
end

#should_synthesizeBoolean

Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.

Returns:

  • (Boolean)

    true if the resource should be included or false is the resource should be omitted.



984
985
986
# File 'autoscaling/cfn_auto_scaling_group.rb', line 984

def should_synthesize()
  jsii_call_method("shouldSynthesize", [])
end

#skip_zonal_shift_validationBoolean, ...

Returns:



643
644
645
# File 'autoscaling/cfn_auto_scaling_group.rb', line 643

def skip_zonal_shift_validation()
  jsii_get_property("skipZonalShiftValidation")
end

#skip_zonal_shift_validation=(value) ⇒ Object



647
648
649
650
# File 'autoscaling/cfn_auto_scaling_group.rb', line 647

def skip_zonal_shift_validation=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "skipZonalShiftValidation") unless value.nil?
  jsii_set_property("skipZonalShiftValidation", value)
end

#stackAWSCDK::Stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

Returns:



158
159
160
# File 'autoscaling/cfn_auto_scaling_group.rb', line 158

def stack()
  jsii_get_property("stack")
end

#tagsAWSCDK::TagManager

Tag Manager which manages the tags for this resource.

Returns:



243
244
245
# File 'autoscaling/cfn_auto_scaling_group.rb', line 243

def tags()
  jsii_get_property("tags")
end

#tags_rawArray<AWSCDK::Autoscaling::CfnAutoScalingGroup::TagPropertyProperty>?

One or more tags.



655
656
657
# File 'autoscaling/cfn_auto_scaling_group.rb', line 655

def tags_raw()
  jsii_get_property("tagsRaw")
end

#tags_raw=(value) ⇒ Object



659
660
661
662
663
# File 'autoscaling/cfn_auto_scaling_group.rb', line 659

def tags_raw=(value)
  value = value.is_a?(Array) ? value.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::Autoscaling::CfnAutoScalingGroup::TagPropertyProperty.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : value
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hdXRvc2NhbGluZy5DZm5BdXRvU2NhbGluZ0dyb3VwLlRhZ1Byb3BlcnR5UHJvcGVydHkifSwia2luZCI6ImFycmF5In19")), "tagsRaw") unless value.nil?
  jsii_set_property("tagsRaw", value)
end

#target_group_arnsArray<String>?

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

Returns:

  • (Array<String>, nil)


668
669
670
# File 'autoscaling/cfn_auto_scaling_group.rb', line 668

def target_group_arns()
  jsii_get_property("targetGroupArns")
end

#target_group_arns=(value) ⇒ Object



672
673
674
675
# File 'autoscaling/cfn_auto_scaling_group.rb', line 672

def target_group_arns=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "targetGroupArns") unless value.nil?
  jsii_set_property("targetGroupArns", value)
end

#termination_policiesArray<String>?

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

Returns:

  • (Array<String>, nil)


680
681
682
# File 'autoscaling/cfn_auto_scaling_group.rb', line 680

def termination_policies()
  jsii_get_property("terminationPolicies")
end

#termination_policies=(value) ⇒ Object



684
685
686
687
# File 'autoscaling/cfn_auto_scaling_group.rb', line 684

def termination_policies=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "terminationPolicies") unless value.nil?
  jsii_set_property("terminationPolicies", value)
end

#to_stringString

Returns a string representation of this construct.

Returns:

  • (String)

    a string representation of this resource



716
717
718
# File 'autoscaling/cfn_auto_scaling_group.rb', line 716

def to_string()
  jsii_call_method("toString", [])
end

#traffic_sourcesAWSCDK::IResolvable, ...

The traffic sources associated with this Auto Scaling group.



692
693
694
# File 'autoscaling/cfn_auto_scaling_group.rb', line 692

def traffic_sources()
  jsii_get_property("trafficSources")
end

#traffic_sources=(value) ⇒ Object



696
697
698
699
# File 'autoscaling/cfn_auto_scaling_group.rb', line 696

def traffic_sources=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXV0b3NjYWxpbmcuQ2ZuQXV0b1NjYWxpbmdHcm91cC5UcmFmZmljU291cmNlSWRlbnRpZmllclByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "trafficSources") unless value.nil?
  jsii_set_property("trafficSources", value)
end

#updated_properitesHash{String => Object}

Deprecated.

use updatedProperties Return properties modified after initiation Resources that expose mutable properties should override this function to collect and return the properties object for this resource.

Deprecated.

Returns:

  • (Hash{String => Object})


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

def updated_properites()
  jsii_get_property("updatedProperites")
end

#updated_propertiesHash{String => Object}

Return properties modified after initiation.

Resources that expose mutable properties should override this function to collect and return the properties object for this resource.

Returns:

  • (Hash{String => Object})


215
216
217
# File 'autoscaling/cfn_auto_scaling_group.rb', line 215

def updated_properties()
  jsii_get_property("updatedProperties")
end

#validate_properties(_properties) ⇒ void

This method returns an undefined value.

Parameters:

  • _properties (Object)


990
991
992
993
# File 'autoscaling/cfn_auto_scaling_group.rb', line 990

def validate_properties(_properties)
  Jsii::Type.check_type(_properties, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "_properties")
  jsii_call_method("validateProperties", [_properties])
end

#vpc_zone_identifierArray<String>?

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

Returns:

  • (Array<String>, nil)


704
705
706
# File 'autoscaling/cfn_auto_scaling_group.rb', line 704

def vpc_zone_identifier()
  jsii_get_property("vpcZoneIdentifier")
end

#vpc_zone_identifier=(value) ⇒ Object



708
709
710
711
# File 'autoscaling/cfn_auto_scaling_group.rb', line 708

def vpc_zone_identifier=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "vpcZoneIdentifier") unless value.nil?
  jsii_set_property("vpcZoneIdentifier", value)
end

#with(*mixins) ⇒ Constructs::IConstruct

Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.

Parameters:

  • mixins (Array<Constructs::IMixin>)

Returns:

  • (Constructs::IConstruct)


729
730
731
732
733
734
# File 'autoscaling/cfn_auto_scaling_group.rb', line 729

def with(*mixins)
  mixins.each_with_index do |item, index|
    Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]")
  end
  jsii_call_method("with", [*mixins])
end