aws-sdk 1.7.1 → 1.8.0

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.
Files changed (75) hide show
  1. data/README.rdoc +4 -4
  2. data/lib/aws-sdk.rb +60 -1
  3. data/lib/aws.rb +1 -50
  4. data/lib/aws/api_config/CloudFront-2012-05-05.yml +864 -899
  5. data/lib/aws/api_config/DataPipeline-2012-10-29.yml +422 -0
  6. data/lib/aws/api_config/EC2-2012-07-20.yml +0 -2
  7. data/lib/aws/api_config/Glacier-2012-06-01.yml +622 -0
  8. data/lib/aws/api_config/ImportExport-2010-06-01.yml +109 -0
  9. data/lib/aws/api_config/{SQS-2011-10-01.yml → SQS-2012-11-05.yml} +3 -1
  10. data/lib/aws/api_config/StorageGateway-2012-06-30.yml +748 -0
  11. data/lib/aws/cloud_front.rb +71 -0
  12. data/lib/aws/cloud_front/client.rb +1307 -0
  13. data/lib/aws/cloud_front/config.rb +18 -0
  14. data/lib/aws/cloud_front/errors.rb +22 -0
  15. data/lib/aws/cloud_front/request.rb +44 -0
  16. data/lib/aws/core.rb +19 -1
  17. data/lib/aws/core/client.rb +7 -0
  18. data/lib/aws/core/collection.rb +1 -1
  19. data/lib/aws/core/configuration.rb +12 -0
  20. data/lib/aws/core/data.rb +13 -8
  21. data/lib/aws/core/json_client.rb +3 -4
  22. data/lib/aws/core/json_parser.rb +76 -0
  23. data/lib/aws/core/json_request_builder.rb +4 -3
  24. data/lib/aws/core/json_response_parser.rb +1 -3
  25. data/lib/aws/core/managed_file.rb +32 -0
  26. data/lib/aws/core/options/json_serializer.rb +82 -0
  27. data/lib/aws/core/options/validator.rb +5 -1
  28. data/lib/aws/core/options/xml_serializer.rb +18 -4
  29. data/lib/aws/core/{rest_client.rb → rest_json_client.rb} +5 -6
  30. data/lib/aws/core/rest_request_builder.rb +59 -35
  31. data/lib/aws/core/rest_response_parser.rb +13 -4
  32. data/lib/aws/core/rest_xml_client.rb +47 -0
  33. data/lib/aws/core/signature/version_4.rb +22 -8
  34. data/lib/aws/data_pipeline.rb +30 -0
  35. data/lib/aws/data_pipeline/client.rb +392 -0
  36. data/lib/aws/data_pipeline/config.rb +18 -0
  37. data/lib/aws/data_pipeline/errors.rb +20 -0
  38. data/lib/aws/data_pipeline/request.rb +26 -0
  39. data/lib/aws/ec2/instance_collection.rb +11 -3
  40. data/lib/aws/ec2/security_group.rb +5 -5
  41. data/lib/aws/ec2/security_group/{egress_ip_permission_collection.rb → ip_permission_collection.rb} +33 -14
  42. data/lib/aws/glacier.rb +50 -0
  43. data/lib/aws/glacier/archive.rb +54 -0
  44. data/lib/aws/glacier/archive_collection.rb +141 -0
  45. data/lib/aws/glacier/client.rb +286 -0
  46. data/lib/aws/glacier/config.rb +19 -0
  47. data/lib/aws/glacier/errors.rb +22 -0
  48. data/lib/aws/glacier/request.rb +34 -0
  49. data/lib/aws/glacier/resource.rb +30 -0
  50. data/lib/aws/glacier/vault.rb +137 -0
  51. data/lib/aws/glacier/vault_collection.rb +75 -0
  52. data/lib/aws/glacier/vault_notification_configuration.rb +27 -0
  53. data/lib/aws/import_export.rb +71 -0
  54. data/lib/aws/import_export/client.rb +109 -0
  55. data/lib/aws/import_export/config.rb +19 -0
  56. data/lib/aws/import_export/errors.rb +22 -0
  57. data/lib/aws/import_export/request.rb +23 -0
  58. data/lib/aws/route_53/client.rb +1 -1
  59. data/lib/aws/s3/bucket_lifecycle_configuration.rb +160 -63
  60. data/lib/aws/s3/client.rb +43 -0
  61. data/lib/aws/s3/client/xml.rb +6 -0
  62. data/lib/aws/s3/cors_rule_collection.rb +1 -1
  63. data/lib/aws/s3/data_options.rb +1 -3
  64. data/lib/aws/s3/request.rb +1 -1
  65. data/lib/aws/s3/s3_object.rb +52 -10
  66. data/lib/aws/sqs/client.rb +9 -3
  67. data/lib/aws/sqs/queue.rb +44 -5
  68. data/lib/aws/storage_gateway.rb +71 -0
  69. data/lib/aws/storage_gateway/client.rb +472 -0
  70. data/lib/aws/storage_gateway/config.rb +18 -0
  71. data/lib/aws/storage_gateway/errors.rb +22 -0
  72. data/lib/aws/storage_gateway/request.rb +28 -0
  73. data/lib/aws/version.rb +1 -1
  74. metadata +45 -10
  75. data/lib/aws/ec2/security_group/ingress_ip_permission_collection.rb +0 -61
@@ -16,6 +16,7 @@ require 'pathname'
16
16
  require 'stringio'
17
17
  require 'json'
18
18
  require 'digest/md5'
19
+ require 'base64'
19
20
  require 'nokogiri'
20
21
 
