aws-sdk-core 2.6.1 → 2.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (242) hide show
  1. checksums.yaml +4 -4
  2. data/apis/acm/2015-12-08/api-2.json +93 -4
  3. data/apis/acm/2015-12-08/paginators-1.json +2 -2
  4. data/apis/apigateway/2015-07-09/api-2.json +640 -30
  5. data/apis/application-autoscaling/2016-02-06/api-2.json +5 -2
  6. data/apis/appstream/2016-12-01/api-2.json +820 -0
  7. data/apis/appstream/2016-12-01/examples-1.json +5 -0
  8. data/apis/appstream/2016-12-01/waiters-2.json +55 -0
  9. data/apis/autoscaling/2011-01-01/api-2.json +1 -0
  10. data/apis/autoscaling/2011-01-01/resources-1.json +12 -1
  11. data/apis/batch/2016-08-10/api-2.json +885 -0
  12. data/apis/batch/2016-08-10/examples-1.json +589 -0
  13. data/apis/budgets/2016-10-20/api-2.json +696 -0
  14. data/apis/budgets/2016-10-20/examples-1.json +5 -0
  15. data/apis/cloudformation/2010-05-15/api-2.json +138 -12
  16. data/apis/cloudformation/2010-05-15/examples-1.json +153 -0
  17. data/apis/cloudformation/2010-05-15/resources-1.json +10 -1
  18. data/apis/cloudformation/2010-05-15/waiters-2.json +18 -96
  19. data/apis/cloudfront/2016-01-28/api-2.json +1 -0
  20. data/apis/cloudfront/2016-08-01/api-2.json +1 -0
  21. data/apis/cloudfront/2016-08-20/api-2.json +1 -0
  22. data/apis/cloudfront/2016-09-07/api-2.json +1 -0
  23. data/apis/cloudfront/2016-09-29/api-2.json +2599 -0
  24. data/apis/cloudfront/2016-09-29/examples-1.json +5 -0
  25. data/apis/cloudfront/2016-09-29/paginators-1.json +32 -0
  26. data/apis/cloudfront/2016-09-29/waiters-2.json +47 -0
  27. data/apis/cloudfront/2016-11-25/api-2.json +2665 -0
  28. data/apis/cloudfront/2016-11-25/examples-1.json +5 -0
  29. data/apis/cloudfront/2016-11-25/paginators-1.json +32 -0
  30. data/apis/cloudfront/2016-11-25/waiters-2.json +47 -0
  31. data/apis/cloudhsm/2014-05-30/api-2.json +2 -1
  32. data/apis/cloudsearch/2013-01-01/api-2.json +2 -1
  33. data/apis/cloudsearchdomain/2013-01-01/api-2.json +2 -1
  34. data/apis/cloudtrail/2013-11-01/api-2.json +109 -3
  35. data/apis/cloudtrail/2013-11-01/paginators-1.json +6 -0
  36. data/apis/codebuild/2016-10-06/api-2.json +702 -0
  37. data/apis/codebuild/2016-10-06/examples-1.json +5 -0
  38. data/apis/codecommit/2015-04-13/api-2.json +2 -1
  39. data/apis/codedeploy/2014-10-06/api-2.json +138 -17
  40. data/apis/codepipeline/2015-07-09/api-2.json +3 -2
  41. data/apis/cognito-identity/2014-06-30/api-2.json +84 -5
  42. data/apis/cognito-idp/2016-04-18/api-2.json +472 -10
  43. data/apis/cognito-sync/2014-06-30/api-2.json +2 -1
  44. data/apis/config/2014-11-12/api-2.json +40 -9
  45. data/apis/config/2014-11-12/paginators-1.json +2 -2
  46. data/apis/cur/2017-01-06/api-2.json +226 -0
  47. data/apis/cur/2017-01-06/examples-1.json +5 -0
  48. data/apis/cur/2017-01-06/paginators-1.json +9 -0
  49. data/apis/datapipeline/2012-10-29/api-2.json +2 -1
  50. data/apis/devicefarm/2015-06-23/api-2.json +2 -1
  51. data/apis/devicefarm/2015-06-23/examples-1.json +1237 -0
  52. data/apis/directconnect/2012-10-25/api-2.json +257 -10
  53. data/apis/discovery/2015-11-01/api-2.json +316 -5
  54. data/apis/dms/2016-01-01/api-2.json +45 -9
  55. data/apis/ds/2015-04-16/api-2.json +144 -1
  56. data/apis/dynamodb/2011-12-05/api-2.json +802 -0
  57. data/apis/dynamodb/2011-12-05/examples-1.json +5 -0
  58. data/apis/dynamodb/2011-12-05/paginators-1.json +26 -0
  59. data/apis/dynamodb/2011-12-05/waiters-2.json +35 -0
  60. data/apis/dynamodb/2012-08-10/api-2.json +115 -1
  61. data/apis/dynamodb/2012-08-10/examples-1.json +623 -0
  62. data/apis/dynamodb/2012-08-10/paginators-1.json +4 -4
  63. data/apis/ec2/2015-10-01/api-2.json +1 -0
  64. data/apis/ec2/2016-04-01/api-2.json +1 -0
  65. data/apis/ec2/2016-09-15/api-2.json +14415 -0
  66. data/apis/ec2/2016-09-15/examples-1.json +3740 -0
  67. data/apis/ec2/2016-09-15/paginators-1.json +138 -0
  68. data/apis/ec2/2016-09-15/resources-1.json +2582 -0
  69. data/apis/ec2/2016-09-15/waiters-2.json +593 -0
  70. data/apis/ec2/2016-11-15/api-2.json +15037 -0
  71. data/apis/ec2/2016-11-15/examples-1.json +3740 -0
  72. data/apis/ec2/2016-11-15/paginators-1.json +138 -0
  73. data/apis/ec2/2016-11-15/resources-1.json +2582 -0
  74. data/apis/ec2/2016-11-15/waiters-2.json +593 -0
  75. data/apis/ecr/2015-09-21/api-2.json +88 -4
  76. data/apis/ecr/2015-09-21/paginators-1.json +12 -6
  77. data/apis/ecs/2014-11-13/api-2.json +183 -9
  78. data/apis/elasticache/2015-02-02/api-2.json +57 -9
  79. data/apis/elasticache/2015-02-02/examples-1.json +2963 -0
  80. data/apis/elasticbeanstalk/2010-12-01/api-2.json +155 -6
  81. data/apis/elasticfilesystem/2015-02-01/api-2.json +2 -1
  82. data/apis/elasticfilesystem/2015-02-01/examples-1.json +217 -0
  83. data/apis/elasticloadbalancing/2012-06-01/api-2.json +1 -0
  84. data/apis/elasticloadbalancingv2/2015-12-01/api-2.json +1 -0
  85. data/apis/elasticmapreduce/2009-03-31/api-2.json +449 -5
  86. data/apis/elastictranscoder/2012-09-25/api-2.json +44 -13
  87. data/apis/elastictranscoder/2012-09-25/examples-1.json +5 -0
  88. data/apis/email/2010-12-01/api-2.json +425 -4
  89. data/apis/es/2015-01-01/api-2.json +1 -0
  90. data/apis/events/2015-10-07/api-2.json +1 -0
  91. data/apis/firehose/2015-08-04/api-2.json +151 -4
  92. data/apis/firehose/2015-08-04/examples-1.json +5 -0
  93. data/apis/gamelift/2015-10-01/api-2.json +367 -787
  94. data/apis/gamelift/2015-10-01/examples-1.json +2 -2
  95. data/apis/glacier/2012-06-01/api-2.json +369 -779
  96. data/apis/glacier/2012-06-01/examples-1.json +806 -0
  97. data/apis/glacier/2012-06-01/paginators-1.json +5 -5
  98. data/apis/health/2016-08-04/api-2.json +547 -0
  99. data/apis/health/2016-08-04/examples-1.json +5 -0
  100. data/apis/health/2016-08-04/paginators-1.json +31 -0
  101. data/apis/iam/2010-05-08/api-2.json +209 -0
  102. data/apis/iam/2010-05-08/examples-1.json +1186 -0
  103. data/apis/importexport/2010-06-01/api-2.json +1 -0
  104. data/apis/inspector/2016-02-16/api-2.json +2 -1
  105. data/apis/inspector/2016-02-16/examples-1.json +1135 -0
  106. data/apis/iot/2015-05-28/api-2.json +16 -0
  107. data/apis/iot-data/2015-05-28/api-2.json +1 -0
  108. data/apis/kinesis/2013-12-02/api-2.json +80 -12
  109. data/apis/kinesisanalytics/2015-08-14/api-2.json +7 -2
  110. data/apis/kms/2014-11-01/api-2.json +4 -2
  111. data/apis/kms/2014-11-01/examples-1.json +810 -0
  112. data/apis/lambda/2014-11-11/api-2.json +1 -0
  113. data/apis/lambda/2015-03-31/api-2.json +162 -9
  114. data/apis/lambda/2015-03-31/examples-1.json +609 -0
  115. data/apis/lightsail/2016-11-28/api-2.json +2137 -0
  116. data/apis/lightsail/2016-11-28/examples-1.json +5 -0
  117. data/apis/logs/2014-03-28/api-2.json +113 -6
  118. data/apis/machinelearning/2014-12-12/api-2.json +1 -0
  119. data/apis/marketplacecommerceanalytics/2015-07-01/api-2.json +5 -2
  120. data/apis/meteringmarketplace/2016-01-14/api-2.json +136 -0
  121. data/apis/monitoring/2010-08-01/api-2.json +27 -6
  122. data/apis/opsworks/2013-02-18/api-2.json +1 -0
  123. data/apis/opsworkscm/2016-11-01/api-2.json +712 -0
  124. data/apis/opsworkscm/2016-11-01/examples-1.json +5 -0
  125. data/apis/pinpoint/2016-12-01/api-2.json +2753 -0
  126. data/apis/pinpoint/2016-12-01/examples-1.json +5 -0
  127. data/apis/polly/2016-06-10/api-2.json +504 -0
  128. data/apis/polly/2016-06-10/examples-1.json +171 -0
  129. data/apis/rds/2013-01-10/api-2.json +2902 -0
  130. data/apis/rds/2013-01-10/examples-1.json +5 -0
  131. data/apis/rds/2013-01-10/paginators-1.json +97 -0
  132. data/apis/rds/2013-02-12/api-2.json +3058 -0
  133. data/apis/rds/2013-02-12/examples-1.json +5 -0
  134. data/apis/rds/2013-02-12/paginators-1.json +110 -0
  135. data/apis/rds/2013-09-09/api-2.json +3159 -0
  136. data/apis/rds/2013-09-09/examples-1.json +5 -0
  137. data/apis/rds/2013-09-09/paginators-1.json +110 -0
  138. data/apis/rds/2013-09-09/waiters-2.json +97 -0
  139. data/apis/rds/2014-09-01/api-2.json +3272 -0
  140. data/apis/rds/2014-09-01/examples-1.json +5 -0
  141. data/apis/rds/2014-09-01/paginators-1.json +4 -0
  142. data/apis/rds/2014-10-31/api-2.json +144 -11
  143. data/apis/rds/2014-10-31/examples-1.json +332 -4
  144. data/apis/rds/2014-10-31/paginators-1.json +18 -18
  145. data/apis/rds/2014-10-31/resources-1.json +1 -1
  146. data/apis/redshift/2012-12-01/api-2.json +10 -3
  147. data/apis/rekognition/2016-06-27/api-2.json +836 -0
  148. data/apis/rekognition/2016-06-27/examples-1.json +651 -0
  149. data/apis/rekognition/2016-06-27/paginators-1.json +16 -0
  150. data/apis/route53/2013-04-01/api-2.json +186 -219
  151. data/apis/route53/2013-04-01/paginators-1.json +9 -9
  152. data/apis/route53domains/2014-05-15/api-2.json +1 -0
  153. data/apis/s3/2006-03-01/api-2.json +871 -20
  154. data/apis/sdb/2009-04-15/api-2.json +1 -0
  155. data/apis/servicecatalog/2015-12-10/api-2.json +1214 -29
  156. data/apis/shield/2016-06-02/api-2.json +494 -0
  157. data/apis/shield/2016-06-02/examples-1.json +5 -0
  158. data/apis/sms/2016-10-24/api-2.json +612 -0
  159. data/apis/sms/2016-10-24/examples-1.json +5 -0
  160. data/apis/sms/2016-10-24/paginators-1.json +28 -0
  161. data/apis/snowball/2016-06-30/api-2.json +283 -11
  162. data/apis/snowball/2016-06-30/examples-1.json +437 -0
  163. data/apis/sns/2010-03-31/api-2.json +1 -0
  164. data/apis/sqs/2012-11-05/api-2.json +74 -38
  165. data/apis/sqs/2012-11-05/examples-1.json +0 -39
  166. data/apis/sqs/2012-11-05/resources-1.json +232 -0
  167. data/apis/ssm/2014-11-06/api-2.json +4036 -536
  168. data/apis/states/2016-11-23/api-2.json +1021 -0
  169. data/apis/states/2016-11-23/examples-1.json +5 -0
  170. data/apis/states/2016-11-23/paginators-1.json +28 -0
  171. data/apis/storagegateway/2013-06-30/api-2.json +269 -6
  172. data/apis/storagegateway/2013-06-30/examples-1.json +1376 -0
  173. data/apis/streams.dynamodb/2012-08-10/api-2.json +2 -1
  174. data/apis/streams.dynamodb/2012-08-10/examples-1.json +207 -0
  175. data/apis/sts/2011-06-15/api-2.json +1 -0
  176. data/apis/sts/2011-06-15/examples-1.json +201 -0
  177. data/apis/support/2013-04-15/api-2.json +1 -0
  178. data/apis/swf/2012-01-25/api-2.json +1 -0
  179. data/apis/waf/2015-08-24/api-2.json +12 -11
  180. data/apis/waf/2015-08-24/examples-1.json +1012 -0
  181. data/apis/waf-regional/2016-11-28/api-2.json +2090 -0
  182. data/apis/waf-regional/2016-11-28/examples-1.json +1017 -0
  183. data/apis/workspaces/2015-04-08/api-2.json +1 -0
  184. data/apis/xray/2016-04-12/api-2.json +491 -0
  185. data/apis/xray/2016-04-12/examples-1.json +5 -0
  186. data/endpoints.json +781 -392
  187. data/lib/aws-sdk-core/api/customizations.rb +16 -0
  188. data/lib/aws-sdk-core/api/docs/builder.rb +2 -1
  189. data/lib/aws-sdk-core/api/docs/client_type_documenter.rb +9 -0
  190. data/lib/aws-sdk-core/api/docs/crosslink.rb +43 -0
  191. data/lib/aws-sdk-core/api/docs/operation_documenter.rb +11 -2
  192. data/lib/aws-sdk-core/appstream.rb +6 -0
  193. data/lib/aws-sdk-core/batch.rb +5 -0
  194. data/lib/aws-sdk-core/budgets.rb +5 -0
  195. data/lib/aws-sdk-core/client.rb +1 -0
  196. data/lib/aws-sdk-core/client_waiters.rb +5 -5
  197. data/lib/aws-sdk-core/cloudfront/url_signer.rb +1 -1
  198. data/lib/aws-sdk-core/cloudfront.rb +5 -5
  199. data/lib/aws-sdk-core/codebuild.rb +5 -0
  200. data/lib/aws-sdk-core/costandusagereportservice.rb +6 -0
  201. data/lib/aws-sdk-core/credential_provider_chain.rb +3 -3
  202. data/lib/aws-sdk-core/cur.rb +6 -0
  203. data/lib/aws-sdk-core/ec2.rb +6 -6
  204. data/lib/aws-sdk-core/elastictranscoder.rb +1 -0
  205. data/lib/aws-sdk-core/firehose.rb +1 -0
  206. data/lib/aws-sdk-core/glacier.rb +1 -0
  207. data/lib/aws-sdk-core/health.rb +6 -0
  208. data/lib/aws-sdk-core/instance_profile_credentials.rb +1 -1
  209. data/lib/aws-sdk-core/lightsail.rb +5 -0
  210. data/lib/aws-sdk-core/opsworkscm.rb +5 -0
  211. data/lib/aws-sdk-core/partitions/region.rb +0 -12
  212. data/lib/aws-sdk-core/partitions/service.rb +1 -11
  213. data/lib/aws-sdk-core/pinpoint.rb +5 -0
  214. data/lib/aws-sdk-core/plugins/ec2_copy_encrypted_snapshot.rb +24 -55
  215. data/lib/aws-sdk-core/plugins/idempotency_token.rb +37 -0
  216. data/lib/aws-sdk-core/plugins/rds_cross_region_copying.rb +64 -0
  217. data/lib/aws-sdk-core/plugins/request_signer.rb +4 -0
  218. data/lib/aws-sdk-core/plugins/retry_errors.rb +1 -0
  219. data/lib/aws-sdk-core/plugins/s3_accelerate.rb +18 -1
  220. data/lib/aws-sdk-core/plugins/s3_bucket_dns.rb +1 -1
  221. data/lib/aws-sdk-core/plugins/s3_dualstack.rb +6 -9
  222. data/lib/aws-sdk-core/plugins/sqs_md5s.rb +1 -1
  223. data/lib/aws-sdk-core/polly/presigner.rb +70 -0
  224. data/lib/aws-sdk-core/polly.rb +13 -0
  225. data/lib/aws-sdk-core/rekognition.rb +6 -0
  226. data/lib/aws-sdk-core/rest/request/endpoint.rb +11 -66
  227. data/lib/aws-sdk-core/rest/request/querystring_builder.rb +90 -0
  228. data/lib/aws-sdk-core/shield.rb +5 -0
  229. data/lib/aws-sdk-core/signers/v4.rb +2 -1
  230. data/lib/aws-sdk-core/sms.rb +6 -0
  231. data/lib/aws-sdk-core/sqs.rb +1 -0
  232. data/lib/aws-sdk-core/states.rb +6 -0
  233. data/lib/aws-sdk-core/version.rb +1 -1
  234. data/lib/aws-sdk-core/wafregional.rb +5 -0
  235. data/lib/aws-sdk-core/xray.rb +5 -0
  236. data/lib/aws-sdk-core.rb +20 -0
  237. data/lib/seahorse/client/net_http/connection_pool.rb +11 -7
  238. data/lib/seahorse/client/net_http/handler.rb +5 -2
  239. data/lib/seahorse/client/plugin_list.rb +3 -1
  240. data/lib/seahorse/client/response.rb +9 -20
  241. data/service-models.json +66 -2
  242. metadata +115 -2
