fog-aws 3.14.0 → 3.33.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 (112) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -1161
  3. data/README.md +17 -3
  4. data/fog-aws.gemspec +7 -4
  5. data/lib/fog/aws/auto_scaling.rb +1 -1
  6. data/lib/fog/aws/beanstalk.rb +1 -1
  7. data/lib/fog/aws/cdn.rb +1 -1
  8. data/lib/fog/aws/cloud_formation.rb +1 -1
  9. data/lib/fog/aws/cloud_watch.rb +1 -1
  10. data/lib/fog/aws/compute.rb +1 -1
  11. data/lib/fog/aws/credential_fetcher.rb +16 -2
  12. data/lib/fog/aws/data_pipeline.rb +1 -1
  13. data/lib/fog/aws/dns.rb +1 -1
  14. data/lib/fog/aws/dynamodb.rb +1 -1
  15. data/lib/fog/aws/ecs.rb +1 -1
  16. data/lib/fog/aws/elasticache.rb +2 -2
  17. data/lib/fog/aws/elb.rb +1 -1
  18. data/lib/fog/aws/elbv2.rb +1 -1
  19. data/lib/fog/aws/emr.rb +1 -1
  20. data/lib/fog/aws/glacier.rb +1 -1
  21. data/lib/fog/aws/iam.rb +1 -1
  22. data/lib/fog/aws/kinesis.rb +1 -1
  23. data/lib/fog/aws/kms.rb +6 -2
  24. data/lib/fog/aws/lambda.rb +1 -1
  25. data/lib/fog/aws/models/compute/dhcp_option.rb +1 -1
  26. data/lib/fog/aws/models/compute/flavors.rb +2144 -754
  27. data/lib/fog/aws/models/compute/network_interfaces.rb +1 -1
  28. data/lib/fog/aws/models/elasticache/cluster.rb +1 -1
  29. data/lib/fog/aws/models/storage/file.rb +26 -10
  30. data/lib/fog/aws/models/storage/files.rb +3 -2
  31. data/lib/fog/aws/parsers/compute/describe_instance_status.rb +5 -3
  32. data/lib/fog/aws/parsers/iam/get_group_policy.rb +1 -1
  33. data/lib/fog/aws/parsers/iam/get_role_policy.rb +1 -1
  34. data/lib/fog/aws/parsers/iam/get_user_policy.rb +1 -1
  35. data/lib/fog/aws/parsers/iam/list_server_certificates.rb +1 -1
  36. data/lib/fog/aws/parsers/iam/policy_version.rb +1 -1
  37. data/lib/fog/aws/parsers/kms/describe_key.rb +2 -2
  38. data/lib/fog/aws/parsers/kms/get_public_key.rb +30 -0
  39. data/lib/fog/aws/parsers/kms/schedule_key_deletion.rb +28 -0
  40. data/lib/fog/aws/parsers/kms/sign.rb +24 -0
  41. data/lib/fog/aws/parsers/rds/db_cluster_parser.rb +1 -1
  42. data/lib/fog/aws/parsers/rds/db_parser.rb +1 -1
  43. data/lib/fog/aws/parsers/rds/modify_db_subnet_group.rb +1 -1
  44. data/lib/fog/aws/parsers/redshift/cluster_subnet_group_parser.rb +1 -1
  45. data/lib/fog/aws/parsers/storage/list_objects_v2.rb +66 -0
  46. data/lib/fog/aws/rds.rb +1 -1
  47. data/lib/fog/aws/redshift.rb +1 -1
  48. data/lib/fog/aws/requests/auto_scaling/attach_load_balancer_target_groups.rb +1 -1
  49. data/lib/fog/aws/requests/auto_scaling/describe_scaling_activities.rb +1 -1
  50. data/lib/fog/aws/requests/auto_scaling/put_scheduled_update_group_action.rb +1 -1
  51. data/lib/fog/aws/requests/cloud_formation/create_change_set.rb +1 -1
  52. data/lib/fog/aws/requests/cloud_formation/create_stack.rb +1 -1
  53. data/lib/fog/aws/requests/cloud_formation/get_template_summary.rb +1 -1
  54. data/lib/fog/aws/requests/cloud_formation/update_stack.rb +1 -1
  55. data/lib/fog/aws/requests/cloud_watch/list_metrics.rb +1 -1
  56. data/lib/fog/aws/requests/compute/authorize_security_group_egress.rb +1 -1
  57. data/lib/fog/aws/requests/compute/authorize_security_group_ingress.rb +1 -1
  58. data/lib/fog/aws/requests/compute/create_network_interface.rb +1 -1
  59. data/lib/fog/aws/requests/compute/create_vpc.rb +1 -1
  60. data/lib/fog/aws/requests/compute/describe_network_interfaces.rb +2 -2
  61. data/lib/fog/aws/requests/compute/modify_network_interface_attribute.rb +1 -1
  62. data/lib/fog/aws/requests/compute/modify_volume.rb +1 -1
  63. data/lib/fog/aws/requests/compute/revoke_security_group_egress.rb +1 -1
  64. data/lib/fog/aws/requests/compute/revoke_security_group_ingress.rb +1 -1
  65. data/lib/fog/aws/requests/compute/run_instances.rb +2 -2
  66. data/lib/fog/aws/requests/data_pipeline/deactivate_pipeline.rb +1 -1
  67. data/lib/fog/aws/requests/ecs/list_task_definitions.rb +1 -1
  68. data/lib/fog/aws/requests/efs/create_file_system.rb +1 -1
  69. data/lib/fog/aws/requests/elasticache/authorize_cache_security_group_ingress.rb +1 -1
  70. data/lib/fog/aws/requests/elasticache/create_cache_cluster.rb +2 -2
  71. data/lib/fog/aws/requests/elasticache/describe_engine_default_parameters.rb +1 -1
  72. data/lib/fog/aws/requests/elb/delete_load_balancer_listeners.rb +1 -1
  73. data/lib/fog/aws/requests/elbv2/describe_tags.rb +2 -2
  74. data/lib/fog/aws/requests/glacier/initiate_job.rb +1 -1
  75. data/lib/fog/aws/requests/glacier/initiate_multipart_upload.rb +1 -1
  76. data/lib/fog/aws/requests/kinesis/list_streams.rb +1 -1
  77. data/lib/fog/aws/requests/kms/create_key.rb +74 -36
  78. data/lib/fog/aws/requests/kms/get_public_key.rb +35 -0
  79. data/lib/fog/aws/requests/kms/list_keys.rb +3 -4
  80. data/lib/fog/aws/requests/kms/schedule_key_deletion.rb +37 -0
  81. data/lib/fog/aws/requests/kms/sign.rb +62 -0
  82. data/lib/fog/aws/requests/rds/authorize_db_security_group_ingress.rb +2 -2
  83. data/lib/fog/aws/requests/rds/create_db_cluster.rb +1 -1
  84. data/lib/fog/aws/requests/rds/describe_db_snapshots.rb +1 -1
  85. data/lib/fog/aws/requests/rds/modify_db_instance.rb +1 -1
  86. data/lib/fog/aws/requests/rds/modify_db_parameter_group.rb +1 -1
  87. data/lib/fog/aws/requests/ses/send_raw_email.rb +1 -1
  88. data/lib/fog/aws/requests/sqs/change_message_visibility.rb +1 -1
  89. data/lib/fog/aws/requests/sqs/delete_message.rb +1 -1
  90. data/lib/fog/aws/requests/storage/copy_object.rb +2 -1
  91. data/lib/fog/aws/requests/storage/get_bucket.rb +2 -2
  92. data/lib/fog/aws/requests/storage/get_bucket_object_versions.rb +2 -2
  93. data/lib/fog/aws/requests/storage/get_service.rb +1 -1
  94. data/lib/fog/aws/requests/storage/list_objects_v2.rb +129 -0
  95. data/lib/fog/aws/requests/storage/list_parts.rb +1 -1
  96. data/lib/fog/aws/requests/storage/post_object_restore.rb +24 -4
  97. data/lib/fog/aws/requests/storage/put_bucket.rb +0 -4
  98. data/lib/fog/aws/requests/storage/put_bucket_lifecycle.rb +1 -1
  99. data/lib/fog/aws/requests/storage/put_bucket_notification.rb +1 -1
  100. data/lib/fog/aws/requests/storage/put_object.rb +1 -1
  101. data/lib/fog/aws/requests/storage/sync_clock.rb +9 -1
  102. data/lib/fog/aws/requests/storage/upload_part_copy.rb +1 -1
  103. data/lib/fog/aws/ses.rb +20 -17
  104. data/lib/fog/aws/signaturev4.rb +1 -1
  105. data/lib/fog/aws/simpledb.rb +1 -1
  106. data/lib/fog/aws/sns.rb +1 -1
  107. data/lib/fog/aws/sqs.rb +1 -1
  108. data/lib/fog/aws/storage.rb +38 -9
  109. data/lib/fog/aws/support.rb +1 -1
  110. data/lib/fog/aws/version.rb +1 -1
  111. data/lib/fog/aws.rb +6 -3
  112. metadata +37 -11