21
22
  module AWS
@@ -925,8 +926,19 @@ module AWS
925
926
  exp_rule_id = nil
926
927
  end
927
928
 
929
+ if restore = resp.http_response.headers['x-amz-restore']
930
+ restore.first =~ /ongoing-request="(.+?)", expiry-date="(.+?)"/
931
+ restoring = $1 == "true"
932
+ restore_date = DateTime.parse($2)
933
+ else
934
+ restoring = false
935
+ restore_date = nil
936
+ end
937
+
928
938
  resp.data[:expiration_date] = exp_date
929
939
  resp.data[:expiration_rule_id] = exp_rule_id
940
+ resp.data[:restore_in_progress] = restoring
941
+ resp.data[:restore_expiration_date] = restore_date
930
942
 
931
943
  {
932
944
  'x-amz-version-id' => :version_id,
@@ -970,6 +982,37 @@ module AWS
970
982
 
971
983
  end
972
984
 
985
+ # @overload restore_object(options = {})
986
+ # Restores a temporary copy of an archived object.
987
+ # @param [Hash] options
988
+ # @option options [required,String] :bucket_name
989
+ # @option options [required,String] :key
990
+ # @option options [required,Integer] :days the number of days to keep
991
+ # the restored object.
992
+ # @return [Core::Response]
993
+ # @since 1.7.2
994
+ object_method(:restore_object, :post, 'restore',
995
+ :header_options => { :content_md5 => 'Content-MD5' }) do
996
+ configure_request do |req, options|
997
+ super(req, options)
998
+
999
+ validate!(:days, options[:days]) do
1000
+ "must be greater or equal to 1" if options[:days].to_i <= 0
1001
+ end
1002
+
1003
+ xml = Nokogiri::XML::Builder.new do |xml|
1004
+ xml.RestoreRequest('xmlns' => XMLNS) do
1005
+ xml.Days(options[:days].to_i) if options[:days]
1006
+ end
1007
+ end.doc.root.to_xml
1008
+
1009
+ req.body = xml
1010
+ req.headers['content-type'] = 'application/xml'
1011
+ req.headers['content-md5'] = md5(xml)
1012
+ end
1013
+ end
1014
+
1015
+
973
1016
  # @overload list_objects(options = {})
974
1017
  # @param [Hash] options
975
1018
  # @option options [required,String] :bucket_name
@@ -167,6 +167,12 @@ module AWS
167
167
  rename(:rules)
168
168
  element("Expiration") do
169
169
  element("Days") { integer_value }
170
+ element("Date") { datetime_value }
171
+ end
172
+ element("Transition") do
173
+ element("StorageClass") { }
174
+ element("Days") { integer_value }
175
+ element("Date") { datetime_value }
170
176
  end
171
177
  end
172
178
  end
@@ -90,7 +90,7 @@ module AWS
90
90
  # bucket.cors.clear
91
91
  # bucket.cors.set([])
92
92
  #
93
- # @param [Hash,CORSRule,CORSRuleCollection] rule A list or array
93
+ # @param [Hash,CORSRule,CORSRuleCollection] rules A list or array
94
94
  # of one or more rules to set. Each rule may be a Hash, a CORSRule
95
95
  # or a CORSRuleCollection.
96
96
  #
@@ -135,9 +135,7 @@ module AWS
135
135
  # @param [String] path Path to a file on disk.
136
136
  # @return [File] Given a path string, returns an open File.
137
137
  def open_file path
138
- file_opts = ['rb']
139
- file_opts << { :encoding => "BINARY" } if Object.const_defined?(:Encoding)
140
- File.open(path, *file_opts)
138
+ Core::ManagedFile.open(path)
141
139
  end
142
140
 
143
141
  # A utility class that turns a block (with 2 args) into an
@@ -180,7 +180,7 @@ module AWS
180
180
  def sub_resources
181
181
  %w(acl location logging notification partNumber policy
182
182
  requestPayment torrent uploadId uploads versionId
183
- versioning versions delete lifecycle tagging cors)
183
+ versioning versions restore delete lifecycle tagging cors)
184
184
  end
185
185
 
186
186
  def query_parameters
@@ -349,6 +349,31 @@ module AWS
349
349
  !server_side_encryption.nil?
350
350
  end
351
351
 
352
+ # @return [Boolean] whether a {#restore} operation on the
353
+ # object is currently being performed on the object.
354
+ # @see #restore_expiration_date
355
+ # @since 1.7.2
356
+ def restore_in_progress?
357
+ head.restore_in_progress
358
+ end
359
+
360
+ # @return [DateTime] the time when the temporarily restored object
361
+ # will be removed from S3. Note that the original object will remain
362
+ # available in Glacier.
363
+ # @return [nil] if the object was not restored from an archived
364
+ # copy
365
+ # @since 1.7.2
366
+ def restore_expiration_date
367
+ head.restore_expiration_date
368
+ end
369
+
370
+ # @return [Boolean] whether the object is a temporary copy of an
371
+ # archived object in the Glacier storage class.
372
+ # @since 1.7.2
373
+ def restored_object?
374
+ !!head.restore_expiration_date
375
+ end
376
+
352
377
  # Deletes the object from its S3 bucket.
353
378
  #
354
379
  # @param [Hash] options
@@ -381,6 +406,27 @@ module AWS
381
406
 
382
407
  end
383
408
 