@@ -143,6 +143,22 @@ module Aws
143
143
  Aws::Plugins::Route53IdFix
144
144
  ))
145
145
 
146
+ plugins('rds', add: %w(
147
+ Aws::Plugins::RDSCrossRegionCopying
148
+ ))
149
+
150
+ api('rds') do |api|
151
+ api['shapes']['CopyDBSnapshotMessage']['members']['DestinationRegion'] =
152
+ {"shape" => "String"}
153
+ end
154
+
155
+ doc('rds') do |docs|
156
+ docs['shapes']['String']['refs']['CopyDBSnapshotMessage$SourceRegion'] =
157
+ "<p>The region which you are copying an encrypted snapshot from.</p>" +
158
+ "<p>This is a required paramter that allows SDK to compute a pre-signed Url and" +
159
+ " populate <code>PreSignedURL</code> parameter on your behalf.</p>"
160
+ end
161
+
146
162
  api('s3') do |api|
147
163
  api['metadata'].delete('signatureVersion')
148
164
  if ENV['DOCSTRINGS']
@@ -17,6 +17,7 @@ module Aws
17
17
  @client_class = svc_module.const_get(:Client)
18
18
  @api = @client_class.api
19
19
  @full_name = @api.metadata['serviceFullName']
20
+ @uid = @api.metadata['uid']
20
21
  @error_names = @api.operations.map {|_,o| o.errors.map(&:shape).map(&:name) }