@@ -54,7 +54,7 @@ module Fog
54
54
  #
55
55
  # Returns an array of all network interfaces
56
56
  #
57
- #>> AWS.network_interfaves.all
57
+ #>> AWS.network_interfaces.all
58
58
  # <Fog::AWS::Compute::NetworkInterfaces
59
59
  # filters={}
60
60
  # [
@@ -54,7 +54,7 @@ module Fog
54
54
  :engine_version => engine_version,
55
55
  :notification_topic_arn => notification_config['TopicArn'],
56
56
  :port => port,
57
- :preferred_availablility_zone => zone,
57
+ :preferred_availability_zone => zone,
58
58
  :preferred_maintenance_window => maintenance_window,
59
59
  :s3_snapshot_location => s3_snapshot_location,
60
60
  :parameter_group_name => parameter_group_name || parameter_group['CacheParameterGroupName'],
@@ -180,7 +180,8 @@ module Fog
180
180
 
181
181
  remove_method :metadata
182
182
  def metadata
183
- attributes.reject {|key, value| !(key.to_s =~ /^x-amz-/)}
183
+ attributes.reject {|key, value| !(key.to_s =~ /^x-amz-/) }
184
+ .reject {|key, value| ['x-amz-id-2', 'x-amz-request-id'].include?(key) }
184
185
  end
