aws-sdk-core 2.8.4 → 3.129.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (714) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +1287 -0
  3. data/LICENSE.txt +202 -0
  4. data/VERSION +1 -0
  5. data/ca-bundle.crt +3615 -3541
  6. data/lib/aws-defaults/default_configuration.rb +153 -0
  7. data/lib/aws-defaults/defaults_mode_config_resolver.rb +107 -0
  8. data/lib/aws-defaults.rb +3 -0
  9. data/lib/aws-sdk-core/arn.rb +92 -0
  10. data/lib/aws-sdk-core/arn_parser.rb +40 -0
  11. data/lib/aws-sdk-core/assume_role_credentials.rb +20 -0
  12. data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +109 -0
  13. data/lib/aws-sdk-core/async_client_stubs.rb +82 -0
  14. data/lib/aws-sdk-core/binary/decode_handler.rb +58 -0
  15. data/lib/aws-sdk-core/binary/encode_handler.rb +34 -0
  16. data/lib/aws-sdk-core/binary/event_builder.rb +124 -0
  17. data/lib/aws-sdk-core/binary/event_parser.rb +136 -0
  18. data/lib/aws-sdk-core/binary/event_stream_decoder.rb +64 -0
  19. data/lib/aws-sdk-core/binary/event_stream_encoder.rb +55 -0
  20. data/lib/aws-sdk-core/binary.rb +8 -0
  21. data/lib/aws-sdk-core/client_side_monitoring/publisher.rb +51 -0
  22. data/lib/aws-sdk-core/client_side_monitoring/request_metrics.rb +199 -0
  23. data/lib/aws-sdk-core/client_stubs.rb +69 -12
  24. data/lib/aws-sdk-core/credential_provider.rb +2 -29
  25. data/lib/aws-sdk-core/credential_provider_chain.rb +111 -32
  26. data/lib/aws-sdk-core/credentials.rb +2 -0
  27. data/lib/aws-sdk-core/deprecations.rb +17 -11
  28. data/lib/aws-sdk-core/eager_loader.rb +2 -0
  29. data/lib/aws-sdk-core/ec2_metadata.rb +238 -0
  30. data/lib/aws-sdk-core/ecs_credentials.rb +20 -11
  31. data/lib/aws-sdk-core/endpoint_cache.rb +193 -0
  32. data/lib/aws-sdk-core/errors.rb +227 -18
  33. data/lib/aws-sdk-core/event_emitter.rb +64 -0
  34. data/lib/aws-sdk-core/ini_parser.rb +3 -0
  35. data/lib/aws-sdk-core/instance_profile_credentials.rb +237 -45
  36. data/lib/aws-sdk-core/json/builder.rb +6 -2
  37. data/lib/aws-sdk-core/json/error_handler.rb +21 -2
  38. data/lib/aws-sdk-core/json/handler.rb +24 -3
  39. data/lib/aws-sdk-core/json/json_engine.rb +12 -8
  40. data/lib/aws-sdk-core/json/oj_engine.rb +35 -6
  41. data/lib/aws-sdk-core/json/parser.rb +11 -1
  42. data/lib/aws-sdk-core/json.rb +15 -33
  43. data/lib/aws-sdk-core/log/formatter.rb +16 -4
  44. data/lib/aws-sdk-core/log/handler.rb +2 -0
  45. data/lib/aws-sdk-core/log/param_filter.rb +41 -15
  46. data/lib/aws-sdk-core/log/param_formatter.rb +2 -0
  47. data/lib/aws-sdk-core/pageable_response.rb +112 -47
  48. data/lib/aws-sdk-core/pager.rb +35 -25
  49. data/lib/aws-sdk-core/param_converter.rb +5 -3
  50. data/lib/aws-sdk-core/param_validator.rb +109 -26
  51. data/lib/aws-sdk-core/plugins/api_key.rb +56 -0
  52. data/lib/aws-sdk-core/plugins/apig_authorizer_token.rb +32 -0
  53. data/lib/aws-sdk-core/plugins/apig_credentials_configuration.rb +36 -0
  54. data/lib/aws-sdk-core/plugins/apig_user_agent.rb +39 -0
  55. data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +340 -0
  56. data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +283 -0
  57. data/lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb +86 -0
  58. data/lib/aws-sdk-core/plugins/credentials_configuration.rb +81 -0
  59. data/lib/aws-sdk-core/plugins/defaults_mode.rb +40 -0
  60. data/lib/aws-sdk-core/plugins/endpoint_discovery.rb +168 -0
  61. data/lib/aws-sdk-core/plugins/endpoint_pattern.rb +65 -0
  62. data/lib/aws-sdk-core/plugins/event_stream_configuration.rb +32 -0
  63. data/lib/aws-sdk-core/plugins/global_configuration.rb +21 -10
  64. data/lib/aws-sdk-core/plugins/helpful_socket_errors.rb +2 -0
  65. data/lib/aws-sdk-core/plugins/http_checksum.rb +64 -0
  66. data/lib/aws-sdk-core/plugins/idempotency_token.rb +3 -2
  67. data/lib/aws-sdk-core/plugins/invocation_id.rb +35 -0
  68. data/lib/aws-sdk-core/plugins/jsonvalue_converter.rb +31 -0
  69. data/lib/aws-sdk-core/plugins/logging.rb +20 -18
  70. data/lib/aws-sdk-core/plugins/param_converter.rb +11 -5
  71. data/lib/aws-sdk-core/plugins/param_validator.rb +10 -5
  72. data/lib/aws-sdk-core/plugins/protocols/api_gateway.rb +29 -0
  73. data/lib/aws-sdk-core/plugins/protocols/ec2.rb +4 -1
  74. data/lib/aws-sdk-core/plugins/protocols/json_rpc.rb +15 -12
  75. data/lib/aws-sdk-core/plugins/protocols/query.rb +4 -2
  76. data/lib/aws-sdk-core/plugins/protocols/rest_json.rb +18 -1
  77. data/lib/aws-sdk-core/plugins/protocols/rest_xml.rb +2 -0
  78. data/lib/aws-sdk-core/plugins/recursion_detection.rb +27 -0
  79. data/lib/aws-sdk-core/plugins/regional_endpoint.rb +96 -28
  80. data/lib/aws-sdk-core/plugins/response_paging.rb +8 -19
  81. data/lib/aws-sdk-core/plugins/retries/client_rate_limiter.rb +139 -0
  82. data/lib/aws-sdk-core/plugins/retries/clock_skew.rb +100 -0
  83. data/lib/aws-sdk-core/plugins/retries/error_inspector.rb +146 -0
  84. data/lib/aws-sdk-core/plugins/retries/retry_quota.rb +59 -0
  85. data/lib/aws-sdk-core/plugins/retry_errors.rb +342 -82
  86. data/lib/aws-sdk-core/plugins/signature_v2.rb +53 -0
  87. data/lib/aws-sdk-core/plugins/signature_v4.rb +144 -0
  88. data/lib/aws-sdk-core/plugins/stub_responses.rb +44 -18
  89. data/lib/aws-sdk-core/plugins/transfer_encoding.rb +53 -0
  90. data/lib/aws-sdk-core/plugins/user_agent.rb +25 -10
  91. data/lib/aws-sdk-core/process_credentials.rb +81 -0
  92. data/lib/aws-sdk-core/query/ec2_param_builder.rb +11 -3
  93. data/lib/aws-sdk-core/query/handler.rb +22 -16
  94. data/lib/aws-sdk-core/query/param.rb +2 -0
  95. data/lib/aws-sdk-core/query/param_builder.rb +12 -4
  96. data/lib/aws-sdk-core/query/param_list.rb +2 -0
  97. data/lib/aws-sdk-core/query.rb +7 -0
  98. data/lib/aws-sdk-core/refreshing_credentials.rb +16 -3
  99. data/lib/aws-sdk-core/resources/collection.rb +123 -0
  100. data/lib/aws-sdk-core/rest/handler.rb +3 -0
  101. data/lib/aws-sdk-core/rest/request/body.rb +21 -1
  102. data/lib/aws-sdk-core/rest/request/builder.rb +4 -1
  103. data/lib/aws-sdk-core/rest/request/endpoint.rb +13 -6
  104. data/lib/aws-sdk-core/rest/request/headers.rb +38 -5
  105. data/lib/aws-sdk-core/rest/request/querystring_builder.rb +17 -2
  106. data/lib/aws-sdk-core/rest/response/body.rb +16 -1
  107. data/lib/aws-sdk-core/rest/response/headers.rb +13 -1
  108. data/lib/aws-sdk-core/rest/response/parser.rb +20 -14
  109. data/lib/aws-sdk-core/rest/response/status_code.rb +2 -0
  110. data/lib/aws-sdk-core/rest.rb +12 -0
  111. data/lib/aws-sdk-core/shared_config.rb +205 -69
  112. data/lib/aws-sdk-core/shared_credentials.rb +11 -1
  113. data/lib/aws-sdk-core/sso_credentials.rb +136 -0
  114. data/lib/aws-sdk-core/structure.rb +33 -13
  115. data/lib/aws-sdk-core/stubbing/data_applicator.rb +3 -1
  116. data/lib/aws-sdk-core/stubbing/empty_stub.rb +12 -3
  117. data/lib/aws-sdk-core/stubbing/protocols/api_gateway.rb +10 -0
  118. data/lib/aws-sdk-core/stubbing/protocols/ec2.rb +3 -1
  119. data/lib/aws-sdk-core/stubbing/protocols/json.rb +3 -1
  120. data/lib/aws-sdk-core/stubbing/protocols/query.rb +4 -2
  121. data/lib/aws-sdk-core/stubbing/protocols/rest.rb +120 -2
  122. data/lib/aws-sdk-core/stubbing/protocols/rest_json.rb +8 -2
  123. data/lib/aws-sdk-core/stubbing/protocols/rest_xml.rb +11 -7
  124. data/lib/aws-sdk-core/stubbing/stub_data.rb +18 -3
  125. data/lib/aws-sdk-core/stubbing/xml_error.rb +2 -0
  126. data/lib/aws-sdk-core/type_builder.rb +2 -0
  127. data/lib/aws-sdk-core/util.rb +72 -0
  128. data/lib/aws-sdk-core/waiters/errors.rb +2 -0
  129. data/lib/aws-sdk-core/waiters/poller.rb +7 -9
  130. data/lib/aws-sdk-core/waiters/waiter.rb +5 -2
  131. data/lib/aws-sdk-core/waiters.rb +5 -0
  132. data/lib/aws-sdk-core/xml/builder.rb +15 -7
  133. data/lib/aws-sdk-core/xml/default_list.rb +2 -0
  134. data/lib/aws-sdk-core/xml/default_map.rb +2 -0
  135. data/lib/aws-sdk-core/xml/doc_builder.rb +15 -4
  136. data/lib/aws-sdk-core/xml/error_handler.rb +30 -6
  137. data/lib/aws-sdk-core/xml/parser/engines/libxml.rb +2 -0
  138. data/lib/aws-sdk-core/xml/parser/engines/nokogiri.rb +2 -0
  139. data/lib/aws-sdk-core/xml/parser/engines/oga.rb +2 -0
  140. data/lib/aws-sdk-core/xml/parser/engines/ox.rb +7 -1
  141. data/lib/aws-sdk-core/xml/parser/engines/rexml.rb +4 -1
  142. data/lib/aws-sdk-core/xml/parser/frame.rb +31 -6
  143. data/lib/aws-sdk-core/xml/parser/parsing_error.rb +2 -0
  144. data/lib/aws-sdk-core/xml/parser/stack.rb +2 -0
  145. data/lib/aws-sdk-core/xml/parser.rb +8 -11
  146. data/lib/aws-sdk-core/xml.rb +11 -0
  147. data/lib/aws-sdk-core.rb +112 -440
  148. data/lib/aws-sdk-sso/client.rb +570 -0
  149. data/lib/aws-sdk-sso/client_api.rb +190 -0
  150. data/lib/aws-sdk-sso/customizations.rb +1 -0
  151. data/lib/aws-sdk-sso/errors.rb +102 -0
  152. data/lib/aws-sdk-sso/resource.rb +26 -0
  153. data/lib/aws-sdk-sso/types.rb +352 -0
  154. data/lib/aws-sdk-sso.rb +55 -0
  155. data/lib/aws-sdk-sts/client.rb +2315 -0
  156. data/lib/aws-sdk-sts/client_api.rb +344 -0
  157. data/lib/aws-sdk-sts/customizations.rb +4 -0
  158. data/lib/aws-sdk-sts/errors.rb +166 -0
  159. data/lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb +38 -0
  160. data/lib/aws-sdk-sts/presigner.rb +75 -0
  161. data/lib/aws-sdk-sts/resource.rb +26 -0
  162. data/lib/aws-sdk-sts/types.rb +1673 -0
  163. data/lib/aws-sdk-sts.rb +55 -0
  164. data/lib/seahorse/client/async_base.rb +52 -0
  165. data/lib/seahorse/client/async_response.rb +64 -0
  166. data/lib/seahorse/client/base.rb +8 -9
  167. data/lib/seahorse/client/block_io.rb +6 -2
  168. data/lib/seahorse/client/configuration.rb +16 -2
  169. data/lib/seahorse/client/events.rb +3 -1
  170. data/lib/seahorse/client/h2/connection.rb +250 -0
  171. data/lib/seahorse/client/h2/handler.rb +152 -0
  172. data/lib/seahorse/client/handler.rb +2 -0
  173. data/lib/seahorse/client/handler_builder.rb +2 -0
  174. data/lib/seahorse/client/handler_list.rb +2 -0
  175. data/lib/seahorse/client/handler_list_entry.rb +6 -4
  176. data/lib/seahorse/client/http/async_response.rb +44 -0
  177. data/lib/seahorse/client/http/headers.rb +2 -0
  178. data/lib/seahorse/client/http/request.rb +5 -3
  179. data/lib/seahorse/client/http/response.rb +18 -11
  180. data/lib/seahorse/client/logging/formatter.rb +9 -1
  181. data/lib/seahorse/client/logging/handler.rb +4 -0
  182. data/lib/seahorse/client/managed_file.rb +2 -0
  183. data/lib/seahorse/client/net_http/connection_pool.rb +46 -27
  184. data/lib/seahorse/client/net_http/handler.rb +29 -7
  185. data/lib/seahorse/client/net_http/patches.rb +18 -79
  186. data/lib/seahorse/client/networking_error.rb +30 -0
  187. data/lib/seahorse/client/plugin.rb +69 -6
  188. data/lib/seahorse/client/plugin_list.rb +2 -0
  189. data/lib/seahorse/client/plugins/content_length.rb +14 -3
  190. data/lib/seahorse/client/plugins/endpoint.rb +16 -10
  191. data/lib/seahorse/client/plugins/h2.rb +69 -0
  192. data/lib/seahorse/client/plugins/logging.rb +19 -19
  193. data/lib/seahorse/client/plugins/net_http.rb +58 -14
  194. data/lib/seahorse/client/plugins/operation_methods.rb +2 -0
  195. data/lib/seahorse/client/plugins/raise_response_errors.rb +6 -4
  196. data/lib/seahorse/client/plugins/request_callback.rb +110 -0
  197. data/lib/seahorse/client/plugins/response_target.rb +28 -10
  198. data/lib/seahorse/client/request.rb +2 -0
  199. data/lib/seahorse/client/request_context.rb +7 -0
  200. data/lib/seahorse/client/response.rb +5 -5
  201. data/lib/seahorse/model/api.rb +43 -0
  202. data/lib/seahorse/model/authorizer.rb +23 -0
  203. data/lib/seahorse/model/operation.rb +28 -0
  204. data/lib/seahorse/model/shapes.rb +71 -2
  205. data/lib/seahorse/util.rb +9 -22
  206. data/lib/seahorse/version.rb +2 -0
  207. data/lib/seahorse.rb +63 -60
  208. metadata +132 -520
  209. data/apis/acm/2015-12-08/api-2.json +0 -595
  210. data/apis/acm/2015-12-08/examples-1.json +0 -5
  211. data/apis/acm/2015-12-08/paginators-1.json +0 -10
  212. data/apis/apigateway/2015-07-09/api-2.json +0 -4523
  213. data/apis/apigateway/2015-07-09/examples-1.json +0 -5
  214. data/apis/apigateway/2015-07-09/paginators-1.json +0 -70
  215. data/apis/application-autoscaling/2016-02-06/api-2.json +0 -511
  216. data/apis/application-autoscaling/2016-02-06/examples-1.json +0 -257
  217. data/apis/application-autoscaling/2016-02-06/paginators-1.json +0 -22
  218. data/apis/appstream/2016-12-01/api-2.json +0 -820
  219. data/apis/appstream/2016-12-01/examples-1.json +0 -5
  220. data/apis/appstream/2016-12-01/waiters-2.json +0 -55
  221. data/apis/autoscaling/2011-01-01/api-2.json +0 -2172
  222. data/apis/autoscaling/2011-01-01/examples-1.json +0 -1395
  223. data/apis/autoscaling/2011-01-01/paginators-1.json +0 -52
  224. data/apis/autoscaling/2011-01-01/resources-1.json +0 -1624
  225. data/apis/autoscaling/2011-01-01/waiters-2.json +0 -62
  226. data/apis/batch/2016-08-10/api-2.json +0 -885
  227. data/apis/batch/2016-08-10/examples-1.json +0 -589
  228. data/apis/budgets/2016-10-20/api-2.json +0 -697
  229. data/apis/budgets/2016-10-20/examples-1.json +0 -5
  230. data/apis/budgets/2016-10-20/paginators-1.json +0 -4
  231. data/apis/clouddirectory/2016-05-10/api-2.json +0 -3033
  232. data/apis/clouddirectory/2016-05-10/examples-1.json +0 -5
  233. data/apis/clouddirectory/2016-05-10/paginators-1.json +0 -84
  234. data/apis/cloudformation/2010-05-15/api-2.json +0 -1428
  235. data/apis/cloudformation/2010-05-15/examples-1.json +0 -158
  236. data/apis/cloudformation/2010-05-15/paginators-1.json +0 -27
  237. data/apis/cloudformation/2010-05-15/resources-1.json +0 -211
  238. data/apis/cloudformation/2010-05-15/waiters-2.json +0 -157
  239. data/apis/cloudfront/2016-01-28/api-2.json +0 -2219
  240. data/apis/cloudfront/2016-01-28/examples-1.json +0 -5
  241. data/apis/cloudfront/2016-01-28/paginators-1.json +0 -32
  242. data/apis/cloudfront/2016-01-28/waiters-2.json +0 -47
  243. data/apis/cloudfront/2016-08-01/api-2.json +0 -2548
  244. data/apis/cloudfront/2016-08-01/examples-1.json +0 -5
  245. data/apis/cloudfront/2016-08-01/paginators-1.json +0 -32
  246. data/apis/cloudfront/2016-08-01/waiters-2.json +0 -47
  247. data/apis/cloudfront/2016-08-20/api-2.json +0 -2586
  248. data/apis/cloudfront/2016-08-20/paginators-1.json +0 -32
  249. data/apis/cloudfront/2016-08-20/waiters-2.json +0 -47
  250. data/apis/cloudfront/2016-09-07/api-2.json +0 -2596
  251. data/apis/cloudfront/2016-09-07/examples-1.json +0 -5
  252. data/apis/cloudfront/2016-09-07/paginators-1.json +0 -32
  253. data/apis/cloudfront/2016-09-07/waiters-2.json +0 -47
  254. data/apis/cloudfront/2016-09-29/api-2.json +0 -2599
  255. data/apis/cloudfront/2016-09-29/examples-1.json +0 -5
  256. data/apis/cloudfront/2016-09-29/paginators-1.json +0 -32
  257. data/apis/cloudfront/2016-09-29/waiters-2.json +0 -47
  258. data/apis/cloudfront/2016-11-25/api-2.json +0 -2665
  259. data/apis/cloudfront/2016-11-25/examples-1.json +0 -5
  260. data/apis/cloudfront/2016-11-25/paginators-1.json +0 -32
  261. data/apis/cloudfront/2016-11-25/waiters-2.json +0 -47
  262. data/apis/cloudhsm/2014-05-30/api-2.json +0 -878
  263. data/apis/cloudhsm/2014-05-30/examples-1.json +0 -5
  264. data/apis/cloudsearch/2013-01-01/api-2.json +0 -2002
  265. data/apis/cloudsearch/2013-01-01/paginators-1.json +0 -20
  266. data/apis/cloudsearchdomain/2013-01-01/api-2.json +0 -374
  267. data/apis/cloudsearchdomain/2013-01-01/examples-1.json +0 -5
  268. data/apis/cloudtrail/2013-11-01/api-2.json +0 -907
  269. data/apis/cloudtrail/2013-11-01/examples-1.json +0 -5
  270. data/apis/cloudtrail/2013-11-01/paginators-1.json +0 -13
  271. data/apis/codebuild/2016-10-06/api-2.json +0 -702
  272. data/apis/codebuild/2016-10-06/examples-1.json +0 -5
  273. data/apis/codebuild/2016-10-06/paginators-1.json +0 -4
  274. data/apis/codecommit/2015-04-13/api-2.json +0 -1112
  275. data/apis/codecommit/2015-04-13/examples-1.json +0 -5
  276. data/apis/codecommit/2015-04-13/paginators-1.json +0 -19
  277. data/apis/codedeploy/2014-10-06/api-2.json +0 -2300
  278. data/apis/codedeploy/2014-10-06/examples-1.json +0 -5
  279. data/apis/codedeploy/2014-10-06/paginators-1.json +0 -4
  280. data/apis/codedeploy/2014-10-06/waiters-2.json +0 -30
  281. data/apis/codepipeline/2015-07-09/api-2.json +0 -1714
  282. data/apis/codepipeline/2015-07-09/examples-1.json +0 -5
  283. data/apis/cognito-identity/2014-06-30/api-2.json +0 -943
  284. data/apis/cognito-identity/2014-06-30/examples-1.json +0 -5
  285. data/apis/cognito-identity/2014-06-30/paginators-1.json +0 -4
  286. data/apis/cognito-idp/2016-04-18/api-2.json +0 -3325
  287. data/apis/cognito-idp/2016-04-18/examples-1.json +0 -5
  288. data/apis/cognito-sync/2014-06-30/api-2.json +0 -1875
  289. data/apis/config/2014-11-12/api-2.json +0 -1417
  290. data/apis/config/2014-11-12/examples-1.json +0 -5
  291. data/apis/config/2014-11-12/paginators-1.json +0 -10
  292. data/apis/cur/2017-01-06/api-2.json +0 -226
  293. data/apis/cur/2017-01-06/examples-1.json +0 -5
  294. data/apis/cur/2017-01-06/paginators-1.json +0 -9
  295. data/apis/datapipeline/2012-10-29/api-2.json +0 -1168
  296. data/apis/datapipeline/2012-10-29/paginators-1.json +0 -26
  297. data/apis/devicefarm/2015-06-23/api-2.json +0 -2031
  298. data/apis/devicefarm/2015-06-23/examples-1.json +0 -1242
  299. data/apis/devicefarm/2015-06-23/paginators-1.json +0 -74
  300. data/apis/directconnect/2012-10-25/api-2.json +0 -1347
  301. data/apis/directconnect/2012-10-25/examples-1.json +0 -5
  302. data/apis/directconnect/2012-10-25/paginators-1.json +0 -22
  303. data/apis/discovery/2015-11-01/api-2.json +0 -867
  304. data/apis/discovery/2015-11-01/examples-1.json +0 -5
  305. data/apis/dms/2016-01-01/api-2.json +0 -1505
  306. data/apis/dms/2016-01-01/examples-1.json +0 -5
  307. data/apis/ds/2015-04-16/api-2.json +0 -1972
  308. data/apis/ds/2015-04-16/examples-1.json +0 -5
  309. data/apis/dynamodb/2011-12-05/api-2.json +0 -802
  310. data/apis/dynamodb/2011-12-05/examples-1.json +0 -5
  311. data/apis/dynamodb/2011-12-05/paginators-1.json +0 -26
  312. data/apis/dynamodb/2011-12-05/waiters-2.json +0 -35
  313. data/apis/dynamodb/2012-08-10/api-2.json +0 -1405
  314. data/apis/dynamodb/2012-08-10/examples-1.json +0 -628
  315. data/apis/dynamodb/2012-08-10/paginators-1.json +0 -26
  316. data/apis/dynamodb/2012-08-10/resources-1.json +0 -136
  317. data/apis/dynamodb/2012-08-10/waiters-2.json +0 -35
  318. data/apis/ec2/2015-10-01/api-2.json +0 -13760
  319. data/apis/ec2/2015-10-01/examples-1.json +0 -5
  320. data/apis/ec2/2015-10-01/paginators-1.json +0 -138
  321. data/apis/ec2/2015-10-01/resources-1.json +0 -2582
  322. data/apis/ec2/2015-10-01/waiters-2.json +0 -593
  323. data/apis/ec2/2016-04-01/api-2.json +0 -14191
  324. data/apis/ec2/2016-04-01/examples-1.json +0 -3729
  325. data/apis/ec2/2016-04-01/paginators-1.json +0 -138
  326. data/apis/ec2/2016-04-01/resources-1.json +0 -2582
  327. data/apis/ec2/2016-04-01/waiters-2.json +0 -593
  328. data/apis/ec2/2016-09-15/api-2.json +0 -14415
  329. data/apis/ec2/2016-09-15/examples-1.json +0 -3740
  330. data/apis/ec2/2016-09-15/paginators-1.json +0 -138
  331. data/apis/ec2/2016-09-15/resources-1.json +0 -2582
  332. data/apis/ec2/2016-09-15/waiters-2.json +0 -593
  333. data/apis/ec2/2016-11-15/api-2.json +0 -15373
  334. data/apis/ec2/2016-11-15/examples-1.json +0 -3740
  335. data/apis/ec2/2016-11-15/paginators-1.json +0 -144
  336. data/apis/ec2/2016-11-15/resources-1.json +0 -2582
  337. data/apis/ec2/2016-11-15/waiters-2.json +0 -611
  338. data/apis/ecr/2015-09-21/api-2.json +0 -947
  339. data/apis/ecr/2015-09-21/examples-1.json +0 -215
  340. data/apis/ecr/2015-09-21/paginators-1.json +0 -22
  341. data/apis/ecs/2014-11-13/api-2.json +0 -1625
  342. data/apis/ecs/2014-11-13/examples-1.json +0 -883
  343. data/apis/ecs/2014-11-13/paginators-1.json +0 -40
  344. data/apis/ecs/2014-11-13/waiters-2.json +0 -93
  345. data/apis/elasticache/2015-02-02/api-2.json +0 -2474
  346. data/apis/elasticache/2015-02-02/examples-1.json +0 -2968
  347. data/apis/elasticache/2015-02-02/paginators-1.json +0 -76
  348. data/apis/elasticache/2015-02-02/waiters-2.json +0 -143
  349. data/apis/elasticbeanstalk/2010-12-01/api-2.json +0 -2332
  350. data/apis/elasticbeanstalk/2010-12-01/examples-1.json +0 -1109
  351. data/apis/elasticbeanstalk/2010-12-01/paginators-1.json +0 -25
  352. data/apis/elasticfilesystem/2015-02-01/api-2.json +0 -714
  353. data/apis/elasticfilesystem/2015-02-01/examples-1.json +0 -222
  354. data/apis/elasticloadbalancing/2012-06-01/api-2.json +0 -1590
  355. data/apis/elasticloadbalancing/2012-06-01/examples-1.json +0 -1036
  356. data/apis/elasticloadbalancing/2012-06-01/paginators-1.json +0 -18
  357. data/apis/elasticloadbalancing/2012-06-01/waiters-2.json +0 -49
  358. data/apis/elasticloadbalancingv2/2015-12-01/api-2.json +0 -1823
  359. data/apis/elasticloadbalancingv2/2015-12-01/examples-1.json +0 -1384
  360. data/apis/elasticloadbalancingv2/2015-12-01/paginators-1.json +0 -19
  361. data/apis/elasticmapreduce/2009-03-31/api-2.json +0 -1794
  362. data/apis/elasticmapreduce/2009-03-31/examples-1.json +0 -5
  363. data/apis/elasticmapreduce/2009-03-31/paginators-1.json +0 -32
  364. data/apis/elasticmapreduce/2009-03-31/waiters-2.json +0 -67
  365. data/apis/elastictranscoder/2012-09-25/api-2.json +0 -1483
  366. data/apis/elastictranscoder/2012-09-25/examples-1.json +0 -5
  367. data/apis/elastictranscoder/2012-09-25/paginators-1.json +0 -24
  368. data/apis/elastictranscoder/2012-09-25/waiters-2.json +0 -30
  369. data/apis/email/2010-12-01/api-2.json +0 -2212
  370. data/apis/email/2010-12-01/examples-1.json +0 -953
  371. data/apis/email/2010-12-01/paginators-1.json +0 -13
  372. data/apis/email/2010-12-01/waiters-2.json +0 -18
  373. data/apis/es/2015-01-01/api-2.json +0 -862
  374. data/apis/es/2015-01-01/examples-1.json +0 -5
  375. data/apis/es/2015-01-01/paginators-1.json +0 -14
  376. data/apis/events/2015-10-07/api-2.json +0 -644
  377. data/apis/events/2015-10-07/examples-1.json +0 -5
  378. data/apis/firehose/2015-08-04/api-2.json +0 -866
  379. data/apis/firehose/2015-08-04/examples-1.json +0 -5
  380. data/apis/gamelift/2015-10-01/api-2.json +0 -2256
  381. data/apis/gamelift/2015-10-01/examples-1.json +0 -5
  382. data/apis/gamelift/2015-10-01/paginators-1.json +0 -4
  383. data/apis/glacier/2012-06-01/api-2.json +0 -1734
  384. data/apis/glacier/2012-06-01/examples-1.json +0 -806
  385. data/apis/glacier/2012-06-01/paginators-1.json +0 -28
  386. data/apis/glacier/2012-06-01/resources-1.json +0 -563
  387. data/apis/glacier/2012-06-01/waiters-2.json +0 -39
  388. data/apis/health/2016-08-04/api-2.json +0 -547
  389. data/apis/health/2016-08-04/examples-1.json +0 -5
  390. data/apis/health/2016-08-04/paginators-1.json +0 -31
  391. data/apis/iam/2010-05-08/api-2.json +0 -4730
  392. data/apis/iam/2010-05-08/examples-1.json +0 -1191
  393. data/apis/iam/2010-05-08/paginators-1.json +0 -198
  394. data/apis/iam/2010-05-08/resources-1.json +0 -1740
  395. data/apis/iam/2010-05-08/waiters-2.json +0 -39
  396. data/apis/importexport/2010-06-01/api-2.json +0 -667
  397. data/apis/importexport/2010-06-01/paginators-1.json +0 -11
  398. data/apis/inspector/2016-02-16/api-2.json +0 -1965
  399. data/apis/inspector/2016-02-16/examples-1.json +0 -1140
  400. data/apis/iot/2015-05-28/api-2.json +0 -4347
  401. data/apis/iot/2015-05-28/examples-1.json +0 -5
  402. data/apis/iot-data/2015-05-28/api-2.json +0 -264
  403. data/apis/kinesis/2013-12-02/api-2.json +0 -890
  404. data/apis/kinesis/2013-12-02/examples-1.json +0 -5
  405. data/apis/kinesis/2013-12-02/paginators-1.json +0 -18
  406. data/apis/kinesis/2013-12-02/waiters-2.json +0 -18
  407. data/apis/kinesisanalytics/2015-08-14/api-2.json +0 -1049
  408. data/apis/kinesisanalytics/2015-08-14/examples-1.json +0 -5
  409. data/apis/kms/2014-11-01/api-2.json +0 -1492
  410. data/apis/kms/2014-11-01/examples-1.json +0 -862
  411. data/apis/kms/2014-11-01/paginators-1.json +0 -32
  412. data/apis/lambda/2014-11-11/api-2.json +0 -668
  413. data/apis/lambda/2014-11-11/paginators-1.json +0 -16
  414. data/apis/lambda/2015-03-31/api-2.json +0 -1514
  415. data/apis/lambda/2015-03-31/examples-1.json +0 -614
  416. data/apis/lambda/2015-03-31/paginators-1.json +0 -16
  417. data/apis/lightsail/2016-11-28/api-2.json +0 -2137
  418. data/apis/lightsail/2016-11-28/examples-1.json +0 -5
  419. data/apis/logs/2014-03-28/api-2.json +0 -1246
  420. data/apis/logs/2014-03-28/examples-1.json +0 -5
  421. data/apis/logs/2014-03-28/paginators-1.json +0 -49
  422. data/apis/machinelearning/2014-12-12/api-2.json +0 -1978
  423. data/apis/machinelearning/2014-12-12/examples-1.json +0 -5
  424. data/apis/machinelearning/2014-12-12/paginators-1.json +0 -28
  425. data/apis/machinelearning/2014-12-12/waiters-2.json +0 -81
  426. data/apis/marketplacecommerceanalytics/2015-07-01/api-2.json +0 -170
  427. data/apis/marketplacecommerceanalytics/2015-07-01/examples-1.json +0 -5
  428. data/apis/meteringmarketplace/2016-01-14/api-2.json +0 -263
  429. data/apis/meteringmarketplace/2016-01-14/examples-1.json +0 -5
  430. data/apis/monitoring/2010-08-01/api-2.json +0 -811
  431. data/apis/monitoring/2010-08-01/examples-1.json +0 -5
  432. data/apis/monitoring/2010-08-01/paginators-1.json +0 -24
  433. data/apis/monitoring/2010-08-01/resources-1.json +0 -346
  434. data/apis/monitoring/2010-08-01/waiters-2.json +0 -18
  435. data/apis/mturk-requester/2017-01-17/api-2.json +0 -1665
  436. data/apis/mturk-requester/2017-01-17/examples-1.json +0 -5
  437. data/apis/mturk-requester/2017-01-17/paginators-1.json +0 -54
  438. data/apis/opsworks/2013-02-18/api-2.json +0 -2607
  439. data/apis/opsworks/2013-02-18/examples-1.json +0 -5
  440. data/apis/opsworks/2013-02-18/paginators-1.json +0 -55
  441. data/apis/opsworks/2013-02-18/resources-1.json +0 -173
  442. data/apis/opsworks/2013-02-18/waiters-2.json +0 -295
  443. data/apis/opsworkscm/2016-11-01/api-2.json +0 -730
  444. data/apis/opsworkscm/2016-11-01/examples-1.json +0 -5
  445. data/apis/opsworkscm/2016-11-01/paginators-1.json +0 -4
  446. data/apis/organizations/2016-11-28/api-2.json +0 -1989
  447. data/apis/organizations/2016-11-28/examples-1.json +0 -1398
  448. data/apis/organizations/2016-11-28/paginators-1.json +0 -4
  449. data/apis/pinpoint/2016-12-01/api-2.json +0 -2753
  450. data/apis/pinpoint/2016-12-01/examples-1.json +0 -5
  451. data/apis/polly/2016-06-10/api-2.json +0 -504
  452. data/apis/polly/2016-06-10/examples-1.json +0 -171
  453. data/apis/rds/2013-01-10/api-2.json +0 -2902
  454. data/apis/rds/2013-01-10/examples-1.json +0 -5
  455. data/apis/rds/2013-01-10/paginators-1.json +0 -97
  456. data/apis/rds/2013-02-12/api-2.json +0 -3058
  457. data/apis/rds/2013-02-12/examples-1.json +0 -5
  458. data/apis/rds/2013-02-12/paginators-1.json +0 -110
  459. data/apis/rds/2013-09-09/api-2.json +0 -3159
  460. data/apis/rds/2013-09-09/examples-1.json +0 -5
  461. data/apis/rds/2013-09-09/paginators-1.json +0 -110
  462. data/apis/rds/2013-09-09/waiters-2.json +0 -97
  463. data/apis/rds/2014-09-01/api-2.json +0 -3272
  464. data/apis/rds/2014-09-01/examples-1.json +0 -5
  465. data/apis/rds/2014-09-01/paginators-1.json +0 -4
  466. data/apis/rds/2014-10-31/api-2.json +0 -5098
  467. data/apis/rds/2014-10-31/examples-1.json +0 -1861
  468. data/apis/rds/2014-10-31/paginators-1.json +0 -110
  469. data/apis/rds/2014-10-31/resources-1.json +0 -3272
  470. data/apis/rds/2014-10-31/waiters-2.json +0 -90
  471. data/apis/redshift/2012-12-01/api-2.json +0 -3775
  472. data/apis/redshift/2012-12-01/examples-1.json +0 -5
  473. data/apis/redshift/2012-12-01/paginators-1.json +0 -94
  474. data/apis/redshift/2012-12-01/waiters-2.json +0 -97
  475. data/apis/rekognition/2016-06-27/api-2.json +0 -844
  476. data/apis/rekognition/2016-06-27/examples-1.json +0 -651
  477. data/apis/rekognition/2016-06-27/paginators-1.json +0 -16
  478. data/apis/route53/2013-04-01/api-2.json +0 -3312
  479. data/apis/route53/2013-04-01/examples-1.json +0 -762
  480. data/apis/route53/2013-04-01/paginators-1.json +0 -33
  481. data/apis/route53/2013-04-01/waiters-2.json +0 -18
  482. data/apis/route53domains/2014-05-15/api-2.json +0 -1323
  483. data/apis/route53domains/2014-05-15/paginators-1.json +0 -17
  484. data/apis/runtime.lex/2016-11-28/api-2.json +0 -243
  485. data/apis/runtime.lex/2016-11-28/examples-1.json +0 -5
  486. data/apis/runtime.lex/2016-11-28/paginators-1.json +0 -4
  487. data/apis/s3/2006-03-01/api-2.json +0 -5368
  488. data/apis/s3/2006-03-01/examples-1.json +0 -5
  489. data/apis/s3/2006-03-01/paginators-1.json +0 -66
  490. data/apis/s3/2006-03-01/resources-1.json +0 -1176
  491. data/apis/s3/2006-03-01/waiters-2.json +0 -73
  492. data/apis/sdb/2009-04-15/api-2.json +0 -955
  493. data/apis/sdb/2009-04-15/paginators-1.json +0 -15
  494. data/apis/servicecatalog/2015-12-10/api-2.json +0 -1955
  495. data/apis/servicecatalog/2015-12-10/examples-1.json +0 -5
  496. data/apis/shield/2016-06-02/api-2.json +0 -494
  497. data/apis/shield/2016-06-02/examples-1.json +0 -5
  498. data/apis/sms/2016-10-24/api-2.json +0 -612
  499. data/apis/sms/2016-10-24/examples-1.json +0 -5
  500. data/apis/sms/2016-10-24/paginators-1.json +0 -28
  501. data/apis/snowball/2016-06-30/api-2.json +0 -834
  502. data/apis/snowball/2016-06-30/examples-1.json +0 -442
  503. data/apis/snowball/2016-06-30/paginators-1.json +0 -16
  504. data/apis/sns/2010-03-31/api-2.json +0 -1145
  505. data/apis/sns/2010-03-31/examples-1.json +0 -5
  506. data/apis/sns/2010-03-31/paginators-1.json +0 -29
  507. data/apis/sns/2010-03-31/resources-1.json +0 -327
  508. data/apis/sqs/2012-11-05/api-2.json +0 -986
  509. data/apis/sqs/2012-11-05/examples-1.json +0 -5
  510. data/apis/sqs/2012-11-05/paginators-1.json +0 -7
  511. data/apis/sqs/2012-11-05/resources-1.json +0 -232
  512. data/apis/ssm/2014-11-06/api-2.json +0 -5296
  513. data/apis/ssm/2014-11-06/examples-1.json +0 -5
  514. data/apis/ssm/2014-11-06/paginators-1.json +0 -40
  515. data/apis/states/2016-11-23/api-2.json +0 -1021
  516. data/apis/states/2016-11-23/examples-1.json +0 -5
  517. data/apis/states/2016-11-23/paginators-1.json +0 -28
  518. data/apis/storagegateway/2013-06-30/api-2.json +0 -2551
  519. data/apis/storagegateway/2013-06-30/examples-1.json +0 -1381
  520. data/apis/storagegateway/2013-06-30/paginators-1.json +0 -52
  521. data/apis/streams.dynamodb/2012-08-10/api-2.json +0 -406
  522. data/apis/streams.dynamodb/2012-08-10/examples-1.json +0 -212
  523. data/apis/streams.dynamodb/2012-08-10/paginators-1.json +0 -4
  524. data/apis/sts/2011-06-15/api-2.json +0 -522
  525. data/apis/sts/2011-06-15/examples-1.json +0 -206
  526. data/apis/support/2013-04-15/api-2.json +0 -772
  527. data/apis/support/2013-04-15/examples-1.json +0 -5
  528. data/apis/support/2013-04-15/paginators-1.json +0 -25
  529. data/apis/swf/2012-01-25/api-2.json +0 -2839
  530. data/apis/swf/2012-01-25/paginators-1.json +0 -46
  531. data/apis/waf/2015-08-24/api-2.json +0 -1959
  532. data/apis/waf/2015-08-24/examples-1.json +0 -1017
  533. data/apis/waf/2015-08-24/paginators-1.json +0 -4
  534. data/apis/waf-regional/2016-11-28/api-2.json +0 -2090
  535. data/apis/waf-regional/2016-11-28/examples-1.json +0 -1017
  536. data/apis/waf-regional/2016-11-28/paginators-1.json +0 -4
  537. data/apis/workdocs/2016-05-01/api-2.json +0 -1781
  538. data/apis/workdocs/2016-05-01/examples-1.json +0 -5
  539. data/apis/workdocs/2016-05-01/paginators-1.json +0 -25
  540. data/apis/workspaces/2015-04-08/api-2.json +0 -840
  541. data/apis/workspaces/2015-04-08/examples-1.json +0 -5
  542. data/apis/workspaces/2015-04-08/paginators-1.json +0 -20
  543. data/apis/xray/2016-04-12/api-2.json +0 -491
  544. data/apis/xray/2016-04-12/examples-1.json +0 -5
  545. data/bin/aws.rb +0 -180
  546. data/endpoints.json +0 -1935
  547. data/lib/aws-sdk-core/acm.rb +0 -6
  548. data/lib/aws-sdk-core/api/builder.rb +0 -106
  549. data/lib/aws-sdk-core/api/customizations.rb +0 -261
  550. data/lib/aws-sdk-core/api/docs/builder.rb +0 -223
  551. data/lib/aws-sdk-core/api/docs/client_type_documenter.rb +0 -118
  552. data/lib/aws-sdk-core/api/docs/crosslink.rb +0 -43
  553. data/lib/aws-sdk-core/api/docs/docstring_provider.rb +0 -75
  554. data/lib/aws-sdk-core/api/docs/operation_documenter.rb +0 -151
  555. data/lib/aws-sdk-core/api/docs/param_formatter.rb +0 -163
  556. data/lib/aws-sdk-core/api/docs/request_syntax_example.rb +0 -22
  557. data/lib/aws-sdk-core/api/docs/response_structure_example.rb +0 -91
  558. data/lib/aws-sdk-core/api/docs/shared_example.rb +0 -100
  559. data/lib/aws-sdk-core/api/docs/utils.rb +0 -133
  560. data/lib/aws-sdk-core/api/shape_map.rb +0 -142
  561. data/lib/aws-sdk-core/apigateway.rb +0 -6
  562. data/lib/aws-sdk-core/applicationautoscaling.rb +0 -6
  563. data/lib/aws-sdk-core/applicationdiscoveryservice.rb +0 -5
  564. data/lib/aws-sdk-core/appstream.rb +0 -6
  565. data/lib/aws-sdk-core/autoscaling.rb +0 -8
  566. data/lib/aws-sdk-core/batch.rb +0 -5
  567. data/lib/aws-sdk-core/budgets.rb +0 -6
  568. data/lib/aws-sdk-core/checksums.rb +0 -51
  569. data/lib/aws-sdk-core/client.rb +0 -59
  570. data/lib/aws-sdk-core/client_waiters.rb +0 -120
  571. data/lib/aws-sdk-core/clouddirectory.rb +0 -6
  572. data/lib/aws-sdk-core/cloudformation.rb +0 -8
  573. data/lib/aws-sdk-core/cloudfront/cookie_signer.rb +0 -44
  574. data/lib/aws-sdk-core/cloudfront/signer.rb +0 -141
  575. data/lib/aws-sdk-core/cloudfront/url_signer.rb +0 -48
  576. data/lib/aws-sdk-core/cloudfront.rb +0 -17
  577. data/lib/aws-sdk-core/cloudhsm.rb +0 -5
  578. data/lib/aws-sdk-core/cloudsearch.rb +0 -5
  579. data/lib/aws-sdk-core/cloudsearchdomain.rb +0 -5
  580. data/lib/aws-sdk-core/cloudtrail.rb +0 -6
  581. data/lib/aws-sdk-core/cloudwatch.rb +0 -8
  582. data/lib/aws-sdk-core/cloudwatchevents.rb +0 -5
  583. data/lib/aws-sdk-core/cloudwatchlogs.rb +0 -6
  584. data/lib/aws-sdk-core/codebuild.rb +0 -6
  585. data/lib/aws-sdk-core/codecommit.rb +0 -6
  586. data/lib/aws-sdk-core/codedeploy.rb +0 -7
  587. data/lib/aws-sdk-core/codepipeline.rb +0 -5
  588. data/lib/aws-sdk-core/cognitoidentity.rb +0 -6
  589. data/lib/aws-sdk-core/cognitoidentityprovider.rb +0 -5
  590. data/lib/aws-sdk-core/cognitosync.rb +0 -4
  591. data/lib/aws-sdk-core/configservice.rb +0 -6
  592. data/lib/aws-sdk-core/costandusagereportservice.rb +0 -6
  593. data/lib/aws-sdk-core/databasemigrationservice.rb +0 -5
  594. data/lib/aws-sdk-core/datapipeline.rb +0 -5
  595. data/lib/aws-sdk-core/devicefarm.rb +0 -6
  596. data/lib/aws-sdk-core/directconnect.rb +0 -6
  597. data/lib/aws-sdk-core/directoryservice.rb +0 -5
  598. data/lib/aws-sdk-core/dynamodb/attribute_value.rb +0 -108
  599. data/lib/aws-sdk-core/dynamodb.rb +0 -40
  600. data/lib/aws-sdk-core/dynamodbstreams.rb +0 -6
  601. data/lib/aws-sdk-core/ec2.rb +0 -8
  602. data/lib/aws-sdk-core/ecr.rb +0 -6
  603. data/lib/aws-sdk-core/ecs.rb +0 -7
  604. data/lib/aws-sdk-core/efs.rb +0 -5
  605. data/lib/aws-sdk-core/elasticache.rb +0 -7
  606. data/lib/aws-sdk-core/elasticbeanstalk.rb +0 -6
  607. data/lib/aws-sdk-core/elasticloadbalancing.rb +0 -7
  608. data/lib/aws-sdk-core/elasticloadbalancingv2.rb +0 -6
  609. data/lib/aws-sdk-core/elasticsearchservice.rb +0 -6
  610. data/lib/aws-sdk-core/elastictranscoder.rb +0 -7
  611. data/lib/aws-sdk-core/empty_structure.rb +0 -3
  612. data/lib/aws-sdk-core/emr.rb +0 -7
  613. data/lib/aws-sdk-core/endpoint_provider.rb +0 -104
  614. data/lib/aws-sdk-core/firehose.rb +0 -5
  615. data/lib/aws-sdk-core/gamelift.rb +0 -6
  616. data/lib/aws-sdk-core/glacier.rb +0 -8
  617. data/lib/aws-sdk-core/health.rb +0 -6
  618. data/lib/aws-sdk-core/iam.rb +0 -8
  619. data/lib/aws-sdk-core/importexport.rb +0 -5
  620. data/lib/aws-sdk-core/inspector.rb +0 -5
  621. data/lib/aws-sdk-core/iot.rb +0 -5
  622. data/lib/aws-sdk-core/iotdataplane.rb +0 -4
  623. data/lib/aws-sdk-core/kinesis.rb +0 -7
  624. data/lib/aws-sdk-core/kinesisanalytics.rb +0 -5
  625. data/lib/aws-sdk-core/kms.rb +0 -6
  626. data/lib/aws-sdk-core/lambda.rb +0 -6
  627. data/lib/aws-sdk-core/lambdapreview.rb +0 -5
  628. data/lib/aws-sdk-core/lex.rb +0 -6
  629. data/lib/aws-sdk-core/lightsail.rb +0 -5
  630. data/lib/aws-sdk-core/machinelearning.rb +0 -7
  631. data/lib/aws-sdk-core/marketplacecommerceanalytics.rb +0 -5
  632. data/lib/aws-sdk-core/marketplacemetering.rb +0 -5
  633. data/lib/aws-sdk-core/mturk.rb +0 -6
  634. data/lib/aws-sdk-core/opsworks.rb +0 -8
  635. data/lib/aws-sdk-core/opsworkscm.rb +0 -6
  636. data/lib/aws-sdk-core/organizations.rb +0 -6
  637. data/lib/aws-sdk-core/partitions/partition.rb +0 -95
  638. data/lib/aws-sdk-core/partitions/partition_list.rb +0 -60
  639. data/lib/aws-sdk-core/partitions/region.rb +0 -66
  640. data/lib/aws-sdk-core/partitions/service.rb +0 -74
  641. data/lib/aws-sdk-core/partitions.rb +0 -174
  642. data/lib/aws-sdk-core/pinpoint.rb +0 -5
  643. data/lib/aws-sdk-core/plugins/api_gateway_header.rb +0 -19
  644. data/lib/aws-sdk-core/plugins/csd_conditional_signing.rb +0 -30
  645. data/lib/aws-sdk-core/plugins/csd_switch_to_post.rb +0 -36
  646. data/lib/aws-sdk-core/plugins/dynamodb_crc32_validation.rb +0 -52
  647. data/lib/aws-sdk-core/plugins/dynamodb_extended_retries.rb +0 -22
  648. data/lib/aws-sdk-core/plugins/dynamodb_simple_attributes.rb +0 -209
  649. data/lib/aws-sdk-core/plugins/ec2_copy_encrypted_snapshot.rb +0 -56
  650. data/lib/aws-sdk-core/plugins/ec2_region_validation.rb +0 -17
  651. data/lib/aws-sdk-core/plugins/glacier_account_id.rb +0 -19
  652. data/lib/aws-sdk-core/plugins/glacier_api_version.rb +0 -19
  653. data/lib/aws-sdk-core/plugins/glacier_checksums.rb +0 -87
  654. data/lib/aws-sdk-core/plugins/machine_learning_predict_endpoint.rb +0 -20
  655. data/lib/aws-sdk-core/plugins/rds_cross_region_copying.rb +0 -69
  656. data/lib/aws-sdk-core/plugins/request_signer.rb +0 -142
  657. data/lib/aws-sdk-core/plugins/route_53_id_fix.rb +0 -55
  658. data/lib/aws-sdk-core/plugins/s3_accelerate.rb +0 -90
  659. data/lib/aws-sdk-core/plugins/s3_bucket_dns.rb +0 -86
  660. data/lib/aws-sdk-core/plugins/s3_bucket_name_restrictions.rb +0 -21
  661. data/lib/aws-sdk-core/plugins/s3_dualstack.rb +0 -67
  662. data/lib/aws-sdk-core/plugins/s3_expect_100_continue.rb +0 -27
  663. data/lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb +0 -21
  664. data/lib/aws-sdk-core/plugins/s3_http_200_errors.rb +0 -45
  665. data/lib/aws-sdk-core/plugins/s3_location_constraint.rb +0 -31
  666. data/lib/aws-sdk-core/plugins/s3_md5s.rb +0 -50
  667. data/lib/aws-sdk-core/plugins/s3_redirects.rb +0 -37
  668. data/lib/aws-sdk-core/plugins/s3_request_signer.rb +0 -166
  669. data/lib/aws-sdk-core/plugins/s3_sse_cpk.rb +0 -64
  670. data/lib/aws-sdk-core/plugins/s3_url_encoded_keys.rb +0 -92
  671. data/lib/aws-sdk-core/plugins/sqs_md5s.rb +0 -162
  672. data/lib/aws-sdk-core/plugins/sqs_queue_urls.rb +0 -34
  673. data/lib/aws-sdk-core/plugins/swf_read_timeouts.rb +0 -23
  674. data/lib/aws-sdk-core/polly/presigner.rb +0 -70
  675. data/lib/aws-sdk-core/polly.rb +0 -13
  676. data/lib/aws-sdk-core/rds.rb +0 -8
  677. data/lib/aws-sdk-core/redshift.rb +0 -7
  678. data/lib/aws-sdk-core/rekognition.rb +0 -6
  679. data/lib/aws-sdk-core/route53.rb +0 -7
  680. data/lib/aws-sdk-core/route53domains.rb +0 -5
  681. data/lib/aws-sdk-core/s3/bucket_region_cache.rb +0 -75
  682. data/lib/aws-sdk-core/s3/presigner.rb +0 -116
  683. data/lib/aws-sdk-core/s3.rb +0 -26
  684. data/lib/aws-sdk-core/service.rb +0 -4
  685. data/lib/aws-sdk-core/servicecatalog.rb +0 -5
  686. data/lib/aws-sdk-core/ses.rb +0 -7
  687. data/lib/aws-sdk-core/shield.rb +0 -5
  688. data/lib/aws-sdk-core/signers/base.rb +0 -31
  689. data/lib/aws-sdk-core/signers/s3.rb +0 -184
  690. data/lib/aws-sdk-core/signers/v2.rb +0 -51
  691. data/lib/aws-sdk-core/signers/v3.rb +0 -34
  692. data/lib/aws-sdk-core/signers/v4.rb +0 -234
  693. data/lib/aws-sdk-core/simpledb.rb +0 -5
  694. data/lib/aws-sdk-core/sms.rb +0 -6
  695. data/lib/aws-sdk-core/snowball.rb +0 -6
  696. data/lib/aws-sdk-core/sns.rb +0 -7
  697. data/lib/aws-sdk-core/sqs.rb +0 -7
  698. data/lib/aws-sdk-core/ssm.rb +0 -6
  699. data/lib/aws-sdk-core/states.rb +0 -6
  700. data/lib/aws-sdk-core/storagegateway.rb +0 -6
  701. data/lib/aws-sdk-core/sts.rb +0 -5
  702. data/lib/aws-sdk-core/support.rb +0 -6
  703. data/lib/aws-sdk-core/swf.rb +0 -5
  704. data/lib/aws-sdk-core/tree_hash.rb +0 -69
  705. data/lib/aws-sdk-core/version.rb +0 -3
  706. data/lib/aws-sdk-core/waf.rb +0 -6
  707. data/lib/aws-sdk-core/wafregional.rb +0 -6
  708. data/lib/aws-sdk-core/waiters/null_provider.rb +0 -12
  709. data/lib/aws-sdk-core/waiters/provider.rb +0 -35
  710. data/lib/aws-sdk-core/workdocs.rb +0 -6
  711. data/lib/aws-sdk-core/workspaces.rb +0 -6
  712. data/lib/aws-sdk-core/xray.rb +0 -5
  713. data/lib/seahorse/client/plugins/restful_bindings.rb +0 -127
  714. data/service-models.json +0 -381