409
+ # Restores a temporary copy of an archived object from the
410
+ # Glacier storage tier. After the specified +days+, Amazon
411
+ # S3 deletes the temporary copy. Note that the object
412
+ # remains archived; Amazon S3 deletes only the restored copy.
413
+ #
414
+ # Restoring an object does not occur immediately. Use
415
+ # {#restore_in_progress?} to check the status of the operation.
416
+ #
417
+ # @option [Integer] :days (1) the number of days to keep the object
418
+ # @return [Boolean] +true+ if a restore can be initiated.
419
+ # @since 1.7.2
420
+ def restore options = {}
421
+ options[:days] ||= 1
422
+
423
+ client.restore_object(
424
+ :bucket_name => bucket.name,
425
+ :key => key, :days => options[:days])
426
+
427
+ true
428
+ end
429
+
384
430
  # @option [String] :version_id (nil) If present the metadata object
385
431
  # will be for the specified version.
386
432
  # @return [ObjectMetadata] Returns an instance of ObjectMetadata
@@ -1310,17 +1356,13 @@ module AWS
1310
1356
  end
1311
1357
 
1312
1358
  def expiration_timestamp(input)
1359
+ input = input.to_int if input.respond_to?(:to_int)
1313
1360
  case input
1314
- when Time
1315
- expires = input.to_i
1316
- when DateTime
1317
- expires = Time.parse(input.to_s).to_i
1318
- when Integer
1319
- expires = (Time.now + input).to_i
1320
- when String
1321
- expires = Time.parse(input).to_i
1322
- else
1323
- expires = (Time.now + 60*60).to_i
1361
+ when Time then input.to_i
1362
+ when DateTime then Time.parse(input.to_s).to_i
1363
+ when Integer then (Time.now + input).to_i
1364
+ when String then Time.parse(input).to_i
1365
+ else (Time.now + 60*60).to_i
1324
1366
  end
1325
1367
  end
1326
1368
 
@@ -17,7 +17,7 @@ module AWS
17
17
  # Client class for Amazon Simple Queue Service (SQS).
18
18
  class Client < Core::QueryClient
19
19
 
20
- define_client_methods('2011-10-01')
20
+ define_client_methods('2012-11-05')
21
21
 
22
22
  # @private
23
23
  CACHEABLE_REQUESTS = Set[]
@@ -167,8 +167,10 @@ module AWS
167
167
  # @param [Hash] options
168
168
  # * +:queue_url+ - *required* - (String) The URL of the SQS queue to
169
169
  # take action on.
170
- # * +:attribute_names+ - (Array<String>) A list of attributes to
171
- # retrieve information for.
170
+ # * +:attribute_names+ - (Array<String>) A list of attributes that need
171
+ # to be returned along with each message. The set of valid attributes
172
+ # are [SenderId, ApproximateFirstReceiveTimestamp,
173
+ # ApproximateReceiveCount, SentTimestamp].
172
174
  # * +:max_number_of_messages+ - (Integer) The maximum number of
173
175
  # messages to return. Amazon SQS never returns more messages than
174
176
  # this value but may return fewer. All of the messages are not
@@ -176,6 +178,10 @@ module AWS
176
178
  # * +:visibility_timeout+ - (Integer) The duration (in seconds) that
177
179
  # the received messages are hidden from subsequent retrieve requests
178
180
  # after being retrieved by a ReceiveMessage request.
181
+ # * +:wait_time_seconds+ - (Integer) The duration (in seconds) for
182
+ # which the call will wait for a message to arrive in the queue
183
+ # before returning. If a message is available, the call will return
184
+ # sooner than WaitTimeSeconds.
179
185
  # @return [Core::Response]
180
186
  # The #data method of the response object returns
181
187
  # a hash with the following structure:
@@ -29,8 +29,15 @@ module AWS
29
29
 
30
30
  # The default number of seconds to wait between polling requests for
31
31
  # new messages.
32
+ # @deprecated No longer used by {#poll}
32
33
  DEFAULT_POLL_INTERVAL = 1
33
34
 
35
+ # The default number of seconds to pass in as the SQS long polling
36
+ # value (+:wait_time_seconds+) in {#receive_message}.
37
+ #
38
+ # @since 1.8.0
39
+ DEFAULT_WAIT_TIME_SECONDS = 15
40
+
34
41
  include Core::Model
35
42
 
36
43
  # @return [String] The queue URL.
@@ -147,6 +154,12 @@ module AWS
147
154
  # (for more information, see the preceding note about
148
155
  # machine sampling).
149
156
  #
157
+ # @option opts [Integer] :wait_time_seconds The number of seconds
158
+ # the service should wait for a response when requesting a new message.
159
+ # Defaults to the {#wait_time_seconds} attribute defined on the queue.
160
+ # See {#wait_time_seconds} to set the global long poll setting
161
+ # on the queue.
162
+ #
150
163
  # @option opts [Integer] :visibilitiy_timeout The duration (in
151
164
  # seconds) that the received messages are hidden from
152
165
  # subsequent retrieve requests. Valid values: integer from
@@ -209,9 +222,12 @@ module AWS
209
222
  #
210
223
  # @param [Hash] opts Options for polling.
211
224
  #
212
- # @option opts [Float, Integer] :poll_interval The number of
213
- # seconds to wait before retrying when no messages are
214
- # received. The default is 1 second.
225
+ # @option opts [Integer] :wait_time_seconds The number of seconds
226
+ # the service should wait for a response when requesting a new message.
227
+ # Defaults to {DEFAULT_WAIT_TIME_SECONDS}. Use +nil+ to
228
+ # use the queue's global long polling wait time setting.
229
+ # See {#wait_time_seconds} to set the global long poll setting
230
+ # on the queue.
215
231
  #
216
232
  # @option opts [Integer] :idle_timeout The maximum number of
