aws-sdk-core 3.190.2 → 3.240.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +650 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-defaults.rb +4 -1
  5. data/lib/aws-sdk-core/arn.rb +1 -3
  6. data/lib/aws-sdk-core/assume_role_credentials.rb +21 -13
  7. data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +16 -9
  8. data/lib/aws-sdk-core/binary/decode_handler.rb +3 -9
  9. data/lib/aws-sdk-core/binary/encode_handler.rb +1 -1
  10. data/lib/aws-sdk-core/binary/event_builder.rb +34 -37
  11. data/lib/aws-sdk-core/binary/event_stream_decoder.rb +1 -0
  12. data/lib/aws-sdk-core/binary/event_stream_encoder.rb +4 -3
  13. data/lib/aws-sdk-core/cbor/decoder.rb +308 -0
  14. data/lib/aws-sdk-core/cbor/encoder.rb +243 -0
  15. data/lib/aws-sdk-core/cbor.rb +53 -0
  16. data/lib/aws-sdk-core/client_side_monitoring.rb +9 -0
  17. data/lib/aws-sdk-core/client_stubs.rb +39 -58
  18. data/lib/aws-sdk-core/credential_provider.rb +5 -1
  19. data/lib/aws-sdk-core/credential_provider_chain.rb +101 -25
  20. data/lib/aws-sdk-core/credentials.rb +19 -6
  21. data/lib/aws-sdk-core/ec2_metadata.rb +1 -1
  22. data/lib/aws-sdk-core/ecs_credentials.rb +16 -14
  23. data/lib/aws-sdk-core/endpoints/endpoint.rb +3 -1
  24. data/lib/aws-sdk-core/endpoints/matchers.rb +8 -10
  25. data/lib/aws-sdk-core/endpoints.rb +101 -21
  26. data/lib/aws-sdk-core/error_handler.rb +46 -0
  27. data/lib/aws-sdk-core/errors.rb +16 -4
  28. data/lib/aws-sdk-core/event_emitter.rb +1 -17
  29. data/lib/aws-sdk-core/instance_profile_credentials.rb +148 -157
  30. data/lib/aws-sdk-core/json/builder.rb +8 -1
  31. data/lib/aws-sdk-core/json/error_handler.rb +29 -13
  32. data/lib/aws-sdk-core/json/handler.rb +6 -6
  33. data/lib/aws-sdk-core/json/json_engine.rb +3 -1
  34. data/lib/aws-sdk-core/json/oj_engine.rb +7 -1
  35. data/lib/aws-sdk-core/json/parser.rb +6 -1
  36. data/lib/aws-sdk-core/json.rb +43 -14
  37. data/lib/aws-sdk-core/log/param_filter.rb +2 -2
  38. data/lib/aws-sdk-core/log/param_formatter.rb +7 -3
  39. data/lib/aws-sdk-core/log.rb +10 -0
  40. data/lib/aws-sdk-core/login_credentials.rb +229 -0
  41. data/lib/aws-sdk-core/lru_cache.rb +75 -0
  42. data/lib/aws-sdk-core/pageable_response.rb +1 -1
  43. data/lib/aws-sdk-core/param_validator.rb +7 -2
  44. data/lib/aws-sdk-core/plugins/bearer_authorization.rb +2 -0
  45. data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +347 -170
  46. data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +1 -1
  47. data/lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb +14 -2
  48. data/lib/aws-sdk-core/plugins/credentials_configuration.rb +78 -56
  49. data/lib/aws-sdk-core/plugins/endpoint_pattern.rb +40 -32
  50. data/lib/aws-sdk-core/plugins/global_configuration.rb +8 -9
  51. data/lib/aws-sdk-core/plugins/http_checksum.rb +2 -8
  52. data/lib/aws-sdk-core/plugins/invocation_id.rb +1 -11
  53. data/lib/aws-sdk-core/plugins/logging.rb +2 -0
  54. data/lib/aws-sdk-core/plugins/protocols/api_gateway.rb +3 -1
  55. data/lib/aws-sdk-core/plugins/protocols/ec2.rb +2 -24
  56. data/lib/aws-sdk-core/plugins/protocols/json_rpc.rb +6 -8
  57. data/lib/aws-sdk-core/plugins/protocols/query.rb +4 -2
  58. data/lib/aws-sdk-core/plugins/protocols/rest_json.rb +3 -15
  59. data/lib/aws-sdk-core/plugins/protocols/rest_xml.rb +3 -0
  60. data/lib/aws-sdk-core/plugins/protocols/rpc_v2.rb +17 -0
  61. data/lib/aws-sdk-core/plugins/regional_endpoint.rb +74 -25
  62. data/lib/aws-sdk-core/plugins/request_compression.rb +11 -2
  63. data/lib/aws-sdk-core/plugins/retry_errors.rb +12 -3
  64. data/lib/aws-sdk-core/plugins/sign.rb +42 -26
  65. data/lib/aws-sdk-core/plugins/signature_v2.rb +2 -1
  66. data/lib/aws-sdk-core/plugins/signature_v4.rb +2 -1
  67. data/lib/aws-sdk-core/plugins/stub_responses.rb +59 -9
  68. data/lib/aws-sdk-core/plugins/telemetry.rb +75 -0
  69. data/lib/aws-sdk-core/plugins/transfer_encoding.rb +16 -9
  70. data/lib/aws-sdk-core/plugins/user_agent.rb +103 -26
  71. data/lib/aws-sdk-core/plugins.rb +39 -0
  72. data/lib/aws-sdk-core/process_credentials.rb +48 -29
  73. data/lib/aws-sdk-core/query/ec2_handler.rb +27 -0
  74. data/lib/aws-sdk-core/query/ec2_param_builder.rb +5 -7
  75. data/lib/aws-sdk-core/query/handler.rb +4 -4
  76. data/lib/aws-sdk-core/query/param_builder.rb +2 -2
  77. data/lib/aws-sdk-core/query.rb +2 -1
  78. data/lib/aws-sdk-core/refreshing_credentials.rb +8 -11
  79. data/lib/aws-sdk-core/resources.rb +8 -0
  80. data/lib/aws-sdk-core/rest/content_type_handler.rb +60 -0
  81. data/lib/aws-sdk-core/rest/handler.rb +3 -4
  82. data/lib/aws-sdk-core/rest/request/body.rb +32 -5
  83. data/lib/aws-sdk-core/rest/request/endpoint.rb +24 -4
  84. data/lib/aws-sdk-core/rest/request/headers.rb +15 -7
  85. data/lib/aws-sdk-core/rest/request/querystring_builder.rb +23 -11
  86. data/lib/aws-sdk-core/rest/response/body.rb +15 -1
  87. data/lib/aws-sdk-core/rest/response/header_list_parser.rb +79 -0
  88. data/lib/aws-sdk-core/rest/response/headers.rb +8 -3
  89. data/lib/aws-sdk-core/rest.rb +1 -0
  90. data/lib/aws-sdk-core/rpc_v2/builder.rb +62 -0
  91. data/lib/aws-sdk-core/rpc_v2/cbor_engine.rb +18 -0
  92. data/lib/aws-sdk-core/rpc_v2/content_type_handler.rb +47 -0
  93. data/lib/aws-sdk-core/rpc_v2/error_handler.rb +95 -0
  94. data/lib/aws-sdk-core/rpc_v2/handler.rb +79 -0
  95. data/lib/aws-sdk-core/rpc_v2/parser.rb +98 -0
  96. data/lib/aws-sdk-core/rpc_v2.rb +69 -0
  97. data/lib/aws-sdk-core/shared_config.rb +108 -22
  98. data/lib/aws-sdk-core/shared_credentials.rb +1 -7
  99. data/lib/aws-sdk-core/sso_credentials.rb +5 -2
  100. data/lib/aws-sdk-core/static_token_provider.rb +1 -2
  101. data/lib/aws-sdk-core/stubbing/protocols/ec2.rb +12 -11
  102. data/lib/aws-sdk-core/stubbing/protocols/json.rb +11 -10
  103. data/lib/aws-sdk-core/stubbing/protocols/query.rb +7 -6
  104. data/lib/aws-sdk-core/stubbing/protocols/rest.rb +2 -1
  105. data/lib/aws-sdk-core/stubbing/protocols/rest_json.rb +9 -8
  106. data/lib/aws-sdk-core/stubbing/protocols/rest_xml.rb +6 -5
  107. data/lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb +39 -0
  108. data/lib/aws-sdk-core/stubbing.rb +22 -0
  109. data/lib/aws-sdk-core/telemetry/base.rb +177 -0
  110. data/lib/aws-sdk-core/telemetry/no_op.rb +70 -0
  111. data/lib/aws-sdk-core/telemetry/otel.rb +235 -0
  112. data/lib/aws-sdk-core/telemetry/span_kind.rb +22 -0
  113. data/lib/aws-sdk-core/telemetry/span_status.rb +59 -0
  114. data/lib/aws-sdk-core/telemetry.rb +78 -0
  115. data/lib/aws-sdk-core/token.rb +3 -3
  116. data/lib/aws-sdk-core/token_provider.rb +4 -0
  117. data/lib/aws-sdk-core/token_provider_chain.rb +2 -6
  118. data/lib/aws-sdk-core/util.rb +41 -1
  119. data/lib/aws-sdk-core/waiters/poller.rb +10 -5
  120. data/lib/aws-sdk-core/xml/builder.rb +17 -9
  121. data/lib/aws-sdk-core/xml/error_handler.rb +35 -43
  122. data/lib/aws-sdk-core/xml/parser/frame.rb +4 -20
  123. data/lib/aws-sdk-core/xml/parser/stack.rb +2 -0
  124. data/lib/aws-sdk-core/xml/parser.rb +2 -6
  125. data/lib/aws-sdk-core.rb +86 -107
  126. data/lib/aws-sdk-signin/client.rb +604 -0
  127. data/lib/aws-sdk-signin/client_api.rb +119 -0
  128. data/lib/aws-sdk-signin/customizations.rb +1 -0
  129. data/lib/aws-sdk-signin/endpoint_parameters.rb +69 -0
  130. data/lib/aws-sdk-signin/endpoint_provider.rb +59 -0
  131. data/lib/aws-sdk-signin/endpoints.rb +20 -0
  132. data/lib/aws-sdk-signin/errors.rb +122 -0
  133. data/lib/aws-sdk-signin/plugins/endpoints.rb +77 -0
  134. data/lib/aws-sdk-signin/resource.rb +26 -0
  135. data/lib/aws-sdk-signin/types.rb +299 -0
  136. data/lib/aws-sdk-signin.rb +63 -0
  137. data/lib/aws-sdk-sso/client.rb +189 -96
  138. data/lib/aws-sdk-sso/client_api.rb +7 -0
  139. data/lib/aws-sdk-sso/endpoint_parameters.rb +13 -10
  140. data/lib/aws-sdk-sso/endpoint_provider.rb +16 -20
  141. data/lib/aws-sdk-sso/endpoints.rb +2 -54
  142. data/lib/aws-sdk-sso/plugins/endpoints.rb +20 -20
  143. data/lib/aws-sdk-sso/types.rb +1 -0
  144. data/lib/aws-sdk-sso.rb +15 -11
  145. data/lib/aws-sdk-ssooidc/client.rb +293 -122
  146. data/lib/aws-sdk-ssooidc/client_api.rb +38 -0
  147. data/lib/aws-sdk-ssooidc/endpoint_parameters.rb +13 -10
  148. data/lib/aws-sdk-ssooidc/endpoint_provider.rb +14 -18
  149. data/lib/aws-sdk-ssooidc/endpoints.rb +2 -54
  150. data/lib/aws-sdk-ssooidc/errors.rb +31 -0
  151. data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +20 -20
  152. data/lib/aws-sdk-ssooidc/types.rb +142 -29
  153. data/lib/aws-sdk-ssooidc.rb +15 -11
  154. data/lib/aws-sdk-sts/client.rb +529 -156
  155. data/lib/aws-sdk-sts/client_api.rb +108 -8
  156. data/lib/aws-sdk-sts/customizations.rb +5 -2
  157. data/lib/aws-sdk-sts/endpoint_parameters.rb +15 -14
  158. data/lib/aws-sdk-sts/endpoint_provider.rb +50 -55
  159. data/lib/aws-sdk-sts/endpoints.rb +2 -118
  160. data/lib/aws-sdk-sts/errors.rb +79 -0
  161. data/lib/aws-sdk-sts/plugins/endpoints.rb +20 -28
  162. data/lib/aws-sdk-sts/presigner.rb +2 -6
  163. data/lib/aws-sdk-sts/types.rb +344 -32
  164. data/lib/aws-sdk-sts.rb +15 -11
  165. data/lib/seahorse/client/async_base.rb +4 -5
  166. data/lib/seahorse/client/async_response.rb +19 -0
  167. data/lib/seahorse/client/base.rb +18 -21
  168. data/lib/seahorse/client/h2/connection.rb +18 -28
  169. data/lib/seahorse/client/h2/handler.rb +19 -3
  170. data/lib/seahorse/client/handler.rb +1 -1
  171. data/lib/seahorse/client/http/response.rb +1 -1
  172. data/lib/seahorse/client/net_http/connection_pool.rb +15 -12
  173. data/lib/seahorse/client/net_http/handler.rb +21 -9
  174. data/lib/seahorse/client/networking_error.rb +1 -1
  175. data/lib/seahorse/client/plugin.rb +9 -0
  176. data/lib/seahorse/client/plugins/endpoint.rb +0 -1
  177. data/lib/seahorse/client/plugins/h2.rb +4 -4
  178. data/lib/seahorse/client/plugins/net_http.rb +57 -16
  179. data/lib/seahorse/client/request_context.rb +9 -2
  180. data/lib/seahorse/client/response.rb +2 -0
  181. data/lib/seahorse/model/shapes.rb +2 -2
  182. data/lib/seahorse/util.rb +2 -1
  183. data/sig/aws-sdk-core/async_client_stubs.rbs +21 -0
  184. data/sig/aws-sdk-core/client_stubs.rbs +10 -0
  185. data/sig/aws-sdk-core/errors.rbs +22 -0
  186. data/sig/aws-sdk-core/resources/collection.rbs +21 -0
  187. data/sig/aws-sdk-core/structure.rbs +4 -0
  188. data/sig/aws-sdk-core/telemetry/base.rbs +46 -0
  189. data/sig/aws-sdk-core/telemetry/otel.rbs +22 -0
  190. data/sig/aws-sdk-core/telemetry/span_kind.rbs +15 -0
  191. data/sig/aws-sdk-core/telemetry/span_status.rbs +24 -0
  192. data/sig/aws-sdk-core/waiters/errors.rbs +20 -0
  193. data/sig/aws-sdk-core.rbs +7 -0
  194. data/sig/seahorse/client/async_base.rbs +18 -0
  195. data/sig/seahorse/client/base.rbs +25 -0
  196. data/sig/seahorse/client/handler_builder.rbs +16 -0
  197. data/sig/seahorse/client/response.rbs +61 -0
  198. metadata +117 -23
  199. /data/lib/aws-sdk-core/xml/parser/{engines/libxml.rb → libxml_engine.rb} +0 -0
  200. /data/lib/aws-sdk-core/xml/parser/{engines/nokogiri.rb → nokogiri_engine.rb} +0 -0
  201. /data/lib/aws-sdk-core/xml/parser/{engines/oga.rb → oga_engine.rb} +0 -0
  202. /data/lib/aws-sdk-core/xml/parser/{engines/ox.rb → ox_engine.rb} +0 -0
  203. /data/lib/aws-sdk-core/xml/parser/{engines/rexml.rb → rexml_engine.rb} +0 -0
