Sha256: 38a389f4be846ca5828e69b6756aaa474abe74786d59fda79b456dbd126b76fd

Contents?: true

Size: 662 Bytes

Versions: 22

Compression:

Stored size: 662 Bytes

Contents

require 'fog/core/model'

module Fog
  module Compute
    class AWS
      class Tag < Fog::Model
        identity  :key

        attribute :value
        attribute :resource_id,           :aliases => 'resourceId'
        attribute :resource_type,         :aliases => 'resourceType'

        def initialize(attributes = {})
          super
        end

        def destroy
          requires :key, :resource_id
          service.delete_tags(resource_id, key => value)
          true
        end

        def save
          requires :key, :resource_id
          service.create_tags(resource_id, key => value)
          true
        end
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 5 rubygems

Version Path
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/aws/models/compute/tag.rb
fog-aws-0.1.1 lib/fog/aws/models/compute/tag.rb
fog-aws-0.1.0 lib/fog/aws/models/compute/tag.rb
fog-aws-0.0.8 lib/fog/aws/models/compute/tag.rb
fog-aws-0.0.7 lib/fog/aws/models/compute/tag.rb
fog-aws-0.0.6 lib/fog/aws/models/compute/tag.rb
fog-aws-0.0.5 lib/fog/aws/models/compute/tag.rb
fog-1.26.0 lib/fog/aws/models/compute/tag.rb
fog-1.25.0 lib/fog/aws/models/compute/tag.rb
nsidc-fog-1.24.1 lib/fog/aws/models/compute/tag.rb
fog-1.24.0 lib/fog/aws/models/compute/tag.rb
ns-fog-1.22.11 lib/fog/aws/models/compute/tag.rb
ns-fog-1.22.10 lib/fog/aws/models/compute/tag.rb
ns-fog-1.22.9 lib/fog/aws/models/compute/tag.rb
ns-fog-1.22.8 lib/fog/aws/models/compute/tag.rb
ns-fog-1.22.7 lib/fog/aws/models/compute/tag.rb
ns-fog-1.22.6 lib/fog/aws/models/compute/tag.rb
fog-1.23.0 lib/fog/aws/models/compute/tag.rb
ns-fog-1.22.4 lib/fog/aws/models/compute/tag.rb
ns-fog-1.22.3 lib/fog/aws/models/compute/tag.rb