/aws-ie

AWS Import/Export API support

Primary LanguageRubyOtherNOASSERTION

AWS import/Export API support

AWS::Import

AWS::Import provides Ruby interface to AWS Import/Export API

Getting started

require ‘aws/import/job’

Configure the Import using your access/secret keys

AWS::Import::Config.aws_access_key_id = “YOUR-ACCESS-KEY”

AWS::Import::Config.aws_secret_key_id = “YOUR-SECRET-KEY”

Build Manifest according to AWS API docs

manifest = <<EOF

manifestVersion: 2.0

bucket: myBucket-Sonian

accessKeyId: YOUR-ACCESS-KEY

returnAddress:

name: Amazon.com ATTN Joe Random

street1: 120 Nosuch Ave S.

city: Seattle

stateOrProvince: WA

postalCode: 91111

phoneNumber: 206-266-0000

country: USA

eraseDevice: no

deviceId: 49382

EOF

Create new Import Job

job = AWS::Import::Job.new(:manifest => manifest)

job.save

job.id # => JobId node value from response (Example: ABC-123)

or

job = AWS::Import::Job.create(:manifest => manifest)

job.id # => JobId node value from response (Example: ABC-123)