Sha256: 3380d116a991c023318c555ed869e0a2f81b84e7801277a6b021fb37f405bdf2

Contents?: true

Size: 687 Bytes

Versions: 39

Compression:

Stored size: 687 Bytes

Contents

require 'fog/core/model'

module Fog
  module AWS
    class Compute

      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
          connection.delete_tags(resource_id, key)
          true
        end

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

        private

      end
    end
  end
end

Version data entries

39 entries across 39 versions & 3 rubygems

Version Path
fog-0.6.0 lib/fog/compute/models/aws/tag.rb
fog-0.5.3 lib/fog/compute/models/aws/tag.rb
fog-0.5.2 lib/fog/compute/models/aws/tag.rb
fog-0.5.1 lib/fog/compute/models/aws/tag.rb
fog-0.5.0 lib/fog/compute/models/aws/tag.rb
phpfog-fog-0.4.1.3 lib/fog/compute/models/aws/tag.rb
phpfog-fog-0.4.1.2 lib/fog/compute/models/aws/tag.rb
phpfog-fog-0.4.1.1 lib/fog/compute/models/aws/tag.rb
phpfog-fog-0.4.1 lib/fog/compute/models/aws/tag.rb
fog-0.4.1 lib/fog/compute/models/aws/tag.rb
fog-0.4.0 lib/fog/aws/models/compute/tag.rb
fog-0.3.34 lib/fog/aws/models/compute/tag.rb
fog-0.3.33 lib/fog/aws/models/compute/tag.rb
fog-0.3.32 lib/fog/aws/models/compute/tag.rb
fog-0.3.31 lib/fog/aws/models/compute/tag.rb
fog-0.3.30 lib/fog/aws/models/compute/tag.rb
fog-0.3.29 lib/fog/aws/models/compute/tag.rb
fog-0.3.28 lib/fog/aws/models/compute/tag.rb
fog-0.3.27 lib/fog/aws/models/compute/tag.rb
fog-0.3.26 lib/fog/aws/models/compute/tag.rb