Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
AWS Import/Export API support
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib/aws
spec
.gitignore
COPYING
Gemfile
Gemfile.lock
README.org
Rakefile
VERSION
aws-ie.gemspec

README.org

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)

Something went wrong with that request. Please try again.