Class: AWS::AutoScaling::Tag
- Inherits:
-
Hash
- Object
- Hash
- AWS::AutoScaling::Tag
- Defined in:
- lib/aws/auto_scaling/tag.rb
Overview
Instance Method Summary collapse
-
#delete ⇒ nil
Deletes the tag from the resource.
-
#initialize(options = {}) ⇒ Tag
constructor
A new instance of Tag.
-
#resource ⇒ Group
Returns the tagged resource.
Constructor Details
#initialize(options = {}) ⇒ Tag
Returns a new instance of Tag.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/aws/auto_scaling/tag.rb', line 25 def initialize = {} super() @resource = case [:resource_type] when 'auto-scaling-group' group_name = [:resource_id] config = .delete(:config) Group.new(group_name, :config => config) else msg = "unhandled resource type: #{[:resource_type]}" raise ArgumentError, msg end merge!() end |
Instance Method Details
#delete ⇒ nil
Deletes the tag from the resource.
52 53 54 55 |
# File 'lib/aws/auto_scaling/tag.rb', line 52 def delete resource.([self]) nil end |
#resource ⇒ Group
Returns the tagged resource. Currently this is always an Auto Scaling group.
46 47 48 |
# File 'lib/aws/auto_scaling/tag.rb', line 46 def resource @resource end |