You are viewing documentation for version 1 of the AWS SDK for Ruby. Version 2 documentation can be found here.
Class: AWS::EC2::ExportTaskCollection
- Inherits:
-
Collection
- Object
- Collection
- AWS::EC2::ExportTaskCollection
- 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
-
#[](export_task_id) ⇒ ExportTask
Returns reference to the export task with the given export task id.
Methods included from Core::Collection
#each, #each_batch, #enum, #first, #in_groups_of, #page
Methods included from FilteredCollection
Instance Method Details
#[](export_task_id) ⇒ 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 |