Class: AWSCDK::EC2::CfnLaunchTemplate::LaunchTemplateTagSpecificationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnLaunchTemplate::LaunchTemplateTagSpecificationProperty
- Defined in:
- ec2/cfn_launch_template.rb
Overview
Specifies the tags to apply to the launch template during creation.
To specify the tags for the resources that are created during instance launch, use AWS::EC2::LaunchTemplate TagSpecification .
LaunchTemplateTagSpecification is a property of AWS::EC2::LaunchTemplate .
Instance Attribute Summary collapse
-
#resource_type ⇒ String?
readonly
The type of resource.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
The tags for the resource.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(resource_type: nil, tags: nil) ⇒ LaunchTemplateTagSpecificationProperty
constructor
A new instance of LaunchTemplateTagSpecificationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(resource_type: nil, tags: nil) ⇒ LaunchTemplateTagSpecificationProperty
Returns a new instance of LaunchTemplateTagSpecificationProperty.
2590 2591 2592 2593 2594 2595 |
# File 'ec2/cfn_launch_template.rb', line 2590 def initialize(resource_type: nil, tags: nil) @resource_type = resource_type Jsii::Type.check_type(@resource_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resourceType") unless @resource_type.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? end |
Instance Attribute Details
#resource_type ⇒ String? (readonly)
The type of resource.
To tag a launch template, ResourceType must be launch-template .
2603 2604 2605 |
# File 'ec2/cfn_launch_template.rb', line 2603 def resource_type @resource_type end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
The tags for the resource.
2608 2609 2610 |
# File 'ec2/cfn_launch_template.rb', line 2608 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
2610 2611 2612 2613 2614 2615 |
# File 'ec2/cfn_launch_template.rb', line 2610 def self.jsii_properties { :resource_type => "resourceType", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
2617 2618 2619 2620 2621 2622 2623 2624 |
# File 'ec2/cfn_launch_template.rb', line 2617 def to_jsii result = {} result.merge!({ "resourceType" => @resource_type, "tags" => @tags, }) result.compact end |