185
186
 
186
187
  remove_method :metadata=
@@ -245,7 +246,7 @@ module Fog
245
246
  # @param [Hash] options
246
247
  # @option options [String] acl sets x-amz-acl HTTP header. Valid values include, private | public-read | public-read-write | authenticated-read | bucket-owner-read | bucket-owner-full-control
247
248
  # @option options [String] cache_control sets Cache-Control header. For example, 'No-cache'
248
- # @option options [String] content_disposition sets Content-Disposition HTTP header. For exampple, 'attachment; filename=testing.txt'
249
+ # @option options [String] content_disposition sets Content-Disposition HTTP header. For example, 'attachment; filename=testing.txt'
249
250
  # @option options [String] content_encoding sets Content-Encoding HTTP header. For example, 'x-gzip'
250
251
  # @option options [String] content_md5 sets Content-MD5. For example, '79054025255fb1a26e4bc422aef54eb4'
251
252
  # @option options [String] content_type Content-Type. For example, 'text/plain'
@@ -280,7 +281,7 @@ module Fog
280
281
  merge_attributes(data.body)
281
282
  else
282
283
  data = service.put_object(directory.key, key, body, options)
283
- merge_attributes(data.headers.reject {|key, value| ['Content-Length', 'Content-Type'].include?(key)})
284
+ merge_attributes(data.headers.reject {|key, value| ['connection', 'content-length', 'content-type'].include?(key.downcase)})
284
285
  end
285
286
  self.etag = self.etag.gsub('"','') if self.etag
286
287
  self.content_length = Fog::Storage.get_body_size(body)
@@ -335,12 +336,12 @@ module Fog
335
336
  body.rewind rescue nil
336
337
  end
337
338
  while (chunk = body.read(multipart_chunk_size)) do
338
- part_upload = service.upload_part(directory.key, key, upload_id, part_tags.size + 1, chunk, part_headers(chunk, options))
339
+ part_upload = service.upload_part(directory.key, key, upload_id, part_tags.size + 1, chunk, part_headers(chunk))
339
340
  part_tags << part_upload.headers["ETag"]
340
341
  end
341
342
 
342
343
  if part_tags.empty? #it is an error to have a multipart upload with no parts
343
- part_upload = service.upload_part(directory.key, key, upload_id, 1, '', part_headers('', options))
344
+ part_upload = service.upload_part(directory.key, key, upload_id, 1, '', part_headers(''))
344
345
  part_tags << part_upload.headers["ETag"]
345
346
  end
346
347
 
@@ -387,11 +388,18 @@ module Fog
387
388
  end
388
389
  end
389
390
 
390
- def part_headers(chunk, options)
391
- md5 = Base64.encode64(OpenSSL::Digest::MD5.digest(chunk)).strip
392
- encryption_keys = encryption_customer_key_headers.keys
393
- encryption_headers = options.select { |key| encryption_keys.include?(key) }
394
- { 'Content-MD5' => md5 }.merge(encryption_headers)
391
+ def part_headers(chunk)
392
+ base_headers = part_checksum_headers(chunk)
393
+
394
+ # Only SSE-C headers needed in the UploadPart request. [1]
395
+ # x-amz-server-side-encryption and
396
+ # x-amz-server-side-encryption-aws-kms-key-id are only needed
397
+ # in the CreateMultipartUpload request. [2]
398
+ # [1] https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html
399
+ # [2] https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html
400
+ base_headers.merge!(encryption_customer_key_headers) if encryption && encryption_key
401
+
402
+ base_headers
395
403
  end
396
404
 
397
405
  def encryption_customer_key_headers
@@ -402,6 +410,14 @@ module Fog
402
410
  }
403
411
  end
404
412
 
413
+ def part_checksum_headers(chunk)
414
+ if service.disable_content_md5_validation
415
+ {}
416
+ else
417
+ { 'Content-MD5' => Base64.encode64(OpenSSL::Digest::MD5.digest(chunk)).strip }
418
+ end
419
+ end
420
+
405
421
  def create_part_list(upload_part_options)
406
422
  current_pos = 0
407
423
  count = 0
@@ -125,8 +125,9 @@ module Fog
125
125
  def normalize_headers(data)
126
126
  data.headers['Last-Modified'] = Time.parse(fetch_and_delete_header(data, 'Last-Modified'))
127
127
 
