Class: AWSCDK::EC2::CfnEC2Fleet::TagSpecificationProperty

Inherits:
Jsii::Struct
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resource_type: nil, tags: nil) ⇒ TagSpecificationProperty

Returns a new instance of TagSpecificationProperty.

Parameters:

  • resource_type (String, nil) (defaults to: nil)

    The type of resource to tag.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    The tags to apply to the resource.



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 = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#resource_typeString? (readonly)

The type of resource to tag.



2950
2951
2952
# File 'ec2/cfn_ec2_fleet.rb', line 2950

def resource_type
  @resource_type
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

The tags to apply to the resource.



2955
2956
2957
# File 'ec2/cfn_ec2_fleet.rb', line 2955

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



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_jsiiObject



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