Class: AWS::EC2::ExportTaskCollection

Inherits:
Collection
  • Object
show all
Includes:
Core::Collection::Simple
Defined in:
lib/aws/ec2/export_task_collection.rb

Overview

Getting Export Tasks

Allows you to enumerate export tasks.

ec2.export_tasks.each do |task|
  # yield ExportTask objects
end

You can also get an export task by id

task = ec2.export_tasks['export-task-id']

Creating Export Tasks

To create an export task you start with the Instance:

task = ec2.instances['i-12345678'].export_to_s3('bucket-name')

See Instance#export_to_s3 for more options.

Instance Method Summary collapse

Methods included from Core::Collection

#each, #each_batch, #enum, #first, #in_groups_of, #page

Methods included from FilteredCollection

#filter, #initialize

Instance Method Details

#[](export_task_id) ⇒ ExportTask

Returns reference to the export task with the given export task id.

Parameters:

  • export_task_id (String)

Returns:

  • (ExportTask)

    Returns reference to the export task with the given export task id.



44
45
46
# File 'lib/aws/ec2/export_task_collection.rb', line 44

def [] export_task_id
  ExportTask.new(export_task_id, :config => config)
end