awsum 0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.autotest +1 -0
- data/.gitignore +5 -0
- data/.rspec +1 -0
- data/Gemfile +15 -0
- data/Gemfile.lock +44 -0
- data/LICENSE +19 -0
- data/README.rdoc +42 -0
- data/Rakefile +75 -0
- data/awsum.gemspec +199 -0
- data/lib/awsum.rb +20 -0
- data/lib/awsum/ec2.rb +741 -0
- data/lib/awsum/ec2/address.rb +67 -0
- data/lib/awsum/ec2/availability_zone.rb +16 -0
- data/lib/awsum/ec2/image.rb +62 -0
- data/lib/awsum/ec2/instance.rb +57 -0
- data/lib/awsum/ec2/keypair.rb +16 -0
- data/lib/awsum/ec2/parsers/address_parser.rb +61 -0
- data/lib/awsum/ec2/parsers/availability_zone_parser.rb +57 -0
- data/lib/awsum/ec2/parsers/image_parser.rb +74 -0
- data/lib/awsum/ec2/parsers/instance_parser.rb +90 -0
- data/lib/awsum/ec2/parsers/keypair_parser.rb +64 -0
- data/lib/awsum/ec2/parsers/purchase_reserved_instances_offering_parser.rb +34 -0
- data/lib/awsum/ec2/parsers/region_parser.rb +56 -0
- data/lib/awsum/ec2/parsers/register_image_parser.rb +34 -0
- data/lib/awsum/ec2/parsers/reserved_instance_parser.rb +64 -0
- data/lib/awsum/ec2/parsers/reserved_instances_offering_parser.rb +63 -0
- data/lib/awsum/ec2/parsers/security_group_parser.rb +106 -0
- data/lib/awsum/ec2/parsers/snapshot_parser.rb +64 -0
- data/lib/awsum/ec2/parsers/volume_parser.rb +77 -0
- data/lib/awsum/ec2/region.rb +54 -0
- data/lib/awsum/ec2/reserved_instance.rb +24 -0
- data/lib/awsum/ec2/reserved_instances_offering.rb +20 -0
- data/lib/awsum/ec2/security_group.rb +74 -0
- data/lib/awsum/ec2/snapshot.rb +23 -0
- data/lib/awsum/ec2/volume.rb +65 -0
- data/lib/awsum/error.rb +53 -0
- data/lib/awsum/net_fix.rb +100 -0
- data/lib/awsum/parser.rb +18 -0
- data/lib/awsum/requestable.rb +216 -0
- data/lib/awsum/s3.rb +220 -0
- data/lib/awsum/s3/bucket.rb +28 -0
- data/lib/awsum/s3/headers.rb +24 -0
- data/lib/awsum/s3/object.rb +138 -0
- data/lib/awsum/s3/parsers/bucket_parser.rb +43 -0
- data/lib/awsum/support.rb +94 -0
- data/spec/fixtures/ec2/addresses.xml +10 -0
- data/spec/fixtures/ec2/allocate_address.xml +5 -0
- data/spec/fixtures/ec2/associate_address.xml +5 -0
- data/spec/fixtures/ec2/attach_volume.xml +9 -0
- data/spec/fixtures/ec2/authorize_ip_access.xml +5 -0
- data/spec/fixtures/ec2/authorize_owner_group_access.xml +5 -0
- data/spec/fixtures/ec2/authorize_owner_group_access_error.xml +2 -0
- data/spec/fixtures/ec2/availability_zones.xml +16 -0
- data/spec/fixtures/ec2/available_volume.xml +14 -0
- data/spec/fixtures/ec2/create_key_pair.xml +29 -0
- data/spec/fixtures/ec2/create_security_group.xml +5 -0
- data/spec/fixtures/ec2/create_snapshot.xml +9 -0
- data/spec/fixtures/ec2/create_volume.xml +10 -0
- data/spec/fixtures/ec2/delete_key_pair.xml +5 -0
- data/spec/fixtures/ec2/delete_security_group.xml +5 -0
- data/spec/fixtures/ec2/delete_snapshot.xml +5 -0
- data/spec/fixtures/ec2/delete_volume.xml +5 -0
- data/spec/fixtures/ec2/deregister_image.xml +5 -0
- data/spec/fixtures/ec2/detach_volume.xml +9 -0
- data/spec/fixtures/ec2/disassociate_address.xml +5 -0
- data/spec/fixtures/ec2/image.xml +15 -0
- data/spec/fixtures/ec2/images.xml +77 -0
- data/spec/fixtures/ec2/instance.xml +36 -0
- data/spec/fixtures/ec2/instances.xml +88 -0
- data/spec/fixtures/ec2/internal_error.xml +2 -0
- data/spec/fixtures/ec2/invalid_amiid_error.xml +2 -0
- data/spec/fixtures/ec2/invalid_request_error.xml +2 -0
- data/spec/fixtures/ec2/key_pairs.xml +10 -0
- data/spec/fixtures/ec2/purchase_reserved_instances_offering.xml +5 -0
- data/spec/fixtures/ec2/purchase_reserved_instances_offerings.xml +6 -0
- data/spec/fixtures/ec2/regions.xml +14 -0
- data/spec/fixtures/ec2/register_image.xml +5 -0
- data/spec/fixtures/ec2/release_address.xml +5 -0
- data/spec/fixtures/ec2/reserved_instances.xml +18 -0
- data/spec/fixtures/ec2/reserved_instances_offering.xml +15 -0
- data/spec/fixtures/ec2/reserved_instances_offerings.xml +276 -0
- data/spec/fixtures/ec2/revoke_ip_access.xml +5 -0
- data/spec/fixtures/ec2/revoke_owner_group_access.xml +5 -0
- data/spec/fixtures/ec2/run_instances.xml +30 -0
- data/spec/fixtures/ec2/security_groups.xml +159 -0
- data/spec/fixtures/ec2/snapshots.xml +13 -0
- data/spec/fixtures/ec2/terminate_instances.xml +17 -0
- data/spec/fixtures/ec2/unassociated_address.xml +10 -0
- data/spec/fixtures/ec2/volumes.xml +23 -0
- data/spec/fixtures/errors/invalid_parameter_value.xml +2 -0
- data/spec/fixtures/s3/buckets.xml +2 -0
- data/spec/fixtures/s3/copy_failure.xml +23 -0
- data/spec/fixtures/s3/invalid_request_signature.xml +5 -0
- data/spec/fixtures/s3/keys.xml +2 -0
- data/spec/lib/awsum/ec2/address_spec.rb +149 -0
- data/spec/lib/awsum/ec2/availability_zones_spec.rb +21 -0
- data/spec/lib/awsum/ec2/image_spec.rb +92 -0
- data/spec/lib/awsum/ec2/instance_spec.rb +125 -0
- data/spec/lib/awsum/ec2/keypair_spec.rb +55 -0
- data/spec/lib/awsum/ec2/parsers/address_parser_spec.rb +51 -0
- data/spec/lib/awsum/ec2/parsers/availability_zone_parser_spec.rb +28 -0
- data/spec/lib/awsum/ec2/parsers/image_parser_spec.rb +66 -0
- data/spec/lib/awsum/ec2/parsers/instance_parser_spec.rb +75 -0
- data/spec/lib/awsum/ec2/parsers/keypair_parser_spec.rb +74 -0
- data/spec/lib/awsum/ec2/parsers/purchase_reserved_instances_offering_parser_spec.rb +14 -0
- data/spec/lib/awsum/ec2/parsers/region_parser_spec.rb +27 -0
- data/spec/lib/awsum/ec2/parsers/register_image_parser_spec.rb +15 -0
- data/spec/lib/awsum/ec2/parsers/reserved_instance_parser_spec.rb +35 -0
- data/spec/lib/awsum/ec2/parsers/reserved_instances_offering_parser_spec.rb +32 -0
- data/spec/lib/awsum/ec2/parsers/security_group_parser_spec.rb +78 -0
- data/spec/lib/awsum/ec2/parsers/snapshot_parser_spec.rb +30 -0
- data/spec/lib/awsum/ec2/parsers/volume_parser_spec.rb +35 -0
- data/spec/lib/awsum/ec2/region_spec.rb +73 -0
- data/spec/lib/awsum/ec2/reserved_instance_spec.rb +61 -0
- data/spec/lib/awsum/ec2/reserved_instances_offering_spec.rb +33 -0
- data/spec/lib/awsum/ec2/security_group_spec.rb +179 -0
- data/spec/lib/awsum/ec2/snapshots_spec.rb +69 -0
- data/spec/lib/awsum/ec2/volume_spec.rb +107 -0
- data/spec/lib/awsum/ec2_spec.rb +6 -0
- data/spec/lib/awsum/error_spec.rb +31 -0
- data/spec/lib/awsum/requestable_spec.rb +126 -0
- data/spec/lib/awsum/s3/bucket_spec.rb +95 -0
- data/spec/lib/awsum/s3/object_spec.rb +128 -0
- data/spec/lib/awsum/s3/parsers/bucket_parser_spec.rb +41 -0
- data/spec/lib/awsum/s3/parsers/object_parser_spec.rb +41 -0
- data/spec/spec_helper.rb +16 -0
- metadata +240 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
require 'awsum/s3/parsers/bucket_parser'
|
|
2
|
+
|
|
3
|
+
module Awsum
|
|
4
|
+
class S3
|
|
5
|
+
class Bucket
|
|
6
|
+
attr_reader :name, :creation_date
|
|
7
|
+
|
|
8
|
+
def initialize(s3, name, creation_date = nil)
|
|
9
|
+
@s3 = s3
|
|
10
|
+
@name = name
|
|
11
|
+
@creation_date = creation_date
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Delete this Bucket
|
|
15
|
+
def delete
|
|
16
|
+
@s3.delete_bucket(@name)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# Delete this Bucket, recursively deleting all keys first
|
|
20
|
+
def delete!
|
|
21
|
+
@s3.keys(@name).each do |key|
|
|
22
|
+
key.delete
|
|
23
|
+
end
|
|
24
|
+
delete
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
module Awsum
|
|
2
|
+
class S3
|
|
3
|
+
class Headers #:nodoc:
|
|
4
|
+
def initialize(response)
|
|
5
|
+
@response = response
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
# Locking down to HTTPHeader methods only
|
|
9
|
+
def method_missing(method, *args, &block)
|
|
10
|
+
if !%w(body body_permitted? entity inspect read_body to_ary value).include?(method.to_s) && @response.respond_to?(method)
|
|
11
|
+
@response.send(method, *args, &block)
|
|
12
|
+
else
|
|
13
|
+
raise NoMethodError.new("undefined method `#{method}' for #{inspect}")
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def inspect
|
|
18
|
+
headers = []
|
|
19
|
+
@response.canonical_each do |h,v| headers << h end
|
|
20
|
+
"#<Awsum::S3::Headers \"#{headers.join('", "')}\">"
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
module Awsum
|
|
2
|
+
class S3
|
|
3
|
+
class Object
|
|
4
|
+
attr_reader :key, :bucket, :last_modified, :etag, :size, :owner, :storage_class
|
|
5
|
+
|
|
6
|
+
def initialize(s3, bucket, key, last_modified, etag, size, owner, storage_class)
|
|
7
|
+
@s3 = s3
|
|
8
|
+
@bucket = bucket
|
|
9
|
+
@key = key
|
|
10
|
+
@last_modified = last_modified
|
|
11
|
+
@etag = etag
|
|
12
|
+
@size = size
|
|
13
|
+
@owner = owner
|
|
14
|
+
@storage_class = storage_class
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# Get the headers for this Object
|
|
18
|
+
#
|
|
19
|
+
# All header methods map directly to the Net::HTTPHeader module
|
|
20
|
+
def headers
|
|
21
|
+
@headers ||= @s3.object_headers(@bucket, @key)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# Retrieve the data stored for this Object
|
|
25
|
+
#
|
|
26
|
+
# You can get the data as a single call or add a block to retrieve the data in chunks
|
|
27
|
+
# ==Examples
|
|
28
|
+
# content = object.data
|
|
29
|
+
#
|
|
30
|
+
# or
|
|
31
|
+
#
|
|
32
|
+
# object.data do |chunk|
|
|
33
|
+
# # handle chunk
|
|
34
|
+
# puts chunk
|
|
35
|
+
# end
|
|
36
|
+
def data(&block)
|
|
37
|
+
@s3.object_data @bucket, @key, &block
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Delete this Key
|
|
41
|
+
def delete
|
|
42
|
+
@s3.delete_object(@bucket, @key)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Make a copy of this Object with a new key
|
|
46
|
+
def copy(new_key, headers = nil, meta_headers = nil)
|
|
47
|
+
@s3.copy_object(@bucket, @key, nil, new_key, headers, meta_headers)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Rename or move this Object to a new key
|
|
51
|
+
def rename(new_key, headers = nil, meta_headers = nil)
|
|
52
|
+
copied = @s3.copy_object(@bucket, @key, nil, new_key, headers, meta_headers)
|
|
53
|
+
@s3.delete_object(@bucket, @key) if copied
|
|
54
|
+
end
|
|
55
|
+
alias_method :move, :rename
|
|
56
|
+
|
|
57
|
+
# Copy this Object to another Bucket
|
|
58
|
+
#
|
|
59
|
+
def copy_to(new_bucket, new_key = nil, headers = nil, meta_headers = nil)
|
|
60
|
+
@s3.copy_object(@bucket, @key, new_bucket, new_key, headers, meta_headers)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Move this Object to another Bucket
|
|
64
|
+
def move_to(new_bucket, new_key = nil, headers = nil, meta_headers = nil)
|
|
65
|
+
copied = @s3.copy_object(@bucket, @key, new_bucket, new_key, headers, meta_headers)
|
|
66
|
+
@s3.delete_object(@bucket, @key) if copied
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
#TODO: Create a more advanced array which can deal with pagination
|
|
71
|
+
class ObjectParser < Awsum::Parser #:nodoc:
|
|
72
|
+
def initialize(s3)
|
|
73
|
+
@s3 = s3
|
|
74
|
+
@bucket = ''
|
|
75
|
+
@objects = []
|
|
76
|
+
@text = nil
|
|
77
|
+
@stack = []
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
def tag_start(tag, attributes)
|
|
81
|
+
case tag
|
|
82
|
+
when 'ListBucketResult'
|
|
83
|
+
@stack << tag
|
|
84
|
+
@text = ''
|
|
85
|
+
when 'Contents'
|
|
86
|
+
@stack << tag
|
|
87
|
+
@current = {}
|
|
88
|
+
@text = ''
|
|
89
|
+
when 'Owner'
|
|
90
|
+
@owner = {}
|
|
91
|
+
@stack << tag
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
def text(text)
|
|
96
|
+
@text << text unless @text.nil?
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
def tag_end(tag)
|
|
100
|
+
case tag
|
|
101
|
+
when 'Name'
|
|
102
|
+
if @stack[-1] == 'ListBucketResult'
|
|
103
|
+
@bucket = @text.strip
|
|
104
|
+
end
|
|
105
|
+
when 'Contents'
|
|
106
|
+
@objects << Object.new(
|
|
107
|
+
@s3,
|
|
108
|
+
@bucket,
|
|
109
|
+
@current['Key'],
|
|
110
|
+
Time.parse(@current['LastModified']),
|
|
111
|
+
@current['ETag'],
|
|
112
|
+
@current['Size'].to_i,
|
|
113
|
+
{'id' => @owner['ID'], 'name' => @owner['DisplayName']},
|
|
114
|
+
@current['StorageClass']
|
|
115
|
+
)
|
|
116
|
+
@current = nil
|
|
117
|
+
@text = nil
|
|
118
|
+
@stack.pop
|
|
119
|
+
when 'Owner'
|
|
120
|
+
@stack.pop
|
|
121
|
+
else
|
|
122
|
+
text = @text.strip unless @text.nil?
|
|
123
|
+
case @stack[-1]
|
|
124
|
+
when 'Owner'
|
|
125
|
+
@owner[tag] = (text == '' ? nil : text) unless @owner.nil?
|
|
126
|
+
when 'Contents'
|
|
127
|
+
@current[tag] = (text == '' ? nil : text) unless @current.nil?
|
|
128
|
+
end
|
|
129
|
+
@text = ''
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
def result
|
|
134
|
+
@objects
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
module Awsum
|
|
2
|
+
class S3
|
|
3
|
+
class BucketParser < Awsum::Parser #:nodoc:
|
|
4
|
+
def initialize(s3)
|
|
5
|
+
@s3 = s3
|
|
6
|
+
@buckets = []
|
|
7
|
+
@text = nil
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def tag_start(tag, attributes)
|
|
11
|
+
case tag
|
|
12
|
+
when 'Bucket'
|
|
13
|
+
@current = {}
|
|
14
|
+
@text = ''
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def text(text)
|
|
19
|
+
@text << text unless @text.nil?
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def tag_end(tag)
|
|
23
|
+
case tag
|
|
24
|
+
when 'Bucket'
|
|
25
|
+
@buckets << Bucket.new(
|
|
26
|
+
@s3,
|
|
27
|
+
@current['Name'],
|
|
28
|
+
Time.parse(@current['CreationDate'])
|
|
29
|
+
)
|
|
30
|
+
@text = nil
|
|
31
|
+
@current = nil
|
|
32
|
+
else
|
|
33
|
+
text = @text.strip unless @text.nil?
|
|
34
|
+
@current[tag] = (text == '' ? nil : text) unless @current.nil?
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def result
|
|
39
|
+
@buckets
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Thanks to RightAws for this idea!
|
|
2
|
+
#
|
|
3
|
+
# If ActiveSupport is loaded, then great - use it. But we don't
|
|
4
|
+
# want a dependency on it, so if it's not present, define the few
|
|
5
|
+
# extensions that we want to use...
|
|
6
|
+
unless defined? ActiveSupport::CoreExtensions
|
|
7
|
+
# These are ActiveSupport-;like extensions to do a few handy things in the gems
|
|
8
|
+
# Derived from ActiveSupport, so the ActiveSupport copyright notice applies:
|
|
9
|
+
#
|
|
10
|
+
#
|
|
11
|
+
#
|
|
12
|
+
# Copyright (c) 2005 David Heinemeier Hansson
|
|
13
|
+
#
|
|
14
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
|
15
|
+
# a copy of this software and associated documentation files (the
|
|
16
|
+
# "Software"), to deal in the Software without restriction, including
|
|
17
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
|
18
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
|
19
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
|
20
|
+
# the following conditions:
|
|
21
|
+
#
|
|
22
|
+
# The above copyright notice and this permission notice shall be
|
|
23
|
+
# included in all copies or substantial portions of the Software.
|
|
24
|
+
#
|
|
25
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
26
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
27
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
28
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
29
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
30
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
31
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
32
|
+
#++
|
|
33
|
+
#
|
|
34
|
+
#
|
|
35
|
+
|
|
36
|
+
class Object #:nodoc:
|
|
37
|
+
# "", " ", nil, [], and {} are blank
|
|
38
|
+
def blank?
|
|
39
|
+
if respond_to?(:empty?) && respond_to?(:strip)
|
|
40
|
+
empty? or strip.empty?
|
|
41
|
+
elsif respond_to?(:empty?)
|
|
42
|
+
empty?
|
|
43
|
+
else
|
|
44
|
+
!self
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
class NilClass #:nodoc:
|
|
50
|
+
def blank?
|
|
51
|
+
true
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
class FalseClass #:nodoc:
|
|
56
|
+
def blank?
|
|
57
|
+
true
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
class TrueClass #:nodoc:
|
|
62
|
+
def blank?
|
|
63
|
+
false
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
class Array #:nodoc:
|
|
68
|
+
alias_method :blank?, :empty?
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
class Hash #:nodoc:
|
|
72
|
+
alias_method :blank?, :empty?
|
|
73
|
+
|
|
74
|
+
# Return a new hash with all keys converted to symbols.
|
|
75
|
+
def symbolize_keys
|
|
76
|
+
inject({}) do |options, (key, value)|
|
|
77
|
+
options[key.to_sym] = value
|
|
78
|
+
options
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
class String #:nodoc:
|
|
84
|
+
def blank?
|
|
85
|
+
empty? || strip.empty?
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
class Numeric #:nodoc:
|
|
90
|
+
def blank?
|
|
91
|
+
false
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<?xml version="1.0"?>
|
|
2
|
+
<DescribeAddressesResponse xmlns="http://ec2.amazonaws.com/doc/2008-12-01/">
|
|
3
|
+
<requestId>0a578151-76d1-4461-b1ce-ae36d39ec349</requestId>
|
|
4
|
+
<addressesSet>
|
|
5
|
+
<item>
|
|
6
|
+
<publicIp>127.0.0.1</publicIp>
|
|
7
|
+
<instanceId>i-3f1cc856</instanceId>
|
|
8
|
+
</item>
|
|
9
|
+
</addressesSet>
|
|
10
|
+
</DescribeAddressesResponse>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0"?>
|
|
2
|
+
<AttachVolumeResponse xmlns="http://ec2.amazonaws.com/doc/2008-12-01/">
|
|
3
|
+
<requestId>3756a0c0-aa24-468d-9bd1-bfe2e54dd4cc</requestId>
|
|
4
|
+
<volumeId>vol-44d6322d</volumeId>
|
|
5
|
+
<instanceId>i-3f1cc856</instanceId>
|
|
6
|
+
<device>/dev/sdb</device>
|
|
7
|
+
<status>attaching</status>
|
|
8
|
+
<attachTime>2009-01-14T04:34:35.000Z</attachTime>
|
|
9
|
+
</AttachVolumeResponse>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
<?xml version="1.0"?>
|
|
2
|
+
<Response><Errors><Error><Code>InvalidParameterCombination</Code><Message>The parameter 'CidrIp' may not be used in combination with 'SourceSecurityGroupOwnerId'</Message></Error></Errors><RequestID>6364d411-bdf0-4718-a2c9-219ebec33827</RequestID></Response>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<?xml version="1.0"?>
|
|
2
|
+
<DescribeAvailabilityZonesResponse xmlns="http://ec2.amazonaws.com/doc/2008-12-01/">
|
|
3
|
+
<requestId>6ffe1588-28b8-4033-a07c-97b029c6930a</requestId>
|
|
4
|
+
<availabilityZoneInfo>
|
|
5
|
+
<item>
|
|
6
|
+
<zoneName>eu-west-1a</zoneName>
|
|
7
|
+
<zoneState>available</zoneState>
|
|
8
|
+
<regionName>eu-west-1</regionName>
|
|
9
|
+
</item>
|
|
10
|
+
<item>
|
|
11
|
+
<zoneName>eu-west-1b</zoneName>
|
|
12
|
+
<zoneState>available</zoneState>
|
|
13
|
+
<regionName>eu-west-1</regionName>
|
|
14
|
+
</item>
|
|
15
|
+
</availabilityZoneInfo>
|
|
16
|
+
</DescribeAvailabilityZonesResponse>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<?xml version="1.0"?>
|
|
2
|
+
<DescribeVolumesResponse xmlns="http://ec2.amazonaws.com/doc/2008-12-01/">
|
|
3
|
+
<requestId>f4786b8a-90e8-4570-a786-1076fba0eeae</requestId>
|
|
4
|
+
<volumeSet>
|
|
5
|
+
<item>
|
|
6
|
+
<volumeId>vol-44d6322d</volumeId>
|
|
7
|
+
<size>10</size>
|
|
8
|
+
<snapshotId/>
|
|
9
|
+
<availabilityZone>us-east-1b</availabilityZone>
|
|
10
|
+
<status>available</status>
|
|
11
|
+
<createTime>2009-01-14T03:57:08.000Z</createTime>
|
|
12
|
+
</item>
|
|
13
|
+
</volumeSet>
|
|
14
|
+
</DescribeVolumesResponse>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<?xml version="1.0"?>
|
|
2
|
+
<CreateKeyPairResponse xmlns="http://ec2.amazonaws.com/doc/2008-12-01/">
|
|
3
|
+
<requestId>6c6d3488-f769-431b-a838-2f630aa6c38b</requestId>
|
|
4
|
+
<keyName>test-keypair</keyName>
|
|
5
|
+
<keyFingerprint>ab:ab:ab:ab:ab:ab:ab:ab:ab:ab:ab:ab:ab:ab:ab:ab:ab:ab:ab:ab</keyFingerprint>
|
|
6
|
+
<keyMaterial>-----BEGIN RSA PRIVATE KEY-----
|
|
7
|
+
MIIEogIBAAKCAQEAqkxIjNxLV/shvaep5Kum3N2xTV6aBbXezVA4HHE371HSq3haKTcST7QYeQha
|
|
8
|
+
92AmZojAm2ojqWMw9GJaeq/Q7NvXKdMgj3mKd7zY7tdC+HmKYVkAvJ9enuuVwPFxlt+5rPpZ2jS+
|
|
9
|
+
kl4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