@@ -7,6 +7,7 @@
7
7
  #
8
8
  # WARNING ABOUT GENERATED CODE
9
9
 
10
+
10
11
  module Aws::SSOOIDC
11
12
  # @api private
12
13
  module ClientApi
@@ -14,14 +15,18 @@ module Aws::SSOOIDC
14
15
  include Seahorse::Model
15
16
 
16
17
  AccessDeniedException = Shapes::StructureShape.new(name: 'AccessDeniedException')
18
+ AccessDeniedExceptionReason = Shapes::StringShape.new(name: 'AccessDeniedExceptionReason')
17
19
  AccessToken = Shapes::StringShape.new(name: 'AccessToken')
20
+ ArnType = Shapes::StringShape.new(name: 'ArnType')
18
21
  Assertion = Shapes::StringShape.new(name: 'Assertion')
19
22
  AuthCode = Shapes::StringShape.new(name: 'AuthCode')
20
23
  AuthorizationPendingException = Shapes::StructureShape.new(name: 'AuthorizationPendingException')
24
+ AwsAdditionalDetails = Shapes::StructureShape.new(name: 'AwsAdditionalDetails')
21
25
  ClientId = Shapes::StringShape.new(name: 'ClientId')
22
26
  ClientName = Shapes::StringShape.new(name: 'ClientName')
