Class: AWSCDK::EC2::CfnSpotFleet::FleetLaunchTemplateSpecificationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnSpotFleet::FleetLaunchTemplateSpecificationProperty
- Defined in:
- ec2/cfn_spot_fleet.rb
Overview
Specifies the launch template to be used by the Spot Fleet request for configuring Amazon EC2 instances.
You must specify the following:
- The ID or the name of the launch template, but not both.
- The version of the launch template.
FleetLaunchTemplateSpecification is a property of the AWS::EC2::SpotFleet resource.
For information about creating a launch template, see AWS::EC2::LaunchTemplate and Create a launch template in the Amazon EC2 User Guide .
For examples of launch templates, see Examples .
Instance Attribute Summary collapse
-
#launch_template_id ⇒ String?
readonly
The ID of the launch template.
-
#launch_template_name ⇒ String?
readonly
The name of the launch template.
-
#version ⇒ String
readonly
The version number of the launch template.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(version:, launch_template_id: nil, launch_template_name: nil) ⇒ FleetLaunchTemplateSpecificationProperty
constructor
A new instance of FleetLaunchTemplateSpecificationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(version:, launch_template_id: nil, launch_template_name: nil) ⇒ FleetLaunchTemplateSpecificationProperty
Returns a new instance of FleetLaunchTemplateSpecificationProperty.
1020 1021 1022 1023 1024 1025 1026 1027 |
# File 'ec2/cfn_spot_fleet.rb', line 1020 def initialize(version:, launch_template_id: nil, launch_template_name: nil) @version = version Jsii::Type.check_type(@version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "version") @launch_template_id = launch_template_id Jsii::Type.check_type(@launch_template_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "launchTemplateId") unless @launch_template_id.nil? @launch_template_name = launch_template_name Jsii::Type.check_type(@launch_template_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "launchTemplateName") unless @launch_template_name.nil? end |
Instance Attribute Details
#launch_template_id ⇒ String? (readonly)
The ID of the launch template.
You must specify the LaunchTemplateId or the LaunchTemplateName , but not both.
1042 1043 1044 |
# File 'ec2/cfn_spot_fleet.rb', line 1042 def launch_template_id @launch_template_id end |
#launch_template_name ⇒ String? (readonly)
The name of the launch template.
You must specify the LaunchTemplateName or the LaunchTemplateId , but not both.
1049 1050 1051 |
# File 'ec2/cfn_spot_fleet.rb', line 1049 def launch_template_name @launch_template_name end |
#version ⇒ String (readonly)
The version number of the launch template.
Specifying $Latest or $Default for the template version number is not supported. However, you can specify LatestVersionNumber or DefaultVersionNumber using the Fn::GetAtt intrinsic function. For more information, see Fn::GetAtt .
1035 1036 1037 |
# File 'ec2/cfn_spot_fleet.rb', line 1035 def version @version end |
Class Method Details
.jsii_properties ⇒ Object
1051 1052 1053 1054 1055 1056 1057 |
# File 'ec2/cfn_spot_fleet.rb', line 1051 def self.jsii_properties { :version => "version", :launch_template_id => "launchTemplateId", :launch_template_name => "launchTemplateName", } end |
Instance Method Details
#to_jsii ⇒ Object
1059 1060 1061 1062 1063 1064 1065 1066 1067 |
# File 'ec2/cfn_spot_fleet.rb', line 1059 def to_jsii result = {} result.merge!({ "version" => @version, "launchTemplateId" => @launch_template_id, "launchTemplateName" => @launch_template_name, }) result.compact end |