217
233
  # seconds to spend polling while no messages are being
@@ -247,12 +263,18 @@ module AWS
247
263
  # See {ReceivedMessage} for documentation on each
248
264
  # attribute's meaning.
249
265
  #
266
+ # @option opts [Float, Integer] :poll_interval As of
267
+ # v1.7.2, this option is no longer used. See the
268
+ # +:wait_time_seonds+ option for long polling instead.
269
+ #
250
270
  # @return [nil]
251
271
  def poll(opts = {}, &block)
252
- poll_interval = opts[:poll_interval] || DEFAULT_POLL_INTERVAL
253
272
  opts[:limit] = opts.delete(:batch_size) if
254
273
  opts.key?(:batch_size)
255
274
 
275
+ opts[:wait_time_seconds] = DEFAULT_WAIT_TIME_SECONDS unless
276
+ opts.has_key?(:wait_time_seconds)
277
+
256
278
  last_message_at = Time.now
257
279
  got_first = false
258
280
  loop do
@@ -263,7 +285,6 @@ module AWS
263
285
  yield(message)
264
286
  end
265
287
  unless got_msg
266
- Kernel.sleep(poll_interval) unless poll_interval == 0
267
288
  return if hit_timeout?(got_first, last_message_at, opts)
268
289
  end
269
290
  end
@@ -370,6 +391,21 @@ module AWS
370
391
  set_attribute("DelaySeconds", seconds.to_s)
371
392
  end
372
393
 
394
+ # @return [Integer] Gets the number of seconds the service will wait
395
+ # for a response when requesting a new message
396
+ # @since 1.8.0
397
+ def wait_time_seconds
398
+ get_attribute("ReceiveMessageWaitTimeSeconds").to_i
399
+ end
400
+
401
+ # Sets the number of seconds that the service should wait for a response
402
+ # when requesting a new message
403
+ # @param [Integer] seconds How many seconds to wait for a response
404
+ # @since 1.8.0
405
+ def wait_time_seconds= seconds
406
+ set_attribute("ReceiveMessageWaitTimeSeconds", seconds.to_s)
407
+ end
408
+
373
409
  # @return [Integer] Returns an approximate count of messages delayed.
374
410
  def approximate_number_of_messages_delayed
375
411
  get_attribute("ApproximateNumberOfMessagesDelayed").to_i
@@ -673,6 +709,9 @@ module AWS
673
709
  opts[:visibility_timeout]
674
710
  receive_opts[:max_number_of_messages] = opts[:limit] if
675
711
  opts[:limit]
712
+ receive_opts[:wait_time_seconds] = opts[:wait_time_seconds] if
713
+ opts[:wait_time_seconds]
714
+
676
715
  if names = opts[:attributes]
677
716
  receive_opts[:attribute_names] = names.map do |name|
678
717
  name = ReceivedMessage::ATTRIBUTE_ALIASES[name.to_sym] if