@@ -0,0 +1,2315 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+ require 'seahorse/client/plugins/content_length.rb'
11
+ require 'aws-sdk-core/plugins/credentials_configuration.rb'
12
+ require 'aws-sdk-core/plugins/logging.rb'
13
+ require 'aws-sdk-core/plugins/param_converter.rb'
14
+ require 'aws-sdk-core/plugins/param_validator.rb'
15
+ require 'aws-sdk-core/plugins/user_agent.rb'
16
+ require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
17
+ require 'aws-sdk-core/plugins/retry_errors.rb'
18
+ require 'aws-sdk-core/plugins/global_configuration.rb'
19
+ require 'aws-sdk-core/plugins/regional_endpoint.rb'
20
+ require 'aws-sdk-core/plugins/endpoint_discovery.rb'
21
+ require 'aws-sdk-core/plugins/endpoint_pattern.rb'
22
+ require 'aws-sdk-core/plugins/response_paging.rb'
23
+ require 'aws-sdk-core/plugins/stub_responses.rb'
24
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
25
+ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
26
+ require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
27
+ require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
28
+ require 'aws-sdk-core/plugins/transfer_encoding.rb'
29
+ require 'aws-sdk-core/plugins/http_checksum.rb'
30
+ require 'aws-sdk-core/plugins/checksum_algorithm.rb'
31
+ require 'aws-sdk-core/plugins/defaults_mode.rb'
32
+ require 'aws-sdk-core/plugins/recursion_detection.rb'
33
+ require 'aws-sdk-core/plugins/signature_v4.rb'
34
+ require 'aws-sdk-core/plugins/protocols/query.rb'
35
+ require 'aws-sdk-sts/plugins/sts_regional_endpoints.rb'
36
+
37
+ Aws::Plugins::GlobalConfiguration.add_identifier(:sts)
38
+
39
+ module Aws::STS
40
+ # An API client for STS. To construct a client, you need to configure a `:region` and `:credentials`.
41
+ #
42
+ # client = Aws::STS::Client.new(
43
+ # region: region_name,
44
+ # credentials: credentials,
45
+ # # ...
46
+ # )
47
+ #
48
+ # For details on configuring region and credentials see
49
+ # the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
50
+ #
51
+ # See {#initialize} for a full list of supported configuration options.
52
+ class Client < Seahorse::Client::Base
53
+
54
+ include Aws::ClientStubs
55
+
56
+ @identifier = :sts
57
+
58
+ set_api(ClientApi::API)
59
+
60
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
61
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
62
+ add_plugin(Aws::Plugins::Logging)
63
+ add_plugin(Aws::Plugins::ParamConverter)
64
+ add_plugin(Aws::Plugins::ParamValidator)
65
+ add_plugin(Aws::Plugins::UserAgent)
66
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
67
+ add_plugin(Aws::Plugins::RetryErrors)
68
+ add_plugin(Aws::Plugins::GlobalConfiguration)
69
+ add_plugin(Aws::Plugins::RegionalEndpoint)
70
+ add_plugin(Aws::Plugins::EndpointDiscovery)
71
+ add_plugin(Aws::Plugins::EndpointPattern)
72
+ add_plugin(Aws::Plugins::ResponsePaging)
73
+ add_plugin(Aws::Plugins::StubResponses)
74
+ add_plugin(Aws::Plugins::IdempotencyToken)
75
+ add_plugin(Aws::Plugins::JsonvalueConverter)
76
+ add_plugin(Aws::Plugins::ClientMetricsPlugin)
77
+ add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
78
+ add_plugin(Aws::Plugins::TransferEncoding)
79
+ add_plugin(Aws::Plugins::HttpChecksum)
80
+ add_plugin(Aws::Plugins::ChecksumAlgorithm)
81
+ add_plugin(Aws::Plugins::DefaultsMode)
82
+ add_plugin(Aws::Plugins::RecursionDetection)
83
+ add_plugin(Aws::Plugins::SignatureV4)
84
+ add_plugin(Aws::Plugins::Protocols::Query)
85
+ add_plugin(Aws::STS::Plugins::STSRegionalEndpoints)
86
+
87
+ # @overload initialize(options)
88
+ # @param [Hash] options
89
+ # @option options [required, Aws::CredentialProvider] :credentials
90
+ # Your AWS credentials. This can be an instance of any one of the
91
+ # following classes:
92
+ #
93
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
94
+ # credentials.
95
+ #
96
+ # * `Aws::SharedCredentials` - Used for loading static credentials from a
97
+ # shared file, such as `~/.aws/config`.
98
+ #
99
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
100
+ #
101
+ # * `Aws::AssumeRoleWebIdentityCredentials` - Used when you need to
102
+ # assume a role after providing credentials via the web.
103
+ #
104
+ # * `Aws::SSOCredentials` - Used for loading credentials from AWS SSO using an
105
+ # access token generated from `aws login`.
106
+ #
107
+ # * `Aws::ProcessCredentials` - Used for loading credentials from a
108
+ # process that outputs to stdout.
109
+ #
110
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
111
+ # from an EC2 IMDS on an EC2 instance.
112
+ #
113
+ # * `Aws::ECSCredentials` - Used for loading credentials from
114
+ # instances running in ECS.
115
+ #
116
+ # * `Aws::CognitoIdentityCredentials` - Used for loading credentials
117
+ # from the Cognito Identity service.
118
+ #
119
+ # When `:credentials` are not configured directly, the following
120
+ # locations will be searched for credentials:
121
+ #
122
+ # * `Aws.config[:credentials]`
123
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
124
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
125
+ # * `~/.aws/credentials`
126
+ # * `~/.aws/config`
127
+ # * EC2/ECS IMDS instance profile - When used by default, the timeouts
128
+ # are very aggressive. Construct and pass an instance of
129
+ # `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
130
+ # enable retries and extended timeouts. Instance profile credential
131
+ # fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
132
+ # to true.
133
+ #
134
+ # @option options [required, String] :region
135
+ # The AWS region to connect to. The configured `:region` is
136
+ # used to determine the service `:endpoint`. When not passed,
137
+ # a default `:region` is searched for in the following locations:
138
+ #
139
+ # * `Aws.config[:region]`
140
+ # * `ENV['AWS_REGION']`
141
+ # * `ENV['AMAZON_REGION']`
142
+ # * `ENV['AWS_DEFAULT_REGION']`
143
+ # * `~/.aws/credentials`
144
+ # * `~/.aws/config`
145
+ #
146
+ # @option options [String] :access_key_id
147
+ #
148
+ # @option options [Boolean] :active_endpoint_cache (false)
149
+ # When set to `true`, a thread polling for endpoints will be running in
150
+ # the background every 60 secs (default). Defaults to `false`.
151
+ #
152
+ # @option options [Boolean] :adaptive_retry_wait_to_fill (true)
153
+ # Used only in `adaptive` retry mode. When true, the request will sleep
154
+ # until there is sufficent client side capacity to retry the request.
155
+ # When false, the request will raise a `RetryCapacityNotAvailableError` and will
156
+ # not retry instead of sleeping.
157
+ #
158
+ # @option options [Boolean] :client_side_monitoring (false)
159
+ # When `true`, client-side metrics will be collected for all API requests from
160
+ # this client.
161
+ #
162
+ # @option options [String] :client_side_monitoring_client_id ("")
163
+ # Allows you to provide an identifier for this client which will be attached to
164
+ # all generated client side metrics. Defaults to an empty string.
165
+ #
166
+ # @option options [String] :client_side_monitoring_host ("127.0.0.1")
167
+ # Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client
168
+ # side monitoring agent is running on, where client metrics will be published via UDP.
169
+ #
170
+ # @option options [Integer] :client_side_monitoring_port (31000)
171
+ # Required for publishing client metrics. The port that the client side monitoring
172
+ # agent is running on, where client metrics will be published via UDP.
173
+ #
174
+ # @option options [Aws::ClientSideMonitoring::Publisher] :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher)
175
+ # Allows you to provide a custom client-side monitoring publisher class. By default,
176
+ # will use the Client Side Monitoring Agent Publisher.
177
+ #
178
+ # @option options [Boolean] :convert_params (true)
179
+ # When `true`, an attempt is made to coerce request parameters into
180
+ # the required types.
181
+ #
182
+ # @option options [Boolean] :correct_clock_skew (true)
183
+ # Used only in `standard` and adaptive retry modes. Specifies whether to apply
184
+ # a clock skew correction and retry requests with skewed client clocks.
185
+ #
186
+ # @option options [String] :defaults_mode ("legacy")
187
+ # See {Aws::DefaultsModeConfiguration} for a list of the
188
+ # accepted modes and the configuration defaults that are included.
189
+ #
190
+ # @option options [Boolean] :disable_host_prefix_injection (false)
191
+ # Set to true to disable SDK automatically adding host prefix
192
+ # to default service endpoint when available.
193
+ #
194
+ # @option options [String] :endpoint
195
+ # The client endpoint is normally constructed from the `:region`
196
+ # option. You should only configure an `:endpoint` when connecting
197
+ # to test or custom endpoints. This should be a valid HTTP(S) URI.
198
+ #
199
+ # @option options [Integer] :endpoint_cache_max_entries (1000)
200
+ # Used for the maximum size limit of the LRU cache storing endpoints data
201
+ # for endpoint discovery enabled operations. Defaults to 1000.
202
+ #
203
+ # @option options [Integer] :endpoint_cache_max_threads (10)
204
+ # Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
205
+ #
206
+ # @option options [Integer] :endpoint_cache_poll_interval (60)
207
+ # When :endpoint_discovery and :active_endpoint_cache is enabled,
208
+ # Use this option to config the time interval in seconds for making
209
+ # requests fetching endpoints information. Defaults to 60 sec.
210
+ #
211
+ # @option options [Boolean] :endpoint_discovery (false)
212
+ # When set to `true`, endpoint discovery will be enabled for operations when available.
213
+ #
214
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
215
+ # The log formatter.
216
+ #
217
+ # @option options [Symbol] :log_level (:info)
218
+ # The log level to send messages to the `:logger` at.
219
+ #
220
+ # @option options [Logger] :logger
221
+ # The Logger instance to send log messages to. If this option
222
+ # is not set, logging will be disabled.
223
+ #
224
+ # @option options [Integer] :max_attempts (3)
225
+ # An integer representing the maximum number attempts that will be made for
226
+ # a single request, including the initial attempt. For example,
227
+ # setting this value to 5 will result in a request being retried up to
228
+ # 4 times. Used in `standard` and `adaptive` retry modes.
229
+ #
230
+ # @option options [String] :profile ("default")
231
+ # Used when loading credentials from the shared credentials file
232
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
233
+ #
234
+ # @option options [Proc] :retry_backoff
235
+ # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
236
+ # This option is only used in the `legacy` retry mode.
237
+ #
238
+ # @option options [Float] :retry_base_delay (0.3)
239
+ # The base delay in seconds used by the default backoff function. This option
240
+ # is only used in the `legacy` retry mode.
241
+ #
242
+ # @option options [Symbol] :retry_jitter (:none)
243
+ # A delay randomiser function used by the default backoff function.
244
+ # Some predefined functions can be referenced by name - :none, :equal, :full,
245
+ # otherwise a Proc that takes and returns a number. This option is only used
246
+ # in the `legacy` retry mode.
247
+ #
248
+ # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
249
+ #
250
+ # @option options [Integer] :retry_limit (3)
251
+ # The maximum number of times to retry failed requests. Only
252
+ # ~ 500 level server errors and certain ~ 400 level client errors
253
+ # are retried. Generally, these are throttling errors, data
254
+ # checksum errors, networking errors, timeout errors, auth errors,
255
+ # endpoint discovery, and errors from expired credentials.
256
+ # This option is only used in the `legacy` retry mode.
257
+ #
258
+ # @option options [Integer] :retry_max_delay (0)
259
+ # The maximum number of seconds to delay between retries (0 for no limit)
260
+ # used by the default backoff function. This option is only used in the
261
+ # `legacy` retry mode.
262
+ #
263
+ # @option options [String] :retry_mode ("legacy")
264
+ # Specifies which retry algorithm to use. Values are:
265
+ #
266
+ # * `legacy` - The pre-existing retry behavior. This is default value if
267
+ # no retry mode is provided.
268
+ #
269
+ # * `standard` - A standardized set of retry rules across the AWS SDKs.
270
+ # This includes support for retry quotas, which limit the number of
271
+ # unsuccessful retries a client can make.
272
+ #
273
+ # * `adaptive` - An experimental retry mode that includes all the
274
+ # functionality of `standard` mode along with automatic client side
275
+ # throttling. This is a provisional mode that may change behavior
276
+ # in the future.
277
+ #
278
+ #
279
+ # @option options [String] :secret_access_key
280
+ #
281
+ # @option options [String] :session_token
282
+ #
283
+ # @option options [String] :sts_regional_endpoints ("regional")
284
+ # Passing in 'regional' to enable regional endpoint for STS for all supported
285
+ # regions (except 'aws-global'). Using 'legacy' mode will force all legacy
286
+ # regions to resolve to the STS global endpoint.
287
+ #
288
+ # @option options [Boolean] :stub_responses (false)
289
+ # Causes the client to return stubbed responses. By default
290
+ # fake responses are generated and returned. You can specify
291
+ # the response data to return or errors to raise by calling
292
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
293
+ #
294
+ # ** Please note ** When response stubbing is enabled, no HTTP
295
+ # requests are made, and retries are disabled.
296
+ #
297
+ # @option options [Boolean] :use_dualstack_endpoint
298
+ # When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
299
+ # will be used if available.
300
+ #
301
+ # @option options [Boolean] :use_fips_endpoint
302
+ # When set to `true`, fips compatible endpoints will be used if available.
303
+ # When a `fips` region is used, the region is normalized and this config
304
+ # is set to `true`.
305
+ #
306
+ # @option options [Boolean] :validate_params (true)
307
+ # When `true`, request parameters are validated before
308
+ # sending the request.
309
+ #
310
+ # @option options [URI::HTTP,String] :http_proxy A proxy to send
311
+ # requests through. Formatted like 'http://proxy.com:123'.
312
+ #
313
+ # @option options [Float] :http_open_timeout (15) The number of
314
+ # seconds to wait when opening a HTTP session before raising a
315
+ # `Timeout::Error`.
316
+ #
317
+ # @option options [Float] :http_read_timeout (60) The default
318
+ # number of seconds to wait for response data. This value can
319
+ # safely be set per-request on the session.
320
+ #
321
+ # @option options [Float] :http_idle_timeout (5) The number of
322
+ # seconds a connection is allowed to sit idle before it is
323
+ # considered stale. Stale connections are closed and removed
324
+ # from the pool before making a request.
325
+ #
326
+ # @option options [Float] :http_continue_timeout (1) The number of
327
+ # seconds to wait for a 100-continue response before sending the
328
+ # request body. This option has no effect unless the request has
329
+ # "Expect" header set to "100-continue". Defaults to `nil` which
330
+ # disables this behaviour. This value can safely be set per
331
+ # request on the session.
332
+ #
333
+ # @option options [Float] :ssl_timeout (nil) Sets the SSL timeout
334
+ # in seconds.
335
+ #
336
+ # @option options [Boolean] :http_wire_trace (false) When `true`,
337
+ # HTTP debug output will be sent to the `:logger`.
338
+ #
339
+ # @option options [Boolean] :ssl_verify_peer (true) When `true`,
340
+ # SSL peer certificates are verified when establishing a
341
+ # connection.
342
+ #
343
+ # @option options [String] :ssl_ca_bundle Full path to the SSL
344
+ # certificate authority bundle file that should be used when
345
+ # verifying peer certificates. If you do not pass
346
+ # `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
347
+ # will be used if available.
348
+ #
349
+ # @option options [String] :ssl_ca_directory Full path of the
350
+ # directory that contains the unbundled SSL certificate
351
+ # authority files for verifying peer certificates. If you do
352
+ # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
353
+ # system default will be used if available.
354
+ #
355
+ def initialize(*args)
356
+ super
357
+ end
358
+
359
+ # @!group API Operations
360
+
361
+ # Returns a set of temporary security credentials that you can use to
362
+ # access Amazon Web Services resources that you might not normally have
363
+ # access to. These temporary credentials consist of an access key ID, a
364
+ # secret access key, and a security token. Typically, you use
365
+ # `AssumeRole` within your account or for cross-account access. For a
366
+ # comparison of `AssumeRole` with other API operations that produce
367
+ # temporary credentials, see [Requesting Temporary Security
368
+ # Credentials][1] and [Comparing the Amazon Web Services STS API
369
+ # operations][2] in the *IAM User Guide*.
370
+ #
371
+ # **Permissions**
372
+ #
373
+ # The temporary security credentials created by `AssumeRole` can be used
374
+ # to make API calls to any Amazon Web Services service with the
375
+ # following exception: You cannot call the Amazon Web Services STS
376
+ # `GetFederationToken` or `GetSessionToken` API operations.
377
+ #
378
+ # (Optional) You can pass inline or managed [session policies][3] to
379
+ # this operation. You can pass a single JSON policy document to use as
380
+ # an inline session policy. You can also specify up to 10 managed
381
+ # policies to use as managed session policies. The plaintext that you
382
+ # use for both inline and managed session policies can't exceed 2,048
383
+ # characters. Passing policies to this operation returns new temporary
384
+ # credentials. The resulting session's permissions are the intersection
385
+ # of the role's identity-based policy and the session policies. You can
386
+ # use the role's temporary credentials in subsequent Amazon Web
387
+ # Services API calls to access resources in the account that owns the
388
+ # role. You cannot use session policies to grant more permissions than
389
+ # those allowed by the identity-based policy of the role that is being
390
+ # assumed. For more information, see [Session Policies][3] in the *IAM
391
+ # User Guide*.
392
+ #
393
+ # When you create a role, you create two policies: A role trust policy
394
+ # that specifies *who* can assume the role and a permissions policy that
395
+ # specifies *what* can be done with the role. You specify the trusted
396
+ # principal who is allowed to assume the role in the role trust policy.
397
+ #
398
+ # To assume a role from a different account, your Amazon Web Services
399
+ # account must be trusted by the role. The trust relationship is defined
400
+ # in the role's trust policy when the role is created. That trust
401
+ # policy states which accounts are allowed to delegate that access to
402
+ # users in the account.
403
+ #
404
+ # A user who wants to access a role in a different account must also
405
+ # have permissions that are delegated from the user account
406
+ # administrator. The administrator must attach a policy that allows the
407
+ # user to call `AssumeRole` for the ARN of the role in the other
408
+ # account.
409
+ #
410
+ # To allow a user to assume a role in the same account, you can do
411
+ # either of the following:
412
+ #
413
+ # * Attach a policy to the user that allows the user to call
414
+ # `AssumeRole` (as long as the role's trust policy trusts the
415
+ # account).
416
+ #
417
+ # * Add the user as a principal directly in the role's trust policy.
418
+ #
419
+ # You can do either because the role’s trust policy acts as an IAM
420
+ # resource-based policy. When a resource-based policy grants access to a
421
+ # principal in the same account, no additional identity-based policy is
422
+ # required. For more information about trust policies and resource-based
423
+ # policies, see [IAM Policies][4] in the *IAM User Guide*.
424
+ #
425
+ # **Tags**
426
+ #
427
+ # (Optional) You can pass tag key-value pairs to your session. These
428
+ # tags are called session tags. For more information about session tags,
429
+ # see [Passing Session Tags in STS][5] in the *IAM User Guide*.
430
+ #
431
+ # An administrator must grant you the permissions necessary to pass
432
+ # session tags. The administrator can also create granular permissions
433
+ # to allow you to pass only specific session tags. For more information,
434
+ # see [Tutorial: Using Tags for Attribute-Based Access Control][6] in
435
+ # the *IAM User Guide*.
436
+ #
437
+ # You can set the session tags as transitive. Transitive tags persist
438
+ # during role chaining. For more information, see [Chaining Roles with
439
+ # Session Tags][7] in the *IAM User Guide*.
440
+ #
441
+ # **Using MFA with AssumeRole**
442
+ #
443
+ # (Optional) You can include multi-factor authentication (MFA)
444
+ # information when you call `AssumeRole`. This is useful for
445
+ # cross-account scenarios to ensure that the user that assumes the role
446
+ # has been authenticated with an Amazon Web Services MFA device. In that
447
+ # scenario, the trust policy of the role being assumed includes a
448
+ # condition that tests for MFA authentication. If the caller does not
449
+ # include valid MFA information, the request to assume the role is
450
+ # denied. The condition in a trust policy that tests for MFA
451
+ # authentication might look like the following example.
452
+ #
453
+ # `"Condition": \{"Bool": \{"aws:MultiFactorAuthPresent": true\}\}`
454
+ #
455
+ # For more information, see [Configuring MFA-Protected API Access][8] in
456
+ # the *IAM User Guide* guide.
457
+ #
458
+ # To use MFA with `AssumeRole`, you pass values for the `SerialNumber`
459
+ # and `TokenCode` parameters. The `SerialNumber` value identifies the
460
+ # user's hardware or virtual MFA device. The `TokenCode` is the
461
+ # time-based one-time password (TOTP) that the MFA device produces.
462
+ #
463
+ #
464
+ #
465
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
466
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
467
+ # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
468
+ # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html
469
+ # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
470
+ # [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html
471
+ # [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining
472
+ # [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/MFAProtectedAPI.html
473
+ #
474
+ # @option params [required, String] :role_arn
475
+ # The Amazon Resource Name (ARN) of the role to assume.
476
+ #
477
+ # @option params [required, String] :role_session_name
478
+ # An identifier for the assumed role session.
479
+ #
480
+ # Use the role session name to uniquely identify a session when the same
481
+ # role is assumed by different principals or for different reasons. In
482
+ # cross-account scenarios, the role session name is visible to, and can
483
+ # be logged by the account that owns the role. The role session name is
484
+ # also used in the ARN of the assumed role principal. This means that
485
+ # subsequent cross-account API requests that use the temporary security
486
+ # credentials will expose the role session name to the external account
487
+ # in their CloudTrail logs.
488
+ #
489
+ # The regex used to validate this parameter is a string of characters
490
+ # consisting of upper- and lower-case alphanumeric characters with no
491
+ # spaces. You can also include underscores or any of the following
492
+ # characters: =,.@-
493
+ #
494
+ # @option params [Array<Types::PolicyDescriptorType>] :policy_arns
495
+ # The Amazon Resource Names (ARNs) of the IAM managed policies that you
496
+ # want to use as managed session policies. The policies must exist in
497
+ # the same account as the role.
498
+ #
499
+ # This parameter is optional. You can provide up to 10 managed policy
500
+ # ARNs. However, the plaintext that you use for both inline and managed
501
+ # session policies can't exceed 2,048 characters. For more information
502
+ # about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services
503
+ # Service Namespaces][1] in the Amazon Web Services General Reference.
504
+ #
505
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
506
+ # policies and session tags into a packed binary format that has a
507
+ # separate limit. Your request can fail for this limit even if your
508
+ # plaintext meets the other requirements. The `PackedPolicySize`
509
+ # response element indicates by percentage how close the policies and
510
+ # tags for your request are to the upper size limit.
511
+ #
512
+ # </note>
513
+ #
514
+ # Passing policies to this operation returns new temporary credentials.
515
+ # The resulting session's permissions are the intersection of the
516
+ # role's identity-based policy and the session policies. You can use
517
+ # the role's temporary credentials in subsequent Amazon Web Services
518
+ # API calls to access resources in the account that owns the role. You
519
+ # cannot use session policies to grant more permissions than those
520
+ # allowed by the identity-based policy of the role that is being
521
+ # assumed. For more information, see [Session Policies][2] in the *IAM
522
+ # User Guide*.
523
+ #
524
+ #
525
+ #
526
+ # [1]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
527
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
528
+ #
529
+ # @option params [String] :policy
530
+ # An IAM policy in JSON format that you want to use as an inline session
531
+ # policy.
532
+ #
533
+ # This parameter is optional. Passing policies to this operation returns
534
+ # new temporary credentials. The resulting session's permissions are
535
+ # the intersection of the role's identity-based policy and the session
536
+ # policies. You can use the role's temporary credentials in subsequent
537
+ # Amazon Web Services API calls to access resources in the account that
538
+ # owns the role. You cannot use session policies to grant more
539
+ # permissions than those allowed by the identity-based policy of the
540
+ # role that is being assumed. For more information, see [Session
541
+ # Policies][1] in the *IAM User Guide*.
542
+ #
543
+ # The plaintext that you use for both inline and managed session
544
+ # policies can't exceed 2,048 characters. The JSON policy characters
545
+ # can be any ASCII character from the space character to the end of the
546
+ # valid character list (\\u0020 through \\u00FF). It can also include
547
+ # the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
548
+ # characters.
549
+ #
550
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
551
+ # policies and session tags into a packed binary format that has a
552
+ # separate limit. Your request can fail for this limit even if your
553
+ # plaintext meets the other requirements. The `PackedPolicySize`
554
+ # response element indicates by percentage how close the policies and
555
+ # tags for your request are to the upper size limit.
556
+ #
557
+ # </note>
558
+ #
559
+ #
560
+ #
561
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
562
+ #
563
+ # @option params [Integer] :duration_seconds
564
+ # The duration, in seconds, of the role session. The value specified can
565
+ # range from 900 seconds (15 minutes) up to the maximum session duration
566
+ # set for the role. The maximum session duration setting can have a
567
+ # value from 1 hour to 12 hours. If you specify a value higher than this
568
+ # setting or the administrator setting (whichever is lower), the
569
+ # operation fails. For example, if you specify a session duration of 12
570
+ # hours, but your administrator set the maximum session duration to 6
571
+ # hours, your operation fails.
572
+ #
573
+ # Role chaining limits your Amazon Web Services CLI or Amazon Web
574
+ # Services API role session to a maximum of one hour. When you use the
575
+ # `AssumeRole` API operation to assume a role, you can specify the
576
+ # duration of your role session with the `DurationSeconds` parameter.
577
+ # You can specify a parameter value of up to 43200 seconds (12 hours),
578
+ # depending on the maximum session duration setting for your role.
579
+ # However, if you assume a role using role chaining and provide a
580
+ # `DurationSeconds` parameter value greater than one hour, the operation
581
+ # fails. To learn how to view the maximum value for your role, see [View
582
+ # the Maximum Session Duration Setting for a Role][1] in the *IAM User
583
+ # Guide*.
584
+ #
585
+ # By default, the value is set to `3600` seconds.
586
+ #
587
+ # <note markdown="1"> The `DurationSeconds` parameter is separate from the duration of a
588
+ # console session that you might request using the returned credentials.
589
+ # The request to the federation endpoint for a console sign-in token
590
+ # takes a `SessionDuration` parameter that specifies the maximum length
591
+ # of the console session. For more information, see [Creating a URL that
592
+ # Enables Federated Users to Access the Amazon Web Services Management
593
+ # Console][2] in the *IAM User Guide*.
594
+ #
595
+ # </note>
596
+ #
597
+ #
598
+ #
599
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
600
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html
601
+ #
602
+ # @option params [Array<Types::Tag>] :tags
603
+ # A list of session tags that you want to pass. Each session tag
604
+ # consists of a key name and an associated value. For more information
605
+ # about session tags, see [Tagging Amazon Web Services STS Sessions][1]
606
+ # in the *IAM User Guide*.
607
+ #
608
+ # This parameter is optional. You can pass up to 50 session tags. The
609
+ # plaintext session tag keys can’t exceed 128 characters, and the values
610
+ # can’t exceed 256 characters. For these and additional limits, see [IAM
611
+ # and STS Character Limits][2] in the *IAM User Guide*.
612
+ #
613
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
614
+ # policies and session tags into a packed binary format that has a
615
+ # separate limit. Your request can fail for this limit even if your
616
+ # plaintext meets the other requirements. The `PackedPolicySize`
617
+ # response element indicates by percentage how close the policies and
618
+ # tags for your request are to the upper size limit.
619
+ #
620
+ # </note>
621
+ #
622
+ # You can pass a session tag with the same key as a tag that is already
623
+ # attached to the role. When you do, session tags override a role tag
624
+ # with the same key.
625
+ #
626
+ # Tag key–value pairs are not case sensitive, but case is preserved.
627
+ # This means that you cannot have separate `Department` and `department`
628
+ # tag keys. Assume that the role has the `Department`=`Marketing` tag
629
+ # and you pass the `department`=`engineering` session tag. `Department`
630
+ # and `department` are not saved as separate tags, and the session tag
631
+ # passed in the request takes precedence over the role tag.
632
+ #
633
+ # Additionally, if you used temporary credentials to perform this
634
+ # operation, the new session inherits any transitive session tags from
635
+ # the calling session. If you pass a session tag with the same key as an
636
+ # inherited tag, the operation fails. To view the inherited tags for a
637
+ # session, see the CloudTrail logs. For more information, see [Viewing
638
+ # Session Tags in CloudTrail][3] in the *IAM User Guide*.
639
+ #
640
+ #
641
+ #
642
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
643
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length
644
+ # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_ctlogs
645
+ #
646
+ # @option params [Array<String>] :transitive_tag_keys
647
+ # A list of keys for session tags that you want to set as transitive. If
648
+ # you set a tag key as transitive, the corresponding key and value
649
+ # passes to subsequent sessions in a role chain. For more information,
650
+ # see [Chaining Roles with Session Tags][1] in the *IAM User Guide*.
651
+ #
652
+ # This parameter is optional. When you set session tags as transitive,
653
+ # the session policy and session tags packed binary limit is not
654
+ # affected.
655
+ #
656
+ # If you choose not to specify a transitive tag key, then no tags are
657
+ # passed from this session to any subsequent sessions.
658
+ #
659
+ #
660
+ #
661
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining
662
+ #
663
+ # @option params [String] :external_id
664
+ # A unique identifier that might be required when you assume a role in
665
+ # another account. If the administrator of the account to which the role
666
+ # belongs provided you with an external ID, then provide that value in
667
+ # the `ExternalId` parameter. This value can be any string, such as a
668
+ # passphrase or account number. A cross-account role is usually set up
669
+ # to trust everyone in an account. Therefore, the administrator of the
670
+ # trusting account might send an external ID to the administrator of the
671
+ # trusted account. That way, only someone with the ID can assume the
672
+ # role, rather than everyone in the account. For more information about
673
+ # the external ID, see [How to Use an External ID When Granting Access
674
+ # to Your Amazon Web Services Resources to a Third Party][1] in the *IAM
675
+ # User Guide*.
676
+ #
677
+ # The regex used to validate this parameter is a string of characters
678
+ # consisting of upper- and lower-case alphanumeric characters with no
679
+ # spaces. You can also include underscores or any of the following
680
+ # characters: =,.@:/-
681
+ #
682
+ #
683
+ #
684
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html
685
+ #
686
+ # @option params [String] :serial_number
687
+ # The identification number of the MFA device that is associated with
688
+ # the user who is making the `AssumeRole` call. Specify this value if
689
+ # the trust policy of the role being assumed includes a condition that
690
+ # requires MFA authentication. The value is either the serial number for
691
+ # a hardware device (such as `GAHT12345678`) or an Amazon Resource Name
692
+ # (ARN) for a virtual device (such as
693
+ # `arn:aws:iam::123456789012:mfa/user`).
694
+ #
695
+ # The regex used to validate this parameter is a string of characters
696
+ # consisting of upper- and lower-case alphanumeric characters with no
697
+ # spaces. You can also include underscores or any of the following
698
+ # characters: =,.@-
699
+ #
700
+ # @option params [String] :token_code
701
+ # The value provided by the MFA device, if the trust policy of the role
702
+ # being assumed requires MFA. (In other words, if the policy includes a
703
+ # condition that tests for MFA). If the role being assumed requires MFA
704
+ # and if the `TokenCode` value is missing or expired, the `AssumeRole`
705
+ # call returns an "access denied" error.
706
+ #
707
+ # The format for this parameter, as described by its regex pattern, is a
708
+ # sequence of six numeric digits.
709
+ #
710
+ # @option params [String] :source_identity
711
+ # The source identity specified by the principal that is calling the
712
+ # `AssumeRole` operation.
713
+ #
714
+ # You can require users to specify a source identity when they assume a
715
+ # role. You do this by using the `sts:SourceIdentity` condition key in a
716
+ # role trust policy. You can use source identity information in
717
+ # CloudTrail logs to determine who took actions with a role. You can use
718
+ # the `aws:SourceIdentity` condition key to further control access to
719
+ # Amazon Web Services resources based on the value of source identity.
720
+ # For more information about using source identity, see [Monitor and
721
+ # control actions taken with assumed roles][1] in the *IAM User Guide*.
722
+ #
723
+ # The regex used to validate this parameter is a string of characters
724
+ # consisting of upper- and lower-case alphanumeric characters with no
725
+ # spaces. You can also include underscores or any of the following
726
+ # characters: =,.@-. You cannot use a value that begins with the text
727
+ # `aws:`. This prefix is reserved for Amazon Web Services internal use.
728
+ #
729
+ #
730
+ #
731
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
732
+ #
733
+ # @return [Types::AssumeRoleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
734
+ #
735
+ # * {Types::AssumeRoleResponse#credentials #credentials} => Types::Credentials
736
+ # * {Types::AssumeRoleResponse#assumed_role_user #assumed_role_user} => Types::AssumedRoleUser
737
+ # * {Types::AssumeRoleResponse#packed_policy_size #packed_policy_size} => Integer
738
+ # * {Types::AssumeRoleResponse#source_identity #source_identity} => String
739
+ #
740
+ #
741
+ # @example Example: To assume a role
742
+ #
743
+ # resp = client.assume_role({
744
+ # external_id: "123ABC",
745
+ # policy: "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:ListAllMyBuckets\",\"Resource\":\"*\"}]}",
746
+ # role_arn: "arn:aws:iam::123456789012:role/demo",
747
+ # role_session_name: "testAssumeRoleSession",
748
+ # tags: [
749
+ # {
750
+ # key: "Project",
751
+ # value: "Unicorn",
752
+ # },
753
+ # {
754
+ # key: "Team",
755
+ # value: "Automation",
756
+ # },
757
+ # {
758
+ # key: "Cost-Center",
759
+ # value: "12345",
760
+ # },
761
+ # ],
762
+ # transitive_tag_keys: [
763
+ # "Project",
764
+ # "Cost-Center",
765
+ # ],
766
+ # })
767
+ #
768
+ # resp.to_h outputs the following:
769
+ # {
770
+ # assumed_role_user: {
771
+ # arn: "arn:aws:sts::123456789012:assumed-role/demo/Bob",
772
+ # assumed_role_id: "ARO123EXAMPLE123:Bob",
773
+ # },
774
+ # credentials: {
775
+ # access_key_id: "AKIAIOSFODNN7EXAMPLE",
776
+ # expiration: Time.parse("2011-07-15T23:28:33.359Z"),
777
+ # secret_access_key: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY",
778
+ # session_token: "AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA==",
779
+ # },
780
+ # packed_policy_size: 8,
781
+ # }
782
+ #
783
+ # @example Request syntax with placeholder values
784
+ #
785
+ # resp = client.assume_role({
786
+ # role_arn: "arnType", # required
787
+ # role_session_name: "roleSessionNameType", # required
788
+ # policy_arns: [
789
+ # {
790
+ # arn: "arnType",
791
+ # },
792
+ # ],
793
+ # policy: "sessionPolicyDocumentType",
794
+ # duration_seconds: 1,
795
+ # tags: [
796
+ # {
797
+ # key: "tagKeyType", # required
798
+ # value: "tagValueType", # required
799
+ # },
800
+ # ],
801
+ # transitive_tag_keys: ["tagKeyType"],
802
+ # external_id: "externalIdType",
803
+ # serial_number: "serialNumberType",
804
+ # token_code: "tokenCodeType",
805
+ # source_identity: "sourceIdentityType",
806
+ # })
807
+ #
808
+ # @example Response structure
809
+ #
810
+ # resp.credentials.access_key_id #=> String
811
+ # resp.credentials.secret_access_key #=> String
812
+ # resp.credentials.session_token #=> String
813
+ # resp.credentials.expiration #=> Time
814
+ # resp.assumed_role_user.assumed_role_id #=> String
815
+ # resp.assumed_role_user.arn #=> String
816
+ # resp.packed_policy_size #=> Integer
817
+ # resp.source_identity #=> String
818
+ #
819
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRole AWS API Documentation
820
+ #
821
+ # @overload assume_role(params = {})
822
+ # @param [Hash] params ({})
823
+ def assume_role(params = {}, options = {})
824
+ req = build_request(:assume_role, params)
825
+ req.send_request(options)
826
+ end
827
+
828
+ # Returns a set of temporary security credentials for users who have
829
+ # been authenticated via a SAML authentication response. This operation
830
+ # provides a mechanism for tying an enterprise identity store or
831
+ # directory to role-based Amazon Web Services access without
832
+ # user-specific credentials or configuration. For a comparison of
833
+ # `AssumeRoleWithSAML` with the other API operations that produce
834
+ # temporary credentials, see [Requesting Temporary Security
835
+ # Credentials][1] and [Comparing the Amazon Web Services STS API
836
+ # operations][2] in the *IAM User Guide*.
837
+ #
838
+ # The temporary security credentials returned by this operation consist
839
+ # of an access key ID, a secret access key, and a security token.
840
+ # Applications can use these temporary security credentials to sign
841
+ # calls to Amazon Web Services services.
842
+ #
843
+ # **Session Duration**
844
+ #
845
+ # By default, the temporary security credentials created by
846
+ # `AssumeRoleWithSAML` last for one hour. However, you can use the
847
+ # optional `DurationSeconds` parameter to specify the duration of your
848
+ # session. Your role session lasts for the duration that you specify, or
849
+ # until the time specified in the SAML authentication response's
850
+ # `SessionNotOnOrAfter` value, whichever is shorter. You can provide a
851
+ # `DurationSeconds` value from 900 seconds (15 minutes) up to the
852
+ # maximum session duration setting for the role. This setting can have a
853
+ # value from 1 hour to 12 hours. To learn how to view the maximum value
854
+ # for your role, see [View the Maximum Session Duration Setting for a
855
+ # Role][3] in the *IAM User Guide*. The maximum session duration limit
856
+ # applies when you use the `AssumeRole*` API operations or the
857
+ # `assume-role*` CLI commands. However the limit does not apply when you
858
+ # use those operations to create a console URL. For more information,
859
+ # see [Using IAM Roles][4] in the *IAM User Guide*.
860
+ #
861
+ # <note markdown="1"> [Role chaining][5] limits your CLI or Amazon Web Services API role
862
+ # session to a maximum of one hour. When you use the `AssumeRole` API
863
+ # operation to assume a role, you can specify the duration of your role
864
+ # session with the `DurationSeconds` parameter. You can specify a
865
+ # parameter value of up to 43200 seconds (12 hours), depending on the
866
+ # maximum session duration setting for your role. However, if you assume
867
+ # a role using role chaining and provide a `DurationSeconds` parameter
868
+ # value greater than one hour, the operation fails.
869
+ #
870
+ # </note>
871
+ #
872
+ # **Permissions**
873
+ #
874
+ # The temporary security credentials created by `AssumeRoleWithSAML` can
875
+ # be used to make API calls to any Amazon Web Services service with the
876
+ # following exception: you cannot call the STS `GetFederationToken` or
877
+ # `GetSessionToken` API operations.
878
+ #
879
+ # (Optional) You can pass inline or managed [session policies][6] to
880
+ # this operation. You can pass a single JSON policy document to use as
881
+ # an inline session policy. You can also specify up to 10 managed
882
+ # policies to use as managed session policies. The plaintext that you
883
+ # use for both inline and managed session policies can't exceed 2,048
884
+ # characters. Passing policies to this operation returns new temporary
885
+ # credentials. The resulting session's permissions are the intersection
886
+ # of the role's identity-based policy and the session policies. You can
887
+ # use the role's temporary credentials in subsequent Amazon Web
888
+ # Services API calls to access resources in the account that owns the
889
+ # role. You cannot use session policies to grant more permissions than
890
+ # those allowed by the identity-based policy of the role that is being
891
+ # assumed. For more information, see [Session Policies][6] in the *IAM
892
+ # User Guide*.
893
+ #
894
+ # Calling `AssumeRoleWithSAML` does not require the use of Amazon Web
895
+ # Services security credentials. The identity of the caller is validated
896
+ # by using keys in the metadata document that is uploaded for the SAML
897
+ # provider entity for your identity provider.
898
+ #
899
+ # Calling `AssumeRoleWithSAML` can result in an entry in your CloudTrail
900
+ # logs. The entry includes the value in the `NameID` element of the SAML
901
+ # assertion. We recommend that you use a `NameIDType` that is not
902
+ # associated with any personally identifiable information (PII). For
903
+ # example, you could instead use the persistent identifier
904
+ # (`urn:oasis:names:tc:SAML:2.0:nameid-format:persistent`).
905
+ #
906
+ # **Tags**
907
+ #
908
+ # (Optional) You can configure your IdP to pass attributes into your
909
+ # SAML assertion as session tags. Each session tag consists of a key
910
+ # name and an associated value. For more information about session tags,
911
+ # see [Passing Session Tags in STS][7] in the *IAM User Guide*.
912
+ #
913
+ # You can pass up to 50 session tags. The plaintext session tag keys
914
+ # can’t exceed 128 characters and the values can’t exceed 256
915
+ # characters. For these and additional limits, see [IAM and STS
916
+ # Character Limits][8] in the *IAM User Guide*.
917
+ #
918
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
919
+ # policies and session tags into a packed binary format that has a
920
+ # separate limit. Your request can fail for this limit even if your
921
+ # plaintext meets the other requirements. The `PackedPolicySize`
922
+ # response element indicates by percentage how close the policies and
923
+ # tags for your request are to the upper size limit.
924
+ #
925
+ # </note>
926
+ #
927
+ # You can pass a session tag with the same key as a tag that is attached
928
+ # to the role. When you do, session tags override the role's tags with
929
+ # the same key.
930
+ #
931
+ # An administrator must grant you the permissions necessary to pass
932
+ # session tags. The administrator can also create granular permissions
933
+ # to allow you to pass only specific session tags. For more information,
934
+ # see [Tutorial: Using Tags for Attribute-Based Access Control][9] in
935
+ # the *IAM User Guide*.
936
+ #
937
+ # You can set the session tags as transitive. Transitive tags persist
938
+ # during role chaining. For more information, see [Chaining Roles with
939
+ # Session Tags][10] in the *IAM User Guide*.
940
+ #
941
+ # **SAML Configuration**
942
+ #
943
+ # Before your application can call `AssumeRoleWithSAML`, you must
944
+ # configure your SAML identity provider (IdP) to issue the claims
945
+ # required by Amazon Web Services. Additionally, you must use Identity
946
+ # and Access Management (IAM) to create a SAML provider entity in your
947
+ # Amazon Web Services account that represents your identity provider.
948
+ # You must also create an IAM role that specifies this SAML provider in
949
+ # its trust policy.
950
+ #
951
+ # For more information, see the following resources:
952
+ #
953
+ # * [About SAML 2.0-based Federation][11] in the *IAM User Guide*.
954
+ #
955
+ # * [Creating SAML Identity Providers][12] in the *IAM User Guide*.
956
+ #
957
+ # * [Configuring a Relying Party and Claims][13] in the *IAM User
958
+ # Guide*.
959
+ #
960
+ # * [Creating a Role for SAML 2.0 Federation][14] in the *IAM User
961
+ # Guide*.
962
+ #
963
+ #
964
+ #
965
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
966
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
967
+ # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
968
+ # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
969
+ # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-role-chaining
970
+ # [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
971
+ # [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
972
+ # [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length
973
+ # [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html
974
+ # [10]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining
975
+ # [11]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html
976
+ # [12]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html
977
+ # [13]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html
978
+ # [14]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_saml.html
979
+ #
980
+ # @option params [required, String] :role_arn
981
+ # The Amazon Resource Name (ARN) of the role that the caller is
982
+ # assuming.
983
+ #
984
+ # @option params [required, String] :principal_arn
985
+ # The Amazon Resource Name (ARN) of the SAML provider in IAM that
986
+ # describes the IdP.
987
+ #
988
+ # @option params [required, String] :saml_assertion
989
+ # The base64 encoded SAML authentication response provided by the IdP.
990
+ #
991
+ # For more information, see [Configuring a Relying Party and Adding
992
+ # Claims][1] in the *IAM User Guide*.
993
+ #
994
+ #
995
+ #
996
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/create-role-saml-IdP-tasks.html
997
+ #
998
+ # @option params [Array<Types::PolicyDescriptorType>] :policy_arns
999
+ # The Amazon Resource Names (ARNs) of the IAM managed policies that you
1000
+ # want to use as managed session policies. The policies must exist in
1001
+ # the same account as the role.
1002
+ #
1003
+ # This parameter is optional. You can provide up to 10 managed policy
1004
+ # ARNs. However, the plaintext that you use for both inline and managed
1005
+ # session policies can't exceed 2,048 characters. For more information
1006
+ # about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services
1007
+ # Service Namespaces][1] in the Amazon Web Services General Reference.
1008
+ #
1009
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
1010
+ # policies and session tags into a packed binary format that has a
1011
+ # separate limit. Your request can fail for this limit even if your
1012
+ # plaintext meets the other requirements. The `PackedPolicySize`
1013
+ # response element indicates by percentage how close the policies and
1014
+ # tags for your request are to the upper size limit.
1015
+ #
1016
+ # </note>
1017
+ #
1018
+ # Passing policies to this operation returns new temporary credentials.
1019
+ # The resulting session's permissions are the intersection of the
1020
+ # role's identity-based policy and the session policies. You can use
1021
+ # the role's temporary credentials in subsequent Amazon Web Services
1022
+ # API calls to access resources in the account that owns the role. You
1023
+ # cannot use session policies to grant more permissions than those
1024
+ # allowed by the identity-based policy of the role that is being
1025
+ # assumed. For more information, see [Session Policies][2] in the *IAM
1026
+ # User Guide*.
1027
+ #
1028
+ #
1029
+ #
1030
+ # [1]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
1031
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
1032
+ #
1033
+ # @option params [String] :policy
1034
+ # An IAM policy in JSON format that you want to use as an inline session
1035
+ # policy.
1036
+ #
1037
+ # This parameter is optional. Passing policies to this operation returns
1038
+ # new temporary credentials. The resulting session's permissions are
1039
+ # the intersection of the role's identity-based policy and the session
1040
+ # policies. You can use the role's temporary credentials in subsequent
1041
+ # Amazon Web Services API calls to access resources in the account that
1042
+ # owns the role. You cannot use session policies to grant more
1043
+ # permissions than those allowed by the identity-based policy of the
1044
+ # role that is being assumed. For more information, see [Session
1045
+ # Policies][1] in the *IAM User Guide*.
1046
+ #
1047
+ # The plaintext that you use for both inline and managed session
1048
+ # policies can't exceed 2,048 characters. The JSON policy characters
1049
+ # can be any ASCII character from the space character to the end of the
1050
+ # valid character list (\\u0020 through \\u00FF). It can also include
1051
+ # the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
1052
+ # characters.
1053
+ #
1054
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
1055
+ # policies and session tags into a packed binary format that has a
1056
+ # separate limit. Your request can fail for this limit even if your
1057
+ # plaintext meets the other requirements. The `PackedPolicySize`
1058
+ # response element indicates by percentage how close the policies and
1059
+ # tags for your request are to the upper size limit.
1060
+ #
1061
+ # </note>
1062
+ #
1063
+ #
1064
+ #
1065
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
1066
+ #
1067
+ # @option params [Integer] :duration_seconds
1068
+ # The duration, in seconds, of the role session. Your role session lasts
1069
+ # for the duration that you specify for the `DurationSeconds` parameter,
1070
+ # or until the time specified in the SAML authentication response's
1071
+ # `SessionNotOnOrAfter` value, whichever is shorter. You can provide a
1072
+ # `DurationSeconds` value from 900 seconds (15 minutes) up to the
1073
+ # maximum session duration setting for the role. This setting can have a
1074
+ # value from 1 hour to 12 hours. If you specify a value higher than this
1075
+ # setting, the operation fails. For example, if you specify a session
1076
+ # duration of 12 hours, but your administrator set the maximum session
1077
+ # duration to 6 hours, your operation fails. To learn how to view the
1078
+ # maximum value for your role, see [View the Maximum Session Duration
1079
+ # Setting for a Role][1] in the *IAM User Guide*.
1080
+ #
1081
+ # By default, the value is set to `3600` seconds.
1082
+ #
1083
+ # <note markdown="1"> The `DurationSeconds` parameter is separate from the duration of a
1084
+ # console session that you might request using the returned credentials.
1085
+ # The request to the federation endpoint for a console sign-in token
1086
+ # takes a `SessionDuration` parameter that specifies the maximum length
1087
+ # of the console session. For more information, see [Creating a URL that
1088
+ # Enables Federated Users to Access the Amazon Web Services Management
1089
+ # Console][2] in the *IAM User Guide*.
1090
+ #
1091
+ # </note>
1092
+ #
1093
+ #
1094
+ #
1095
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
1096
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html
1097
+ #
1098
+ # @return [Types::AssumeRoleWithSAMLResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1099
+ #
1100
+ # * {Types::AssumeRoleWithSAMLResponse#credentials #credentials} => Types::Credentials
1101
+ # * {Types::AssumeRoleWithSAMLResponse#assumed_role_user #assumed_role_user} => Types::AssumedRoleUser
1102
+ # * {Types::AssumeRoleWithSAMLResponse#packed_policy_size #packed_policy_size} => Integer
1103
+ # * {Types::AssumeRoleWithSAMLResponse#subject #subject} => String
1104
+ # * {Types::AssumeRoleWithSAMLResponse#subject_type #subject_type} => String
1105
+ # * {Types::AssumeRoleWithSAMLResponse#issuer #issuer} => String
1106
+ # * {Types::AssumeRoleWithSAMLResponse#audience #audience} => String
1107
+ # * {Types::AssumeRoleWithSAMLResponse#name_qualifier #name_qualifier} => String
1108
+ # * {Types::AssumeRoleWithSAMLResponse#source_identity #source_identity} => String
1109
+ #
1110
+ #
1111
+ # @example Example: To assume a role using a SAML assertion
1112
+ #
1113
+ # resp = client.assume_role_with_saml({
1114
+ # duration_seconds: 3600,
1115
+ # principal_arn: "arn:aws:iam::123456789012:saml-provider/SAML-test",
1116
+ # role_arn: "arn:aws:iam::123456789012:role/TestSaml",
1117
+ # saml_assertion: "VERYLONGENCODEDASSERTIONEXAMPLExzYW1sOkF1ZGllbmNlPmJsYW5rPC9zYW1sOkF1ZGllbmNlPjwvc2FtbDpBdWRpZW5jZVJlc3RyaWN0aW9uPjwvc2FtbDpDb25kaXRpb25zPjxzYW1sOlN1YmplY3Q+PHNhbWw6TmFtZUlEIEZvcm1hdD0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOm5hbWVpZC1mb3JtYXQ6dHJhbnNpZW50Ij5TYW1sRXhhbXBsZTwvc2FtbDpOYW1lSUQ+PHNhbWw6U3ViamVjdENvbmZpcm1hdGlvbiBNZXRob2Q9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDpjbTpiZWFyZXIiPjxzYW1sOlN1YmplY3RDb25maXJtYXRpb25EYXRhIE5vdE9uT3JBZnRlcj0iMjAxOS0xMS0wMVQyMDoyNTowNS4xNDVaIiBSZWNpcGllbnQ9Imh0dHBzOi8vc2lnbmluLmF3cy5hbWF6b24uY29tL3NhbWwiLz48L3NhbWw6U3ViamVjdENvbmZpcm1hdGlvbj48L3NhbWw6U3ViamVjdD48c2FtbDpBdXRoblN0YXRlbWVudCBBdXRoPD94bWwgdmpSZXNwb25zZT4=",
1118
+ # })
1119
+ #
1120
+ # resp.to_h outputs the following:
1121
+ # {
1122
+ # assumed_role_user: {
1123
+ # arn: "arn:aws:sts::123456789012:assumed-role/TestSaml",
1124
+ # assumed_role_id: "ARO456EXAMPLE789:TestSaml",
1125
+ # },
1126
+ # audience: "https://signin.aws.amazon.com/saml",
1127
+ # credentials: {
1128
+ # access_key_id: "ASIAV3ZUEFP6EXAMPLE",
1129
+ # expiration: Time.parse("2019-11-01T20:26:47Z"),
1130
+ # secret_access_key: "8P+SQvWIuLnKhh8d++jpw0nNmQRBZvNEXAMPLEKEY",
1131
+ # session_token: "IQoJb3JpZ2luX2VjEOz////////////////////wEXAMPLEtMSJHMEUCIDoKK3JH9uGQE1z0sINr5M4jk+Na8KHDcCYRVjJCZEvOAiEA3OvJGtw1EcViOleS2vhs8VdCKFJQWPQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA==",
1132
+ # },
1133
+ # issuer: "https://integ.example.com/idp/shibboleth",
1134
+ # name_qualifier: "SbdGOnUkh1i4+EXAMPLExL/jEvs=",
1135
+ # packed_policy_size: 6,
1136
+ # subject: "SamlExample",
1137
+ # subject_type: "transient",
1138
+ # }
1139
+ #
1140
+ # @example Request syntax with placeholder values
1141
+ #
1142
+ # resp = client.assume_role_with_saml({
1143
+ # role_arn: "arnType", # required
1144
+ # principal_arn: "arnType", # required
1145
+ # saml_assertion: "SAMLAssertionType", # required
1146
+ # policy_arns: [
1147
+ # {
1148
+ # arn: "arnType",
1149
+ # },
1150
+ # ],
1151
+ # policy: "sessionPolicyDocumentType",
1152
+ # duration_seconds: 1,
1153
+ # })
1154
+ #
1155
+ # @example Response structure
1156
+ #
1157
+ # resp.credentials.access_key_id #=> String
1158
+ # resp.credentials.secret_access_key #=> String
1159
+ # resp.credentials.session_token #=> String
1160
+ # resp.credentials.expiration #=> Time
1161
+ # resp.assumed_role_user.assumed_role_id #=> String
1162
+ # resp.assumed_role_user.arn #=> String
1163
+ # resp.packed_policy_size #=> Integer
1164
+ # resp.subject #=> String
1165
+ # resp.subject_type #=> String
1166
+ # resp.issuer #=> String
1167
+ # resp.audience #=> String
1168
+ # resp.name_qualifier #=> String
1169
+ # resp.source_identity #=> String
1170
+ #
1171
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAML AWS API Documentation
1172
+ #
1173
+ # @overload assume_role_with_saml(params = {})
1174
+ # @param [Hash] params ({})
1175
+ def assume_role_with_saml(params = {}, options = {})
1176
+ req = build_request(:assume_role_with_saml, params)
1177
+ req.send_request(options)
1178
+ end
1179
+
1180
+ # Returns a set of temporary security credentials for users who have
1181
+ # been authenticated in a mobile or web application with a web identity
1182
+ # provider. Example providers include the OAuth 2.0 providers Login with
1183
+ # Amazon and Facebook, or any OpenID Connect-compatible identity
1184
+ # provider such as Google or [Amazon Cognito federated identities][1].
1185
+ #
1186
+ # <note markdown="1"> For mobile applications, we recommend that you use Amazon Cognito. You
1187
+ # can use Amazon Cognito with the [Amazon Web Services SDK for iOS
1188
+ # Developer Guide][2] and the [Amazon Web Services SDK for Android
1189
+ # Developer Guide][3] to uniquely identify a user. You can also supply
1190
+ # the user with a consistent identity throughout the lifetime of an
1191
+ # application.
1192
+ #
1193
+ # To learn more about Amazon Cognito, see [Amazon Cognito Overview][4]
1194
+ # in *Amazon Web Services SDK for Android Developer Guide* and [Amazon
1195
+ # Cognito Overview][5] in the *Amazon Web Services SDK for iOS Developer
1196
+ # Guide*.
1197
+ #
1198
+ # </note>
1199
+ #
1200
+ # Calling `AssumeRoleWithWebIdentity` does not require the use of Amazon
1201
+ # Web Services security credentials. Therefore, you can distribute an
1202
+ # application (for example, on mobile devices) that requests temporary
1203
+ # security credentials without including long-term Amazon Web Services
1204
+ # credentials in the application. You also don't need to deploy
1205
+ # server-based proxy services that use long-term Amazon Web Services
1206
+ # credentials. Instead, the identity of the caller is validated by using
1207
+ # a token from the web identity provider. For a comparison of
1208
+ # `AssumeRoleWithWebIdentity` with the other API operations that produce
1209
+ # temporary credentials, see [Requesting Temporary Security
1210
+ # Credentials][6] and [Comparing the Amazon Web Services STS API
1211
+ # operations][7] in the *IAM User Guide*.
1212
+ #
1213
+ # The temporary security credentials returned by this API consist of an
1214
+ # access key ID, a secret access key, and a security token. Applications
1215
+ # can use these temporary security credentials to sign calls to Amazon
1216
+ # Web Services service API operations.
1217
+ #
1218
+ # **Session Duration**
1219
+ #
1220
+ # By default, the temporary security credentials created by
1221
+ # `AssumeRoleWithWebIdentity` last for one hour. However, you can use
1222
+ # the optional `DurationSeconds` parameter to specify the duration of
1223
+ # your session. You can provide a value from 900 seconds (15 minutes) up
1224
+ # to the maximum session duration setting for the role. This setting can
1225
+ # have a value from 1 hour to 12 hours. To learn how to view the maximum
1226
+ # value for your role, see [View the Maximum Session Duration Setting
1227
+ # for a Role][8] in the *IAM User Guide*. The maximum session duration
1228
+ # limit applies when you use the `AssumeRole*` API operations or the
1229
+ # `assume-role*` CLI commands. However the limit does not apply when you
1230
+ # use those operations to create a console URL. For more information,
1231
+ # see [Using IAM Roles][9] in the *IAM User Guide*.
1232
+ #
1233
+ # **Permissions**
1234
+ #
1235
+ # The temporary security credentials created by
1236
+ # `AssumeRoleWithWebIdentity` can be used to make API calls to any
1237
+ # Amazon Web Services service with the following exception: you cannot
1238
+ # call the STS `GetFederationToken` or `GetSessionToken` API operations.
1239
+ #
1240
+ # (Optional) You can pass inline or managed [session policies][10] to
1241
+ # this operation. You can pass a single JSON policy document to use as
1242
+ # an inline session policy. You can also specify up to 10 managed
1243
+ # policies to use as managed session policies. The plaintext that you
1244
+ # use for both inline and managed session policies can't exceed 2,048
1245
+ # characters. Passing policies to this operation returns new temporary
1246
+ # credentials. The resulting session's permissions are the intersection
1247
+ # of the role's identity-based policy and the session policies. You can
1248
+ # use the role's temporary credentials in subsequent Amazon Web
1249
+ # Services API calls to access resources in the account that owns the
1250
+ # role. You cannot use session policies to grant more permissions than
1251
+ # those allowed by the identity-based policy of the role that is being
1252
+ # assumed. For more information, see [Session Policies][10] in the *IAM
1253
+ # User Guide*.
1254
+ #
1255
+ # **Tags**
1256
+ #
1257
+ # (Optional) You can configure your IdP to pass attributes into your web
1258
+ # identity token as session tags. Each session tag consists of a key
1259
+ # name and an associated value. For more information about session tags,
1260
+ # see [Passing Session Tags in STS][11] in the *IAM User Guide*.
1261
+ #
1262
+ # You can pass up to 50 session tags. The plaintext session tag keys
1263
+ # can’t exceed 128 characters and the values can’t exceed 256
1264
+ # characters. For these and additional limits, see [IAM and STS
1265
+ # Character Limits][12] in the *IAM User Guide*.
1266
+ #
1267
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
1268
+ # policies and session tags into a packed binary format that has a
1269
+ # separate limit. Your request can fail for this limit even if your
1270
+ # plaintext meets the other requirements. The `PackedPolicySize`
1271
+ # response element indicates by percentage how close the policies and
1272
+ # tags for your request are to the upper size limit.
1273
+ #
1274
+ # </note>
1275
+ #
1276
+ # You can pass a session tag with the same key as a tag that is attached
1277
+ # to the role. When you do, the session tag overrides the role tag with
1278
+ # the same key.
1279
+ #
1280
+ # An administrator must grant you the permissions necessary to pass
1281
+ # session tags. The administrator can also create granular permissions
1282
+ # to allow you to pass only specific session tags. For more information,
1283
+ # see [Tutorial: Using Tags for Attribute-Based Access Control][13] in
1284
+ # the *IAM User Guide*.
1285
+ #
1286
+ # You can set the session tags as transitive. Transitive tags persist
1287
+ # during role chaining. For more information, see [Chaining Roles with
1288
+ # Session Tags][14] in the *IAM User Guide*.
1289
+ #
1290
+ # **Identities**
1291
+ #
1292
+ # Before your application can call `AssumeRoleWithWebIdentity`, you must
1293
+ # have an identity token from a supported identity provider and create a
1294
+ # role that the application can assume. The role that your application
1295
+ # assumes must trust the identity provider that is associated with the
1296
+ # identity token. In other words, the identity provider must be
1297
+ # specified in the role's trust policy.
1298
+ #
1299
+ # Calling `AssumeRoleWithWebIdentity` can result in an entry in your
1300
+ # CloudTrail logs. The entry includes the [Subject][15] of the provided
1301
+ # web identity token. We recommend that you avoid using any personally
1302
+ # identifiable information (PII) in this field. For example, you could
1303
+ # instead use a GUID or a pairwise identifier, as [suggested in the OIDC
1304
+ # specification][16].
1305
+ #
1306
+ # For more information about how to use web identity federation and the
1307
+ # `AssumeRoleWithWebIdentity` API, see the following resources:
1308
+ #
1309
+ # * [Using Web Identity Federation API Operations for Mobile Apps][17]
1310
+ # and [Federation Through a Web-based Identity Provider][18].
1311
+ #
1312
+ # * [ Web Identity Federation Playground][19]. Walk through the process
1313
+ # of authenticating through Login with Amazon, Facebook, or Google,
1314
+ # getting temporary security credentials, and then using those
1315
+ # credentials to make a request to Amazon Web Services.
1316
+ #
1317
+ # * [Amazon Web Services SDK for iOS Developer Guide][2] and [Amazon Web
1318
+ # Services SDK for Android Developer Guide][3]. These toolkits contain
1319
+ # sample apps that show how to invoke the identity providers. The
1320
+ # toolkits then show how to use the information from these providers
1321
+ # to get and use temporary security credentials.
1322
+ #
1323
+ # * [Web Identity Federation with Mobile Applications][20]. This article
1324
+ # discusses web identity federation and shows an example of how to use
1325
+ # web identity federation to get access to content in Amazon S3.
1326
+ #
1327
+ #
1328
+ #
1329
+ # [1]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html
1330
+ # [2]: http://aws.amazon.com/sdkforios/
1331
+ # [3]: http://aws.amazon.com/sdkforandroid/
1332
+ # [4]: https://docs.aws.amazon.com/mobile/sdkforandroid/developerguide/cognito-auth.html#d0e840
1333
+ # [5]: https://docs.aws.amazon.com/mobile/sdkforios/developerguide/cognito-auth.html#d0e664
1334
+ # [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
1335
+ # [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
1336
+ # [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
1337
+ # [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
1338
+ # [10]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
1339
+ # [11]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
1340
+ # [12]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length
1341
+ # [13]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html
1342
+ # [14]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining
1343
+ # [15]: http://openid.net/specs/openid-connect-core-1_0.html#Claims
1344
+ # [16]: http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes
1345
+ # [17]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html
1346
+ # [18]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity
1347
+ # [19]: https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/
1348
+ # [20]: http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications
1349
+ #
1350
+ # @option params [required, String] :role_arn
1351
+ # The Amazon Resource Name (ARN) of the role that the caller is
1352
+ # assuming.
1353
+ #
1354
+ # @option params [required, String] :role_session_name
1355
+ # An identifier for the assumed role session. Typically, you pass the
1356
+ # name or identifier that is associated with the user who is using your
1357
+ # application. That way, the temporary security credentials that your
1358
+ # application will use are associated with that user. This session name
1359
+ # is included as part of the ARN and assumed role ID in the
1360
+ # `AssumedRoleUser` response element.
1361
+ #
1362
+ # The regex used to validate this parameter is a string of characters
1363
+ # consisting of upper- and lower-case alphanumeric characters with no
1364
+ # spaces. You can also include underscores or any of the following
1365
+ # characters: =,.@-
1366
+ #
1367
+ # @option params [required, String] :web_identity_token
1368
+ # The OAuth 2.0 access token or OpenID Connect ID token that is provided
1369
+ # by the identity provider. Your application must get this token by
1370
+ # authenticating the user who is using your application with a web
1371
+ # identity provider before the application makes an
1372
+ # `AssumeRoleWithWebIdentity` call.
1373
+ #
1374
+ # @option params [String] :provider_id
1375
+ # The fully qualified host component of the domain name of the OAuth 2.0
1376
+ # identity provider. Do not specify this value for an OpenID Connect
1377
+ # identity provider.
1378
+ #
1379
+ # Currently `www.amazon.com` and `graph.facebook.com` are the only
1380
+ # supported identity providers for OAuth 2.0 access tokens. Do not
1381
+ # include URL schemes and port numbers.
1382
+ #
1383
+ # Do not specify this value for OpenID Connect ID tokens.
1384
+ #
1385
+ # @option params [Array<Types::PolicyDescriptorType>] :policy_arns
1386
+ # The Amazon Resource Names (ARNs) of the IAM managed policies that you
1387
+ # want to use as managed session policies. The policies must exist in
1388
+ # the same account as the role.
1389
+ #
1390
+ # This parameter is optional. You can provide up to 10 managed policy
1391
+ # ARNs. However, the plaintext that you use for both inline and managed
1392
+ # session policies can't exceed 2,048 characters. For more information
1393
+ # about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services
1394
+ # Service Namespaces][1] in the Amazon Web Services General Reference.
1395
+ #
1396
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
1397
+ # policies and session tags into a packed binary format that has a
1398
+ # separate limit. Your request can fail for this limit even if your
1399
+ # plaintext meets the other requirements. The `PackedPolicySize`
1400
+ # response element indicates by percentage how close the policies and
1401
+ # tags for your request are to the upper size limit.
1402
+ #
1403
+ # </note>
1404
+ #
1405
+ # Passing policies to this operation returns new temporary credentials.
1406
+ # The resulting session's permissions are the intersection of the
1407
+ # role's identity-based policy and the session policies. You can use
1408
+ # the role's temporary credentials in subsequent Amazon Web Services
1409
+ # API calls to access resources in the account that owns the role. You
1410
+ # cannot use session policies to grant more permissions than those
1411
+ # allowed by the identity-based policy of the role that is being
1412
+ # assumed. For more information, see [Session Policies][2] in the *IAM
1413
+ # User Guide*.
1414
+ #
1415
+ #
1416
+ #
1417
+ # [1]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
1418
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
1419
+ #
1420
+ # @option params [String] :policy
1421
+ # An IAM policy in JSON format that you want to use as an inline session
1422
+ # policy.
1423
+ #
1424
+ # This parameter is optional. Passing policies to this operation returns
1425
+ # new temporary credentials. The resulting session's permissions are
1426
+ # the intersection of the role's identity-based policy and the session
1427
+ # policies. You can use the role's temporary credentials in subsequent
1428
+ # Amazon Web Services API calls to access resources in the account that
1429
+ # owns the role. You cannot use session policies to grant more
1430
+ # permissions than those allowed by the identity-based policy of the
1431
+ # role that is being assumed. For more information, see [Session
1432
+ # Policies][1] in the *IAM User Guide*.
1433
+ #
1434
+ # The plaintext that you use for both inline and managed session
1435
+ # policies can't exceed 2,048 characters. The JSON policy characters
1436
+ # can be any ASCII character from the space character to the end of the
1437
+ # valid character list (\\u0020 through \\u00FF). It can also include
1438
+ # the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
1439
+ # characters.
1440
+ #
1441
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
1442
+ # policies and session tags into a packed binary format that has a
1443
+ # separate limit. Your request can fail for this limit even if your
1444
+ # plaintext meets the other requirements. The `PackedPolicySize`
1445
+ # response element indicates by percentage how close the policies and
1446
+ # tags for your request are to the upper size limit.
1447
+ #
1448
+ # </note>
1449
+ #
1450
+ #
1451
+ #
1452
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
1453
+ #
1454
+ # @option params [Integer] :duration_seconds
1455
+ # The duration, in seconds, of the role session. The value can range
1456
+ # from 900 seconds (15 minutes) up to the maximum session duration
1457
+ # setting for the role. This setting can have a value from 1 hour to 12
1458
+ # hours. If you specify a value higher than this setting, the operation
1459
+ # fails. For example, if you specify a session duration of 12 hours, but
1460
+ # your administrator set the maximum session duration to 6 hours, your
1461
+ # operation fails. To learn how to view the maximum value for your role,
1462
+ # see [View the Maximum Session Duration Setting for a Role][1] in the
1463
+ # *IAM User Guide*.
1464
+ #
1465
+ # By default, the value is set to `3600` seconds.
1466
+ #
1467
+ # <note markdown="1"> The `DurationSeconds` parameter is separate from the duration of a
1468
+ # console session that you might request using the returned credentials.
1469
+ # The request to the federation endpoint for a console sign-in token
1470
+ # takes a `SessionDuration` parameter that specifies the maximum length
1471
+ # of the console session. For more information, see [Creating a URL that
1472
+ # Enables Federated Users to Access the Amazon Web Services Management
1473
+ # Console][2] in the *IAM User Guide*.
1474
+ #
1475
+ # </note>
1476
+ #
1477
+ #
1478
+ #
1479
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session
1480
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html
1481
+ #
1482
+ # @return [Types::AssumeRoleWithWebIdentityResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1483
+ #
1484
+ # * {Types::AssumeRoleWithWebIdentityResponse#credentials #credentials} => Types::Credentials
1485
+ # * {Types::AssumeRoleWithWebIdentityResponse#subject_from_web_identity_token #subject_from_web_identity_token} => String
1486
+ # * {Types::AssumeRoleWithWebIdentityResponse#assumed_role_user #assumed_role_user} => Types::AssumedRoleUser
1487
+ # * {Types::AssumeRoleWithWebIdentityResponse#packed_policy_size #packed_policy_size} => Integer
1488
+ # * {Types::AssumeRoleWithWebIdentityResponse#provider #provider} => String
1489
+ # * {Types::AssumeRoleWithWebIdentityResponse#audience #audience} => String
1490
+ # * {Types::AssumeRoleWithWebIdentityResponse#source_identity #source_identity} => String
1491
+ #
1492
+ #
1493
+ # @example Example: To assume a role as an OpenID Connect-federated user
1494
+ #
1495
+ # resp = client.assume_role_with_web_identity({
1496
+ # duration_seconds: 3600,
1497
+ # policy: "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:ListAllMyBuckets\",\"Resource\":\"*\"}]}",
1498
+ # provider_id: "www.amazon.com",
1499
+ # role_arn: "arn:aws:iam::123456789012:role/FederatedWebIdentityRole",
1500
+ # role_session_name: "app1",
1501
+ # web_identity_token: "Atza%7CIQEBLjAsAhRFiXuWpUXuRvQ9PZL3GMFcYevydwIUFAHZwXZXXXXXXXXJnrulxKDHwy87oGKPznh0D6bEQZTSCzyoCtL_8S07pLpr0zMbn6w1lfVZKNTBdDansFBmtGnIsIapjI6xKR02Yc_2bQ8LZbUXSGm6Ry6_BG7PrtLZtj_dfCTj92xNGed-CrKqjG7nPBjNIL016GGvuS5gSvPRUxWES3VYfm1wl7WTI7jn-Pcb6M-buCgHhFOzTQxod27L9CqnOLio7N3gZAGpsp6n1-AJBOCJckcyXe2c6uD0srOJeZlKUm2eTDVMf8IehDVI0r1QOnTV6KzzAI3OY87Vd_cVMQ",
1502
+ # })
1503
+ #
1504
+ # resp.to_h outputs the following:
1505
+ # {
1506
+ # assumed_role_user: {
1507
+ # arn: "arn:aws:sts::123456789012:assumed-role/FederatedWebIdentityRole/app1",
1508
+ # assumed_role_id: "AROACLKWSDQRAOEXAMPLE:app1",
1509
+ # },
1510
+ # audience: "client.5498841531868486423.1548@apps.example.com",
1511
+ # credentials: {
1512
+ # access_key_id: "AKIAIOSFODNN7EXAMPLE",
1513
+ # expiration: Time.parse("2014-10-24T23:00:23Z"),
1514
+ # secret_access_key: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY",
1515
+ # session_token: "AQoDYXdzEE0a8ANXXXXXXXXNO1ewxE5TijQyp+IEXAMPLE",
1516
+ # },
1517
+ # packed_policy_size: 123,
1518
+ # provider: "www.amazon.com",
1519
+ # subject_from_web_identity_token: "amzn1.account.AF6RHO7KZU5XRVQJGXK6HEXAMPLE",
1520
+ # }
1521
+ #
1522
+ # @example Request syntax with placeholder values
1523
+ #
1524
+ # resp = client.assume_role_with_web_identity({
1525
+ # role_arn: "arnType", # required
1526
+ # role_session_name: "roleSessionNameType", # required
1527
+ # web_identity_token: "clientTokenType", # required
1528
+ # provider_id: "urlType",
1529
+ # policy_arns: [
1530
+ # {
1531
+ # arn: "arnType",
1532
+ # },
1533
+ # ],
1534
+ # policy: "sessionPolicyDocumentType",
1535
+ # duration_seconds: 1,
1536
+ # })
1537
+ #
1538
+ # @example Response structure
1539
+ #
1540
+ # resp.credentials.access_key_id #=> String
1541
+ # resp.credentials.secret_access_key #=> String
1542
+ # resp.credentials.session_token #=> String
1543
+ # resp.credentials.expiration #=> Time
1544
+ # resp.subject_from_web_identity_token #=> String
1545
+ # resp.assumed_role_user.assumed_role_id #=> String
1546
+ # resp.assumed_role_user.arn #=> String
1547
+ # resp.packed_policy_size #=> Integer
1548
+ # resp.provider #=> String
1549
+ # resp.audience #=> String
1550
+ # resp.source_identity #=> String
1551
+ #
1552
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentity AWS API Documentation
1553
+ #
1554
+ # @overload assume_role_with_web_identity(params = {})
1555
+ # @param [Hash] params ({})
1556
+ def assume_role_with_web_identity(params = {}, options = {})
1557
+ req = build_request(:assume_role_with_web_identity, params)
1558
+ req.send_request(options)
1559
+ end
1560
+
1561
+ # Decodes additional information about the authorization status of a
1562
+ # request from an encoded message returned in response to an Amazon Web
1563
+ # Services request.
1564
+ #
1565
+ # For example, if a user is not authorized to perform an operation that
1566
+ # he or she has requested, the request returns a
1567
+ # `Client.UnauthorizedOperation` response (an HTTP 403 response). Some
1568
+ # Amazon Web Services operations additionally return an encoded message
1569
+ # that can provide details about this authorization failure.
1570
+ #
1571
+ # <note markdown="1"> Only certain Amazon Web Services operations return an encoded
1572
+ # authorization message. The documentation for an individual operation
1573
+ # indicates whether that operation returns an encoded message in
1574
+ # addition to returning an HTTP code.
1575
+ #
1576
+ # </note>
1577
+ #
1578
+ # The message is encoded because the details of the authorization status
1579
+ # can contain privileged information that the user who requested the
1580
+ # operation should not see. To decode an authorization status message, a
1581
+ # user must be granted permissions through an IAM [policy][1] to request
1582
+ # the `DecodeAuthorizationMessage` (`sts:DecodeAuthorizationMessage`)
1583
+ # action.
1584
+ #
1585
+ # The decoded message includes the following type of information:
1586
+ #
1587
+ # * Whether the request was denied due to an explicit deny or due to the
1588
+ # absence of an explicit allow. For more information, see [Determining
1589
+ # Whether a Request is Allowed or Denied][2] in the *IAM User Guide*.
1590
+ #
1591
+ # * The principal who made the request.
1592
+ #
1593
+ # * The requested action.
1594
+ #
1595
+ # * The requested resource.
1596
+ #
1597
+ # * The values of condition keys in the context of the user's request.
1598
+ #
1599
+ #
1600
+ #
1601
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html
1602
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-denyallow
1603
+ #
1604
+ # @option params [required, String] :encoded_message
1605
+ # The encoded message that was returned with the response.
1606
+ #
1607
+ # @return [Types::DecodeAuthorizationMessageResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1608
+ #
1609
+ # * {Types::DecodeAuthorizationMessageResponse#decoded_message #decoded_message} => String
1610
+ #
1611
+ #
1612
+ # @example Example: To decode information about an authorization status of a request
1613
+ #
1614
+ # resp = client.decode_authorization_message({
1615
+ # encoded_message: "<encoded-message>",
1616
+ # })
1617
+ #
1618
+ # resp.to_h outputs the following:
1619
+ # {
1620
+ # decoded_message: "{\"allowed\": \"false\",\"explicitDeny\": \"false\",\"matchedStatements\": \"\",\"failures\": \"\",\"context\": {\"principal\": {\"id\": \"AIDACKCEVSQ6C2EXAMPLE\",\"name\": \"Bob\",\"arn\": \"arn:aws:iam::123456789012:user/Bob\"},\"action\": \"ec2:StopInstances\",\"resource\": \"arn:aws:ec2:us-east-1:123456789012:instance/i-dd01c9bd\",\"conditions\": [{\"item\": {\"key\": \"ec2:Tenancy\",\"values\": [\"default\"]},{\"item\": {\"key\": \"ec2:ResourceTag/elasticbeanstalk:environment-name\",\"values\": [\"Default-Environment\"]}},(Additional items ...)]}}",
1621
+ # }
1622
+ #
1623
+ # @example Request syntax with placeholder values
1624
+ #
1625
+ # resp = client.decode_authorization_message({
1626
+ # encoded_message: "encodedMessageType", # required
1627
+ # })
1628
+ #
1629
+ # @example Response structure
1630
+ #
1631
+ # resp.decoded_message #=> String
1632
+ #
1633
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessage AWS API Documentation
1634
+ #
1635
+ # @overload decode_authorization_message(params = {})
1636
+ # @param [Hash] params ({})
1637
+ def decode_authorization_message(params = {}, options = {})
1638
+ req = build_request(:decode_authorization_message, params)
1639
+ req.send_request(options)
1640
+ end
1641
+
1642
+ # Returns the account identifier for the specified access key ID.
1643
+ #
1644
+ # Access keys consist of two parts: an access key ID (for example,
1645
+ # `AKIAIOSFODNN7EXAMPLE`) and a secret access key (for example,
1646
+ # `wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY`). For more information
1647
+ # about access keys, see [Managing Access Keys for IAM Users][1] in the
1648
+ # *IAM User Guide*.
1649
+ #
1650
+ # When you pass an access key ID to this operation, it returns the ID of
1651
+ # the Amazon Web Services account to which the keys belong. Access key
1652
+ # IDs beginning with `AKIA` are long-term credentials for an IAM user or
1653
+ # the Amazon Web Services account root user. Access key IDs beginning
1654
+ # with `ASIA` are temporary credentials that are created using STS
1655
+ # operations. If the account in the response belongs to you, you can
1656
+ # sign in as the root user and review your root user access keys. Then,
1657
+ # you can pull a [credentials report][2] to learn which IAM user owns
1658
+ # the keys. To learn who requested the temporary credentials for an
1659
+ # `ASIA` access key, view the STS events in your [CloudTrail logs][3] in
1660
+ # the *IAM User Guide*.
1661
+ #
1662
+ # This operation does not indicate the state of the access key. The key
1663
+ # might be active, inactive, or deleted. Active keys might not have
1664
+ # permissions to perform an operation. Providing a deleted access key
1665
+ # might return an error that the key doesn't exist.
1666
+ #
1667
+ #
1668
+ #
1669
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html
1670
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html
1671
+ # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html
1672
+ #
1673
+ # @option params [required, String] :access_key_id
1674
+ # The identifier of an access key.
1675
+ #
1676
+ # This parameter allows (through its regex pattern) a string of
1677
+ # characters that can consist of any upper- or lowercase letter or
1678
+ # digit.
1679
+ #
1680
+ # @return [Types::GetAccessKeyInfoResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1681
+ #
1682
+ # * {Types::GetAccessKeyInfoResponse#account #account} => String
1683
+ #
1684
+ # @example Request syntax with placeholder values
1685
+ #
1686
+ # resp = client.get_access_key_info({
1687
+ # access_key_id: "accessKeyIdType", # required
1688
+ # })
1689
+ #
1690
+ # @example Response structure
1691
+ #
1692
+ # resp.account #=> String
1693
+ #
1694
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetAccessKeyInfo AWS API Documentation
1695
+ #
1696
+ # @overload get_access_key_info(params = {})
1697
+ # @param [Hash] params ({})
1698
+ def get_access_key_info(params = {}, options = {})
1699
+ req = build_request(:get_access_key_info, params)
1700
+ req.send_request(options)
1701
+ end
1702
+
1703
+ # Returns details about the IAM user or role whose credentials are used
1704
+ # to call the operation.
1705
+ #
1706
+ # <note markdown="1"> No permissions are required to perform this operation. If an
1707
+ # administrator adds a policy to your IAM user or role that explicitly
1708
+ # denies access to the `sts:GetCallerIdentity` action, you can still
1709
+ # perform this operation. Permissions are not required because the same
1710
+ # information is returned when an IAM user or role is denied access. To
1711
+ # view an example response, see [I Am Not Authorized to Perform:
1712
+ # iam:DeleteVirtualMFADevice][1] in the *IAM User Guide*.
1713
+ #
1714
+ # </note>
1715
+ #
1716
+ #
1717
+ #
1718
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_access-denied-delete-mfa
1719
+ #
1720
+ # @return [Types::GetCallerIdentityResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1721
+ #
1722
+ # * {Types::GetCallerIdentityResponse#user_id #user_id} => String
1723
+ # * {Types::GetCallerIdentityResponse#account #account} => String
1724
+ # * {Types::GetCallerIdentityResponse#arn #arn} => String
1725
+ #
1726
+ #
1727
+ # @example Example: To get details about a calling IAM user
1728
+ #
1729
+ # # This example shows a request and response made with the credentials for a user named Alice in the AWS account
1730
+ # # 123456789012.
1731
+ #
1732
+ # resp = client.get_caller_identity({
1733
+ # })
1734
+ #
1735
+ # resp.to_h outputs the following:
1736
+ # {
1737
+ # account: "123456789012",
1738
+ # arn: "arn:aws:iam::123456789012:user/Alice",
1739
+ # user_id: "AKIAI44QH8DHBEXAMPLE",
1740
+ # }
1741
+ #
1742
+ # @example Example: To get details about a calling user federated with AssumeRole
1743
+ #
1744
+ # # This example shows a request and response made with temporary credentials created by AssumeRole. The name of the assumed
1745
+ # # role is my-role-name, and the RoleSessionName is set to my-role-session-name.
1746
+ #
1747
+ # resp = client.get_caller_identity({
1748
+ # })
1749
+ #
1750
+ # resp.to_h outputs the following:
1751
+ # {
1752
+ # account: "123456789012",
1753
+ # arn: "arn:aws:sts::123456789012:assumed-role/my-role-name/my-role-session-name",
1754
+ # user_id: "AKIAI44QH8DHBEXAMPLE:my-role-session-name",
1755
+ # }
1756
+ #
1757
+ # @example Example: To get details about a calling user federated with GetFederationToken
1758
+ #
1759
+ # # This example shows a request and response made with temporary credentials created by using GetFederationToken. The Name
1760
+ # # parameter is set to my-federated-user-name.
1761
+ #
1762
+ # resp = client.get_caller_identity({
1763
+ # })
1764
+ #
1765
+ # resp.to_h outputs the following:
1766
+ # {
1767
+ # account: "123456789012",
1768
+ # arn: "arn:aws:sts::123456789012:federated-user/my-federated-user-name",
1769
+ # user_id: "123456789012:my-federated-user-name",
1770
+ # }
1771
+ #
1772
+ # @example Response structure
1773
+ #
1774
+ # resp.user_id #=> String
1775
+ # resp.account #=> String
1776
+ # resp.arn #=> String
1777
+ #
1778
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetCallerIdentity AWS API Documentation
1779
+ #
1780
+ # @overload get_caller_identity(params = {})
1781
+ # @param [Hash] params ({})
1782
+ def get_caller_identity(params = {}, options = {})
1783
+ req = build_request(:get_caller_identity, params)
1784
+ req.send_request(options)
1785
+ end
1786
+
1787
+ # Returns a set of temporary security credentials (consisting of an
1788
+ # access key ID, a secret access key, and a security token) for a
1789
+ # federated user. A typical use is in a proxy application that gets
1790
+ # temporary security credentials on behalf of distributed applications
1791
+ # inside a corporate network. You must call the `GetFederationToken`
1792
+ # operation using the long-term security credentials of an IAM user. As
1793
+ # a result, this call is appropriate in contexts where those credentials
1794
+ # can be safely stored, usually in a server-based application. For a
1795
+ # comparison of `GetFederationToken` with the other API operations that
1796
+ # produce temporary credentials, see [Requesting Temporary Security
1797
+ # Credentials][1] and [Comparing the Amazon Web Services STS API
1798
+ # operations][2] in the *IAM User Guide*.
1799
+ #
1800
+ # <note markdown="1"> You can create a mobile-based or browser-based app that can
1801
+ # authenticate users using a web identity provider like Login with
1802
+ # Amazon, Facebook, Google, or an OpenID Connect-compatible identity
1803
+ # provider. In this case, we recommend that you use [Amazon Cognito][3]
1804
+ # or `AssumeRoleWithWebIdentity`. For more information, see [Federation
1805
+ # Through a Web-based Identity Provider][4] in the *IAM User Guide*.
1806
+ #
1807
+ # </note>
1808
+ #
1809
+ # You can also call `GetFederationToken` using the security credentials
1810
+ # of an Amazon Web Services account root user, but we do not recommend
1811
+ # it. Instead, we recommend that you create an IAM user for the purpose
1812
+ # of the proxy application. Then attach a policy to the IAM user that
1813
+ # limits federated users to only the actions and resources that they
1814
+ # need to access. For more information, see [IAM Best Practices][5] in
1815
+ # the *IAM User Guide*.
1816
+ #
1817
+ # **Session duration**
1818
+ #
1819
+ # The temporary credentials are valid for the specified duration, from
1820
+ # 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36
1821
+ # hours). The default session duration is 43,200 seconds (12 hours).
1822
+ # Temporary credentials obtained by using the Amazon Web Services
1823
+ # account root user credentials have a maximum duration of 3,600 seconds
1824
+ # (1 hour).
1825
+ #
1826
+ # **Permissions**
1827
+ #
1828
+ # You can use the temporary credentials created by `GetFederationToken`
1829
+ # in any Amazon Web Services service except the following:
1830
+ #
1831
+ # * You cannot call any IAM operations using the CLI or the Amazon Web
1832
+ # Services API.
1833
+ #
1834
+ # * You cannot call any STS operations except `GetCallerIdentity`.
1835
+ #
1836
+ # You must pass an inline or managed [session policy][6] to this
1837
+ # operation. You can pass a single JSON policy document to use as an
1838
+ # inline session policy. You can also specify up to 10 managed policies
1839
+ # to use as managed session policies. The plaintext that you use for
1840
+ # both inline and managed session policies can't exceed 2,048
1841
+ # characters.
1842
+ #
1843
+ # Though the session policy parameters are optional, if you do not pass
1844
+ # a policy, then the resulting federated user session has no
1845
+ # permissions. When you pass session policies, the session permissions
1846
+ # are the intersection of the IAM user policies and the session policies
1847
+ # that you pass. This gives you a way to further restrict the
1848
+ # permissions for a federated user. You cannot use session policies to
1849
+ # grant more permissions than those that are defined in the permissions
1850
+ # policy of the IAM user. For more information, see [Session
1851
+ # Policies][6] in the *IAM User Guide*. For information about using
1852
+ # `GetFederationToken` to create temporary security credentials, see
1853
+ # [GetFederationToken—Federation Through a Custom Identity Broker][7].
1854
+ #
1855
+ # You can use the credentials to access a resource that has a
1856
+ # resource-based policy. If that policy specifically references the
1857
+ # federated user session in the `Principal` element of the policy, the
1858
+ # session has the permissions allowed by the policy. These permissions
1859
+ # are granted in addition to the permissions granted by the session
1860
+ # policies.
1861
+ #
1862
+ # **Tags**
1863
+ #
1864
+ # (Optional) You can pass tag key-value pairs to your session. These are
1865
+ # called session tags. For more information about session tags, see
1866
+ # [Passing Session Tags in STS][8] in the *IAM User Guide*.
1867
+ #
1868
+ # <note markdown="1"> You can create a mobile-based or browser-based app that can
1869
+ # authenticate users using a web identity provider like Login with
1870
+ # Amazon, Facebook, Google, or an OpenID Connect-compatible identity
1871
+ # provider. In this case, we recommend that you use [Amazon Cognito][3]
1872
+ # or `AssumeRoleWithWebIdentity`. For more information, see [Federation
1873
+ # Through a Web-based Identity Provider][4] in the *IAM User Guide*.
1874
+ #
1875
+ # </note>
1876
+ #
1877
+ # An administrator must grant you the permissions necessary to pass
1878
+ # session tags. The administrator can also create granular permissions
1879
+ # to allow you to pass only specific session tags. For more information,
1880
+ # see [Tutorial: Using Tags for Attribute-Based Access Control][9] in
1881
+ # the *IAM User Guide*.
1882
+ #
1883
+ # Tag key–value pairs are not case sensitive, but case is preserved.
1884
+ # This means that you cannot have separate `Department` and `department`
1885
+ # tag keys. Assume that the user that you are federating has the
1886
+ # `Department`=`Marketing` tag and you pass the
1887
+ # `department`=`engineering` session tag. `Department` and `department`
1888
+ # are not saved as separate tags, and the session tag passed in the
1889
+ # request takes precedence over the user tag.
1890
+ #
1891
+ #
1892
+ #
1893
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
1894
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
1895
+ # [3]: http://aws.amazon.com/cognito/
1896
+ # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity
1897
+ # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html
1898
+ # [6]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
1899
+ # [7]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getfederationtoken
1900
+ # [8]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
1901
+ # [9]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html
1902
+ #
1903
+ # @option params [required, String] :name
1904
+ # The name of the federated user. The name is used as an identifier for
1905
+ # the temporary security credentials (such as `Bob`). For example, you
1906
+ # can reference the federated user name in a resource-based policy, such
1907
+ # as in an Amazon S3 bucket policy.
1908
+ #
1909
+ # The regex used to validate this parameter is a string of characters
1910
+ # consisting of upper- and lower-case alphanumeric characters with no
1911
+ # spaces. You can also include underscores or any of the following
1912
+ # characters: =,.@-
1913
+ #
1914
+ # @option params [String] :policy
1915
+ # An IAM policy in JSON format that you want to use as an inline session
1916
+ # policy.
1917
+ #
1918
+ # You must pass an inline or managed [session policy][1] to this
1919
+ # operation. You can pass a single JSON policy document to use as an
1920
+ # inline session policy. You can also specify up to 10 managed policies
1921
+ # to use as managed session policies.
1922
+ #
1923
+ # This parameter is optional. However, if you do not pass any session
1924
+ # policies, then the resulting federated user session has no
1925
+ # permissions.
1926
+ #
1927
+ # When you pass session policies, the session permissions are the
1928
+ # intersection of the IAM user policies and the session policies that
1929
+ # you pass. This gives you a way to further restrict the permissions for
1930
+ # a federated user. You cannot use session policies to grant more
1931
+ # permissions than those that are defined in the permissions policy of
1932
+ # the IAM user. For more information, see [Session Policies][1] in the
1933
+ # *IAM User Guide*.
1934
+ #
1935
+ # The resulting credentials can be used to access a resource that has a
1936
+ # resource-based policy. If that policy specifically references the
1937
+ # federated user session in the `Principal` element of the policy, the
1938
+ # session has the permissions allowed by the policy. These permissions
1939
+ # are granted in addition to the permissions that are granted by the
1940
+ # session policies.
1941
+ #
1942
+ # The plaintext that you use for both inline and managed session
1943
+ # policies can't exceed 2,048 characters. The JSON policy characters
1944
+ # can be any ASCII character from the space character to the end of the
1945
+ # valid character list (\\u0020 through \\u00FF). It can also include
1946
+ # the tab (\\u0009), linefeed (\\u000A), and carriage return (\\u000D)
1947
+ # characters.
1948
+ #
1949
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
1950
+ # policies and session tags into a packed binary format that has a
1951
+ # separate limit. Your request can fail for this limit even if your
1952
+ # plaintext meets the other requirements. The `PackedPolicySize`
1953
+ # response element indicates by percentage how close the policies and
1954
+ # tags for your request are to the upper size limit.
1955
+ #
1956
+ # </note>
1957
+ #
1958
+ #
1959
+ #
1960
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
1961
+ #
1962
+ # @option params [Array<Types::PolicyDescriptorType>] :policy_arns
1963
+ # The Amazon Resource Names (ARNs) of the IAM managed policies that you
1964
+ # want to use as a managed session policy. The policies must exist in
1965
+ # the same account as the IAM user that is requesting federated access.
1966
+ #
1967
+ # You must pass an inline or managed [session policy][1] to this
1968
+ # operation. You can pass a single JSON policy document to use as an
1969
+ # inline session policy. You can also specify up to 10 managed policies
1970
+ # to use as managed session policies. The plaintext that you use for
1971
+ # both inline and managed session policies can't exceed 2,048
1972
+ # characters. You can provide up to 10 managed policy ARNs. For more
1973
+ # information about ARNs, see [Amazon Resource Names (ARNs) and Amazon
1974
+ # Web Services Service Namespaces][2] in the Amazon Web Services General
1975
+ # Reference.
1976
+ #
1977
+ # This parameter is optional. However, if you do not pass any session
1978
+ # policies, then the resulting federated user session has no
1979
+ # permissions.
1980
+ #
1981
+ # When you pass session policies, the session permissions are the
1982
+ # intersection of the IAM user policies and the session policies that
1983
+ # you pass. This gives you a way to further restrict the permissions for
1984
+ # a federated user. You cannot use session policies to grant more
1985
+ # permissions than those that are defined in the permissions policy of
1986
+ # the IAM user. For more information, see [Session Policies][1] in the
1987
+ # *IAM User Guide*.
1988
+ #
1989
+ # The resulting credentials can be used to access a resource that has a
1990
+ # resource-based policy. If that policy specifically references the
1991
+ # federated user session in the `Principal` element of the policy, the
1992
+ # session has the permissions allowed by the policy. These permissions
1993
+ # are granted in addition to the permissions that are granted by the
1994
+ # session policies.
1995
+ #
1996
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
1997
+ # policies and session tags into a packed binary format that has a
1998
+ # separate limit. Your request can fail for this limit even if your
1999
+ # plaintext meets the other requirements. The `PackedPolicySize`
2000
+ # response element indicates by percentage how close the policies and
2001
+ # tags for your request are to the upper size limit.
2002
+ #
2003
+ # </note>
2004
+ #
2005
+ #
2006
+ #
2007
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session
2008
+ # [2]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
2009
+ #
2010
+ # @option params [Integer] :duration_seconds
2011
+ # The duration, in seconds, that the session should last. Acceptable
2012
+ # durations for federation sessions range from 900 seconds (15 minutes)
2013
+ # to 129,600 seconds (36 hours), with 43,200 seconds (12 hours) as the
2014
+ # default. Sessions obtained using Amazon Web Services account root user
2015
+ # credentials are restricted to a maximum of 3,600 seconds (one hour).
2016
+ # If the specified duration is longer than one hour, the session
2017
+ # obtained by using root user credentials defaults to one hour.
2018
+ #
2019
+ # @option params [Array<Types::Tag>] :tags
2020
+ # A list of session tags. Each session tag consists of a key name and an
2021
+ # associated value. For more information about session tags, see
2022
+ # [Passing Session Tags in STS][1] in the *IAM User Guide*.
2023
+ #
2024
+ # This parameter is optional. You can pass up to 50 session tags. The
2025
+ # plaintext session tag keys can’t exceed 128 characters and the values
2026
+ # can’t exceed 256 characters. For these and additional limits, see [IAM
2027
+ # and STS Character Limits][2] in the *IAM User Guide*.
2028
+ #
2029
+ # <note markdown="1"> An Amazon Web Services conversion compresses the passed session
2030
+ # policies and session tags into a packed binary format that has a
2031
+ # separate limit. Your request can fail for this limit even if your
2032
+ # plaintext meets the other requirements. The `PackedPolicySize`
2033
+ # response element indicates by percentage how close the policies and
2034
+ # tags for your request are to the upper size limit.
2035
+ #
2036
+ # </note>
2037
+ #
2038
+ # You can pass a session tag with the same key as a tag that is already
2039
+ # attached to the user you are federating. When you do, session tags
2040
+ # override a user tag with the same key.
2041
+ #
2042
+ # Tag key–value pairs are not case sensitive, but case is preserved.
2043
+ # This means that you cannot have separate `Department` and `department`
2044
+ # tag keys. Assume that the role has the `Department`=`Marketing` tag
2045
+ # and you pass the `department`=`engineering` session tag. `Department`
2046
+ # and `department` are not saved as separate tags, and the session tag
2047
+ # passed in the request takes precedence over the role tag.
2048
+ #
2049
+ #
2050
+ #
2051
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html
2052
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length
2053
+ #
2054
+ # @return [Types::GetFederationTokenResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2055
+ #
2056
+ # * {Types::GetFederationTokenResponse#credentials #credentials} => Types::Credentials
2057
+ # * {Types::GetFederationTokenResponse#federated_user #federated_user} => Types::FederatedUser
2058
+ # * {Types::GetFederationTokenResponse#packed_policy_size #packed_policy_size} => Integer
2059
+ #
2060
+ #
2061
+ # @example Example: To get temporary credentials for a role by using GetFederationToken
2062
+ #
2063
+ # resp = client.get_federation_token({
2064
+ # duration_seconds: 3600,
2065
+ # name: "testFedUserSession",
2066
+ # policy: "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:ListAllMyBuckets\",\"Resource\":\"*\"}]}",
2067
+ # tags: [
2068
+ # {
2069
+ # key: "Project",
2070
+ # value: "Pegasus",
2071
+ # },
2072
+ # {
2073
+ # key: "Cost-Center",
2074
+ # value: "98765",
2075
+ # },
2076
+ # ],
2077
+ # })
2078
+ #
2079
+ # resp.to_h outputs the following:
2080
+ # {
2081
+ # credentials: {
2082
+ # access_key_id: "AKIAIOSFODNN7EXAMPLE",
2083
+ # expiration: Time.parse("2011-07-15T23:28:33.359Z"),
2084
+ # secret_access_key: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY",
2085
+ # session_token: "AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA==",
2086
+ # },
2087
+ # federated_user: {
2088
+ # arn: "arn:aws:sts::123456789012:federated-user/Bob",
2089
+ # federated_user_id: "123456789012:Bob",
2090
+ # },
2091
+ # packed_policy_size: 8,
2092
+ # }
2093
+ #
2094
+ # @example Request syntax with placeholder values
2095
+ #
2096
+ # resp = client.get_federation_token({
2097
+ # name: "userNameType", # required
2098
+ # policy: "sessionPolicyDocumentType",
2099
+ # policy_arns: [
2100
+ # {
2101
+ # arn: "arnType",
2102
+ # },
2103
+ # ],
2104
+ # duration_seconds: 1,
2105
+ # tags: [
2106
+ # {
2107
+ # key: "tagKeyType", # required
2108
+ # value: "tagValueType", # required
2109
+ # },
2110
+ # ],
2111
+ # })
2112
+ #
2113
+ # @example Response structure
2114
+ #
2115
+ # resp.credentials.access_key_id #=> String
2116
+ # resp.credentials.secret_access_key #=> String
2117
+ # resp.credentials.session_token #=> String
2118
+ # resp.credentials.expiration #=> Time
2119
+ # resp.federated_user.federated_user_id #=> String
2120
+ # resp.federated_user.arn #=> String
2121
+ # resp.packed_policy_size #=> Integer
2122
+ #
2123
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationToken AWS API Documentation
2124
+ #
2125
+ # @overload get_federation_token(params = {})
2126
+ # @param [Hash] params ({})
2127
+ def get_federation_token(params = {}, options = {})
2128
+ req = build_request(:get_federation_token, params)
2129
+ req.send_request(options)
2130
+ end
2131
+
2132
+ # Returns a set of temporary credentials for an Amazon Web Services
2133
+ # account or IAM user. The credentials consist of an access key ID, a
2134
+ # secret access key, and a security token. Typically, you use
2135
+ # `GetSessionToken` if you want to use MFA to protect programmatic calls
2136
+ # to specific Amazon Web Services API operations like Amazon EC2
2137
+ # `StopInstances`. MFA-enabled IAM users would need to call
2138
+ # `GetSessionToken` and submit an MFA code that is associated with their
2139
+ # MFA device. Using the temporary security credentials that are returned
2140
+ # from the call, IAM users can then make programmatic calls to API
2141
+ # operations that require MFA authentication. If you do not supply a
2142
+ # correct MFA code, then the API returns an access denied error. For a
2143
+ # comparison of `GetSessionToken` with the other API operations that
2144
+ # produce temporary credentials, see [Requesting Temporary Security
2145
+ # Credentials][1] and [Comparing the Amazon Web Services STS API
2146
+ # operations][2] in the *IAM User Guide*.
2147
+ #
2148
+ # **Session Duration**
2149
+ #
2150
+ # The `GetSessionToken` operation must be called by using the long-term
2151
+ # Amazon Web Services security credentials of the Amazon Web Services
2152
+ # account root user or an IAM user. Credentials that are created by IAM
2153
+ # users are valid for the duration that you specify. This duration can
2154
+ # range from 900 seconds (15 minutes) up to a maximum of 129,600 seconds
2155
+ # (36 hours), with a default of 43,200 seconds (12 hours). Credentials
2156
+ # based on account credentials can range from 900 seconds (15 minutes)
2157
+ # up to 3,600 seconds (1 hour), with a default of 1 hour.
2158
+ #
2159
+ # **Permissions**
2160
+ #
2161
+ # The temporary security credentials created by `GetSessionToken` can be
2162
+ # used to make API calls to any Amazon Web Services service with the
2163
+ # following exceptions:
2164
+ #
2165
+ # * You cannot call any IAM API operations unless MFA authentication
2166
+ # information is included in the request.
2167
+ #
2168
+ # * You cannot call any STS API *except* `AssumeRole` or
2169
+ # `GetCallerIdentity`.
2170
+ #
2171
+ # <note markdown="1"> We recommend that you do not call `GetSessionToken` with Amazon Web
2172
+ # Services account root user credentials. Instead, follow our [best
2173
+ # practices][3] by creating one or more IAM users, giving them the
2174
+ # necessary permissions, and using IAM users for everyday interaction
2175
+ # with Amazon Web Services.
2176
+ #
2177
+ # </note>
2178
+ #
2179
+ # The credentials that are returned by `GetSessionToken` are based on
2180
+ # permissions associated with the user whose credentials were used to
2181
+ # call the operation. If `GetSessionToken` is called using Amazon Web
2182
+ # Services account root user credentials, the temporary credentials have
2183
+ # root user permissions. Similarly, if `GetSessionToken` is called using
2184
+ # the credentials of an IAM user, the temporary credentials have the
2185
+ # same permissions as the IAM user.
2186
+ #
2187
+ # For more information about using `GetSessionToken` to create temporary
2188
+ # credentials, go to [Temporary Credentials for Users in Untrusted
2189
+ # Environments][4] in the *IAM User Guide*.
2190
+ #
2191
+ #
2192
+ #
2193
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html
2194
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison
2195
+ # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#create-iam-users
2196
+ # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken
2197
+ #
2198
+ # @option params [Integer] :duration_seconds
2199
+ # The duration, in seconds, that the credentials should remain valid.
2200
+ # Acceptable durations for IAM user sessions range from 900 seconds (15
2201
+ # minutes) to 129,600 seconds (36 hours), with 43,200 seconds (12 hours)
2202
+ # as the default. Sessions for Amazon Web Services account owners are
2203
+ # restricted to a maximum of 3,600 seconds (one hour). If the duration
2204
+ # is longer than one hour, the session for Amazon Web Services account
2205
+ # owners defaults to one hour.
2206
+ #
2207
+ # @option params [String] :serial_number
2208
+ # The identification number of the MFA device that is associated with
2209
+ # the IAM user who is making the `GetSessionToken` call. Specify this
2210
+ # value if the IAM user has a policy that requires MFA authentication.
2211
+ # The value is either the serial number for a hardware device (such as
2212
+ # `GAHT12345678`) or an Amazon Resource Name (ARN) for a virtual device
2213
+ # (such as `arn:aws:iam::123456789012:mfa/user`). You can find the
2214
+ # device for an IAM user by going to the Amazon Web Services Management
2215
+ # Console and viewing the user's security credentials.
2216
+ #
2217
+ # The regex used to validate this parameter is a string of characters
2218
+ # consisting of upper- and lower-case alphanumeric characters with no
2219
+ # spaces. You can also include underscores or any of the following
2220
+ # characters: =,.@:/-
2221
+ #
2222
+ # @option params [String] :token_code
2223
+ # The value provided by the MFA device, if MFA is required. If any
2224
+ # policy requires the IAM user to submit an MFA code, specify this
2225
+ # value. If MFA authentication is required, the user must provide a code
2226
+ # when requesting a set of temporary security credentials. A user who
2227
+ # fails to provide the code receives an "access denied" response when
2228
+ # requesting resources that require MFA authentication.
2229
+ #
2230
+ # The format for this parameter, as described by its regex pattern, is a
2231
+ # sequence of six numeric digits.
2232
+ #
2233
+ # @return [Types::GetSessionTokenResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2234
+ #
2235
+ # * {Types::GetSessionTokenResponse#credentials #credentials} => Types::Credentials
2236
+ #
2237
+ #
2238
+ # @example Example: To get temporary credentials for an IAM user or an AWS account
2239
+ #
2240
+ # resp = client.get_session_token({
2241
+ # duration_seconds: 3600,
2242
+ # serial_number: "YourMFASerialNumber",
2243
+ # token_code: "123456",
2244
+ # })
2245
+ #
2246
+ # resp.to_h outputs the following:
2247
+ # {
2248
+ # credentials: {
2249
+ # access_key_id: "AKIAIOSFODNN7EXAMPLE",
2250
+ # expiration: Time.parse("2011-07-11T19:55:29.611Z"),
2251
+ # secret_access_key: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY",
2252
+ # session_token: "AQoEXAMPLEH4aoAH0gNCAPyJxz4BlCFFxWNE1OPTgk5TthT+FvwqnKwRcOIfrRh3c/LTo6UDdyJwOOvEVPvLXCrrrUtdnniCEXAMPLE/IvU1dYUg2RVAJBanLiHb4IgRmpRV3zrkuWJOgQs8IZZaIv2BXIa2R4OlgkBN9bkUDNCJiBeb/AXlzBBko7b15fjrBs2+cTQtpZ3CYWFXG8C5zqx37wnOE49mRl/+OtkIKGO7fAE",
2253
+ # },
2254
+ # }
2255
+ #
2256
+ # @example Request syntax with placeholder values
2257
+ #
2258
+ # resp = client.get_session_token({
2259
+ # duration_seconds: 1,
2260
+ # serial_number: "serialNumberType",
2261
+ # token_code: "tokenCodeType",
2262
+ # })
2263
+ #
2264
+ # @example Response structure
2265
+ #
2266
+ # resp.credentials.access_key_id #=> String
2267
+ # resp.credentials.secret_access_key #=> String
2268
+ # resp.credentials.session_token #=> String
2269
+ # resp.credentials.expiration #=> Time
2270
+ #
2271
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionToken AWS API Documentation
2272
+ #
2273
+ # @overload get_session_token(params = {})
2274
+ # @param [Hash] params ({})
2275
+ def get_session_token(params = {}, options = {})
2276
+ req = build_request(:get_session_token, params)
2277
+ req.send_request(options)
2278
+ end
2279
+
2280
+ # @!endgroup
2281
+
2282
+ # @param params ({})
2283
+ # @api private
2284
+ def build_request(operation_name, params = {})
2285
+ handlers = @handlers.for(operation_name)
2286
+ context = Seahorse::Client::RequestContext.new(
2287
+ operation_name: operation_name,
2288
+ operation: config.api.operation(operation_name),
2289
+ client: self,
2290
+ params: params,
2291
+ config: config)
2292
+ context[:gem_name] = 'aws-sdk-core'
2293
+ context[:gem_version] = '3.129.1'
2294
+ Seahorse::Client::Request.new(handlers, context)
2295
+ end
2296
+
2297
+ # @api private
2298
+ # @deprecated
2299
+ def waiter_names
2300
+ []
2301
+ end
2302
+
2303
+ class << self
2304
+
2305
+ # @api private
2306
+ attr_reader :identifier
2307
+
2308
+ # @api private
2309
+ def errors_module
2310
+ Errors
2311
+ end
2312
+
2313
+ end
2314
+ end
2315
+ end