Method: AWS::EC2::TaggedItem#tags

Defined in:
lib/aws/ec2/tagged_item.rb

#tagsResourceTagCollection

Returns a collection that represents only tags belonging to this resource.

Examples:

Manipulating the tags of an EC2 instance

i = ec2.instances["i-123"]
i.tags.to_h                  # => { "foo" => "bar", ... }
i.tags.clear
i.tags.stage = "production"
i.tags.stage                 # => "production"

Returns:



59
60
61
# File 'lib/aws/ec2/tagged_item.rb', line 59

def tags
  ResourceTagCollection.new(self, :config => config)
end