128
- etag = fetch_and_delete_header(data, 'ETag').gsub('"','')
129
- data.headers['ETag'] = etag
128
+ if (etag = fetch_and_delete_header(data, 'ETag'))
129
+ data.headers['ETag'] = etag.gsub('"', '')
130
+ end
130
131
 
131
132
  DASHED_HEADERS.each do |header|
132
133
  value = fetch_and_delete_header(data, header)
@@ -4,7 +4,7 @@ module Fog
4
4
  module Compute
5
5
  class DescribeInstanceStatus < Fog::Parsers::Base
6
6
  def new_instance!
7
- @instance = { 'instanceState' => {}, 'systemStatus' => { 'details' => [] }, 'instanceStatus' => { 'details' => [] }, 'eventsSet' => [] }
7
+ @instance = { 'instanceState' => {}, 'systemStatus' => { 'details' => [] }, 'instanceStatus' => { 'details' => [] }, 'attachedEbsStatus' => { 'details' => [] }, 'eventsSet' => [] }
8
8
  end
9
9
 
10
10
  def new_item!
@@ -31,6 +31,8 @@ module Fog
31
31
  @inside = :instanceState
32
32
  when 'instanceStatus'
33
33
  @inside = :instanceStatus
34
+ when 'attachedEbsStatus'
35
+ @inside = :attachedEbsStatus
34
36
  when 'eventsSet'
35
37
  @inside = :eventsSet
36
38
  end
@@ -43,13 +45,13 @@ module Fog
43
45
  @instance[name] = value
44
46
  when 'nextToken', 'requestId'
45
47
  @response[name] = value
46
- when 'systemStatus', 'instanceState', 'instanceStatus', 'eventsSet'
48
+ when 'systemStatus', 'instanceState', 'instanceStatus', 'attachedEbsStatus', 'eventsSet'
47
49
  @inside = nil
48
50
  when 'item'
49
51
  case @inside
50
52
  when :eventsSet
51
53
  @instance['eventsSet'] << @item
52
- when :systemStatus, :instanceStatus
54
+ when :systemStatus, :instanceStatus, :attachedEbsStatus
53
55
  @instance[@inside.to_s]['details'] << @item
54
56
  when nil
55
57
  @response['instanceStatusSet'] << @instance
@@ -14,7 +14,7 @@ module Fog
14
14
  when 'GroupName', 'PolicyName'
15
15
  @response[name] = value
16
16
  when 'PolicyDocument'
17
- @response['Policy'][name] = if decoded_string = URI.decode(value)
17
+ @response['Policy'][name] = if decoded_string = URI.decode_www_form_component(value)
18
18
  Fog::JSON.decode(decoded_string) rescue value
19
19
  else
20
20
  value
@@ -12,7 +12,7 @@ module Fog
12
12
  when 'RoleName', 'PolicyName'
13
13
  @response['Policy'][name] = value
14
14
  when 'PolicyDocument'
15
- @response['Policy'][name] = if decoded_string = URI.decode(value)
15
+ @response['Policy'][name] = if decoded_string = URI.decode_www_form_component(value)
16
16
  Fog::JSON.decode(decoded_string) rescue value
17
17
  else
18
18
  value
@@ -14,7 +14,7 @@ module Fog
14
14
  when 'UserName', 'PolicyName'
15
15
  @response['Policy'][name] = value
16
16
  when 'PolicyDocument'
17
- @response['Policy'][name] = if decoded_string = URI.decode(value)
17
+ @response['Policy'][name] = if decoded_string = URI.decode_www_form_component(value)
18
18
  Fog::JSON.decode(decoded_string) rescue value
19
19
  else
20
20
  value
@@ -21,7 +21,7 @@ module Fog
21
21
  when 'member'
22
22
  @response['Certificates'] << @certificate
23
23
  reset_certificate
24
- when 'IsTrunctated'
24
+ when 'IsTruncated'
25
25
  @response[name] = !!value
26
26
  when 'Marker'
27
27
  @response[name] = value
@@ -18,7 +18,7 @@ module Fog
18
18
  when 'IsDefaultVersion'
19
19
  @version[name] = (value == 'true')
20
20
  when 'Document'
21
- @version[name] = if decoded_string = URI.decode(value)
21
+ @version[name] = if decoded_string = URI.decode_www_form_component(value)
22
22
  Fog::JSON.decode(decoded_string) rescue value
23
23
  else
24
24
  value
@@ -17,9 +17,9 @@ module Fog
17
17
 
18
18
  def end_element(name)
19
19
  case name
20
- when 'KeyUsage', 'AWSAccountId', 'Description', 'KeyId', 'Arn'
20
+ when 'Arn', 'AWSAccountId', 'Description', 'KeyId', 'KeySpec', 'KeyState', 'KeyUsage'
21
21
  @key[name] = value
22
- when 'CreationDate'
22
+ when 'CreationDate', 'DeletionDate'
23
23
  @key[name] = Time.parse(value)
24
24
  when 'Enabled'
25
25
  @key[name] = (value == 'true')
