Class: AWSCDK::WorkspacesInstances::CfnVolume::TagSpecificationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
workspaces_instances/cfn_volume.rb

Overview

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)
  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    The tags to apply to the resource.



603
604
605
606
607
608
# File 'workspaces_instances/cfn_volume.rb', line 603

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)



612
613
614
# File 'workspaces_instances/cfn_volume.rb', line 612

def resource_type
  @resource_type
end

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

The tags to apply to the resource.



617
618
619
# File 'workspaces_instances/cfn_volume.rb', line 617

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



619
620
621
622
623
624
# File 'workspaces_instances/cfn_volume.rb', line 619

def self.jsii_properties
  {
    :resource_type => "resourceType",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



626
627
628
629
630
631
632
633
# File 'workspaces_instances/cfn_volume.rb', line 626

def to_jsii
  result = {}
  result.merge!({
    "resourceType" => @resource_type,
    "tags" => @tags,
  })
  result.compact
end