Class AWS::EC2::TagCollection
In: lib/aws/ec2/tag_collection.rb
Parent: Collection

Represents all EC2 tags in an account.

Methods

[]   create   each   member_class  

Public Instance methods

@return [Tag] Returns a reference to a tag with the given name.

Creates a new Tag and assigns it to an EC2 resource.

@example tagging with names (keys) only

  ec2.tags.create(instance, 'webserver')

@example tagging with names (keys) and values

  ec2.tags.create(instance, 'stage', 'production')

@param [Object] resource The item to tag. This should be a taggable

  EC2 resource, like an instance, security group, etc.

@param [String] key The tag key (or name). @param [Hash] options @option optins [String] :value (’’) The optional tag value. When

  left blank its assigned the empty string.

@return [Tag]

Yields once for each tag. @yield [tag] @yieldparam [Tag] tag @return [nil]

Protected Instance methods

[Validate]