Class: AWSCDK::EC2::CfnEC2Fleet::FleetLaunchTemplateSpecificationRequestProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnEC2Fleet::FleetLaunchTemplateSpecificationRequestProperty
- Defined in:
- ec2/cfn_ec2_fleet.rb
Overview
Specifies the launch template to be used by the EC2 Fleet 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.
FleetLaunchTemplateSpecificationRequest is a property of the FleetLaunchTemplateConfigRequest property type.
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.
- #launch_template_specification_user_data ⇒ String? readonly
-
#version ⇒ String
readonly
The launch template version number,
$Latest, or$Default.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(version:, launch_template_id: nil, launch_template_name: nil, launch_template_specification_user_data: nil) ⇒ FleetLaunchTemplateSpecificationRequestProperty
constructor
A new instance of FleetLaunchTemplateSpecificationRequestProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(version:, launch_template_id: nil, launch_template_name: nil, launch_template_specification_user_data: nil) ⇒ FleetLaunchTemplateSpecificationRequestProperty
Returns a new instance of FleetLaunchTemplateSpecificationRequestProperty.
1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 |
# File 'ec2/cfn_ec2_fleet.rb', line 1461 def initialize(version:, launch_template_id: nil, launch_template_name: nil, launch_template_specification_user_data: 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? @launch_template_specification_user_data = launch_template_specification_user_data Jsii::Type.check_type(@launch_template_specification_user_data, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "launchTemplateSpecificationUserData") unless @launch_template_specification_user_data.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.
1487 1488 1489 |
# File 'ec2/cfn_ec2_fleet.rb', line 1487 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.
1494 1495 1496 |
# File 'ec2/cfn_ec2_fleet.rb', line 1494 def launch_template_name @launch_template_name end |
#launch_template_specification_user_data ⇒ String? (readonly)
1497 1498 1499 |
# File 'ec2/cfn_ec2_fleet.rb', line 1497 def launch_template_specification_user_data @launch_template_specification_user_data end |
#version ⇒ String (readonly)
The launch template version number, $Latest , or $Default . You must specify a value, otherwise the request fails.
If the value is $Latest , Amazon EC2 uses the latest version of the launch template.
If the value is $Default , Amazon EC2 uses the default version of the launch template.
1480 1481 1482 |
# File 'ec2/cfn_ec2_fleet.rb', line 1480 def version @version end |
Class Method Details
.jsii_properties ⇒ Object
1499 1500 1501 1502 1503 1504 1505 1506 |
# File 'ec2/cfn_ec2_fleet.rb', line 1499 def self.jsii_properties { :version => "version", :launch_template_id => "launchTemplateId", :launch_template_name => "launchTemplateName", :launch_template_specification_user_data => "launchTemplateSpecificationUserData", } end |
Instance Method Details
#to_jsii ⇒ Object
1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 |
# File 'ec2/cfn_ec2_fleet.rb', line 1508 def to_jsii result = {} result.merge!({ "version" => @version, "launchTemplateId" => @launch_template_id, "launchTemplateName" => @launch_template_name, "launchTemplateSpecificationUserData" => @launch_template_specification_user_data, }) result.compact end |