Class: AWSCDK::ECS::CfnService::EBSTagSpecificationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ecs/cfn_service.rb

Overview

The tag specifications of an Amazon EBS volume.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resource_type:, propagate_tags: nil, tags: nil) ⇒ EBSTagSpecificationProperty

Returns a new instance of EBSTagSpecificationProperty.

Parameters:

  • resource_type (String)

    The type of volume resource.

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

    Determines whether to propagate the tags from the task definition to the Amazon EBS volume.

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

    The tags applied to this Amazon EBS volume.



1683
1684
1685
1686
1687
1688
1689
1690
# File 'ecs/cfn_service.rb', line 1683

def initialize(resource_type:, propagate_tags: nil, tags: nil)
  @resource_type = resource_type
  Jsii::Type.check_type(@resource_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resourceType")
  @propagate_tags = propagate_tags
  Jsii::Type.check_type(@propagate_tags, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "propagateTags") unless @propagate_tags.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

#propagate_tagsString? (readonly)

Determines whether to propagate the tags from the task definition to the Amazon EBS volume.

Tags can only propagate to a SERVICE specified in ServiceVolumeConfiguration . If no value is specified, the tags aren't propagated.



1703
1704
1705
# File 'ecs/cfn_service.rb', line 1703

def propagate_tags
  @propagate_tags
end

#resource_typeString (readonly)

The type of volume resource.



1696
1697
1698
# File 'ecs/cfn_service.rb', line 1696

def resource_type
  @resource_type
end

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

The tags applied to this Amazon EBS volume.

AmazonECSCreated and AmazonECSManaged are reserved tags that can't be used.



1710
1711
1712
# File 'ecs/cfn_service.rb', line 1710

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



1712
1713
1714
1715
1716
1717
1718
# File 'ecs/cfn_service.rb', line 1712

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

Instance Method Details

#to_jsiiObject



1720
1721
1722
1723
1724
1725
1726
1727
1728
# File 'ecs/cfn_service.rb', line 1720

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