aws-sdk-core 3.0.0 → 3.129.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (209) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +1287 -0
  3. data/LICENSE.txt +202 -0
  4. data/VERSION +1 -1
  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 +55 -10
  24. data/lib/aws-sdk-core/credential_provider.rb +1 -30
  25. data/lib/aws-sdk-core/credential_provider_chain.rb +111 -33
  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 +210 -12
  33. data/lib/aws-sdk-core/event_emitter.rb +64 -0
  34. data/lib/aws-sdk-core/ini_parser.rb +2 -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 +21 -1
  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 +10 -0
  42. data/lib/aws-sdk-core/json.rb +11 -28
  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 +38 -13
  46. data/lib/aws-sdk-core/log/param_formatter.rb +2 -0
  47. data/lib/aws-sdk-core/pageable_response.rb +111 -47
  48. data/lib/aws-sdk-core/pager.rb +5 -0
  49. data/lib/aws-sdk-core/param_converter.rb +2 -0
  50. data/lib/aws-sdk-core/param_validator.rb +99 -22
  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 +26 -7
  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 +2 -0
  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 +2 -0
  67. data/lib/aws-sdk-core/plugins/invocation_id.rb +35 -0
  68. data/lib/aws-sdk-core/plugins/jsonvalue_converter.rb +2 -0
  69. data/lib/aws-sdk-core/plugins/logging.rb +2 -0
  70. data/lib/aws-sdk-core/plugins/param_converter.rb +2 -0
  71. data/lib/aws-sdk-core/plugins/param_validator.rb +2 -0
  72. data/lib/aws-sdk-core/plugins/protocols/api_gateway.rb +29 -0
  73. data/lib/aws-sdk-core/plugins/protocols/ec2.rb +2 -0
  74. data/lib/aws-sdk-core/plugins/protocols/json_rpc.rb +2 -0
  75. data/lib/aws-sdk-core/plugins/protocols/query.rb +2 -0
  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 +76 -16
  80. data/lib/aws-sdk-core/plugins/response_paging.rb +3 -1
  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 +334 -78
  86. data/lib/aws-sdk-core/plugins/signature_v2.rb +2 -0
  87. data/lib/aws-sdk-core/plugins/signature_v4.rb +33 -28
  88. data/lib/aws-sdk-core/plugins/stub_responses.rb +31 -7
  89. data/lib/aws-sdk-core/plugins/transfer_encoding.rb +53 -0
  90. data/lib/aws-sdk-core/plugins/user_agent.rb +9 -5
  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 +8 -1
  94. data/lib/aws-sdk-core/query/param.rb +2 -0
  95. data/lib/aws-sdk-core/query/param_builder.rb +11 -3
  96. data/lib/aws-sdk-core/query/param_list.rb +2 -0
  97. data/lib/aws-sdk-core/query.rb +2 -0
  98. data/lib/aws-sdk-core/refreshing_credentials.rb +16 -3
  99. data/lib/aws-sdk-core/resources/collection.rb +7 -5
  100. data/lib/aws-sdk-core/rest/handler.rb +2 -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 +30 -6
  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 +8 -3
  108. data/lib/aws-sdk-core/rest/response/parser.rb +7 -1
  109. data/lib/aws-sdk-core/rest/response/status_code.rb +2 -0
  110. data/lib/aws-sdk-core/rest.rb +2 -0
  111. data/lib/aws-sdk-core/shared_config.rb +204 -68
  112. data/lib/aws-sdk-core/shared_credentials.rb +9 -1
  113. data/lib/aws-sdk-core/sso_credentials.rb +136 -0
  114. data/lib/aws-sdk-core/structure.rb +18 -3
  115. data/lib/aws-sdk-core/stubbing/data_applicator.rb +2 -0
  116. data/lib/aws-sdk-core/stubbing/empty_stub.rb +6 -1
  117. data/lib/aws-sdk-core/stubbing/protocols/api_gateway.rb +10 -0
  118. data/lib/aws-sdk-core/stubbing/protocols/ec2.rb +2 -0
  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 +15 -4
  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 +34 -1
  128. data/lib/aws-sdk-core/waiters/errors.rb +2 -0
  129. data/lib/aws-sdk-core/waiters/poller.rb +2 -0
  130. data/lib/aws-sdk-core/waiters/waiter.rb +4 -2
  131. data/lib/aws-sdk-core/waiters.rb +2 -0
  132. data/lib/aws-sdk-core/xml/builder.rb +14 -6
  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 +29 -4
  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 +3 -1
  141. data/lib/aws-sdk-core/xml/parser/engines/rexml.rb +4 -1
  142. data/lib/aws-sdk-core/xml/parser/frame.rb +30 -5
  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 +7 -0
  146. data/lib/aws-sdk-core/xml.rb +2 -0
  147. data/lib/aws-sdk-core.rb +39 -5
  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 +1474 -598
  156. data/lib/aws-sdk-sts/client_api.rb +81 -1
  157. data/lib/aws-sdk-sts/customizations.rb +4 -0
  158. data/lib/aws-sdk-sts/errors.rb +153 -1
  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 +4 -1
  162. data/lib/aws-sdk-sts/types.rb +1005 -251
  163. data/lib/aws-sdk-sts.rb +16 -6
  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 +7 -2
  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 +6 -2
  181. data/lib/seahorse/client/logging/handler.rb +2 -0
  182. data/lib/seahorse/client/managed_file.rb +2 -0
  183. data/lib/seahorse/client/net_http/connection_pool.rb +43 -27
  184. data/lib/seahorse/client/net_http/handler.rb +27 -7
  185. data/lib/seahorse/client/net_http/patches.rb +17 -79
  186. data/lib/seahorse/client/networking_error.rb +30 -0
  187. data/lib/seahorse/client/plugin.rb +10 -7
  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 +4 -2
  191. data/lib/seahorse/client/plugins/h2.rb +69 -0
  192. data/lib/seahorse/client/plugins/logging.rb +2 -0
  193. data/lib/seahorse/client/plugins/net_http.rb +39 -3
  194. data/lib/seahorse/client/plugins/operation_methods.rb +2 -0
  195. data/lib/seahorse/client/plugins/raise_response_errors.rb +2 -0
  196. data/lib/seahorse/client/plugins/request_callback.rb +110 -0
  197. data/lib/seahorse/client/plugins/response_target.rb +26 -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 +39 -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 +53 -0
  205. data/lib/seahorse/util.rb +9 -2
  206. data/lib/seahorse/version.rb +2 -0
  207. data/lib/seahorse.rb +13 -0
  208. metadata +99 -12
  209. data/lib/aws-sdk-core/version.rb +0 -3
