Class: AWSCDK::EC2::CfnEC2Fleet::TagSpecificationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnEC2Fleet::TagSpecificationProperty
- Defined in:
- ec2/cfn_ec2_fleet.rb
Overview
Specifies the tags to apply to a resource when the resource is being created for an EC2 Fleet.
TagSpecification is a property of the AWS::EC2::EC2Fleet resource.
Instance Attribute Summary collapse
-
#resource_type ⇒ String?
readonly
The type of resource to tag.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
The tags to apply to the resource.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(resource_type: nil, tags: nil) ⇒ TagSpecificationProperty
constructor
A new instance of TagSpecificationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(resource_type: nil, tags: nil) ⇒ TagSpecificationProperty
Returns a new instance of TagSpecificationProperty.
2939 2940 2941 2942 2943 2944 |
# File 'ec2/cfn_ec2_fleet.rb', line 2939 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.
2950 2951 2952 |
# File 'ec2/cfn_ec2_fleet.rb', line 2950 def resource_type @resource_type end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
The tags to apply to the resource.
2955 2956 2957 |
# File 'ec2/cfn_ec2_fleet.rb', line 2955 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
2957 2958 2959 2960 2961 2962 |
# File 'ec2/cfn_ec2_fleet.rb', line 2957 def self.jsii_properties { :resource_type => "resourceType", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
2964 2965 2966 2967 2968 2969 2970 2971 |
# File 'ec2/cfn_ec2_fleet.rb', line 2964 def to_jsii result = {} result.merge!({ "resourceType" => @resource_type, "tags" => @tags, }) result.compact end |