@@ -0,0 +1,30 @@
1
+ module Fog
2
+ module Parsers
3
+ module AWS
4
+ module KMS
5
+ class GetPublicKey < Fog::Parsers::Base
6
+ def reset
7
+ @response = {}
8
+ end
9
+
10
+ def start_element(name, attrs = [])
11
+ super
12
+ case name
13
+ when 'EncryptionAlgorithms', 'KeyAgreementAlgorithms', 'SigningAlgorithms'
14
+ @response[name] = []
15
+ end
16
+ end
17
+
18
+ def end_element(name)
19
+ case name
20
+ when 'KeyId', 'KeySpec', 'KeyUsage', 'PublicKey'
21
+ @response[name] = value
22
+ when 'EncryptionAlgorithms', 'KeyAgreementAlgorithms', 'SigningAlgorithms'
23
+ @response[name] << value
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,28 @@
1
+ module Fog
2
+ module Parsers
3
+ module AWS
4
+ module KMS
5
+ class ScheduleKeyDeletion < Fog::Parsers::Base
6
+ def reset
7
+ @response = {}
8
+ end
9
+
10
+ def start_element(name, attrs = [])
11
+ super
12
+ end
13
+
14
+ def end_element(name)
15
+ case name
16
+ when 'DeletionDate'
17
+ @response[name] = Time.parse(value)
18
+ when 'KeyId', 'KeyState'
19
+ @response[name] = value
20
+ when 'PendingWindowInDays'
21
+ @response[name] = value.to_i
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,24 @@
1
+ module Fog
2
+ module Parsers
3
+ module AWS
4
+ module KMS
5
+ class Sign < Fog::Parsers::Base
6
+ def reset
7
+ @response = {}
8
+ end
9
+
10
+ def start_element(name, attrs = [])
11
+ super
12
+ end
13
+
14
+ def end_element(name)
15
+ case name
16
+ when 'KeyId', 'Signature', 'SigningAlgorithm'
17
+ @response[name] = value
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -42,7 +42,7 @@ module Fog
42
42
  when 'VpcSecurityGroupId'
43
43
  @vpc_security_group[name] = value
44
44
  when 'Status'
45
- # Unfortunately, status is used in VpcSecurityGroupMemebership and
45
+ # Unfortunately, status is used in VpcSecurityGroupMembership and
46
46
  # DBSecurityGroups
47
47
  if @in_db_security_groups
48
48
  @db_security_group[name]=value
@@ -105,7 +105,7 @@ module Fog
105
105
  when 'VpcSecurityGroupId'
106
106
  @vpc_security_group[name] = value
107
107
  when 'Status'
108
- # Unfortunately, status is used in VpcSecurityGroupMemebership and
108
+ # Unfortunately, status is used in VpcSecurityGroupMembership and
109
109
  # DBSecurityGroups
110
110
  if @in_db_security_groups
111
111
  @db_security_group[name]=value
@@ -4,7 +4,7 @@ module Fog
4
4
  module RDS
5
5
  class ModifyDBSubnetGroup < Fog::Parsers::Base
6
6
  def reset
7
- @response = { 'ModifyDBSubnetGrouptAttributeResult' => {}, 'ResponseMetadata' => {} }
7
+ @response = { 'ModifyDBSubnetGroupAttributeResult' => {}, 'ResponseMetadata' => {} }
8
8
  end
9
9
 
10
10
  def start_element(name, attrs = [])
@@ -32,7 +32,7 @@ module Fog
32
32
  def end_element(name)
33
33
  super
34
34
  case name
35
- when 'ClusterSubnetGroupName', 'Desciption', 'VpcId', 'SubnetGroupStatus'
35
+ when 'ClusterSubnetGroupName', 'Description', 'VpcId', 'SubnetGroupStatus'
36
36
  @response[name] = value
37
37
  when 'SubnetIdentifier', 'SubnetStatus'
38
38
  @subnet[name] = value
