Class: AWSCDK::ECS::EBSTagSpecification

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

Overview

Tag Specification for EBS volume.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(propagate_tags: nil, tags: nil) ⇒ EBSTagSpecification

Returns a new instance of EBSTagSpecification.

Parameters:

  • propagate_tags (AWSCDK::ECS::EbsPropagatedTagSource, nil) (defaults to: nil)

    Specifies whether to propagate the tags from the task definition or the service to the task.

  • tags (Hash{String => String}, nil) (defaults to: nil)

    The tags to apply to the volume.



9
10
11
12
13
14
# File 'ecs/ebs_tag_specification.rb', line 9

def initialize(propagate_tags: nil, tags: nil)
  @propagate_tags = propagate_tags
  Jsii::Type.check_type(@propagate_tags, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkVic1Byb3BhZ2F0ZWRUYWdTb3VyY2UifQ==")), "propagateTags") unless @propagate_tags.nil?
  @tags = tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.nil?
end

Instance Attribute Details

#propagate_tagsAWSCDK::ECS::EbsPropagatedTagSource? (readonly)

Note:

Default: - undefined

Specifies whether to propagate the tags from the task definition or the service to the task.

Valid values are: PropagatedTagSource.SERVICE, PropagatedTagSource.TASK_DEFINITION



22
23
24
# File 'ecs/ebs_tag_specification.rb', line 22

def propagate_tags
  @propagate_tags
end

#tagsHash{String => String}? (readonly)

Note:

Default: - No tags

The tags to apply to the volume.

Returns:

  • (Hash{String => String}, nil)


27
28
29
# File 'ecs/ebs_tag_specification.rb', line 27

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



29
30
31
32
33
34
# File 'ecs/ebs_tag_specification.rb', line 29

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

Instance Method Details

#to_jsiiObject



36
37
38
39
40
41
42
43
# File 'ecs/ebs_tag_specification.rb', line 36

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