23
27
  ClientSecret = Shapes::StringShape.new(name: 'ClientSecret')
24
28
  ClientType = Shapes::StringShape.new(name: 'ClientType')
29
+ CodeVerifier = Shapes::StringShape.new(name: 'CodeVerifier')
25
30
  CreateTokenRequest = Shapes::StructureShape.new(name: 'CreateTokenRequest')
26
31
  CreateTokenResponse = Shapes::StructureShape.new(name: 'CreateTokenResponse')
27
32
  CreateTokenWithIAMRequest = Shapes::StructureShape.new(name: 'CreateTokenWithIAMRequest')
@@ -32,17 +37,22 @@ module Aws::SSOOIDC
32
37
  ExpirationInSeconds = Shapes::IntegerShape.new(name: 'ExpirationInSeconds')
33
38
  ExpiredTokenException = Shapes::StructureShape.new(name: 'ExpiredTokenException')
34
39
  GrantType = Shapes::StringShape.new(name: 'GrantType')
40
+ GrantTypes = Shapes::ListShape.new(name: 'GrantTypes')
35
41
  IdToken = Shapes::StringShape.new(name: 'IdToken')
42
+ IdentityContext = Shapes::StringShape.new(name: 'IdentityContext')
36
43
  InternalServerException = Shapes::StructureShape.new(name: 'InternalServerException')
