Module: AWS::ELB::TaggedItem
- Defined in:
- lib/aws/elb/tagged_item.rb
Instance Method Summary collapse
-
#add_tag(key, options = {}) ⇒ Object
(also: #tag)
Adds a single tag with an optional tag value.
-
#clear_tags ⇒ nil
Deletes all tags associated with this EC2 resource.
-
#tags ⇒ ResourceTagCollection
Returns a collection that represents only tags belonging to this resource.
Instance Method Details
#add_tag(key, options = {}) ⇒ Object Also known as: tag
Adds a single tag with an optional tag value.
# adds a tag with the key production
resource.tag('production')
# adds a tag with the optional value set to production
resource.tag('role', :value => 'webserver')
Unlike EC2 version, this returns nil
17 18 19 |
# File 'lib/aws/elb/tagged_item.rb', line 17 def add_tag key, = {} [key] = [:value].to_s end |
#clear_tags ⇒ nil
Deletes all tags associated with this EC2 resource.
24 25 26 27 |
# File 'lib/aws/elb/tagged_item.rb', line 24 def .clear nil end |
#tags ⇒ ResourceTagCollection
Returns a collection that represents only tags belonging to this resource.
42 43 44 |
# File 'lib/aws/elb/tagged_item.rb', line 42 def LoadBalancerTagCollection.new(self, :config => config) end |