21
22
  @error_names = @error_names.flatten.uniq.sort
22
23
  @namespace = YARD::Registry['Aws']
@@ -143,7 +144,7 @@ Constructs an API client.
143
144
  end
144
145
 
145
146
  def document_client_operation(namespace, method_name, operation)
146
- documenter = OperationDocumenter.new(@svc_name, namespace)
147
+ documenter = OperationDocumenter.new(@svc_name, namespace, @uid)
147
148
  documenter.document(method_name, operation)
148
149
  end
149
150
 
@@ -43,6 +43,7 @@ module Aws
43
43
  def tags(api, shape)
44
44
  tags = []
45
45
  tags << input_example_tag(api, shape) if input_shape?(api, shape)
46
+ tags << see_also_tag(api, shape) if redirectable?(api, shape)
46
47
  tags
47
48
  end
48
49
 
@@ -84,6 +85,14 @@ module Aws
84
85
  tag(note)
85
86
  end
86
87
 
88
+ def see_also_tag(api, shape)
89
+ tag(Crosslink.tag_string(api.metadata["uid"], shape.name))
90
+ end
91
+
92
+ def redirectable?(api, shape)
93
+ Crosslink.taggable?(api.metadata["uid"]) && shape.name
94
+ end
95
+
87
96
  def returned_by(api, shape)