@@ -0,0 +1,66 @@
1
+ module Fog
2
+ module Parsers
3
+ module AWS
4
+ module Storage
5
+ class ListObjectsV2 < Fog::Parsers::Base
6
+ # Initialize parser state
7
+ def initialize
8
+ super
9
+ @common_prefix = {}
10
+ @object = { 'Owner' => {} }
11
+ reset
12
+ end
13
+
14
+ def reset
15
+ @object = { 'Owner' => {} }
16
+ @response = { 'Contents' => [], 'CommonPrefixes' => [] }
17
+ end
18
+
19
+ def start_element(name, attrs = [])
20
+ super
21
+ case name
22
+ when 'CommonPrefixes'
23
+ @in_common_prefixes = true
24
+ end
25
+ end
26
+
27
+ def end_element(name)
28
+ case name
29
+ when 'CommonPrefixes'
30
+ @in_common_prefixes = false
31
+ when 'Contents'
32
+ @response['Contents'] << @object
33
+ @object = { 'Owner' => {} }
34
+ when 'DisplayName', 'ID'
35
+ @object['Owner'][name] = value
36
+ when 'ETag'
37
+ @object[name] = value.gsub('"', '') if value != nil
38
+ when 'IsTruncated'
39
+ if value == 'true'
40
+ @response['IsTruncated'] = true
41
+ else
42
+ @response['IsTruncated'] = false
43
+ end
44
+ when 'LastModified'
45
+ @object['LastModified'] = Time.parse(value)
46
+ when 'ContinuationToken', 'NextContinuationToken', 'Name', 'StartAfter'
47
+ @response[name] = value
48
+ when 'MaxKeys', 'KeyCount'
49
+ @response[name] = value.to_i
50
+ when 'Prefix'
51
+ if @in_common_prefixes
52
+ @response['CommonPrefixes'] << value
53
+ else
54
+ @response[name] = value
55
+ end
56
+ when 'Size'
57
+ @object['Size'] = value.to_i
58
+ when 'Delimiter', 'Key', 'StorageClass'
59
+ @object[name] = value
60
+ end
61
+ end
62
+ end
63
+ end
64
+ end
65
+ end
66
+ end
data/lib/fog/aws/rds.rb CHANGED
@@ -9,7 +9,7 @@ module Fog
9
9
  class AuthorizationAlreadyExists < Fog::Errors::Error; end
10
10
 
11
11
  requires :aws_access_key_id, :aws_secret_access_key
12
- recognizes :region, :host, :path, :port, :scheme, :persistent, :use_iam_profile, :aws_session_token, :aws_credentials_expire_at, :version, :instrumentor, :instrumentor_name
12
+ recognizes :region, :host, :path, :port, :scheme, :persistent, :use_iam_profile, :aws_session_token, :aws_credentials_expire_at, :version, :instrumentor, :instrumentor_name, :sts_endpoint
13
13
 
14
14
  request_path 'fog/aws/requests/rds'
15
15
  request :describe_events
@@ -4,7 +4,7 @@ module Fog
4
4
  extend Fog::AWS::CredentialFetcher::ServiceMethods
5
5
 
6
6
  requires :aws_access_key_id, :aws_secret_access_key
7
- recognizes :region, :host, :path, :port, :scheme, :persistent, :use_iam_profile, :aws_session_token, :aws_credentials_expire_at, :instrumentor, :instrumentor_name
7
+ recognizes :region, :host, :path, :port, :scheme, :persistent, :use_iam_profile, :aws_session_token, :aws_credentials_expire_at, :instrumentor, :instrumentor_name, :sts_endpoint
8
8
 
9
9
  request_path 'fog/aws/requests/redshift'
10
10
 
@@ -11,7 +11,7 @@ module Fog
11
11
  # * auto_scaling_group_name<~String> - The name of the Auto Scaling
12
12
  # group.
13
13
  # * options<~Hash>:
14
- # 'TagetGroupARNs'<~Array> - A list of target group arns to use.
14
+ # 'TargetGroupARNs'<~Array> - A list of target group arns to use.
15
15
  #
16
16
  # ==== See Also
17
17
  # http://docs.amazonwebservices.com/AutoScaling/latest/APIReference/API_AttachLoadBalancerTargetGroups.html
@@ -40,7 +40,7 @@ module Fog
40
40
  # * 'ActivityId'<~String> - Specifies the ID of the activity.
41
41
  # * 'AutoScalingGroupName'<~String> - The name of the Auto
42
42
  # Scaling group.
43
- # * 'Cause'<~String> - Contins the reason the activity was
43
+ # * 'Cause'<~String> - Contains the reason the activity was
44
44
  # begun.
45
45
  # * 'Description'<~String> - Contains a friendly, more verbose
46
46
  # description of the scaling activity.
@@ -39,7 +39,7 @@ module Fog
39
39
  # http://docs.amazonwebservices.com/AutoScaling/latest/APIReference/API_PutScheduledUpdateGroupAction.html
40
40
  #
41
41
  def put_scheduled_update_group_action(auto_scaling_group_name, scheduled_action_name, time=nil, options = {})
42
- # The 'Time' paramenter is now an alias for StartTime and needs to be identical if specified.
42
+ # The 'Time' parameter is now an alias for StartTime and needs to be identical if specified.
43
43
  time = options['StartTime'].nil? ? time : options['StartTime']
44
44
  if !time.nil?
45
45
  time = time.class == Time ? time.utc.iso8601 : Time.parse(time).utc.iso8601
@@ -16,7 +16,7 @@ module Fog
16
16
  # * UsePreviousTemplate [Boolean] Reuse the template that is associated with the stack to create the change set.
17
17
  # * NotificationARNs [Array] List of SNS topics to publish events to.
18
18
  # * Parameters [Hash] Hash of providers to supply to template.
19
- # * Capabilities [Array] List of capabilties the stack is granted. Currently CAPABILITY_IAM for allowing the creation of IAM resources.
19
+ # * Capabilities [Array] List of capabilities the stack is granted. Currently CAPABILITY_IAM for allowing the creation of IAM resources.
20
20
  #