@@ -0,0 +1,190 @@
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
+ module Aws::SSO
11
+ # @api private
12
+ module ClientApi
13
+
14
+ include Seahorse::Model
15
+
16
+ AccessKeyType = Shapes::StringShape.new(name: 'AccessKeyType')
17
+ AccessTokenType = Shapes::StringShape.new(name: 'AccessTokenType')
18
+ AccountIdType = Shapes::StringShape.new(name: 'AccountIdType')
19
+ AccountInfo = Shapes::StructureShape.new(name: 'AccountInfo')
20
+ AccountListType = Shapes::ListShape.new(name: 'AccountListType')
21
+ AccountNameType = Shapes::StringShape.new(name: 'AccountNameType')
22
+ EmailAddressType = Shapes::StringShape.new(name: 'EmailAddressType')
23
+ ErrorDescription = Shapes::StringShape.new(name: 'ErrorDescription')
24
+ ExpirationTimestampType = Shapes::IntegerShape.new(name: 'ExpirationTimestampType')
25
+ GetRoleCredentialsRequest = Shapes::StructureShape.new(name: 'GetRoleCredentialsRequest')
26
+ GetRoleCredentialsResponse = Shapes::StructureShape.new(name: 'GetRoleCredentialsResponse')
27
+ InvalidRequestException = Shapes::StructureShape.new(name: 'InvalidRequestException')
28
+ ListAccountRolesRequest = Shapes::StructureShape.new(name: 'ListAccountRolesRequest')
29
+ ListAccountRolesResponse = Shapes::StructureShape.new(name: 'ListAccountRolesResponse')
30
+ ListAccountsRequest = Shapes::StructureShape.new(name: 'ListAccountsRequest')
31
+ ListAccountsResponse = Shapes::StructureShape.new(name: 'ListAccountsResponse')
32
+ LogoutRequest = Shapes::StructureShape.new(name: 'LogoutRequest')
33
+ MaxResultType = Shapes::IntegerShape.new(name: 'MaxResultType')
34
+ NextTokenType = Shapes::StringShape.new(name: 'NextTokenType')
35
+ ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException')
36
+ RoleCredentials = Shapes::StructureShape.new(name: 'RoleCredentials')
37
+ RoleInfo = Shapes::StructureShape.new(name: 'RoleInfo')
38
+ RoleListType = Shapes::ListShape.new(name: 'RoleListType')
39
+ RoleNameType = Shapes::StringShape.new(name: 'RoleNameType')
40
+ SecretAccessKeyType = Shapes::StringShape.new(name: 'SecretAccessKeyType')
41
+ SessionTokenType = Shapes::StringShape.new(name: 'SessionTokenType')
42
+ TooManyRequestsException = Shapes::StructureShape.new(name: 'TooManyRequestsException')
43
+ UnauthorizedException = Shapes::StructureShape.new(name: 'UnauthorizedException')
44
+
45
+ AccountInfo.add_member(:account_id, Shapes::ShapeRef.new(shape: AccountIdType, location_name: "accountId"))
46
+ AccountInfo.add_member(:account_name, Shapes::ShapeRef.new(shape: AccountNameType, location_name: "accountName"))
47
+ AccountInfo.add_member(:email_address, Shapes::ShapeRef.new(shape: EmailAddressType, location_name: "emailAddress"))
48
+ AccountInfo.struct_class = Types::AccountInfo
49
+
50
+ AccountListType.member = Shapes::ShapeRef.new(shape: AccountInfo)
51
+
52
+ GetRoleCredentialsRequest.add_member(:role_name, Shapes::ShapeRef.new(shape: RoleNameType, required: true, location: "querystring", location_name: "role_name"))
53
+ GetRoleCredentialsRequest.add_member(:account_id, Shapes::ShapeRef.new(shape: AccountIdType, required: true, location: "querystring", location_name: "account_id"))
54
+ GetRoleCredentialsRequest.add_member(:access_token, Shapes::ShapeRef.new(shape: AccessTokenType, required: true, location: "header", location_name: "x-amz-sso_bearer_token"))
55
+ GetRoleCredentialsRequest.struct_class = Types::GetRoleCredentialsRequest
56
+
57
+ GetRoleCredentialsResponse.add_member(:role_credentials, Shapes::ShapeRef.new(shape: RoleCredentials, location_name: "roleCredentials"))
58
+ GetRoleCredentialsResponse.struct_class = Types::GetRoleCredentialsResponse
59
+
60
+ InvalidRequestException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "message"))
61
+ InvalidRequestException.struct_class = Types::InvalidRequestException
62
+
63
+ ListAccountRolesRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: NextTokenType, location: "querystring", location_name: "next_token"))
64
+ ListAccountRolesRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: MaxResultType, location: "querystring", location_name: "max_result"))
65
+ ListAccountRolesRequest.add_member(:access_token, Shapes::ShapeRef.new(shape: AccessTokenType, required: true, location: "header", location_name: "x-amz-sso_bearer_token"))
66
+ ListAccountRolesRequest.add_member(:account_id, Shapes::ShapeRef.new(shape: AccountIdType, required: true, location: "querystring", location_name: "account_id"))
67
+ ListAccountRolesRequest.struct_class = Types::ListAccountRolesRequest
68
+
69
+ ListAccountRolesResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: NextTokenType, location_name: "nextToken"))
70
+ ListAccountRolesResponse.add_member(:role_list, Shapes::ShapeRef.new(shape: RoleListType, location_name: "roleList"))
71
+ ListAccountRolesResponse.struct_class = Types::ListAccountRolesResponse
72
+
73
+ ListAccountsRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: NextTokenType, location: "querystring", location_name: "next_token"))
74
+ ListAccountsRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: MaxResultType, location: "querystring", location_name: "max_result"))
75
+ ListAccountsRequest.add_member(:access_token, Shapes::ShapeRef.new(shape: AccessTokenType, required: true, location: "header", location_name: "x-amz-sso_bearer_token"))
76
+ ListAccountsRequest.struct_class = Types::ListAccountsRequest
77
+
78
+ ListAccountsResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: NextTokenType, location_name: "nextToken"))
79
+ ListAccountsResponse.add_member(:account_list, Shapes::ShapeRef.new(shape: AccountListType, location_name: "accountList"))
80
+ ListAccountsResponse.struct_class = Types::ListAccountsResponse
81
+
82
+ LogoutRequest.add_member(:access_token, Shapes::ShapeRef.new(shape: AccessTokenType, required: true, location: "header", location_name: "x-amz-sso_bearer_token"))
83
+ LogoutRequest.struct_class = Types::LogoutRequest
84
+
85
+ ResourceNotFoundException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "message"))
86
+ ResourceNotFoundException.struct_class = Types::ResourceNotFoundException
87
+
88
+ RoleCredentials.add_member(:access_key_id, Shapes::ShapeRef.new(shape: AccessKeyType, location_name: "accessKeyId"))
89
+ RoleCredentials.add_member(:secret_access_key, Shapes::ShapeRef.new(shape: SecretAccessKeyType, location_name: "secretAccessKey"))
90
+ RoleCredentials.add_member(:session_token, Shapes::ShapeRef.new(shape: SessionTokenType, location_name: "sessionToken"))
91
+ RoleCredentials.add_member(:expiration, Shapes::ShapeRef.new(shape: ExpirationTimestampType, location_name: "expiration"))
92
+ RoleCredentials.struct_class = Types::RoleCredentials
93
+
94
+ RoleInfo.add_member(:role_name, Shapes::ShapeRef.new(shape: RoleNameType, location_name: "roleName"))
95
+ RoleInfo.add_member(:account_id, Shapes::ShapeRef.new(shape: AccountIdType, location_name: "accountId"))
96
+ RoleInfo.struct_class = Types::RoleInfo
97
+
98
+ RoleListType.member = Shapes::ShapeRef.new(shape: RoleInfo)
99
+
100
+ TooManyRequestsException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "message"))
101
+ TooManyRequestsException.struct_class = Types::TooManyRequestsException
102
+
103
+ UnauthorizedException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "message"))
104
+ UnauthorizedException.struct_class = Types::UnauthorizedException
105
+
106
+
107
+ # @api private
108
+ API = Seahorse::Model::Api.new.tap do |api|
109
+
110
+ api.version = "2019-06-10"
111
+
112
+ api.metadata = {
113
+ "apiVersion" => "2019-06-10",
114
+ "endpointPrefix" => "portal.sso",
115
+ "jsonVersion" => "1.1",
116
+ "protocol" => "rest-json",
117
+ "serviceAbbreviation" => "SSO",
118
+ "serviceFullName" => "AWS Single Sign-On",
119
+ "serviceId" => "SSO",
120
+ "signatureVersion" => "v4",
121
+ "signingName" => "awsssoportal",
122
+ "uid" => "sso-2019-06-10",
123
+ }
124
+
125
+ api.add_operation(:get_role_credentials, Seahorse::Model::Operation.new.tap do |o|
126
+ o.name = "GetRoleCredentials"
127
+ o.http_method = "GET"
128
+ o.http_request_uri = "/federation/credentials"
129
+ o['authtype'] = "none"
130
+ o.input = Shapes::ShapeRef.new(shape: GetRoleCredentialsRequest)
131
+ o.output = Shapes::ShapeRef.new(shape: GetRoleCredentialsResponse)
132
+ o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
133
+ o.errors << Shapes::ShapeRef.new(shape: UnauthorizedException)
134
+ o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
135
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
136
+ end)
137
+
138
+ api.add_operation(:list_account_roles, Seahorse::Model::Operation.new.tap do |o|
139
+ o.name = "ListAccountRoles"
140
+ o.http_method = "GET"
141
+ o.http_request_uri = "/assignment/roles"
142
+ o['authtype'] = "none"
143
+ o.input = Shapes::ShapeRef.new(shape: ListAccountRolesRequest)
144
+ o.output = Shapes::ShapeRef.new(shape: ListAccountRolesResponse)
145
+ o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
146
+ o.errors << Shapes::ShapeRef.new(shape: UnauthorizedException)
147
+ o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
148
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
149
+ o[:pager] = Aws::Pager.new(
150
+ limit_key: "max_results",
151
+ tokens: {
152
+ "next_token" => "next_token"
153
+ }
154
+ )
155
+ end)
156
+
157
+ api.add_operation(:list_accounts, Seahorse::Model::Operation.new.tap do |o|
158
+ o.name = "ListAccounts"
159
+ o.http_method = "GET"
160
+ o.http_request_uri = "/assignment/accounts"
161
+ o['authtype'] = "none"
162
+ o.input = Shapes::ShapeRef.new(shape: ListAccountsRequest)
163
+ o.output = Shapes::ShapeRef.new(shape: ListAccountsResponse)
164
+ o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
165
+ o.errors << Shapes::ShapeRef.new(shape: UnauthorizedException)
166
+ o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
167
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
168
+ o[:pager] = Aws::Pager.new(
169
+ limit_key: "max_results",
170
+ tokens: {
171
+ "next_token" => "next_token"
172
+ }
173
+ )
174
+ end)
175
+
176
+ api.add_operation(:logout, Seahorse::Model::Operation.new.tap do |o|
177
+ o.name = "Logout"
178
+ o.http_method = "POST"
179
+ o.http_request_uri = "/logout"
180
+ o['authtype'] = "none"
181
+ o.input = Shapes::ShapeRef.new(shape: LogoutRequest)
182
+ o.output = Shapes::ShapeRef.new(shape: Shapes::StructureShape.new(struct_class: Aws::EmptyStructure))
183
+ o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
184
+ o.errors << Shapes::ShapeRef.new(shape: UnauthorizedException)
185
+ o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
186
+ end)
187
+ end
188
+
189
+ end
190
+ end
@@ -0,0 +1 @@
1
+ # frozen_string_literal: true
@@ -0,0 +1,102 @@
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
+ module Aws::SSO
11
+
12
+ # When SSO returns an error response, the Ruby SDK constructs and raises an error.
13
+ # These errors all extend Aws::SSO::Errors::ServiceError < {Aws::Errors::ServiceError}
14
+ #
15
+ # You can rescue all SSO errors using ServiceError:
16
+ #
17
+ # begin
18
+ # # do stuff
19
+ # rescue Aws::SSO::Errors::ServiceError
20
+ # # rescues all SSO API errors
21
+ # end
22
+ #
23
+ #
24
+ # ## Request Context
25
+ # ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns
26
+ # information about the request that generated the error.
27
+ # See {Seahorse::Client::RequestContext} for more information.
28
+ #
29
+ # ## Error Classes
30
+ # * {InvalidRequestException}
31
+ # * {ResourceNotFoundException}
32
+ # * {TooManyRequestsException}
33
+ # * {UnauthorizedException}
34
+ #
35
+ # Additionally, error classes are dynamically generated for service errors based on the error code
36
+ # if they are not defined above.
37
+ module Errors
38
+
39
+ extend Aws::Errors::DynamicErrors
40
+
41
+ class InvalidRequestException < ServiceError
42
+
43
+ # @param [Seahorse::Client::RequestContext] context
44
+ # @param [String] message
45
+ # @param [Aws::SSO::Types::InvalidRequestException] data
46
+ def initialize(context, message, data = Aws::EmptyStructure.new)
47
+ super(context, message, data)
48
+ end
49
+
50
+ # @return [String]
51
+ def message
52
+ @message || @data[:message]
53
+ end
54
+ end
55
+
56
+ class ResourceNotFoundException < ServiceError
57
+
58
+ # @param [Seahorse::Client::RequestContext] context
59
+ # @param [String] message
60
+ # @param [Aws::SSO::Types::ResourceNotFoundException] data
61
+ def initialize(context, message, data = Aws::EmptyStructure.new)
62
+ super(context, message, data)
63
+ end
64
+
65
+ # @return [String]
66
+ def message
67
+ @message || @data[:message]
68
+ end
69
+ end
70
+
71
+ class TooManyRequestsException < ServiceError
72
+
73
+ # @param [Seahorse::Client::RequestContext] context
74
+ # @param [String] message
75
+ # @param [Aws::SSO::Types::TooManyRequestsException] data
76
+ def initialize(context, message, data = Aws::EmptyStructure.new)
77
+ super(context, message, data)
78
+ end
79
+
80
+ # @return [String]
81
+ def message
82
+ @message || @data[:message]
83
+ end
84
+ end
85
+
86
+ class UnauthorizedException < ServiceError
87
+
88
+ # @param [Seahorse::Client::RequestContext] context
89
+ # @param [String] message
90
+ # @param [Aws::SSO::Types::UnauthorizedException] data
91
+ def initialize(context, message, data = Aws::EmptyStructure.new)
92
+ super(context, message, data)
93
+ end
94
+
95
+ # @return [String]
96
+ def message
97
+ @message || @data[:message]
98
+ end
99
+ end
100
+
101
+ end
102
+ end
@@ -0,0 +1,26 @@
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
+ module Aws::SSO
11
+
12
+ class Resource
13
+
14
+ # @param options ({})
15
+ # @option options [Client] :client
16
+ def initialize(options = {})
17
+ @client = options[:client] || Client.new(options)
18
+ end
19
+
20
+ # @return [Client]
21
+ def client
22
+ @client
23
+ end
24
+
25
+ end
26
+ end
@@ -0,0 +1,352 @@
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
+ module Aws::SSO
11
+ module Types
12
+
13
+ # Provides information about your AWS account.
14
+ #
15
+ # @!attribute [rw] account_id
16
+ # The identifier of the AWS account that is assigned to the user.
17
+ # @return [String]
18
+ #
19
+ # @!attribute [rw] account_name
20
+ # The display name of the AWS account that is assigned to the user.
21
+ # @return [String]
22
+ #
23
+ # @!attribute [rw] email_address
24
+ # The email address of the AWS account that is assigned to the user.
25
+ # @return [String]
26
+ #
27
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/AccountInfo AWS API Documentation
28
+ #
29
+ class AccountInfo < Struct.new(
30
+ :account_id,
31
+ :account_name,
32
+ :email_address)
33
+ SENSITIVE = []
34
+ include Aws::Structure
35
+ end
36
+
37
+ # @note When making an API call, you may pass GetRoleCredentialsRequest
38
+ # data as a hash:
39
+ #
40
+ # {
41
+ # role_name: "RoleNameType", # required
42
+ # account_id: "AccountIdType", # required
43
+ # access_token: "AccessTokenType", # required
44
+ # }
45
+ #
46
+ # @!attribute [rw] role_name
47
+ # The friendly name of the role that is assigned to the user.
48
+ # @return [String]
49
+ #
50
+ # @!attribute [rw] account_id
51
+ # The identifier for the AWS account that is assigned to the user.
52
+ # @return [String]
53
+ #
54
+ # @!attribute [rw] access_token
55
+ # The token issued by the `CreateToken` API call. For more
56
+ # information, see [CreateToken][1] in the *AWS SSO OIDC API Reference
57
+ # Guide*.
58
+ #
59
+ #
60
+ #
61
+ # [1]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html
62
+ # @return [String]
63
+ #
64
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/GetRoleCredentialsRequest AWS API Documentation
65
+ #
66
+ class GetRoleCredentialsRequest < Struct.new(
67
+ :role_name,
68
+ :account_id,
69
+ :access_token)
70
+ SENSITIVE = [:access_token]
71
+ include Aws::Structure
72
+ end
73
+
74
+ # @!attribute [rw] role_credentials
75
+ # The credentials for the role that is assigned to the user.
76
+ # @return [Types::RoleCredentials]
77
+ #
78
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/GetRoleCredentialsResponse AWS API Documentation
79
+ #
80
+ class GetRoleCredentialsResponse < Struct.new(
81
+ :role_credentials)
82
+ SENSITIVE = []
83
+ include Aws::Structure
84
+ end
85
+
86
+ # Indicates that a problem occurred with the input to the request. For
87
+ # example, a required parameter might be missing or out of range.
88
+ #
89
+ # @!attribute [rw] message
90
+ # @return [String]
91
+ #
92
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/InvalidRequestException AWS API Documentation
93
+ #
94
+ class InvalidRequestException < Struct.new(
95
+ :message)
96
+ SENSITIVE = []
97
+ include Aws::Structure
98
+ end
99
+
100
+ # @note When making an API call, you may pass ListAccountRolesRequest
101
+ # data as a hash:
102
+ #
103
+ # {
104
+ # next_token: "NextTokenType",
105
+ # max_results: 1,
106
+ # access_token: "AccessTokenType", # required
107
+ # account_id: "AccountIdType", # required
108
+ # }
109
+ #
110
+ # @!attribute [rw] next_token
111
+ # The page token from the previous response output when you request
112
+ # subsequent pages.
113
+ # @return [String]
114
+ #
115
+ # @!attribute [rw] max_results
116
+ # The number of items that clients can request per page.
117
+ # @return [Integer]
118
+ #
119
+ # @!attribute [rw] access_token
120
+ # The token issued by the `CreateToken` API call. For more
121
+ # information, see [CreateToken][1] in the *AWS SSO OIDC API Reference
122
+ # Guide*.
123
+ #
124
+ #
125
+ #
126
+ # [1]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html
127
+ # @return [String]
128
+ #
129
+ # @!attribute [rw] account_id
130
+ # The identifier for the AWS account that is assigned to the user.
131
+ # @return [String]
132
+ #
133
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccountRolesRequest AWS API Documentation
134
+ #
135
+ class ListAccountRolesRequest < Struct.new(
136
+ :next_token,
137
+ :max_results,
138
+ :access_token,
139
+ :account_id)
140
+ SENSITIVE = [:access_token]
141
+ include Aws::Structure
142
+ end
143
+
144
+ # @!attribute [rw] next_token
145
+ # The page token client that is used to retrieve the list of accounts.
146
+ # @return [String]
147
+ #
148
+ # @!attribute [rw] role_list
149
+ # A paginated response with the list of roles and the next token if
150
+ # more results are available.
151
+ # @return [Array<Types::RoleInfo>]
152
+ #
153
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccountRolesResponse AWS API Documentation
154
+ #
155
+ class ListAccountRolesResponse < Struct.new(
156
+ :next_token,
157
+ :role_list)
158
+ SENSITIVE = []
159
+ include Aws::Structure
160
+ end
161
+
162
+ # @note When making an API call, you may pass ListAccountsRequest
163
+ # data as a hash:
164
+ #
165
+ # {
166
+ # next_token: "NextTokenType",
167
+ # max_results: 1,
168
+ # access_token: "AccessTokenType", # required
169
+ # }
170
+ #
171
+ # @!attribute [rw] next_token
172
+ # (Optional) When requesting subsequent pages, this is the page token
173
+ # from the previous response output.
174
+ # @return [String]
175
+ #
176
+ # @!attribute [rw] max_results
177
+ # This is the number of items clients can request per page.
178
+ # @return [Integer]
179
+ #
180
+ # @!attribute [rw] access_token
181
+ # The token issued by the `CreateToken` API call. For more
182
+ # information, see [CreateToken][1] in the *AWS SSO OIDC API Reference
183
+ # Guide*.
184
+ #
185
+ #
186
+ #
187
+ # [1]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html
188
+ # @return [String]
189
+ #
190
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccountsRequest AWS API Documentation
191
+ #
192
+ class ListAccountsRequest < Struct.new(
193
+ :next_token,
194
+ :max_results,
195
+ :access_token)
196
+ SENSITIVE = [:access_token]
197
+ include Aws::Structure
198
+ end
199
+
200
+ # @!attribute [rw] next_token
201
+ # The page token client that is used to retrieve the list of accounts.
202
+ # @return [String]
203
+ #
204
+ # @!attribute [rw] account_list
205
+ # A paginated response with the list of account information and the
206
+ # next token if more results are available.
207
+ # @return [Array<Types::AccountInfo>]
208
+ #
209
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccountsResponse AWS API Documentation
210
+ #
211
+ class ListAccountsResponse < Struct.new(
212
+ :next_token,
213
+ :account_list)
214
+ SENSITIVE = []
215
+ include Aws::Structure
216
+ end
217
+
218
+ # @note When making an API call, you may pass LogoutRequest
219
+ # data as a hash:
220
+ #
221
+ # {
222
+ # access_token: "AccessTokenType", # required
223
+ # }
224
+ #
225
+ # @!attribute [rw] access_token
226
+ # The token issued by the `CreateToken` API call. For more
227
+ # information, see [CreateToken][1] in the *AWS SSO OIDC API Reference
228
+ # Guide*.
229
+ #
230
+ #
231
+ #
232
+ # [1]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html
233
+ # @return [String]
234
+ #
235
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/LogoutRequest AWS API Documentation
236
+ #
237
+ class LogoutRequest < Struct.new(
238
+ :access_token)
239
+ SENSITIVE = [:access_token]
240
+ include Aws::Structure
241
+ end
242
+
243
+ # The specified resource doesn't exist.
244
+ #
245
+ # @!attribute [rw] message
246
+ # @return [String]
247
+ #
248
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ResourceNotFoundException AWS API Documentation
249
+ #
250
+ class ResourceNotFoundException < Struct.new(
251
+ :message)
252
+ SENSITIVE = []
253
+ include Aws::Structure
254
+ end
255
+
256
+ # Provides information about the role credentials that are assigned to
257
+ # the user.
258
+ #
259
+ # @!attribute [rw] access_key_id
260
+ # The identifier used for the temporary security credentials. For more
261
+ # information, see [Using Temporary Security Credentials to Request
262
+ # Access to AWS Resources][1] in the *AWS IAM User Guide*.
263
+ #
264
+ #
265
+ #
266
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html
267
+ # @return [String]
268
+ #
269
+ # @!attribute [rw] secret_access_key
270
+ # The key that is used to sign the request. For more information, see
271
+ # [Using Temporary Security Credentials to Request Access to AWS
272
+ # Resources][1] in the *AWS IAM User Guide*.
273
+ #
274
+ #
275
+ #
276
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html
277
+ # @return [String]
278
+ #
279
+ # @!attribute [rw] session_token
280
+ # The token used for temporary credentials. For more information, see
281
+ # [Using Temporary Security Credentials to Request Access to AWS
282
+ # Resources][1] in the *AWS IAM User Guide*.
283
+ #
284
+ #
285
+ #
286
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html
287
+ # @return [String]
288
+ #
289
+ # @!attribute [rw] expiration
290
+ # The date on which temporary security credentials expire.
291
+ # @return [Integer]
292
+ #
293
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/RoleCredentials AWS API Documentation
294
+ #
295
+ class RoleCredentials < Struct.new(
296
+ :access_key_id,
297
+ :secret_access_key,
298
+ :session_token,
299
+ :expiration)
300
+ SENSITIVE = [:secret_access_key, :session_token]
301
+ include Aws::Structure
302
+ end
303
+
304
+ # Provides information about the role that is assigned to the user.
305
+ #
306
+ # @!attribute [rw] role_name
307
+ # The friendly name of the role that is assigned to the user.
308
+ # @return [String]
309
+ #
310
+ # @!attribute [rw] account_id
311
+ # The identifier of the AWS account assigned to the user.
312
+ # @return [String]
313
+ #
314
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/RoleInfo AWS API Documentation
315
+ #
316
+ class RoleInfo < Struct.new(
317
+ :role_name,
318
+ :account_id)
319
+ SENSITIVE = []
320
+ include Aws::Structure
321
+ end
322
+
323
+ # Indicates that the request is being made too frequently and is more
324
+ # than what the server can handle.
325
+ #
326
+ # @!attribute [rw] message
327
+ # @return [String]
328
+ #
329
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/TooManyRequestsException AWS API Documentation
330
+ #
331
+ class TooManyRequestsException < Struct.new(
332
+ :message)
333
+ SENSITIVE = []
334
+ include Aws::Structure
335
+ end
336
+
337
+ # Indicates that the request is not authorized. This can happen due to
338
+ # an invalid access token in the request.
339
+ #
340
+ # @!attribute [rw] message
341
+ # @return [String]
342
+ #
343
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/UnauthorizedException AWS API Documentation
344
+ #
345
+ class UnauthorizedException < Struct.new(
346
+ :message)
347
+ SENSITIVE = []
348
+ include Aws::Structure
349
+ end
350
+
351
+ end
352
+ end