37
44
  IntervalInSeconds = Shapes::IntegerShape.new(name: 'IntervalInSeconds')
38
45
  InvalidClientException = Shapes::StructureShape.new(name: 'InvalidClientException')
39
46
  InvalidClientMetadataException = Shapes::StructureShape.new(name: 'InvalidClientMetadataException')
40
47
  InvalidGrantException = Shapes::StructureShape.new(name: 'InvalidGrantException')
48
+ InvalidRedirectUriException = Shapes::StructureShape.new(name: 'InvalidRedirectUriException')
41
49
  InvalidRequestException = Shapes::StructureShape.new(name: 'InvalidRequestException')
50
+ InvalidRequestExceptionReason = Shapes::StringShape.new(name: 'InvalidRequestExceptionReason')
42
51
  InvalidRequestRegionException = Shapes::StructureShape.new(name: 'InvalidRequestRegionException')
43
52
  InvalidScopeException = Shapes::StructureShape.new(name: 'InvalidScopeException')
44
53
  Location = Shapes::StringShape.new(name: 'Location')
45
54
  LongTimeStampType = Shapes::IntegerShape.new(name: 'LongTimeStampType')
55
+ RedirectUris = Shapes::ListShape.new(name: 'RedirectUris')
46
56
  RefreshToken = Shapes::StringShape.new(name: 'RefreshToken')
47
57
  Region = Shapes::StringShape.new(name: 'Region')
48
58
  RegisterClientRequest = Shapes::StructureShape.new(name: 'RegisterClientRequest')
@@ -61,6 +71,7 @@ module Aws::SSOOIDC
61
71
  UserCode = Shapes::StringShape.new(name: 'UserCode')
62
72
 
63
73
  AccessDeniedException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
74
+ AccessDeniedException.add_member(:reason, Shapes::ShapeRef.new(shape: AccessDeniedExceptionReason, location_name: "reason"))
64
75
  AccessDeniedException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
65
76
  AccessDeniedException.struct_class = Types::AccessDeniedException
66
77
 
