Class: AWSCDK::EC2::CfnLaunchTemplateProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnLaunchTemplateProps
- Defined in:
- ec2/cfn_launch_template_props.rb
Overview
Properties for defining a CfnLaunchTemplate.
Instance Attribute Summary collapse
-
#launch_template_data ⇒ AWSCDK::IResolvable, AWSCDK::EC2::CfnLaunchTemplate::LaunchTemplateDataProperty
readonly
The information for the launch template.
-
#launch_template_name ⇒ String?
readonly
A name for the launch template.
-
#tag_specifications ⇒ AWSCDK::IResolvable, ...
readonly
The tags to apply to the launch template on creation.
-
#version_description ⇒ String?
readonly
A description for the first version of the launch template.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(launch_template_data:, launch_template_name: nil, tag_specifications: nil, version_description: nil) ⇒ CfnLaunchTemplateProps
constructor
A new instance of CfnLaunchTemplateProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(launch_template_data:, launch_template_name: nil, tag_specifications: nil, version_description: nil) ⇒ CfnLaunchTemplateProps
Returns a new instance of CfnLaunchTemplateProps.
13 14 15 16 17 18 19 20 21 22 |
# File 'ec2/cfn_launch_template_props.rb', line 13 def initialize(launch_template_data:, launch_template_name: nil, tag_specifications: nil, version_description: nil) @launch_template_data = launch_template_data.is_a?(Hash) ? ::AWSCDK::EC2::CfnLaunchTemplate::LaunchTemplateDataProperty.new(**launch_template_data.transform_keys(&:to_sym)) : launch_template_data Jsii::Type.check_type(@launch_template_data, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuQ2ZuTGF1bmNoVGVtcGxhdGUuTGF1bmNoVGVtcGxhdGVEYXRhUHJvcGVydHkifV19fQ==")), "launchTemplateData") @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? @tag_specifications = tag_specifications Jsii::Type.check_type(@tag_specifications, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkNmbkxhdW5jaFRlbXBsYXRlLkxhdW5jaFRlbXBsYXRlVGFnU3BlY2lmaWNhdGlvblByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "tagSpecifications") unless @tag_specifications.nil? @version_description = version_description Jsii::Type.check_type(@version_description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "versionDescription") unless @version_description.nil? end |
Instance Attribute Details
#launch_template_data ⇒ AWSCDK::IResolvable, AWSCDK::EC2::CfnLaunchTemplate::LaunchTemplateDataProperty (readonly)
The information for the launch template.
28 29 30 |
# File 'ec2/cfn_launch_template_props.rb', line 28 def launch_template_data @launch_template_data end |
#launch_template_name ⇒ String? (readonly)
A name for the launch template.
33 34 35 |
# File 'ec2/cfn_launch_template_props.rb', line 33 def launch_template_name @launch_template_name end |
#tag_specifications ⇒ AWSCDK::IResolvable, ... (readonly)
The tags to apply to the launch template on creation.
To tag the launch template, the resource type must be launch-template .
To specify the tags for resources that are created during instance launch, use TagSpecifications .
42 43 44 |
# File 'ec2/cfn_launch_template_props.rb', line 42 def tag_specifications @tag_specifications end |
#version_description ⇒ String? (readonly)
A description for the first version of the launch template.
47 48 49 |
# File 'ec2/cfn_launch_template_props.rb', line 47 def version_description @version_description end |
Class Method Details
.jsii_properties ⇒ Object
49 50 51 52 53 54 55 56 |
# File 'ec2/cfn_launch_template_props.rb', line 49 def self.jsii_properties { :launch_template_data => "launchTemplateData", :launch_template_name => "launchTemplateName", :tag_specifications => "tagSpecifications", :version_description => "versionDescription", } end |
Instance Method Details
#to_jsii ⇒ Object
58 59 60 61 62 63 64 65 66 67 |
# File 'ec2/cfn_launch_template_props.rb', line 58 def to_jsii result = {} result.merge!({ "launchTemplateData" => @launch_template_data, "launchTemplateName" => @launch_template_name, "tagSpecifications" => @tag_specifications, "versionDescription" => @version_description, }) result.compact end |