88
97
  methods = []
89
98
 
@@ -0,0 +1,43 @@
1
+ module Aws
2
+ module Api
3
+ module Docs
4
+ module Crosslink
5
+
6
+ EXCLUDE_UIDS = [
7
+ "apigateway",
8
+ "budgets",
9
+ "cloudsearch",
10
+ "cloudsearchdomain",
11
+ "discovery",
12
+ "elastictranscoder",
13
+ "es",
14
+ "glacier",
15
+ "importexport",
16
+ "iot",
17
+ "iot-data",
18
+ "machinelearning",
19
+ "rekognition",
20
+ "sdb",
21
+ "swf"
22
+ ]
23
+
24
+ def self.tag_string(uid, name)
25
+ path = "#{ENV['BASEURL']}goto/WebAPI/#{uid}/#{name}"
26
+ "@see #{path} AWS API Documentation"
27
+ end
28
+
29
+ def self.taggable?(uid)
30
+ uid && ENV['BASEURL'] && !exclude?(uid)
31
+ end
32
+
33
+ private
34
+ def self.exclude?(uid)
35
+ EXCLUDE_UIDS.any? do |service|
36
+ uid.match(/^#{service}/)
37
+ end
38
+ end
39
+
40
+ end
41
+ end
42
+ end
43
+ end
@@ -6,10 +6,11 @@ module Aws
6
6
  include Seahorse::Model
7
7
  include Utils
8
8
 
9
- def initialize(service_name, namespace)
9
+ def initialize(service_name, namespace, uid)
10
10
  @service_name = service_name
11
11
  @namespace = namespace
12
12
  @optname = 'options'
13
+ @uid = uid
13
14
  end
14
15
 
15
16
  # @param [Symbol] method_name
@@ -46,6 +47,10 @@ module Aws
46
47
  type = input_type(ref)
47
48
  docstring = "@option #{@optname} [#{req}#{type}] :#{name}\n"
48
49
  docstring += ref.documentation.to_s.lines.map { |line| " #{line}" }.join
50
+ if ref['idempotencyToken']
51
+ docstring << "\n\n This parameter will be auto-filled on your behalf"\
52
+ " with a random UUIDv4 when no value is provided.\n"
53
+ end
49
54
  tag(docstring)
50
55
  end
51
56
  end
@@ -133,7 +138,11 @@ module Aws
133
138
  end
134
139
 
135
140
  def see_also_tags(method_name, operation)
136
- []
141
+ if Crosslink.taggable?(@uid)
142
+ [tag(Crosslink.tag_string(@uid, operation.name))]
143
+ else
144
+ []
145
+ end
137
146
  end
138
147
 
139
148
  end
@@ -0,0 +1,6 @@
1
+ Aws.add_service(:AppStream, {
2
+ api: "#{Aws::API_DIR}/appstream/2016-12-01/api-2.json",
3
+ docs: "#{Aws::API_DIR}/appstream/2016-12-01/docs-2.json",
4
+ examples: "#{Aws::API_DIR}/appstream/2016-12-01/examples-1.json",
5
+ waiters: "#{Aws::API_DIR}/appstream/2016-12-01/waiters-2.json",
6
+ })
@@ -0,0 +1,5 @@
1
+ Aws.add_service(:Batch, {
2
+ api: "#{Aws::API_DIR}/batch/2016-08-10/api-2.json",
3
+ docs: "#{Aws::API_DIR}/batch/2016-08-10/docs-2.json",
4
+ examples: "#{Aws::API_DIR}/batch/2016-08-10/examples-1.json",
5
+ })
@@ -0,0 +1,5 @@
1
+ Aws.add_service(:Budgets, {
2
+ api: "#{Aws::API_DIR}/budgets/2016-10-20/api-2.json",
3
+ docs: "#{Aws::API_DIR}/budgets/2016-10-20/docs-2.json",
4
+ examples: "#{Aws::API_DIR}/budgets/2016-10-20/examples-1.json",
5
+ })
@@ -16,6 +16,7 @@ module Aws
16
16
  'Aws::Plugins::RequestSigner',
17
17
  'Aws::Plugins::ResponsePaging',
18
18
  'Aws::Plugins::StubResponses',
19
+ 'Aws::Plugins::IdempotencyToken',
19
20
  ]