@@ -68,6 +79,9 @@ module Aws::SSOOIDC
68
79
  AuthorizationPendingException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
69
80
  AuthorizationPendingException.struct_class = Types::AuthorizationPendingException
70
81
 
82
+ AwsAdditionalDetails.add_member(:identity_context, Shapes::ShapeRef.new(shape: IdentityContext, location_name: "identityContext"))
83
+ AwsAdditionalDetails.struct_class = Types::AwsAdditionalDetails
84
+
71
85
  CreateTokenRequest.add_member(:client_id, Shapes::ShapeRef.new(shape: ClientId, required: true, location_name: "clientId"))
72
86
  CreateTokenRequest.add_member(:client_secret, Shapes::ShapeRef.new(shape: ClientSecret, required: true, location_name: "clientSecret"))
73
87
  CreateTokenRequest.add_member(:grant_type, Shapes::ShapeRef.new(shape: GrantType, required: true, location_name: "grantType"))
@@ -76,6 +90,7 @@ module Aws::SSOOIDC
76
90
  CreateTokenRequest.add_member(:refresh_token, Shapes::ShapeRef.new(shape: RefreshToken, location_name: "refreshToken"))
77
91
  CreateTokenRequest.add_member(:scope, Shapes::ShapeRef.new(shape: Scopes, location_name: "scope"))
78
92
  CreateTokenRequest.add_member(:redirect_uri, Shapes::ShapeRef.new(shape: URI, location_name: "redirectUri"))
93
+ CreateTokenRequest.add_member(:code_verifier, Shapes::ShapeRef.new(shape: CodeVerifier, location_name: "codeVerifier"))
79
94
  CreateTokenRequest.struct_class = Types::CreateTokenRequest
80
95
 
81
96
  CreateTokenResponse.add_member(:access_token, Shapes::ShapeRef.new(shape: AccessToken, location_name: "accessToken"))
@@ -95,6 +110,7 @@ module Aws::SSOOIDC
95
110
  CreateTokenWithIAMRequest.add_member(:subject_token, Shapes::ShapeRef.new(shape: SubjectToken, location_name: "subjectToken"))
96
111
  CreateTokenWithIAMRequest.add_member(:subject_token_type, Shapes::ShapeRef.new(shape: TokenTypeURI, location_name: "subjectTokenType"))
97
112
  CreateTokenWithIAMRequest.add_member(:requested_token_type, Shapes::ShapeRef.new(shape: TokenTypeURI, location_name: "requestedTokenType"))
113
+ CreateTokenWithIAMRequest.add_member(:code_verifier, Shapes::ShapeRef.new(shape: CodeVerifier, location_name: "codeVerifier"))
98
114
  CreateTokenWithIAMRequest.struct_class = Types::CreateTokenWithIAMRequest
99
115
 
100
116
  CreateTokenWithIAMResponse.add_member(:access_token, Shapes::ShapeRef.new(shape: AccessToken, location_name: "accessToken"))
@@ -104,12 +120,15 @@ module Aws::SSOOIDC
104
120
  CreateTokenWithIAMResponse.add_member(:id_token, Shapes::ShapeRef.new(shape: IdToken, location_name: "idToken"))
105
121
  CreateTokenWithIAMResponse.add_member(:issued_token_type, Shapes::ShapeRef.new(shape: TokenTypeURI, location_name: "issuedTokenType"))
106
122
  CreateTokenWithIAMResponse.add_member(:scope, Shapes::ShapeRef.new(shape: Scopes, location_name: "scope"))
123
+ CreateTokenWithIAMResponse.add_member(:aws_additional_details, Shapes::ShapeRef.new(shape: AwsAdditionalDetails, location_name: "awsAdditionalDetails"))
107
124
  CreateTokenWithIAMResponse.struct_class = Types::CreateTokenWithIAMResponse
108
125
 
109
126
  ExpiredTokenException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
110
127
  ExpiredTokenException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
111
128
  ExpiredTokenException.struct_class = Types::ExpiredTokenException
112
129
 
130
+ GrantTypes.member = Shapes::ShapeRef.new(shape: GrantType)
131
+
113
132
  InternalServerException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
114
133
  InternalServerException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
115
134
  InternalServerException.struct_class = Types::InternalServerException
@@ -126,7 +145,12 @@ module Aws::SSOOIDC
126
145
  InvalidGrantException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
127
146
  InvalidGrantException.struct_class = Types::InvalidGrantException
128
147
 
148
+ InvalidRedirectUriException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
149
+ InvalidRedirectUriException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
150
+ InvalidRedirectUriException.struct_class = Types::InvalidRedirectUriException
151
+
129
152
  InvalidRequestException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
153
+ InvalidRequestException.add_member(:reason, Shapes::ShapeRef.new(shape: InvalidRequestExceptionReason, location_name: "reason"))
130
154
  InvalidRequestException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
131
155
  InvalidRequestException.struct_class = Types::InvalidRequestException
132
156
 
@@ -140,9 +164,15 @@ module Aws::SSOOIDC
140
164
  InvalidScopeException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
141
165
  InvalidScopeException.struct_class = Types::InvalidScopeException
142
166
 
