Class: AWSCDK::EC2::CfnSpotFleet::LaunchTemplateConfigProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ec2/cfn_spot_fleet.rb

Overview

Specifies a launch template and overrides.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of LaunchTemplateConfigProperty.

Parameters:



1793
1794
1795
1796
1797
1798
# File 'ec2/cfn_spot_fleet.rb', line 1793

def initialize(launch_template_specification: nil, overrides: nil)
  @launch_template_specification = launch_template_specification.is_a?(Hash) ? ::AWSCDK::EC2::CfnSpotFleet::FleetLaunchTemplateSpecificationProperty.new(**launch_template_specification.transform_keys(&:to_sym)) : launch_template_specification
  Jsii::Type.check_type(@launch_template_specification, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuQ2ZuU3BvdEZsZWV0LkZsZWV0TGF1bmNoVGVtcGxhdGVTcGVjaWZpY2F0aW9uUHJvcGVydHkifV19fQ==")), "launchTemplateSpecification") unless @launch_template_specification.nil?
  @overrides = overrides
  Jsii::Type.check_type(@overrides, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkNmblNwb3RGbGVldC5MYXVuY2hUZW1wbGF0ZU92ZXJyaWRlc1Byb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "overrides") unless @overrides.nil?
end

Instance Attribute Details

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

The launch template to use.

Make sure that the launch template does not contain the NetworkInterfaceId parameter because you can't specify a network interface ID in a Spot Fleet.



1806
1807
1808
# File 'ec2/cfn_spot_fleet.rb', line 1806

def launch_template_specification
  @launch_template_specification
end

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

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



1811
1812
1813
# File 'ec2/cfn_spot_fleet.rb', line 1811

def overrides
  @overrides
end

Class Method Details

.jsii_propertiesObject



1813
1814
1815
1816
1817
1818
# File 'ec2/cfn_spot_fleet.rb', line 1813

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

Instance Method Details

#to_jsiiObject



1820
1821
1822
1823
1824
1825
1826
1827
# File 'ec2/cfn_spot_fleet.rb', line 1820

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