class AWS::AutoScaling::Tag
Auto Scaling tags are hashes with two helper methods:
-
{#resource}
-
{#delete}
Public Class Methods
new(options = {})
click to toggle source
@api private
Calls superclass method
# File lib/aws/auto_scaling/tag.rb, line 25 def initialize options = {} super() @resource = case options[:resource_type] when 'auto-scaling-group' group_name = options[:resource_id] config = options.delete(:config) Group.new(group_name, :config => config) else msg = "unhandled resource type: #{options[:resource_type]}" raise ArgumentError, msg end merge!(options) end
Public Instance Methods
delete()
click to toggle source
Deletes the tag from the resource. @return [nil]
# File lib/aws/auto_scaling/tag.rb, line 52 def delete resource.delete_tags([self]) nil end
resource()
click to toggle source
@return [Group] Returns the tagged resource. Currently this is
always an Auto Scaling group.
# File lib/aws/auto_scaling/tag.rb, line 46 def resource @resource end