@@ -0,0 +1,71 @@
1
+ # Copyright 2011-2012 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License"). You
4
+ # may not use this file except in compliance with the License. A copy of
5
+ # the License is located at
6
+ #
7
+ # http://aws.amazon.com/apache2.0/
8
+ #
9
+ # or in the "license" file accompanying this file. This file is
10
+ # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11
+ # ANY KIND, either express or implied. See the License for the specific
12
+ # language governing permissions and limitations under the License.
13
+
14
+ require 'aws/core'
15
+ require 'aws/storage_gateway/config'
16
+
17
+ module AWS
18
+
19
+ # This class is the starting point for working with AWS Storage Gateway.
20
+ #
21
+ # To use AWS Storage Gateway you must first
22
+ # {sign up here}[http://aws.amazon.com/storagegateway/].
23
+ #
24
+ # For more information about AWS Storage Gateway:
25
+ #
26
+ # * {AWS Storage Gateway}[http://aws.amazon.com/storagegateway/]
27
+ # * {AWS Storage Gateway Documentation}[http://aws.amazon.com/documentation/storagegateway/]
28
+ #
29
+ # = Credentials
30
+ #
31
+ # You can setup default credentials for all AWS services via
32
+ # AWS.config:
33
+ #
34
+ # AWS.config(
35
+ # :access_key_id => 'YOUR_ACCESS_KEY_ID',
36
+ # :secret_access_key => 'YOUR_SECRET_ACCESS_KEY')
37
+ #
38
+ # Or you can set them directly on the AWS::StorageGateway interface:
39
+ #
40
+ # sg = AWS::StorageGateway.new(
41
+ # :access_key_id => 'YOUR_ACCESS_KEY_ID',
42
+ # :secret_access_key => 'YOUR_SECRET_ACCESS_KEY')
43
+ #
44
+ # = Using the Client
45
+ #
46
+ # AWS::StorageGateway does not provide higher level abstractions for Route 53 at
47
+ # this time. You can still access all of the API methods using
48
+ # {AWS::StorageGateway::Client}. Here is how you access the client and make
49
+ # a simple request:
50
+ #
51
+ # sg = AWS::StorageGateway.new
52
+ #
53
+ # resp = sg.client.list_gateways
54
+ # resp[:gateways].each do |gateway|
55
+ # puts gateway[:gateway_arn]
56
+ # end
57
+ #
58
+ # See {Client} for documentation on all of the supported operations.
59
+ #
60
+ class StorageGateway
61
+
62
+ AWS.register_autoloads(self, 'aws/storage_gateway') do
63
+ autoload :Client, 'client'
64
+ autoload :Errors, 'errors'
65
+ autoload :Request, 'request'
66
+ end
67
+
68
+ include Core::ServiceInterface
69
+
70
+ end
71
+ end
@@ -0,0 +1,472 @@
1
+ # Copyright 2011-2012 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License"). You
4
+ # may not use this file except in compliance with the License. A copy of
5
+ # the License is located at
6
+ #
7
+ # http://aws.amazon.com/apache2.0/
8
+ #
9
+ # or in the "license" file accompanying this file. This file is
10
+ # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11
+ # ANY KIND, either express or implied. See the License for the specific
12
+ # language governing permissions and limitations under the License.
13
+
14
+ module AWS
15
+ class StorageGateway
16
+
17
+ # Client class for AWS Storage Gateway.
18
+ class Client < Core::JSONClient
19
+
20
+ define_client_methods('2012-06-30')
21
+
22
+ # @private
23
+ CACHEABLE_REQUESTS = Set[]
24
+
25
+ ## client methods ##
26
+
27
+ # @!method activate_gateway(options = {})
28
+ # Calls the ActivateGateway API operation.
29
+ # @param [Hash] options
30
+ # * +:activation_key+ - *required* - (String)
31
+ # * +:gateway_name+ - *required* - (String)
32
+ # * +:gateway_timezone+ - *required* - (String)
33
+ # * +:gateway_region+ - *required* - (String)
34
+ # * +:gateway_type+ - (String)
35
+ # @return [Core::Response]
36
+ # The #data method of the response object returns
37
+ # a hash with the following structure:
38
+ # * +GatewayARN+ - (String)
39
+
40
+ # @!method add_cache(options = {})
41
+ # Calls the AddCache API operation.
42
+ # @param [Hash] options
43
+ # * +:gateway_arn+ - *required* - (String)
44
+ # * +:disk_ids+ - *required* - (Array<String>)
45
+ # @return [Core::Response]
46
+ # The #data method of the response object returns
47
+ # a hash with the following structure:
48
+ # * +GatewayARN+ - (String)
49
+
50
+ # @!method add_upload_buffer(options = {})
51
+ # Calls the AddUploadBuffer API operation.
52
+ # @param [Hash] options
53
+ # * +:gateway_arn+ - *required* - (String)
54
+ # * +:disk_ids+ - *required* - (Array<String>)
55
+ # @return [Core::Response]
56
+ # The #data method of the response object returns
57
+ # a hash with the following structure:
58
+ # * +GatewayARN+ - (String)
59
+
60
+ # @!method add_working_storage(options = {})
61
+ # Calls the AddWorkingStorage API operation.
62
+ # @param [Hash] options
63
+ # * +:gateway_arn+ - *required* - (String)
64
+ # * +:disk_ids+ - *required* - (Array<String>)
65
+ # @return [Core::Response]
66
+ # The #data method of the response object returns
67
+ # a hash with the following structure:
68
+ # * +GatewayARN+ - (String)
69
+
70
+ # @!method create_cachedi_scsi_volume(options = {})
71
+ # Calls the CreateCachediSCSIVolume API operation.
72
+ # @param [Hash] options
73
+ # * +:gateway_arn+ - *required* - (String)
74
+ # * +:volume_size_in_bytes+ - *required* - (Integer)
75
+ # * +:snapshot_id+ - (String)
76
+ # * +:target_name+ - *required* - (String)
77
+ # * +:network_interface_id+ - *required* - (String)
78
+ # * +:client_token+ - *required* - (String)
79
+ # @return [Core::Response]
80
+ # The #data method of the response object returns
81
+ # a hash with the following structure:
82
+ # * +VolumeARN+ - (String)
83
+ # * +TargetARN+ - (String)
84
+
85
+ # @!method create_snapshot(options = {})
86
+ # Calls the CreateSnapshot API operation.
87
+ # @param [Hash] options
88
+ # * +:volume_arn+ - *required* - (String)
89
+ # * +:snapshot_description+ - *required* - (String)
90
+ # @return [Core::Response]
91
+ # The #data method of the response object returns
92
+ # a hash with the following structure:
93
+ # * +VolumeARN+ - (String)
94
+ # * +SnapshotId+ - (String)
95
+
96
+ # @!method create_snapshot_from_volume_recovery_point(options = {})
97
+ # Calls the CreateSnapshotFromVolumeRecoveryPoint API operation.
98
+ # @param [Hash] options
99
+ # * +:volume_arn+ - *required* - (String)
100
+ # * +:snapshot_description+ - *required* - (String)
101
+ # @return [Core::Response]
102
+ # The #data method of the response object returns
103
+ # a hash with the following structure:
104
+ # * +SnapshotId+ - (String)
105
+ # * +VolumeARN+ - (String)
106
+ # * +VolumeRecoveryPointTime+ - (String)
107
+
108
+ # @!method create_storedi_scsi_volume(options = {})
109
+ # Calls the CreateStorediSCSIVolume API operation.
110
+ # @param [Hash] options
111
+ # * +:gateway_arn+ - *required* - (String)
112
+ # * +:disk_id+ - *required* - (String)
113
+ # * +:snapshot_id+ - (String)
114
+ # * +:preserve_existing_data+ - *required* - (Boolean)
115
+ # * +:target_name+ - *required* - (String)
116
+ # * +:network_interface_id+ - *required* - (String)
117
+ # @return [Core::Response]
118
+ # The #data method of the response object returns
119
+ # a hash with the following structure:
120
+ # * +VolumeARN+ - (String)
121
+ # * +VolumeSizeInBytes+ - (Integer)
122
+ # * +TargetARN+ - (String)
123
+
124
+ # @!method delete_bandwidth_rate_limit(options = {})
125
+ # Calls the DeleteBandwidthRateLimit API operation.
126
+ # @param [Hash] options
127
+ # * +:gateway_arn+ - *required* - (String)
128
+ # * +:bandwidth_type+ - *required* - (String)
129
+ # @return [Core::Response]
130
+ # The #data method of the response object returns
131
+ # a hash with the following structure:
132
+ # * +GatewayARN+ - (String)
133
+
134
+ # @!method delete_chap_credentials(options = {})
135
+ # Calls the DeleteChapCredentials API operation.
136
+ # @param [Hash] options
137
+ # * +:target_arn+ - *required* - (String)
138
+ # * +:initiator_name+ - *required* - (String)
139
+ # @return [Core::Response]
140
+ # The #data method of the response object returns
141
+ # a hash with the following structure:
142
+ # * +TargetARN+ - (String)
143
+ # * +InitiatorName+ - (String)
144
+
145
+ # @!method delete_gateway(options = {})
146
+ # Calls the DeleteGateway API operation.
147
+ # @param [Hash] options
148
+ # * +:gateway_arn+ - *required* - (String)
149
+ # @return [Core::Response]
150
+ # The #data method of the response object returns
151
+ # a hash with the following structure:
152
+ # * +GatewayARN+ - (String)
153
+
154
+ # @!method delete_snapshot_schedule(options = {})
155
+ # Calls the DeleteSnapshotSchedule API operation.
156
+ # @param [Hash] options
157
+ # * +:volume_arn+ - *required* - (String)
158
+ # @return [Core::Response]
159
+ # The #data method of the response object returns
160
+ # a hash with the following structure:
161
+ # * +VolumeARN+ - (String)
162
+
163
+ # @!method delete_volume(options = {})
164
+ # Calls the DeleteVolume API operation.
165
+ # @param [Hash] options
166
+ # * +:volume_arn+ - *required* - (String)
167
+ # @return [Core::Response]
168
+ # The #data method of the response object returns
169
+ # a hash with the following structure:
170
+ # * +VolumeARN+ - (String)
171
+
172
+ # @!method describe_bandwidth_rate_limit(options = {})
173
+ # Calls the DescribeBandwidthRateLimit API operation.
174
+ # @param [Hash] options
175
+ # * +:gateway_arn+ - *required* - (String)
176
+ # @return [Core::Response]
177
+ # The #data method of the response object returns
178
+ # a hash with the following structure:
179
+ # * +GatewayARN+ - (String)
180
+ # * +AverageUploadRateLimitInBitsPerSec+ - (Integer)
181
+ # * +AverageDownloadRateLimitInBitsPerSec+ - (Integer)
182
+
183
+ # @!method describe_cache(options = {})
184
+ # Calls the DescribeCache API operation.
185
+ # @param [Hash] options
186
+ # * +:gateway_arn+ - *required* - (String)
187
+ # @return [Core::Response]
188
+ # The #data method of the response object returns
189
+ # a hash with the following structure:
190
+ # * +GatewayARN+ - (String)
191
+ # * +DiskIds+ - (Array<String>)
192
+ # * +CacheAllocatedInBytes+ - (Integer)
193
+ # * +CacheUsedPercentage+ - (Numeric)
194
+ # * +CacheDirtyPercentage+ - (Numeric)
195
+ # * +CacheHitPercentage+ - (Numeric)
196
+ # * +CacheMissPercentage+ - (Numeric)
197
+
198
+ # @!method describe_cachedi_scsi_volumes(options = {})
199
+ # Calls the DescribeCachediSCSIVolumes API operation.
200
+ # @param [Hash] options
201
+ # * +:volume_ar_ns+ - *required* - (Array<String>)
202
+ # @return [Core::Response]
203
+ # The #data method of the response object returns
204
+ # a hash with the following structure:
205
+ # * +CachediSCSIVolumes+ - (Array<Hash>)
206
+ # * +VolumeARN+ - (String)
207
+ # * +VolumeId+ - (String)
208
+ # * +VolumeType+ - (String)
209
+ # * +VolumeStatus+ - (String)
210
+ # * +VolumeSizeInBytes+ - (Integer)
211
+ # * +VolumeProgress+ - (Numeric)
212
+ # * +SourceSnapshotId+ - (String)
213
+ # * +VolumeiSCSIAttributes+ - (Hash)
214
+ # * +TargetARN+ - (String)
215
+ # * +NetworkInterfaceId+ - (String)
216
+ # * +NetworkInterfacePort+ - (Integer)
217
+ # * +LunNumber+ - (Integer)
218
+ # * +ChapEnabled+ - (Boolean)
219
+
220
+ # @!method describe_chap_credentials(options = {})
221
+ # Calls the DescribeChapCredentials API operation.
222
+ # @param [Hash] options
223
+ # * +:target_arn+ - *required* - (String)
224
+ # @return [Core::Response]
225
+ # The #data method of the response object returns
226
+ # a hash with the following structure:
227
+ # * +ChapCredentials+ - (Array<Hash>)
228
+ # * +TargetARN+ - (String)
229
+ # * +SecretToAuthenticateInitiator+ - (String)
230
+ # * +InitiatorName+ - (String)
231
+ # * +SecretToAuthenticateTarget+ - (String)
232
+
233
+ # @!method describe_gateway_information(options = {})
234
+ # Calls the DescribeGatewayInformation API operation.
235
+ # @param [Hash] options
236
+ # * +:gateway_arn+ - *required* - (String)
237
+ # @return [Core::Response]
238
+ # The #data method of the response object returns
239
+ # a hash with the following structure:
240
+ # * +GatewayARN+ - (String)
241
+ # * +GatewayId+ - (String)
242
+ # * +GatewayTimezone+ - (String)
243
+ # * +GatewayState+ - (String)
244
+ # * +GatewayNetworkInterfaces+ - (Array<Hash>)
245
+ # * +Ipv4Address+ - (String)
246
+ # * +MacAddress+ - (String)
247
+ # * +Ipv6Address+ - (String)
248
+ # * +GatewayType+ - (String)
249
+ # * +NextUpdateAvailabilityDate+ - (String)
250
+
251
+ # @!method describe_maintenance_start_time(options = {})
252
+ # Calls the DescribeMaintenanceStartTime API operation.
253
+ # @param [Hash] options
254
+ # * +:gateway_arn+ - *required* - (String)
255
+ # @return [Core::Response]
256
+ # The #data method of the response object returns
257
+ # a hash with the following structure:
258
+ # * +GatewayARN+ - (String)
259
+ # * +HourOfDay+ - (Integer)
260
+ # * +MinuteOfHour+ - (Integer)
261
+ # * +DayOfWeek+ - (Integer)
262
+ # * +Timezone+ - (String)
263
+
264
+ # @!method describe_snapshot_schedule(options = {})
265
+ # Calls the DescribeSnapshotSchedule API operation.
266
+ # @param [Hash] options
267
+ # * +:volume_arn+ - *required* - (String)
268
+ # @return [Core::Response]
269
+ # The #data method of the response object returns
270
+ # a hash with the following structure:
271
+ # * +VolumeARN+ - (String)
272
+ # * +StartAt+ - (Integer)
273
+ # * +RecurrenceInHours+ - (Integer)
274
+ # * +Description+ - (String)
275
+ # * +Timezone+ - (String)
276
+
277
+ # @!method describe_storedi_scsi_volumes(options = {})
278
+ # Calls the DescribeStorediSCSIVolumes API operation.
279
+ # @param [Hash] options
280
+ # * +:volume_ar_ns+ - *required* - (Array<String>)
281
+ # @return [Core::Response]
282
+ # The #data method of the response object returns
283
+ # a hash with the following structure:
284
+ # * +StorediSCSIVolumes+ - (Array<Hash>)
285
+ # * +VolumeARN+ - (String)
286
+ # * +VolumeId+ - (String)
287
+ # * +VolumeType+ - (String)
288
+ # * +VolumeStatus+ - (String)
289
+ # * +VolumeSizeInBytes+ - (Integer)
290
+ # * +VolumeProgress+ - (Numeric)
291
+ # * +VolumeDiskId+ - (String)
292
+ # * +SourceSnapshotId+ - (String)
293
+ # * +PreservedExistingData+ - (Boolean)
294
+ # * +VolumeiSCSIAttributes+ - (Hash)
295
+ # * +TargetARN+ - (String)
296
+ # * +NetworkInterfaceId+ - (String)
297
+ # * +NetworkInterfacePort+ - (Integer)
298
+ # * +LunNumber+ - (Integer)
299
+ # * +ChapEnabled+ - (Boolean)
300
+
301
+ # @!method describe_upload_buffer(options = {})
302
+ # Calls the DescribeUploadBuffer API operation.
303
+ # @param [Hash] options
304
+ # * +:gateway_arn+ - *required* - (String)
305
+ # @return [Core::Response]
306
+ # The #data method of the response object returns
307
+ # a hash with the following structure:
308
+ # * +GatewayARN+ - (String)
309
+ # * +DiskIds+ - (Array<String>)
310
+ # * +UploadBufferUsedInBytes+ - (Integer)
311
+ # * +UploadBufferAllocatedInBytes+ - (Integer)
312
+
313
+ # @!method describe_working_storage(options = {})
314
+ # Calls the DescribeWorkingStorage API operation.
315
+ # @param [Hash] options
316
+ # * +:gateway_arn+ - *required* - (String)
317
+ # @return [Core::Response]
318
+ # The #data method of the response object returns
319
+ # a hash with the following structure:
320
+ # * +GatewayARN+ - (String)
321
+ # * +DiskIds+ - (Array<String>)
322
+ # * +WorkingStorageUsedInBytes+ - (Integer)
323
+ # * +WorkingStorageAllocatedInBytes+ - (Integer)
324
+
325
+ # @!method list_gateways(options = {})
326
+ # Calls the ListGateways API operation.
327
+ # @param [Hash] options
328
+ # * +:marker+ - (String)
329
+ # * +:limit+ - (Integer)
330
+ # @return [Core::Response]
331
+ # The #data method of the response object returns
332
+ # a hash with the following structure:
333
+ # * +Gateways+ - (Array<Hash>)
334
+ # * +GatewayARN+ - (String)
335
+ # * +Marker+ - (String)
336
+
337
+ # @!method list_local_disks(options = {})
338
+ # Calls the ListLocalDisks API operation.
339
+ # @param [Hash] options
340
+ # * +:gateway_arn+ - *required* - (String)
341
+ # @return [Core::Response]
342
+ # The #data method of the response object returns
343
+ # a hash with the following structure:
344
+ # * +GatewayARN+ - (String)
345
+ # * +Disks+ - (Array<Hash>)
346
+ # * +DiskId+ - (String)
347
+ # * +DiskPath+ - (String)
348
+ # * +DiskNode+ - (String)
349
+ # * +DiskSizeInBytes+ - (Integer)
350
+ # * +DiskAllocationType+ - (String)
351
+ # * +DiskAllocationResource+ - (String)
352
+
353
+ # @!method list_volume_recovery_points(options = {})
354
+ # Calls the ListVolumeRecoveryPoints API operation.
355
+ # @param [Hash] options
356
+ # * +:gateway_arn+ - *required* - (String)
357
+ # @return [Core::Response]
358
+ # The #data method of the response object returns
359
+ # a hash with the following structure:
360
+ # * +GatewayARN+ - (String)
361
+ # * +VolumeRecoveryPointInfos+ - (Array<Hash>)
362
+ # * +VolumeARN+ - (String)
363
+ # * +VolumeSizeInBytes+ - (Integer)
364
+ # * +VolumeUsageInBytes+ - (Integer)
365
+ # * +VolumeRecoveryPointTime+ - (String)
366
+
367
+ # @!method list_volumes(options = {})
368
+ # Calls the ListVolumes API operation.
369
+ # @param [Hash] options
370
+ # * +:gateway_arn+ - *required* - (String)
371
+ # * +:marker+ - (String)
372
+ # * +:limit+ - (Integer)
373
+ # @return [Core::Response]
374
+ # The #data method of the response object returns
375
+ # a hash with the following structure:
376
+ # * +GatewayARN+ - (String)
377
+ # * +Marker+ - (String)
378
+ # * +VolumeInfos+ - (Array<Hash>)
379
+ # * +VolumeARN+ - (String)
380
+ # * +VolumeType+ - (String)
381
+
382
+ # @!method shutdown_gateway(options = {})
383
+ # Calls the ShutdownGateway API operation.
384
+ # @param [Hash] options
385
+ # * +:gateway_arn+ - *required* - (String)
386
+ # @return [Core::Response]
387
+ # The #data method of the response object returns
388
+ # a hash with the following structure:
389
+ # * +GatewayARN+ - (String)
390
+
391
+ # @!method start_gateway(options = {})
392
+ # Calls the StartGateway API operation.
393
+ # @param [Hash] options
394
+ # * +:gateway_arn+ - *required* - (String)
395
+ # @return [Core::Response]
396
+ # The #data method of the response object returns
397
+ # a hash with the following structure:
398
+ # * +GatewayARN+ - (String)
399
+
400
+ # @!method update_bandwidth_rate_limit(options = {})
401
+ # Calls the UpdateBandwidthRateLimit API operation.
402
+ # @param [Hash] options
403
+ # * +:gateway_arn+ - *required* - (String)
404
+ # * +:average_upload_rate_limit_in_bits_per_sec+ - (Integer)
405
+ # * +:average_download_rate_limit_in_bits_per_sec+ - (Integer)
406
+ # @return [Core::Response]
407
+ # The #data method of the response object returns
408
+ # a hash with the following structure:
409
+ # * +GatewayARN+ - (String)
410
+
411
+ # @!method update_chap_credentials(options = {})
412
+ # Calls the UpdateChapCredentials API operation.
413
+ # @param [Hash] options
414
+ # * +:target_arn+ - *required* - (String)
415
+ # * +:secret_to_authenticate_initiator+ - *required* - (String)
416
+ # * +:initiator_name+ - *required* - (String)
417
+ # * +:secret_to_authenticate_target+ - (String)
418
+ # @return [Core::Response]
419
+ # The #data method of the response object returns
420
+ # a hash with the following structure:
421
+ # * +TargetARN+ - (String)
422
+ # * +InitiatorName+ - (String)
423
+
424
+ # @!method update_gateway_information(options = {})
425
+ # Calls the UpdateGatewayInformation API operation.
426
+ # @param [Hash] options
427
+ # * +:gateway_arn+ - *required* - (String)
428
+ # * +:gateway_name+ - (String)
429
+ # * +:gateway_timezone+ - (String)
430
+ # @return [Core::Response]
431
+ # The #data method of the response object returns
432
+ # a hash with the following structure:
433
+ # * +GatewayARN+ - (String)
434
+
435
+ # @!method update_gateway_software_now(options = {})
436
+ # Calls the UpdateGatewaySoftwareNow API operation.
437
+ # @param [Hash] options
438
+ # * +:gateway_arn+ - *required* - (String)
439
+ # @return [Core::Response]
440
+ # The #data method of the response object returns
441
+ # a hash with the following structure:
442
+ # * +GatewayARN+ - (String)
443
+
444
+ # @!method update_maintenance_start_time(options = {})
445
+ # Calls the UpdateMaintenanceStartTime API operation.
446
+ # @param [Hash] options
447
+ # * +:gateway_arn+ - *required* - (String)
448
+ # * +:hour_of_day+ - *required* - (Integer)
449
+ # * +:minute_of_hour+ - *required* - (Integer)
450
+ # * +:day_of_week+ - *required* - (Integer)
451
+ # @return [Core::Response]
452
+ # The #data method of the response object returns
453
+ # a hash with the following structure:
454
+ # * +GatewayARN+ - (String)
455
+
456
+ # @!method update_snapshot_schedule(options = {})
457
+ # Calls the UpdateSnapshotSchedule API operation.
458
+ # @param [Hash] options
459
+ # * +:volume_arn+ - *required* - (String)
460
+ # * +:start_at+ - *required* - (Integer)
461
+ # * +:recurrence_in_hours+ - *required* - (Integer)
462
+ # * +:description+ - (String)
463
+ # @return [Core::Response]
464
+ # The #data method of the response object returns
465
+ # a hash with the following structure:
466
+ # * +VolumeARN+ - (String)
467
+
468
+ ## end client methods ##
469
+
470
+ end
471
+ end
472
+ end