21
21
  # @return [Excon::Response]:
22
22
  # * body [Hash:
@@ -16,7 +16,7 @@ module Fog
16
16
  # * NotificationARNs [Array] List of SNS topics to publish events to.
17
17
  # * Parameters [Hash] Hash of providers to supply to template
18
18
  # * TimeoutInMinutes [Integer] Minutes to wait before status is set to CREATE_FAILED
19
- # * Capabilities [Array] List of capabilties the stack is granted. Currently CAPABILITY_IAM for allowing the creation of IAM resources
19
+ # * Capabilities [Array] List of capabilities the stack is granted. Currently CAPABILITY_IAM for allowing the creation of IAM resources
20
20
  # * StackPolicyBody [String] Structure containing the stack policy body.
21
21
  # * StackPolicyURL [String] URL of file containing the stack policy.
22
22
  # * Tags [Array] Key-value pairs to associate with this stack.
@@ -15,7 +15,7 @@ module Fog
15
15
  #
16
16
  # @return [Excon::Response]:
17
17
  # * body [Hash:
18
- # * Capabilities [Array] List of capabilties in the template.
18
+ # * Capabilities [Array] List of capabilities in the template.
19
19
  # * CapabilitiesReason [String] The list of resources that generated the values in the Capabilities response element.
20
20
  # * Description [String] Template Description.
21
21
  # * Metadata [String] Template Metadata.
@@ -12,7 +12,7 @@ module Fog
12
12
  # or (one of the two Template parameters is required)
13
13
  # * TemplateURL [String] URL of file containing the template body.
14
14
  # * Parameters [Hash] Hash of providers to supply to template.
15
- # * Capabilities [Array] List of capabilties the stack is granted. Currently CAPABILITY_IAM for allowing the creation of IAM resources.
15
+ # * Capabilities [Array] List of capabilities the stack is granted. Currently CAPABILITY_IAM for allowing the creation of IAM resources.
16
16
  # * NotificationARNs [Array] List of SNS topics to publish events to.
17
17
  # * ResourceTypes [Array] The template resource types that you have permissions to work.
18
18
  # * StackPolicyBody [String] Structure containing the stack policy body.
@@ -4,7 +4,7 @@ module Fog
4
4
  class Real
5
5
  require 'fog/aws/parsers/cloud_watch/list_metrics'
6
6
 
7
- # List availabe metrics
7
+ # List available metrics
8
8
  #
9
9
  # ==== Options
10
10
  # * Dimensions<~Array>: a list of dimensions to filter against,
@@ -7,7 +7,7 @@ module Fog
7
7
  # Add permissions to a security group
8
8
  #
9
9
  # ==== Parameters
10
- # * group_name<~String> - Name of group, optional (can also be specifed as GroupName in options)
10
+ # * group_name<~String> - Name of group, optional (can also be specified as GroupName in options)
11
11
  # * options<~Hash>:
12
12
  # * 'GroupName'<~String> - Name of security group to modify
13
13
  # * 'GroupId'<~String> - Id of security group to modify
@@ -7,7 +7,7 @@ module Fog
7
7
  # Add permissions to a security group
8
8
  #
9
9
  # ==== Parameters
10
- # * group_name<~String> - Name of group, optional (can also be specifed as GroupName in options)
10
+ # * group_name<~String> - Name of group, optional (can also be specified as GroupName in options)
11
11
  # * options<~Hash>:
12
12
  # * 'GroupName'<~String> - Name of security group to modify
13
13
  # * 'GroupId'<~String> - Id of security group to modify
@@ -25,7 +25,7 @@ module Fog
25
25
  # * 'availabilityZone'<~String> - The availability zone
26
26
  # * 'description'<~String> - The description
27
27
  # * 'ownerId'<~String> - The ID of the person who created the interface
28
- # * 'requesterId'<~String> - The ID ot teh entity requesting this interface
28
+ # * 'requesterId'<~String> - The ID or the entity requesting this interface
29
29
  # * 'requesterManaged'<~String> -
30
30
  # * 'status'<~String> - "available" or "in-use"
31
31
  # * 'macAddress'<~String> -
@@ -67,7 +67,7 @@ module Fog
67
67
  route_table = self.data[:route_tables].find { |routetable| routetable["routeTableId"].eql? default_route.id }
68
68
 
69
69
  # This pushes a main route to the associationSet
70
- # add_route_association(routeTableId, subnetId, main=false) is declared in assocate_route_table.rb
70
+ # add_route_association(routeTableId, subnetId, main=false) is declared in associate_route_table.rb
71
71
  assoc = add_route_association(default_route.id, nil, true)
72
72
  route_table["associationSet"].push(assoc)
73
73
 
@@ -20,7 +20,7 @@ module Fog
20
20
  # * 'availabilityZone'<~String> - The availability zone
21
21
  # * 'description'<~String> - The description
22
22
  # * 'ownerId'<~String> - The ID of the person who created the interface