167
+ RedirectUris.member = Shapes::ShapeRef.new(shape: URI)
168
+
143
169
  RegisterClientRequest.add_member(:client_name, Shapes::ShapeRef.new(shape: ClientName, required: true, location_name: "clientName"))
144
170
  RegisterClientRequest.add_member(:client_type, Shapes::ShapeRef.new(shape: ClientType, required: true, location_name: "clientType"))
145
171
  RegisterClientRequest.add_member(:scopes, Shapes::ShapeRef.new(shape: Scopes, location_name: "scopes"))
172
+ RegisterClientRequest.add_member(:redirect_uris, Shapes::ShapeRef.new(shape: RedirectUris, location_name: "redirectUris"))
173
+ RegisterClientRequest.add_member(:grant_types, Shapes::ShapeRef.new(shape: GrantTypes, location_name: "grantTypes"))
174
+ RegisterClientRequest.add_member(:issuer_url, Shapes::ShapeRef.new(shape: URI, location_name: "issuerUrl"))
175
+ RegisterClientRequest.add_member(:entitled_application_arn, Shapes::ShapeRef.new(shape: ArnType, location_name: "entitledApplicationArn"))
146
176
  RegisterClientRequest.struct_class = Types::RegisterClientRequest
147
177
 
148
178
  RegisterClientResponse.add_member(:client_id, Shapes::ShapeRef.new(shape: ClientId, location_name: "clientId"))
@@ -188,9 +218,11 @@ module Aws::SSOOIDC
188
218
 
189
219
  api.metadata = {
190
220
  "apiVersion" => "2019-06-10",
221
+ "auth" => ["aws.auth#sigv4"],
191
222
  "endpointPrefix" => "oidc",
192
223
  "jsonVersion" => "1.1",
193
224
  "protocol" => "rest-json",
225
+ "protocols" => ["rest-json"],
194
226
  "serviceAbbreviation" => "SSO OIDC",
195
227
  "serviceFullName" => "AWS SSO OIDC",
196
228
  "serviceId" => "SSO OIDC",
@@ -204,6 +236,7 @@ module Aws::SSOOIDC
204
236
  o.http_method = "POST"
205
237
  o.http_request_uri = "/token"
206
238
  o['authtype'] = "none"
239
+ o['auth'] = ["smithy.api#noAuth"]
207
240
  o.input = Shapes::ShapeRef.new(shape: CreateTokenRequest)
208
241
  o.output = Shapes::ShapeRef.new(shape: CreateTokenResponse)
209
242
  o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
@@ -244,12 +277,16 @@ module Aws::SSOOIDC
244
277
  o.http_method = "POST"
245
278
  o.http_request_uri = "/client/register"
246
279
  o['authtype'] = "none"
280
+ o['auth'] = ["smithy.api#noAuth"]
247
281
  o.input = Shapes::ShapeRef.new(shape: RegisterClientRequest)
248
282
  o.output = Shapes::ShapeRef.new(shape: RegisterClientResponse)
249
283
  o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
250
284
  o.errors << Shapes::ShapeRef.new(shape: InvalidScopeException)
251
285
  o.errors << Shapes::ShapeRef.new(shape: InvalidClientMetadataException)
252
286
  o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
287
+ o.errors << Shapes::ShapeRef.new(shape: InvalidRedirectUriException)
288
+ o.errors << Shapes::ShapeRef.new(shape: UnsupportedGrantTypeException)
289
+ o.errors << Shapes::ShapeRef.new(shape: SlowDownException)
253
290
  end)
254
291
 
