Class: AWSCDK::Autoscaling::CfnAutoScalingGroup::LaunchTemplateProperty

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

Overview

Use this structure to specify the launch templates and instance types (overrides) for a mixed instances policy.

LaunchTemplate is a property of the AWS::AutoScaling::AutoScalingGroup MixedInstancesPolicy property type.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(launch_template_specification:, overrides: nil) ⇒ LaunchTemplateProperty

Returns a new instance of LaunchTemplateProperty.

Parameters:



2125
2126
2127
2128
2129
2130
# File 'autoscaling/cfn_auto_scaling_group.rb', line 2125

def initialize(launch_template_specification:, overrides: nil)
  @launch_template_specification = launch_template_specification.is_a?(Hash) ? ::AWSCDK::Autoscaling::CfnAutoScalingGroup::LaunchTemplateSpecificationProperty.new(**launch_template_specification.transform_keys(&:to_sym)) : launch_template_specification
  Jsii::Type.check_type(@launch_template_specification, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hdXRvc2NhbGluZy5DZm5BdXRvU2NhbGluZ0dyb3VwLkxhdW5jaFRlbXBsYXRlU3BlY2lmaWNhdGlvblByb3BlcnR5In1dfX0=")), "launchTemplateSpecification")
  @overrides = overrides
  Jsii::Type.check_type(@overrides, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXV0b3NjYWxpbmcuQ2ZuQXV0b1NjYWxpbmdHcm91cC5MYXVuY2hUZW1wbGF0ZU92ZXJyaWRlc1Byb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "overrides") unless @overrides.nil?
end

Instance Attribute Details

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

Any properties that you specify override the same properties in the launch template.



2141
2142
2143
# File 'autoscaling/cfn_auto_scaling_group.rb', line 2141

def overrides
  @overrides
end

Class Method Details

.jsii_propertiesObject



2143
2144
2145
2146
2147
2148
# File 'autoscaling/cfn_auto_scaling_group.rb', line 2143

def self.jsii_properties
  {
    :launch_template_specification => "launchTemplateSpecification",
    :overrides => "overrides",
  }
end

Instance Method Details

#to_jsiiObject



2150
2151
2152
2153
2154
2155
2156
2157
# File 'autoscaling/cfn_auto_scaling_group.rb', line 2150

def to_jsii
  result = {}
  result.merge!({
    "launchTemplateSpecification" => @launch_template_specification,
    "overrides" => @overrides,
  })
  result.compact
end