23
- # * 'requesterId'<~String> - The ID ot teh entity requesting this interface
23
+ # * 'requesterId'<~String> - The ID of the entity requesting this interface
24
24
  # * 'requesterManaged'<~String> -
25
25
  # * 'status'<~String> - "available" or "in-use"
26
26
  # * 'macAddress'<~String> -
@@ -49,7 +49,7 @@ module Fog
49
49
  # * 'privateIpAddresses' <~Array>:
50
50
  # * 'privateIpAddress'<~String> - One of the additional private ip address
51
51
  # * 'privateDnsName'<~String> - The private DNS associate to the ip address
52
- # * 'primay'<~String> - Whether main ip associate with NIC true of false
52
+ # * 'primary'<~String> - Whether main ip associate with NIC true of false
53
53
  #
54
54
  # {Amazon API Reference}[http://docs.amazonwebservices.com/AWSEC2/2012-03-01/APIReference/index.html?ApiReference-query-DescribeNetworkInterfaces.html]
55
55
  def describe_network_interfaces(filters = {})
@@ -9,7 +9,7 @@ module Fog
9
9
  # ==== Parameters
10
10
  # * network_interface_id<~String> - The ID of the network interface you want to describe an attribute of
11
11
  # * attribute<~String> - The attribute to modify, must be one of 'description', 'groupSet', 'sourceDestCheck' or 'attachment'
12
- # * value<~Object> - New value of attribute, the actual tyep depends on teh attribute:
12
+ # * value<~Object> - New value of attribute, the actual type depends on the attribute:
13
13
  # description - a string
14
14
  # groupSet - a list of group id's
15
15
  # sourceDestCheck - a boolean value
@@ -10,7 +10,7 @@ module Fog
10
10
  # * volume_id<~String> - The ID of the volume
11
11
  # * options<~Hash>:
12
12
  # * 'VolumeType'<~String> - Type of volume
13
- # * 'Size'<~Integer> - Size in GiBs fo the volume
13
+ # * 'Size'<~Integer> - Size in GiBs of the volume
14
14
  # * 'Iops'<~Integer> - Number of IOPS the volume supports
15
15
  #
16
16
  # ==== Response
@@ -7,7 +7,7 @@ module Fog
7
7
  # Remove permissions from a security group
8
8
  #
9
9
  # ==== Parameters
10
- # * group_name<~String> - Name of group, optional (can also be specifed as GroupName in options)
10
+ # * group_name<~String> - Name of group, optional (can also be specified as GroupName in options)
11
11
  # * options<~Hash>:
12
12
  # * 'GroupName'<~String> - Name of security group to modify
13
13
  # * 'GroupId'<~String> - Id of security group to modify
@@ -7,7 +7,7 @@ module Fog
7
7
  # Remove permissions from a security group
8
8
  #
9
9
  # ==== Parameters
10
- # * group_name<~String> - Name of group, optional (can also be specifed as GroupName in options)
10
+ # * group_name<~String> - Name of group, optional (can also be specified as GroupName in options)
11
11
  # * options<~Hash>:
12
12
  # * 'GroupName'<~String> - Name of security group to modify
13
13
  # * 'GroupId'<~String> - Id of security group to modify
@@ -31,7 +31,7 @@ module Fog
31
31
  # * 'Ebs.VolumeType'<~String> - Type of EBS volue. Valid options in ['standard', 'io1'] default is 'standard'.
32
32
  # * 'Ebs.Iops'<~String> - The number of I/O operations per second (IOPS) that the volume supports. Required when VolumeType is 'io1'
33
33
  # * 'HibernationOptions'<~Array>: array of hashes
34
- # * 'Configured'<~Boolean> - specifies whether or not the instance is configued for hibernation. This parameter is valid only if the instance meets the hibernation prerequisites.
34
+ # * 'Configured'<~Boolean> - specifies whether or not the instance is configured for hibernation. This parameter is valid only if the instance meets the hibernation prerequisites.
35
35
  # * 'NetworkInterfaces'<~Array>: array of hashes
36
36
  # * 'NetworkInterfaceId'<~String> - An existing interface to attach to a single instance
37
37
  # * 'DeviceIndex'<~String> - The device index. Applies both to attaching an existing network interface and creating a network interface
@@ -46,7 +46,7 @@ module Fog
46
46
  # * 'AssociatePublicIpAddress'<~String> - Indicates whether to assign a public IP address to an instance in a VPC. The public IP address is assigned to a specific network interface
47
47
  # * 'TagSpecifications'<~Array>: array of hashes
48
48
  # * 'ResourceType'<~String> - Type of resource to apply tags on, e.g: instance or volume
49
- # * 'Tags'<~Array> - List of hashs reprensenting tag to be set
49
+ # * 'Tags'<~Array> - List of hashes reprensenting tag to be set
50
50
  # * 'Key'<~String> - Tag name
51
51
  # * 'Value'<~String> - Tag value
52
52
  # * 'ClientToken'<~String> - unique case-sensitive token for ensuring idempotency