255
292
  api.add_operation(:start_device_authorization, Seahorse::Model::Operation.new.tap do |o|
@@ -257,6 +294,7 @@ module Aws::SSOOIDC
257
294
  o.http_method = "POST"
258
295
  o.http_request_uri = "/device_authorization"
259
296
  o['authtype'] = "none"
297
+ o['auth'] = ["smithy.api#noAuth"]
260
298
  o.input = Shapes::ShapeRef.new(shape: StartDeviceAuthorizationRequest)
261
299
  o.output = Shapes::ShapeRef.new(shape: StartDeviceAuthorizationResponse)
262
300
  o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
@@ -13,22 +13,22 @@ module Aws::SSOOIDC
13
13
  # @!attribute region
14
14
  # The AWS region used to dispatch the request.
15
15
  #
16
- # @return [String]
16
+ # @return [string]
17
17
  #
18
18
  # @!attribute use_dual_stack
19
19
  # When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.
20
20
  #
21
- # @return [Boolean]
21
+ # @return [boolean]
22
22
  #
23
23
  # @!attribute use_fips
24
24
  # When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.
25
25
  #
26
- # @return [Boolean]
26
+ # @return [boolean]
27
27
  #
28
28
  # @!attribute endpoint
29
29
  # Override the endpoint used to send this request
30
30
  #
31
- # @return [String]
31
+ # @return [string]
32
32
  #
33
33
  EndpointParameters = Struct.new(
34
34
  :region,
@@ -52,15 +52,18 @@ module Aws::SSOOIDC
52
52
  self[:region] = options[:region]
53
53
  self[:use_dual_stack] = options[:use_dual_stack]
54
54
  self[:use_dual_stack] = false if self[:use_dual_stack].nil?
55
- if self[:use_dual_stack].nil?
56
- raise ArgumentError, "Missing required EndpointParameter: :use_dual_stack"
57
- end
58
55
  self[:use_fips] = options[:use_fips]
59
56
  self[:use_fips] = false if self[:use_fips].nil?
60
- if self[:use_fips].nil?
61
- raise ArgumentError, "Missing required EndpointParameter: :use_fips"
62
- end
63
57
  self[:endpoint] = options[:endpoint]
64
58
  end
59
+
60
+ def self.create(config, options={})
61
+ new({
62
+ region: config.region,
63
+ use_dual_stack: config.use_dualstack_endpoint,
64
+ use_fips: config.use_fips_endpoint,
65
+ endpoint: (config.endpoint.to_s unless config.regional_endpoint),
66
+ }.merge(options))
67
+ end
65
68
  end
66
69
  end
@@ -10,43 +10,39 @@
10
10
  module Aws::SSOOIDC
11
11
  class EndpointProvider
12
12
  def resolve_endpoint(parameters)
13
- region = parameters.region
14
- use_dual_stack = parameters.use_dual_stack
15
- use_fips = parameters.use_fips
16
- endpoint = parameters.endpoint
17
- if Aws::Endpoints::Matchers.set?(endpoint)
18
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
13
+ if Aws::Endpoints::Matchers.set?(parameters.endpoint)
14
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)
19
15
  raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
20
16
  end
21
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
17
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
22
18
  raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
23
19
  end
24
- return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
20
+ return Aws::Endpoints::Endpoint.new(url: parameters.endpoint, headers: {}, properties: {})
25
21
  end
26
- if Aws::Endpoints::Matchers.set?(region)
27
- if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
28
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
22
+ if Aws::Endpoints::Matchers.set?(parameters.region)
23
+ if (partition_result = Aws::Endpoints::Matchers.aws_partition(parameters.region))
24
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
29
25
  if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS")) && Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
30
- return Aws::Endpoints::Endpoint.new(url: "https://oidc-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
26
+ return Aws::Endpoints::Endpoint.new(url: "https://oidc-fips.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
31
27
  end
32
28
  raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
33
29
  end
34
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
30
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)
35
31
  if Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"), true)
36
32
  if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-us-gov")
37
- return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{region}.amazonaws.com", headers: {}, properties: {})
33
+ return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{parameters.region}.amazonaws.com", headers: {}, properties: {})
38
34
  end
39
- return Aws::Endpoints::Endpoint.new(url: "https://oidc-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
35
+ return Aws::Endpoints::Endpoint.new(url: "https://oidc-fips.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
40
36
  end
41
37
  raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
42
38
  end
43
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
39
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
44
40
  if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
45
- return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
41
+ return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
46
42
  end
47
43
  raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
48
44
  end
49
- return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
45
+ return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
50
46
  end
51
47
  end
52
48
  raise ArgumentError, "Invalid Configuration: Missing Region"
@@ -12,61 +12,9 @@ module Aws::SSOOIDC
12
12
  # @api private
13
13
  module Endpoints
14
14
 
15
- class CreateToken
16
- def self.build(context)
17
- unless context.config.regional_endpoint
18
- endpoint = context.config.endpoint.to_s
19
- end
20
- Aws::SSOOIDC::EndpointParameters.new(
21
- region: context.config.region,
22
- use_dual_stack: context.config.use_dualstack_endpoint,
23
- use_fips: context.config.use_fips_endpoint,
24
- endpoint: endpoint,
25
- )
26
- end
27
- end
28
-
29
- class CreateTokenWithIAM
30
- def self.build(context)
31
- unless context.config.regional_endpoint
32
- endpoint = context.config.endpoint.to_s
33
- end
34
- Aws::SSOOIDC::EndpointParameters.new(
35
- region: context.config.region,
36
- use_dual_stack: context.config.use_dualstack_endpoint,
37
- use_fips: context.config.use_fips_endpoint,
38
- endpoint: endpoint,
39
- )
40
- end
41
- end
42
15
 
43
- class RegisterClient
44
- def self.build(context)
45
- unless context.config.regional_endpoint
46
- endpoint = context.config.endpoint.to_s
47
- end
48
- Aws::SSOOIDC::EndpointParameters.new(
49
- region: context.config.region,
50
- use_dual_stack: context.config.use_dualstack_endpoint,
51
- use_fips: context.config.use_fips_endpoint,
52
- endpoint: endpoint,
53
- )
54
- end
16
+ def self.parameters_for_operation(context)
17
+ Aws::SSOOIDC::EndpointParameters.create(context.config)
55
18
  end
56
-
57
- class StartDeviceAuthorization
58
- def self.build(context)
59
- unless context.config.regional_endpoint
60
- endpoint = context.config.endpoint.to_s
61
- end
62
- Aws::SSOOIDC::EndpointParameters.new(
63
- region: context.config.region,
64
- use_dual_stack: context.config.use_dualstack_endpoint,
65
- use_fips: context.config.use_fips_endpoint,
66
- endpoint: endpoint,
67
- )
68
- end
69
- end
70
-
71
19
  end
72
20
  end
@@ -34,6 +34,7 @@ module Aws::SSOOIDC
34
34
  # * {InvalidClientException}
35
35
  # * {InvalidClientMetadataException}
36
36
  # * {InvalidGrantException}
37
+ # * {InvalidRedirectUriException}
37
38
  # * {InvalidRequestException}
38
39
  # * {InvalidRequestRegionException}
39
40
  # * {InvalidScopeException}
@@ -61,6 +62,11 @@ module Aws::SSOOIDC
61
62
  @data[:error]
62
63
  end
63
64
 
65
+ # @return [String]
66
+ def reason
67
+ @data[:reason]
68
+ end
69
+
64
70
  # @return [String]
65
71
  def error_description
66
72
  @data[:error_description]
@@ -187,6 +193,26 @@ module Aws::SSOOIDC
187
193
  end
188
194
  end
189
195
 
196
+ class InvalidRedirectUriException < ServiceError
197
+
198
+ # @param [Seahorse::Client::RequestContext] context
199
+ # @param [String] message
200
+ # @param [Aws::SSOOIDC::Types::InvalidRedirectUriException] data
201
+ def initialize(context, message, data = Aws::EmptyStructure.new)
202
+ super(context, message, data)
203
+ end
204
+
205
+ # @return [String]
206
+ def error
207
+ @data[:error]
208
+ end
209
+
210
+ # @return [String]
211
+ def error_description
212
+ @data[:error_description]
213
+ end
214
+ end
215
+
190
216
  class InvalidRequestException < ServiceError
191
217
 
192
218
  # @param [Seahorse::Client::RequestContext] context
@@ -201,6 +227,11 @@ module Aws::SSOOIDC
201
227
  @data[:error]
202
228
  end
203
229
 
230
+ # @return [String]
231
+ def reason
232
+ @data[:reason]
233
+ end
234
+
204
235
  # @return [String]
205
236
  def error_description
206
237
  @data[:error_description]
@@ -14,11 +14,12 @@ module Aws::SSOOIDC
14
14
  option(
15
15
  :endpoint_provider,
16
16
  doc_type: 'Aws::SSOOIDC::EndpointProvider',
17
- docstring: 'The endpoint provider used to resolve endpoints. Any '\
18
- 'object that responds to `#resolve_endpoint(parameters)` '\
19
- 'where `parameters` is a Struct similar to '\
20
- '`Aws::SSOOIDC::EndpointParameters`'
21
- ) do |cfg|
17
+ rbs_type: 'untyped',
18
+ docstring: <<~DOCS) do |_cfg|
19
+ The endpoint provider used to resolve endpoints. Any object that responds to
20
+ `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
21
+ `Aws::SSOOIDC::EndpointParameters`.
22
+ DOCS
22
23
  Aws::SSOOIDC::EndpointProvider.new
23
24
  end
24
25
 
@@ -26,7 +27,7 @@ module Aws::SSOOIDC
26
27
  class Handler < Seahorse::Client::Handler
27
28
  def call(context)
28
29
  unless context[:discovered_endpoint]
29
- params = parameters_for_operation(context)
30
+ params = Aws::SSOOIDC::Endpoints.parameters_for_operation(context)
30
31
  endpoint = context.config.endpoint_provider.resolve_endpoint(params)
31
32
 
32
33
  context.http_request.endpoint = endpoint.url
@@ -39,11 +40,23 @@ module Aws::SSOOIDC
39
40
  context[:auth_scheme] =
40
41
  Aws::Endpoints.resolve_auth_scheme(context, endpoint)
41
42
 
42
- @handler.call(context)
43
+ with_metrics(context) { @handler.call(context) }
43
44
  end
44
45
 
45
46
  private
46
47
 
48
+ def with_metrics(context, &block)
49
+ metrics = []
50
+ metrics << 'ENDPOINT_OVERRIDE' unless context.config.regional_endpoint
51
+ if context[:auth_scheme] && context[:auth_scheme]['name'] == 'sigv4a'
52
+ metrics << 'SIGV4A_SIGNING'
53
+ end
54
+ if context.config.credentials&.credentials&.account_id
55
+ metrics << 'RESOLVED_ACCOUNT_ID'
56
+ end
57
+ Aws::Plugins::UserAgent.metric(*metrics, &block)
58
+ end
59
+
47
60
  def apply_endpoint_headers(context, headers)
48
61
  headers.each do |key, values|
49
62
  value = values
@@ -54,19 +67,6 @@ module Aws::SSOOIDC
54
67
  context.http_request.headers[key] = value
55
68
  end
56
69
  end
57
-
58
- def parameters_for_operation(context)
59
- case context.operation_name
60
- when :create_token
61
- Aws::SSOOIDC::Endpoints::CreateToken.build(context)
62
- when :create_token_with_iam
63
- Aws::SSOOIDC::Endpoints::CreateTokenWithIAM.build(context)
64
- when :register_client
65
- Aws::SSOOIDC::Endpoints::RegisterClient.build(context)
66
- when :start_device_authorization
67
- Aws::SSOOIDC::Endpoints::StartDeviceAuthorization.build(context)
68
- end
69
- end
70
70
  end
71
71
 
72
72
  def add_handlers(handlers, _config)