Class: Aws::EC2::Resource

Inherits:
Object
  • Object
show all
Defined in:
lib/aws-sdk-resources/services/ec2.rb

Instance Method Summary collapse

Instance Method Details

#create_tags(options) ⇒ Object



8
9
10
11
12
13
14
15
16
17
# File 'lib/aws-sdk-resources/services/ec2.rb', line 8

def create_tags(options)
  resp = @client.create_tags(options)
  tags = []
  options[:resources].each do |resource_id|
    options[:tags].each do |tag|
      tags << Tag.new(resource_id, tag[:key], tag[:value], client: @client)
    end
  end
  Resources::Batch.new(Tag, tags, response: resp)
end