20
21
 
21
22
  # @api private
@@ -72,11 +72,11 @@ module Aws
72
72
  # fails, it raises an error. **All errors raised extend from
73
73
  # {Aws::Waiters::Errors::WaiterFailed}**.
74
74
  #
75
- # begin
76
- # client.wait_until(...)
77
- # rescue Aws::Waiters::Errors::WaiterFailed
78
- # # resource did not enter the desired state in time
79
- # end
75
+ # begin
76
+ # client.wait_until(...)
77
+ # rescue Aws::Waiters::Errors::WaiterFailed
78
+ # # resource did not enter the desired state in time
79
+ # end
80
80
  #
81
81
  # @param [Symbol] waiter_name The name of the waiter. See {#waiter_names}
82
82
  # for a full list of supported waiters.
@@ -138,7 +138,7 @@ module Aws
138
138
  }
139
139
  ]
140
140
  }
141
- json_hash.to_json
141
+ JSON.dump(json_hash)
142
142
  end
143
143
 
144
144
  def encode(policy)
@@ -1,9 +1,9 @@
1
1
  Aws.add_service(:CloudFront, {
2
- api: "#{Aws::API_DIR}/cloudfront/2016-09-07/api-2.json",
3
- docs: "#{Aws::API_DIR}/cloudfront/2016-09-07/docs-2.json",
4
- examples: "#{Aws::API_DIR}/cloudfront/2016-09-07/examples-1.json",
5
- paginators: "#{Aws::API_DIR}/cloudfront/2016-09-07/paginators-1.json",
6
- waiters: "#{Aws::API_DIR}/cloudfront/2016-09-07/waiters-2.json",
2
+ api: "#{Aws::API_DIR}/cloudfront/2016-11-25/api-2.json",
3
+ docs: "#{Aws::API_DIR}/cloudfront/2016-11-25/docs-2.json",
4
+ examples: "#{Aws::API_DIR}/cloudfront/2016-11-25/examples-1.json",
5
+ paginators: "#{Aws::API_DIR}/cloudfront/2016-11-25/paginators-1.json",
6
+ waiters: "#{Aws::API_DIR}/cloudfront/2016-11-25/waiters-2.json",
7
7
  })
8
8
 
9
9
  module Aws
@@ -0,0 +1,5 @@
1
+ Aws.add_service(:CodeBuild, {
2
+ api: "#{Aws::API_DIR}/codebuild/2016-10-06/api-2.json",
3
+ docs: "#{Aws::API_DIR}/codebuild/2016-10-06/docs-2.json",
4
+ examples: "#{Aws::API_DIR}/codebuild/2016-10-06/examples-1.json",
5
+ })
@@ -0,0 +1,6 @@
1
+ Aws.add_service(:CostandUsageReportService, {
2
+ api: "#{Aws::API_DIR}/cur/2017-01-06/api-2.json",
3
+ docs: "#{Aws::API_DIR}/cur/2017-01-06/docs-2.json",
4
+ examples: "#{Aws::API_DIR}/cur/2017-01-06/examples-1.json",
5
+ paginators: "#{Aws::API_DIR}/cur/2017-01-06/paginators-1.json",
6
+ })
@@ -24,9 +24,9 @@ module Aws
24
24
  [:assume_role_credentials, {}],
