class Aws::AutoScaling::Tag::Collection

Public Instance Methods

batch_create(options = {}) click to toggle source

@param options ({}) @return [void]

# File lib/aws-sdk-autoscaling/tag.rb, line 315
def batch_create(options = {})
  batch_enum.each do |batch|
    params = Aws::Util.copy_hash(options)
    params[:tags] ||= []
    batch.each do |item|
      params[:tags] << {
        resource_type: item.resource_type,
        resource_id: item.resource_id,
        key: item.key
      }
    end
    batch[0].client.create_or_update_tags(params)
  end
  nil
end
batch_delete!(options = {}) click to toggle source

@param options ({}) @return [void]

# File lib/aws-sdk-autoscaling/tag.rb, line 333
def batch_delete!(options = {})
  batch_enum.each do |batch|
    params = Aws::Util.copy_hash(options)
    params[:tags] ||= []
    batch.each do |item|
      params[:tags] << {
        resource_type: item.resource_type,
        resource_id: item.resource_id,
        key: item.key
      }
    end
    batch[0].client.delete_tags(params)
  end
  nil
end