25
25
  [:shared_credentials, {}],
26
26
  [:instance_profile_credentials, {
27
- retries: 0,
28
- http_open_timeout: 1,
29
- http_read_timeout: 1,
27
+ retries: @config ? @config.instance_profile_credentials_retries : 0,
28
+ http_open_timeout: @config ? @config.instance_profile_credentials_timeout : 1,
29
+ http_read_timeout: @config ? @config.instance_profile_credentials_timeout : 1,
30
30
  }],
31
31
  ]
32
32
  end
@@ -0,0 +1,6 @@
1
+ Aws.add_service(:Cur, {
2
+ api: "#{Aws::API_DIR}/cur/2017-01-06/api-2.json",
3
+ docs: "#{Aws::API_DIR}/cur/2017-01-06/docs-2.json",
4
+ examples: "#{Aws::API_DIR}/cur/2017-01-06/examples-1.json",
5
+ paginators: "#{Aws::API_DIR}/cur/2017-01-06/paginators-1.json",
6
+ })
@@ -1,8 +1,8 @@
1
1
  Aws.add_service(:EC2, {
2
- api: "#{Aws::API_DIR}/ec2/2016-04-01/api-2.json",
3
- docs: "#{Aws::API_DIR}/ec2/2016-04-01/docs-2.json",
4
- examples: "#{Aws::API_DIR}/ec2/2016-04-01/examples-1.json",
5
- paginators: "#{Aws::API_DIR}/ec2/2016-04-01/paginators-1.json",
6
- resources: "#{Aws::API_DIR}/ec2/2016-04-01/resources-1.json",
7
- waiters: "#{Aws::API_DIR}/ec2/2016-04-01/waiters-2.json",
2
+ api: "#{Aws::API_DIR}/ec2/2016-11-15/api-2.json",
3
+ docs: "#{Aws::API_DIR}/ec2/2016-11-15/docs-2.json",
4
+ examples: "#{Aws::API_DIR}/ec2/2016-11-15/examples-1.json",
5
+ paginators: "#{Aws::API_DIR}/ec2/2016-11-15/paginators-1.json",
6
+ resources: "#{Aws::API_DIR}/ec2/2016-11-15/resources-1.json",
7
+ waiters: "#{Aws::API_DIR}/ec2/2016-11-15/waiters-2.json",
8
8
  })
@@ -1,6 +1,7 @@
1
1
  Aws.add_service(:ElasticTranscoder, {
2
2
  api: "#{Aws::API_DIR}/elastictranscoder/2012-09-25/api-2.json",
3
3
  docs: "#{Aws::API_DIR}/elastictranscoder/2012-09-25/docs-2.json",
4
+ examples: "#{Aws::API_DIR}/elastictranscoder/2012-09-25/examples-1.json",
4
5
  paginators: "#{Aws::API_DIR}/elastictranscoder/2012-09-25/paginators-1.json",
5
6
  waiters: "#{Aws::API_DIR}/elastictranscoder/2012-09-25/waiters-2.json",
6
7
  })
@@ -1,4 +1,5 @@
1
1
  Aws.add_service(:Firehose, {
2
2
  api: "#{Aws::API_DIR}/firehose/2015-08-04/api-2.json",
3
3
  docs: "#{Aws::API_DIR}/firehose/2015-08-04/docs-2.json",
4
+ examples: "#{Aws::API_DIR}/firehose/2015-08-04/examples-1.json",
4
5
  })
@@ -1,6 +1,7 @@
1
1
  Aws.add_service(:Glacier, {
2
2
  api: "#{Aws::API_DIR}/glacier/2012-06-01/api-2.json",
3
3
  docs: "#{Aws::API_DIR}/glacier/2012-06-01/docs-2.json",
4
+ examples: "#{Aws::API_DIR}/glacier/2012-06-01/examples-1.json",
4
5
  paginators: "#{Aws::API_DIR}/glacier/2012-06-01/paginators-1.json",
5
6
  resources: "#{Aws::API_DIR}/glacier/2012-06-01/resources-1.json",
6
7
  waiters: "#{Aws::API_DIR}/glacier/2012-06-01/waiters-2.json",
@@ -0,0 +1,6 @@
1
+ Aws.add_service(:Health, {
2
+ api: "#{Aws::API_DIR}/health/2016-08-04/api-2.json",
3
+ docs: "#{Aws::API_DIR}/health/2016-08-04/docs-2.json",
4
+ examples: "#{Aws::API_DIR}/health/2016-08-04/examples-1.json",
5
+ paginators: "#{Aws::API_DIR}/health/2016-08-04/paginators-1.json",
6
+ })
@@ -119,7 +119,7 @@ module Aws
119
119
  retries = 0
120
120
  begin
121
121
  yield
122
- rescue *error_classes => error
122
+ rescue *error_classes
123
123
  if retries < max_retries
124
124
  @backoff.call(retries)
125
125
  retries += 1
@@ -0,0 +1,5 @@
1
+ Aws.add_service(:Lightsail, {
2
+ api: "#{Aws::API_DIR}/lightsail/2016-11-28/api-2.json",
3
+ docs: "#{Aws::API_DIR}/lightsail/2016-11-28/docs-2.json",
4
+ examples: "#{Aws::API_DIR}/lightsail/2016-11-28/examples-1.json",
5
+ })
@@ -0,0 +1,5 @@
1
+ Aws.add_service(:OpsWorksCM, {
2
+ api: "#{Aws::API_DIR}/opsworkscm/2016-11-01/api-2.json",
3
+ docs: "#{Aws::API_DIR}/opsworkscm/2016-11-01/docs-2.json",
4
+ examples: "#{Aws::API_DIR}/opsworkscm/2016-11-01/examples-1.json",
5
+ })
@@ -57,21 +57,9 @@ module Aws
57
57
  end
58
58
 
59
59
  def service_in_region?(svc, region_name)
60
- svc_endpoints_contains_region?(svc, region_name) ||
61
- svc_partition_endpoint_matches_region?(svc, region_name)
62
- end
63
-
64
- def svc_endpoints_contains_region?(svc, region_name)
65
60
  svc['endpoints'].key?(region_name)
66
61
  end
67
62
 
68
- def svc_partition_endpoint_matches_region?(svc, region_name)
69
- if pe = svc['partitionEndpoint']
70
- region = svc['endpoints'][pe].fetch('credentialScope', {})['region']
71
- region == region_name
72
- end
73
- end
74
-
75
63
  end
76
64
  end
77
65
  end
@@ -16,7 +16,6 @@ module Aws
16
16
  @regions = options[:regions]
17
17
  @regionalized = options[:regionalized]
18
18
  @partition_region = options[:partition_region]
19
- @regions << @partition_region if !@regionalized
20
19
  end
21
20
 
22
21
  # @return [String] The name of this service. The name is the module
@@ -66,16 +65,7 @@ module Aws
66
65
  end
67
66
 
68
67
  def partition_region(service)
69
- if service['partitionEndpoint']
70
- endpoint = service['endpoints'][service['partitionEndpoint']]
71
- if endpoint['credentialScope']
72
- endpoint['credentialScope']['region']
73
- elsif service['defaults'] && service['defaults']['credentialScope']
74
- service['defaults']['credentialScope']['region']
75
- else
76
- service['partitionEndpoint']
77
- end
78
- end
68
+ service['partitionEndpoint']
79
69
  end
80
70
 
81
71
  end
@@ -0,0 +1,5 @@
1
+ Aws.add_service(:Pinpoint, {
2
+ api: "#{Aws::API_DIR}/pinpoint/2016-12-01/api-2.json",
3
+ docs: "#{Aws::API_DIR}/pinpoint/2016-12-01/docs-2.json",
4
+ examples: "#{Aws::API_DIR}/pinpoint/2016-12-01/examples-1.json",
5
+ })
@@ -1,3 +1,5 @@
1
+ require 'aws-sigv4'
2
+
1
3
  module Aws
2
4
  module Plugins
3
5
 
@@ -16,66 +18,33 @@ module Aws
16
18
  def call(context)
17
19
  params = context.params
18
20
  params[:destination_region] = context.config.region
19
- params[:presigned_url] = presigned_url(context.client, params)
21
+ params[:presigned_url] = presigned_url(context, params)
20
22
  @handler.call(context)
21
23
  end
22
24
 
23
25
  private
24
26
 
25
- def presigned_url(client, params)
26
- client = source_region_client(client, params)
27
- client.handle(PresignHandler, step: :build, priority: 0)
28
- client.handlers.remove(Handler)
29
- client.copy_snapshot(params).data # presigned url
30
- end
31
-
32
- def source_region_client(client, params)
33
- EC2::Client.new({
34
- region: params[:source_region] || 'region',
35
- credentials: client.config.credentials,
36
- })
37
- end
38
-
39
- end
40
-
41
- # This handler intentionally does NOT call the next handler in
42
- # the stack. It generates a presigned url from the request
43
- # and returns it as the response data.
44
- #
45
- # Before signing:
46
- #
47
- # * The HTTP method is changed from POST to GET
48
- # * The url-encoded body is moved to the querystring
49
- #
50
- # @api private
51
- class PresignHandler < Seahorse::Client::Handler
52
-
53
- def call(context)
54
- convert_post_2_get(context)
55
- Seahorse::Client::Response.new(
56
- context: context,
57
- data: presigned_url(context.http_request, context.config))
58
- end
59
-
60
- private
61
-
62
- def convert_post_2_get(context)
63
- context.http_request.http_method = 'GET'
64
- context.http_request.endpoint = new_endpoint(context)
65
- context.http_request.body = ''
66
- context.http_request.headers.delete('Content-Type')
67
- end
68
-
69
- def new_endpoint(context)
70
- body = context.http_request.body_contents
71
- endpoint = context.http_request.endpoint
72
- endpoint.query = body
73
- endpoint
74
- end
75
-
76
- def presigned_url(http_request, config)
77
- signer = Signers::V4.new(config.credentials, 'ec2', config.region)
78
- signer.presigned_url(http_request, expires_in: 3600)
27
+ def presigned_url(context, params)
28
+ param_list = Aws::Query::ParamList.new
29
+ param_list.set('Action', 'CopySnapshot')
30
+ param_list.set('DestinationRegion', context.config.region)
31
+ param_list.set('Version', context.config.api.metadata['apiVersion'])
32
+ Aws::Query::EC2ParamBuilder.new(param_list).apply(context.operation.input, params)
33
+
34
+ signer = Aws::Sigv4::Signer.new(
35
+ service: 'ec2',
36
+ region: params[:source_region],
37
+ credentials_provider: context.config.credentials
38
+ )
39
+ url = Aws::EndpointProvider.resolve(signer.region, 'ec2')
40
+ url += "?#{param_list.to_s}"
41
+
42
+ signer.presign_url(
43
+ http_method: 'GET',
44
+ url: url,
45
+ body: '',
46
+ expires_in: 3600
47
+ ).to_s
79
48
  end
80
49
 
81
50
  end
@@ -0,0 +1,37 @@
1
+ require 'securerandom'
2
+
3
+ module Aws
4
+ module Plugins
5
+
6
+ # Provides support for auto filling operation parameters
7
+ # that enabled with `idempotencyToken` trait with random UUID v4
8
+ # when no value is provided
9
+ class IdempotencyToken < Seahorse::Client::Plugin
10
+
11
+ # @api private
12
+ class Handler < Seahorse::Client::Handler
13
+
14
+ # @param [RequestContext] context
15
+ # @param [Response]
16
+ def call(context)
17
+ auto_fill(context.params, context.operation.input)
18
+ @handler.call(context)
19
+ end
20
+
21
+ private
22
+
23
+ def auto_fill(params, ref)
24
+ ref.shape.members.each do |name, member_ref|
25
+ if member_ref['idempotencyToken']
26
+ params[name] ||= SecureRandom.uuid
27
+ end
28
+ end
29
+ end
30
+
31
+ end
32
+
33
+ handler(Handler, step: :initialize)
34
+
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,64 @@
1
+ require 'aws-sigv4'
2
+
3
+ module Aws
4
+ module Plugins
5
+
6
+ # This plugin populates the `:pre_signed_url` request param for the
7
+ # CopyDBSnapshot API.
8
+ #
9
+ # This parameter is required by RDS when copying an encrypted snapshot
10
+ # across regions. This plugin will be skipped if the `:pre_signed_url`
11
+ # parameter is provided by the user.
12
+ #
13
+ # @seahorse.client.option [String] :source_region The region which you are
14
+ # copying an encrypted snapshot from. This parameter must be present to
15
+ # have the plugin compute a presigned URL on your behalf.
16
+ class RDSCrossRegionCopying < Seahorse::Client::Plugin
17
+
18
+ # @api private
19
+ class Handler < Seahorse::Client::Handler
20
+
21
+ def call(context)
22
+ params = context.params
23
+ if params[:source_region] && !params[:pre_signed_url]
24
+ params[:pre_signed_url] = presigned_url(context, params)
25
+ params[:destination_region] = context.config.region
26
+ end
27
+ @handler.call(context)
28
+ end
29
+
30
+ private
31
+ def presigned_url(context, params)
32
+ # :source_region is not modeled in the api
33
+ source_region = params.delete(:source_region)
34
+ param_list = Aws::Query::ParamList.new
35
+ param_list.set('Action', context.operation.name)
36
+ param_list.set('DestinationRegion', context.config.region)
37
+ param_list.set('Version', context.config.api.metadata['apiVersion'])
38
+ Aws::Query::ParamBuilder.new(param_list).apply(
39
+ context.operation.input,
40
+ params
41
+ )
42
+ signer = Aws::Sigv4::Signer.new(
43
+ service: 'rds',
44
+ region: source_region,
45
+ credentials_provider: context.config.credentials
46
+ )
47
+ url = Aws::EndpointProvider.resolve(signer.region, 'rds')
48
+ url += "?#{param_list.to_s}"
49
+ signer.presign_url(
50
+ http_method: 'GET',
51
+ url: url,
52
+ body: '',
53
+ expires_in: 3600
54
+ ).to_s
55
+ end
56
+ end
57
+ handler(
58
+ Handler,
59
+ step: :initialize,
60
+ operations: [:copy_db_snapshot]
61
+ )
62
+ end
63
+ end
64
+ end
@@ -37,6 +37,10 @@ module Aws
37
37
  CredentialProviderChain.new(config).resolve
38
38
  end
39
39
 
40
+ option(:instance_profile_credentials_retries, 0)
41
+
42
+ option(:instance_profile_credentials_timeout, 1)
43
+
40
44
  # Intentionally not documented - this should go away when all
41
45
  # services support signature version 4 in every region.
42
46
  option(:signature_version) do |cfg|
@@ -32,6 +32,7 @@ module Aws
32
32
  'ProvisionedThroughputExceededException', # dynamodb
33
33
  'RequestLimitExceeded', # ec2
34
34
  'BandwidthLimitExceeded', # cloud search
35
+ 'LimitExceededException', # kinesis
35
36
  ])
36
37
 
37
38
  CHECKSUM_ERRORS = Set.new([
@@ -15,6 +15,7 @@ module Aws
15
15
  class S3Accelerate < Seahorse::Client::Plugin
16
16
 
17
17
  option(:use_accelerate_endpoint, false)
18
+ option(:use_dualstack_endpoint, false)
18
19
 
19
20
  def add_handlers(handlers, config)
20
21
  operations = config.api.operation_names - [
@@ -38,7 +39,13 @@ module Aws
38
39
  class AccelerateHandler < Seahorse::Client::Handler
39
40
 
40
41
  def call(context)
41
- use_accelerate_endpoint(context) if context[:use_accelerate_endpoint]
42
+ if context[:use_accelerate_endpoint]
43
+ if context[:use_dualstack_endpoint]
44
+ use_combined_accelerate_dualstack_endpoint(context)
45
+ else
46
+ use_accelerate_endpoint(context)
47
+ end
48
+ end
42
49
  @handler.call(context)
43
50
  end
44
51
 
@@ -54,6 +61,16 @@ module Aws
54
61
  context.http_request.endpoint = endpoint.to_s
55
62
  end
56
63
 
64
+ def use_combined_accelerate_dualstack_endpoint(context)
65
+ bucket_name = context.params[:bucket]
66
+ validate_bucket_name!(bucket_name)
67
+ endpoint = URI.parse(context.http_request.endpoint.to_s)
68
+ endpoint.scheme = 'https'
69
+ endpoint.port = 443
70
+ endpoint.host = "#{bucket_name}.s3-accelerate.dualstack.amazonaws.com"
71
+ context.http_request.endpoint = endpoint.to_s
72
+ end
73
+
57
74
  def validate_bucket_name!(bucket_name)
58
75
  unless S3BucketDns.dns_compatible?(bucket_name, ssl = true)
59
76
  msg = "unable to use `accelerate: true` on buckets with "
@@ -39,7 +39,7 @@ module Aws
39
39
  if
40
40
  bucket_name &&
41
41
  S3BucketDns.dns_compatible?(bucket_name, https?(endpoint)) &&
42
- context.operation_name != 'get_bucket_location'
42
+ context.operation_name.to_s != 'get_bucket_location'
43
43
  then
44
44
  move_bucket_to_subdomain(bucket_name, endpoint)
45
45
  end