aws-sdk-core 3.181.0 → 3.209.1

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 (168) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +413 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-defaults.rb +4 -1
  5. data/lib/aws-sdk-core/assume_role_credentials.rb +12 -5
  6. data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +13 -7
  7. data/lib/aws-sdk-core/binary/decode_handler.rb +3 -9
  8. data/lib/aws-sdk-core/binary/encode_handler.rb +1 -1
  9. data/lib/aws-sdk-core/binary/event_builder.rb +34 -37
  10. data/lib/aws-sdk-core/binary/event_stream_decoder.rb +1 -0
  11. data/lib/aws-sdk-core/binary/event_stream_encoder.rb +4 -3
  12. data/lib/aws-sdk-core/cbor/cbor_engine.rb +19 -0
  13. data/lib/aws-sdk-core/cbor/decoder.rb +310 -0
  14. data/lib/aws-sdk-core/cbor/encoder.rb +243 -0
  15. data/lib/aws-sdk-core/cbor.rb +106 -0
  16. data/lib/aws-sdk-core/client_side_monitoring.rb +9 -0
  17. data/lib/aws-sdk-core/client_stubs.rb +18 -14
  18. data/lib/aws-sdk-core/credential_provider.rb +1 -1
  19. data/lib/aws-sdk-core/credential_provider_chain.rb +13 -6
  20. data/lib/aws-sdk-core/credentials.rb +13 -6
  21. data/lib/aws-sdk-core/ec2_metadata.rb +1 -1
  22. data/lib/aws-sdk-core/ecs_credentials.rb +78 -11
  23. data/lib/aws-sdk-core/endpoints/endpoint.rb +3 -1
  24. data/lib/aws-sdk-core/endpoints/matchers.rb +18 -10
  25. data/lib/aws-sdk-core/endpoints.rb +74 -18
  26. data/lib/aws-sdk-core/error_handler.rb +41 -0
  27. data/lib/aws-sdk-core/errors.rb +12 -3
  28. data/lib/aws-sdk-core/event_emitter.rb +0 -16
  29. data/lib/aws-sdk-core/instance_profile_credentials.rb +55 -32
  30. data/lib/aws-sdk-core/json/builder.rb +8 -1
  31. data/lib/aws-sdk-core/json/error_handler.rb +15 -10
  32. data/lib/aws-sdk-core/json/handler.rb +12 -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 +33 -3
  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.rb +10 -0
  39. data/lib/aws-sdk-core/lru_cache.rb +75 -0
  40. data/lib/aws-sdk-core/pageable_response.rb +1 -1
  41. data/lib/aws-sdk-core/param_validator.rb +9 -4
  42. data/lib/aws-sdk-core/plugins/bearer_authorization.rb +2 -0
  43. data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +6 -3
  44. data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +1 -0
  45. data/lib/aws-sdk-core/plugins/client_metrics_send_plugin.rb +14 -2
  46. data/lib/aws-sdk-core/plugins/credentials_configuration.rb +9 -3
  47. data/lib/aws-sdk-core/plugins/global_configuration.rb +8 -9
  48. data/lib/aws-sdk-core/plugins/http_checksum.rb +2 -1
  49. data/lib/aws-sdk-core/plugins/invocation_id.rb +1 -11
  50. data/lib/aws-sdk-core/plugins/logging.rb +2 -0
  51. data/lib/aws-sdk-core/plugins/protocols/api_gateway.rb +3 -1
  52. data/lib/aws-sdk-core/plugins/protocols/ec2.rb +2 -24
  53. data/lib/aws-sdk-core/plugins/protocols/json_rpc.rb +6 -8
  54. data/lib/aws-sdk-core/plugins/protocols/query.rb +4 -2
  55. data/lib/aws-sdk-core/plugins/protocols/rest_json.rb +3 -15
  56. data/lib/aws-sdk-core/plugins/protocols/rest_xml.rb +3 -0
  57. data/lib/aws-sdk-core/plugins/protocols/rpc_v2.rb +17 -0
  58. data/lib/aws-sdk-core/plugins/regional_endpoint.rb +33 -3
  59. data/lib/aws-sdk-core/plugins/request_compression.rb +11 -2
  60. data/lib/aws-sdk-core/plugins/retry_errors.rb +12 -3
  61. data/lib/aws-sdk-core/plugins/sign.rb +27 -15
  62. data/lib/aws-sdk-core/plugins/signature_v2.rb +2 -1
  63. data/lib/aws-sdk-core/plugins/signature_v4.rb +2 -1
  64. data/lib/aws-sdk-core/plugins/stub_responses.rb +30 -2
  65. data/lib/aws-sdk-core/plugins/telemetry.rb +75 -0
  66. data/lib/aws-sdk-core/plugins/transfer_encoding.rb +16 -9
  67. data/lib/aws-sdk-core/plugins/user_agent.rb +70 -26
  68. data/lib/aws-sdk-core/plugins.rb +39 -0
  69. data/lib/aws-sdk-core/process_credentials.rb +47 -28
  70. data/lib/aws-sdk-core/query/ec2_handler.rb +27 -0
  71. data/lib/aws-sdk-core/query/ec2_param_builder.rb +5 -7
  72. data/lib/aws-sdk-core/query/handler.rb +4 -4
  73. data/lib/aws-sdk-core/query/param_builder.rb +2 -2
  74. data/lib/aws-sdk-core/query.rb +2 -1
  75. data/lib/aws-sdk-core/refreshing_credentials.rb +12 -6
  76. data/lib/aws-sdk-core/resources.rb +8 -0
  77. data/lib/aws-sdk-core/rest/content_type_handler.rb +60 -0
  78. data/lib/aws-sdk-core/rest/handler.rb +3 -4
  79. data/lib/aws-sdk-core/rest/request/body.rb +32 -5
  80. data/lib/aws-sdk-core/rest/request/endpoint.rb +24 -4
  81. data/lib/aws-sdk-core/rest/request/headers.rb +15 -7
  82. data/lib/aws-sdk-core/rest/request/querystring_builder.rb +62 -36
  83. data/lib/aws-sdk-core/rest/response/body.rb +15 -1
  84. data/lib/aws-sdk-core/rest/response/header_list_parser.rb +79 -0
  85. data/lib/aws-sdk-core/rest/response/headers.rb +8 -3
  86. data/lib/aws-sdk-core/rest.rb +1 -0
  87. data/lib/aws-sdk-core/rpc_v2/builder.rb +62 -0
  88. data/lib/aws-sdk-core/rpc_v2/content_type_handler.rb +45 -0
  89. data/lib/aws-sdk-core/rpc_v2/error_handler.rb +84 -0
  90. data/lib/aws-sdk-core/rpc_v2/handler.rb +78 -0
  91. data/lib/aws-sdk-core/rpc_v2/parser.rb +90 -0
  92. data/lib/aws-sdk-core/rpc_v2.rb +6 -0
  93. data/lib/aws-sdk-core/shared_config.rb +7 -2
  94. data/lib/aws-sdk-core/shared_credentials.rb +0 -7
  95. data/lib/aws-sdk-core/sso_credentials.rb +2 -1
  96. data/lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb +41 -0
  97. data/lib/aws-sdk-core/stubbing.rb +22 -0
  98. data/lib/aws-sdk-core/telemetry/base.rb +177 -0
  99. data/lib/aws-sdk-core/telemetry/no_op.rb +70 -0
  100. data/lib/aws-sdk-core/telemetry/otel.rb +235 -0
  101. data/lib/aws-sdk-core/telemetry/span_kind.rb +22 -0
  102. data/lib/aws-sdk-core/telemetry/span_status.rb +59 -0
  103. data/lib/aws-sdk-core/telemetry.rb +78 -0
  104. data/lib/aws-sdk-core/util.rb +39 -0
  105. data/lib/aws-sdk-core/waiters/poller.rb +10 -5
  106. data/lib/aws-sdk-core/xml/builder.rb +17 -9
  107. data/lib/aws-sdk-core/xml/error_handler.rb +32 -42
  108. data/lib/aws-sdk-core/xml/parser/frame.rb +4 -20
  109. data/lib/aws-sdk-core/xml/parser/stack.rb +2 -0
  110. data/lib/aws-sdk-core/xml/parser.rb +2 -6
  111. data/lib/aws-sdk-core.rb +82 -107
  112. data/lib/aws-sdk-sso/client.rb +119 -55
  113. data/lib/aws-sdk-sso/client_api.rb +7 -0
  114. data/lib/aws-sdk-sso/endpoint_provider.rb +30 -24
  115. data/lib/aws-sdk-sso/endpoints.rb +4 -16
  116. data/lib/aws-sdk-sso/plugins/endpoints.rb +22 -8
  117. data/lib/aws-sdk-sso/types.rb +1 -0
  118. data/lib/aws-sdk-sso.rb +15 -11
  119. data/lib/aws-sdk-ssooidc/client.rb +504 -83
  120. data/lib/aws-sdk-ssooidc/client_api.rb +83 -1
  121. data/lib/aws-sdk-ssooidc/endpoint_provider.rb +30 -24
  122. data/lib/aws-sdk-ssooidc/endpoints.rb +14 -12
  123. data/lib/aws-sdk-ssooidc/errors.rb +52 -0
  124. data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +24 -8
  125. data/lib/aws-sdk-ssooidc/types.rb +373 -51
  126. data/lib/aws-sdk-ssooidc.rb +15 -11
  127. data/lib/aws-sdk-sts/client.rb +129 -57
  128. data/lib/aws-sdk-sts/client_api.rb +15 -11
  129. data/lib/aws-sdk-sts/customizations.rb +5 -1
  130. data/lib/aws-sdk-sts/endpoint_provider.rb +2 -2
  131. data/lib/aws-sdk-sts/endpoints.rb +8 -32
  132. data/lib/aws-sdk-sts/plugins/endpoints.rb +22 -8
  133. data/lib/aws-sdk-sts/presigner.rb +1 -1
  134. data/lib/aws-sdk-sts/types.rb +19 -4
  135. data/lib/aws-sdk-sts.rb +15 -11
  136. data/lib/seahorse/client/async_base.rb +1 -1
  137. data/lib/seahorse/client/async_response.rb +19 -0
  138. data/lib/seahorse/client/base.rb +18 -7
  139. data/lib/seahorse/client/h2/handler.rb +14 -3
  140. data/lib/seahorse/client/handler.rb +1 -1
  141. data/lib/seahorse/client/net_http/connection_pool.rb +11 -11
  142. data/lib/seahorse/client/net_http/handler.rb +21 -9
  143. data/lib/seahorse/client/net_http/patches.rb +1 -4
  144. data/lib/seahorse/client/plugin.rb +9 -0
  145. data/lib/seahorse/client/plugins/endpoint.rb +0 -1
  146. data/lib/seahorse/client/plugins/h2.rb +3 -3
  147. data/lib/seahorse/client/plugins/net_http.rb +57 -16
  148. data/lib/seahorse/client/request_context.rb +8 -1
  149. data/lib/seahorse/model/shapes.rb +2 -2
  150. data/sig/aws-sdk-core/client_stubs.rbs +10 -0
  151. data/sig/aws-sdk-core/errors.rbs +22 -0
  152. data/sig/aws-sdk-core/resources/collection.rbs +21 -0
  153. data/sig/aws-sdk-core/structure.rbs +4 -0
  154. data/sig/aws-sdk-core/telemetry/base.rbs +46 -0
  155. data/sig/aws-sdk-core/telemetry/otel.rbs +22 -0
  156. data/sig/aws-sdk-core/telemetry/span_kind.rbs +15 -0
  157. data/sig/aws-sdk-core/telemetry/span_status.rbs +24 -0
  158. data/sig/aws-sdk-core/waiters/errors.rbs +20 -0
  159. data/sig/aws-sdk-core.rbs +7 -0
  160. data/sig/seahorse/client/base.rbs +25 -0
  161. data/sig/seahorse/client/handler_builder.rbs +16 -0
  162. data/sig/seahorse/client/response.rbs +61 -0
  163. metadata +59 -17
  164. /data/lib/aws-sdk-core/xml/parser/{engines/libxml.rb → libxml_engine.rb} +0 -0
  165. /data/lib/aws-sdk-core/xml/parser/{engines/nokogiri.rb → nokogiri_engine.rb} +0 -0
  166. /data/lib/aws-sdk-core/xml/parser/{engines/oga.rb → oga_engine.rb} +0 -0
  167. /data/lib/aws-sdk-core/xml/parser/{engines/ox.rb → ox_engine.rb} +0 -0
  168. /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
@@ -15,30 +16,41 @@ module Aws::SSOOIDC
15
16
 
16
17
  AccessDeniedException = Shapes::StructureShape.new(name: 'AccessDeniedException')
17
18
  AccessToken = Shapes::StringShape.new(name: 'AccessToken')
19
+ ArnType = Shapes::StringShape.new(name: 'ArnType')
20
+ Assertion = Shapes::StringShape.new(name: 'Assertion')
18
21
  AuthCode = Shapes::StringShape.new(name: 'AuthCode')
19
22
  AuthorizationPendingException = Shapes::StructureShape.new(name: 'AuthorizationPendingException')
20
23
  ClientId = Shapes::StringShape.new(name: 'ClientId')
21
24
  ClientName = Shapes::StringShape.new(name: 'ClientName')
22
25
  ClientSecret = Shapes::StringShape.new(name: 'ClientSecret')
23
26
  ClientType = Shapes::StringShape.new(name: 'ClientType')
27
+ CodeVerifier = Shapes::StringShape.new(name: 'CodeVerifier')
24
28
  CreateTokenRequest = Shapes::StructureShape.new(name: 'CreateTokenRequest')
25
29
  CreateTokenResponse = Shapes::StructureShape.new(name: 'CreateTokenResponse')
30
+ CreateTokenWithIAMRequest = Shapes::StructureShape.new(name: 'CreateTokenWithIAMRequest')
31
+ CreateTokenWithIAMResponse = Shapes::StructureShape.new(name: 'CreateTokenWithIAMResponse')
26
32
  DeviceCode = Shapes::StringShape.new(name: 'DeviceCode')
27
33
  Error = Shapes::StringShape.new(name: 'Error')
28
34
  ErrorDescription = Shapes::StringShape.new(name: 'ErrorDescription')
29
35
  ExpirationInSeconds = Shapes::IntegerShape.new(name: 'ExpirationInSeconds')
30
36
  ExpiredTokenException = Shapes::StructureShape.new(name: 'ExpiredTokenException')
31
37
  GrantType = Shapes::StringShape.new(name: 'GrantType')
38
+ GrantTypes = Shapes::ListShape.new(name: 'GrantTypes')
32
39
  IdToken = Shapes::StringShape.new(name: 'IdToken')
33
40
  InternalServerException = Shapes::StructureShape.new(name: 'InternalServerException')
34
41
  IntervalInSeconds = Shapes::IntegerShape.new(name: 'IntervalInSeconds')
35
42
  InvalidClientException = Shapes::StructureShape.new(name: 'InvalidClientException')
36
43
  InvalidClientMetadataException = Shapes::StructureShape.new(name: 'InvalidClientMetadataException')
37
44
  InvalidGrantException = Shapes::StructureShape.new(name: 'InvalidGrantException')
45
+ InvalidRedirectUriException = Shapes::StructureShape.new(name: 'InvalidRedirectUriException')
38
46
  InvalidRequestException = Shapes::StructureShape.new(name: 'InvalidRequestException')
47
+ InvalidRequestRegionException = Shapes::StructureShape.new(name: 'InvalidRequestRegionException')
39
48
  InvalidScopeException = Shapes::StructureShape.new(name: 'InvalidScopeException')
49
+ Location = Shapes::StringShape.new(name: 'Location')
40
50
  LongTimeStampType = Shapes::IntegerShape.new(name: 'LongTimeStampType')
51
+ RedirectUris = Shapes::ListShape.new(name: 'RedirectUris')
41
52
  RefreshToken = Shapes::StringShape.new(name: 'RefreshToken')
53
+ Region = Shapes::StringShape.new(name: 'Region')
42
54
  RegisterClientRequest = Shapes::StructureShape.new(name: 'RegisterClientRequest')
43
55
  RegisterClientResponse = Shapes::StructureShape.new(name: 'RegisterClientResponse')
44
56
  Scope = Shapes::StringShape.new(name: 'Scope')
@@ -46,7 +58,9 @@ module Aws::SSOOIDC
46
58
  SlowDownException = Shapes::StructureShape.new(name: 'SlowDownException')
47
59
  StartDeviceAuthorizationRequest = Shapes::StructureShape.new(name: 'StartDeviceAuthorizationRequest')
48
60
  StartDeviceAuthorizationResponse = Shapes::StructureShape.new(name: 'StartDeviceAuthorizationResponse')
61
+ SubjectToken = Shapes::StringShape.new(name: 'SubjectToken')
49
62
  TokenType = Shapes::StringShape.new(name: 'TokenType')
63
+ TokenTypeURI = Shapes::StringShape.new(name: 'TokenTypeURI')
50
64
  URI = Shapes::StringShape.new(name: 'URI')
51
65
  UnauthorizedClientException = Shapes::StructureShape.new(name: 'UnauthorizedClientException')
52
66
  UnsupportedGrantTypeException = Shapes::StructureShape.new(name: 'UnsupportedGrantTypeException')
@@ -68,6 +82,7 @@ module Aws::SSOOIDC
68
82
  CreateTokenRequest.add_member(:refresh_token, Shapes::ShapeRef.new(shape: RefreshToken, location_name: "refreshToken"))
69
83
  CreateTokenRequest.add_member(:scope, Shapes::ShapeRef.new(shape: Scopes, location_name: "scope"))
70
84
  CreateTokenRequest.add_member(:redirect_uri, Shapes::ShapeRef.new(shape: URI, location_name: "redirectUri"))
85
+ CreateTokenRequest.add_member(:code_verifier, Shapes::ShapeRef.new(shape: CodeVerifier, location_name: "codeVerifier"))
71
86
  CreateTokenRequest.struct_class = Types::CreateTokenRequest
72
87
 
73
88
  CreateTokenResponse.add_member(:access_token, Shapes::ShapeRef.new(shape: AccessToken, location_name: "accessToken"))
@@ -77,10 +92,34 @@ module Aws::SSOOIDC
77
92
  CreateTokenResponse.add_member(:id_token, Shapes::ShapeRef.new(shape: IdToken, location_name: "idToken"))
78
93
  CreateTokenResponse.struct_class = Types::CreateTokenResponse
79
94
 
95
+ CreateTokenWithIAMRequest.add_member(:client_id, Shapes::ShapeRef.new(shape: ClientId, required: true, location_name: "clientId"))
96
+ CreateTokenWithIAMRequest.add_member(:grant_type, Shapes::ShapeRef.new(shape: GrantType, required: true, location_name: "grantType"))
97
+ CreateTokenWithIAMRequest.add_member(:code, Shapes::ShapeRef.new(shape: AuthCode, location_name: "code"))
98
+ CreateTokenWithIAMRequest.add_member(:refresh_token, Shapes::ShapeRef.new(shape: RefreshToken, location_name: "refreshToken"))
99
+ CreateTokenWithIAMRequest.add_member(:assertion, Shapes::ShapeRef.new(shape: Assertion, location_name: "assertion"))
100
+ CreateTokenWithIAMRequest.add_member(:scope, Shapes::ShapeRef.new(shape: Scopes, location_name: "scope"))
101
+ CreateTokenWithIAMRequest.add_member(:redirect_uri, Shapes::ShapeRef.new(shape: URI, location_name: "redirectUri"))
102
+ CreateTokenWithIAMRequest.add_member(:subject_token, Shapes::ShapeRef.new(shape: SubjectToken, location_name: "subjectToken"))
103
+ CreateTokenWithIAMRequest.add_member(:subject_token_type, Shapes::ShapeRef.new(shape: TokenTypeURI, location_name: "subjectTokenType"))
104
+ CreateTokenWithIAMRequest.add_member(:requested_token_type, Shapes::ShapeRef.new(shape: TokenTypeURI, location_name: "requestedTokenType"))
105
+ CreateTokenWithIAMRequest.add_member(:code_verifier, Shapes::ShapeRef.new(shape: CodeVerifier, location_name: "codeVerifier"))
106
+ CreateTokenWithIAMRequest.struct_class = Types::CreateTokenWithIAMRequest
107
+
108
+ CreateTokenWithIAMResponse.add_member(:access_token, Shapes::ShapeRef.new(shape: AccessToken, location_name: "accessToken"))
109
+ CreateTokenWithIAMResponse.add_member(:token_type, Shapes::ShapeRef.new(shape: TokenType, location_name: "tokenType"))
110
+ CreateTokenWithIAMResponse.add_member(:expires_in, Shapes::ShapeRef.new(shape: ExpirationInSeconds, location_name: "expiresIn"))
111
+ CreateTokenWithIAMResponse.add_member(:refresh_token, Shapes::ShapeRef.new(shape: RefreshToken, location_name: "refreshToken"))
112
+ CreateTokenWithIAMResponse.add_member(:id_token, Shapes::ShapeRef.new(shape: IdToken, location_name: "idToken"))
113
+ CreateTokenWithIAMResponse.add_member(:issued_token_type, Shapes::ShapeRef.new(shape: TokenTypeURI, location_name: "issuedTokenType"))
114
+ CreateTokenWithIAMResponse.add_member(:scope, Shapes::ShapeRef.new(shape: Scopes, location_name: "scope"))
115
+ CreateTokenWithIAMResponse.struct_class = Types::CreateTokenWithIAMResponse
116
+
80
117
  ExpiredTokenException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
81
118
  ExpiredTokenException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
82
119
  ExpiredTokenException.struct_class = Types::ExpiredTokenException
83
120
 
121
+ GrantTypes.member = Shapes::ShapeRef.new(shape: GrantType)
122
+
84
123
  InternalServerException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
85
124
  InternalServerException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
86
125
  InternalServerException.struct_class = Types::InternalServerException
@@ -97,17 +136,33 @@ module Aws::SSOOIDC
97
136
  InvalidGrantException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
98
137
  InvalidGrantException.struct_class = Types::InvalidGrantException
99
138
 
139
+ InvalidRedirectUriException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
140
+ InvalidRedirectUriException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
141
+ InvalidRedirectUriException.struct_class = Types::InvalidRedirectUriException
142
+
100
143
  InvalidRequestException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
101
144
  InvalidRequestException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
102
145
  InvalidRequestException.struct_class = Types::InvalidRequestException
103
146
 
147
+ InvalidRequestRegionException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
148
+ InvalidRequestRegionException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
149
+ InvalidRequestRegionException.add_member(:endpoint, Shapes::ShapeRef.new(shape: Location, location_name: "endpoint"))
150
+ InvalidRequestRegionException.add_member(:region, Shapes::ShapeRef.new(shape: Region, location_name: "region"))
151
+ InvalidRequestRegionException.struct_class = Types::InvalidRequestRegionException
152
+
104
153
  InvalidScopeException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
105
154
  InvalidScopeException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
106
155
  InvalidScopeException.struct_class = Types::InvalidScopeException
107
156
 
157
+ RedirectUris.member = Shapes::ShapeRef.new(shape: URI)
158
+
108
159
  RegisterClientRequest.add_member(:client_name, Shapes::ShapeRef.new(shape: ClientName, required: true, location_name: "clientName"))
109
160
  RegisterClientRequest.add_member(:client_type, Shapes::ShapeRef.new(shape: ClientType, required: true, location_name: "clientType"))
110
161
  RegisterClientRequest.add_member(:scopes, Shapes::ShapeRef.new(shape: Scopes, location_name: "scopes"))
162
+ RegisterClientRequest.add_member(:redirect_uris, Shapes::ShapeRef.new(shape: RedirectUris, location_name: "redirectUris"))
163
+ RegisterClientRequest.add_member(:grant_types, Shapes::ShapeRef.new(shape: GrantTypes, location_name: "grantTypes"))
164
+ RegisterClientRequest.add_member(:issuer_url, Shapes::ShapeRef.new(shape: URI, location_name: "issuerUrl"))
165
+ RegisterClientRequest.add_member(:entitled_application_arn, Shapes::ShapeRef.new(shape: ArnType, location_name: "entitledApplicationArn"))
111
166
  RegisterClientRequest.struct_class = Types::RegisterClientRequest
112
167
 
113
168
  RegisterClientResponse.add_member(:client_id, Shapes::ShapeRef.new(shape: ClientId, location_name: "clientId"))
@@ -153,14 +208,16 @@ module Aws::SSOOIDC
153
208
 
154
209
  api.metadata = {
155
210
  "apiVersion" => "2019-06-10",
211
+ "auth" => ["aws.auth#sigv4"],
156
212
  "endpointPrefix" => "oidc",
157
213
  "jsonVersion" => "1.1",
158
214
  "protocol" => "rest-json",
215
+ "protocols" => ["rest-json"],
159
216
  "serviceAbbreviation" => "SSO OIDC",
160
217
  "serviceFullName" => "AWS SSO OIDC",
161
218
  "serviceId" => "SSO OIDC",
162
219
  "signatureVersion" => "v4",
163
- "signingName" => "awsssooidc",
220
+ "signingName" => "sso-oauth",
164
221
  "uid" => "sso-oidc-2019-06-10",
165
222
  }
166
223
 
@@ -169,6 +226,7 @@ module Aws::SSOOIDC
169
226
  o.http_method = "POST"
170
227
  o.http_request_uri = "/token"
171
228
  o['authtype'] = "none"
229
+ o['auth'] = ["smithy.api#noAuth"]
172
230
  o.input = Shapes::ShapeRef.new(shape: CreateTokenRequest)
173
231
  o.output = Shapes::ShapeRef.new(shape: CreateTokenResponse)
174
232
  o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
@@ -184,17 +242,40 @@ module Aws::SSOOIDC
184
242
  o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
185
243
  end)
186
244
 
245
+ api.add_operation(:create_token_with_iam, Seahorse::Model::Operation.new.tap do |o|
246
+ o.name = "CreateTokenWithIAM"
247
+ o.http_method = "POST"
248
+ o.http_request_uri = "/token?aws_iam=t"
249
+ o.input = Shapes::ShapeRef.new(shape: CreateTokenWithIAMRequest)
250
+ o.output = Shapes::ShapeRef.new(shape: CreateTokenWithIAMResponse)
251
+ o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
252
+ o.errors << Shapes::ShapeRef.new(shape: InvalidClientException)
253
+ o.errors << Shapes::ShapeRef.new(shape: InvalidGrantException)
254
+ o.errors << Shapes::ShapeRef.new(shape: UnauthorizedClientException)
255
+ o.errors << Shapes::ShapeRef.new(shape: UnsupportedGrantTypeException)
256
+ o.errors << Shapes::ShapeRef.new(shape: InvalidScopeException)
257
+ o.errors << Shapes::ShapeRef.new(shape: AuthorizationPendingException)
258
+ o.errors << Shapes::ShapeRef.new(shape: SlowDownException)
259
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
260
+ o.errors << Shapes::ShapeRef.new(shape: ExpiredTokenException)
261
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
262
+ o.errors << Shapes::ShapeRef.new(shape: InvalidRequestRegionException)
263
+ end)
264
+
187
265
  api.add_operation(:register_client, Seahorse::Model::Operation.new.tap do |o|
188
266
  o.name = "RegisterClient"
189
267
  o.http_method = "POST"
190
268
  o.http_request_uri = "/client/register"
191
269
  o['authtype'] = "none"
270
+ o['auth'] = ["smithy.api#noAuth"]
192
271
  o.input = Shapes::ShapeRef.new(shape: RegisterClientRequest)
193
272
  o.output = Shapes::ShapeRef.new(shape: RegisterClientResponse)
194
273
  o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
195
274
  o.errors << Shapes::ShapeRef.new(shape: InvalidScopeException)
196
275
  o.errors << Shapes::ShapeRef.new(shape: InvalidClientMetadataException)
197
276
  o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
277
+ o.errors << Shapes::ShapeRef.new(shape: InvalidRedirectUriException)
278
+ o.errors << Shapes::ShapeRef.new(shape: UnsupportedGrantTypeException)
198
279
  end)
199
280
 
200
281
  api.add_operation(:start_device_authorization, Seahorse::Model::Operation.new.tap do |o|
@@ -202,6 +283,7 @@ module Aws::SSOOIDC
202
283
  o.http_method = "POST"
203
284
  o.http_request_uri = "/device_authorization"
204
285
  o['authtype'] = "none"
286
+ o['auth'] = ["smithy.api#noAuth"]
205
287
  o.input = Shapes::ShapeRef.new(shape: StartDeviceAuthorizationRequest)
206
288
  o.output = Shapes::ShapeRef.new(shape: StartDeviceAuthorizationResponse)
207
289
  o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
@@ -14,36 +14,42 @@ module Aws::SSOOIDC
14
14
  use_dual_stack = parameters.use_dual_stack
15
15
  use_fips = parameters.use_fips
16
16
  endpoint = parameters.endpoint
17
- if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
18
- if Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint))
19
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
20
- raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
21
- end
22
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
23
- raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
24
- end
25
- return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
26
- end
27
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
28
- 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"))
29
- return Aws::Endpoints::Endpoint.new(url: "https://oidc-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
30
- end
31
- raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
32
- end
17
+ if Aws::Endpoints::Matchers.set?(endpoint)
33
18
  if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
34
- if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
35
- return Aws::Endpoints::Endpoint.new(url: "https://oidc-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
36
- end
37
- raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
19
+ raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
38
20
  end
39
21
  if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
40
- if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
41
- return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
22
+ raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
23
+ end
24
+ return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
25
+ 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)
29
+ 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: {})
31
+ end
32
+ raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
33
+ end
34
+ if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
35
+ if Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"), true)
36
+ 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: {})
38
+ end
39
+ return Aws::Endpoints::Endpoint.new(url: "https://oidc-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
40
+ end
41
+ raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
42
+ end
43
+ if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
44
+ 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: {})
46
+ end
47
+ raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
42
48
  end
43
- raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
49
+ return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
44
50
  end
45
- return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
46
51
  end
52
+ raise ArgumentError, "Invalid Configuration: Missing Region"
47
53
  raise ArgumentError, 'No endpoint could be resolved'
48
54
 
49
55
  end
@@ -14,42 +14,44 @@ module Aws::SSOOIDC
14
14
 
15
15
  class CreateToken
16
16
  def self.build(context)
17
- unless context.config.regional_endpoint
18
- endpoint = context.config.endpoint.to_s
19
- end
20
17
  Aws::SSOOIDC::EndpointParameters.new(
21
18
  region: context.config.region,
22
19
  use_dual_stack: context.config.use_dualstack_endpoint,
23
20
  use_fips: context.config.use_fips_endpoint,
24
- endpoint: endpoint,
21
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
22
+ )
23
+ end
24
+ end
25
+
26
+ class CreateTokenWithIAM
27
+ def self.build(context)
28
+ Aws::SSOOIDC::EndpointParameters.new(
29
+ region: context.config.region,
30
+ use_dual_stack: context.config.use_dualstack_endpoint,
31
+ use_fips: context.config.use_fips_endpoint,
32
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
25
33
  )
26
34
  end
27
35
  end
28
36
 
29
37
  class RegisterClient
30
38
  def self.build(context)
31
- unless context.config.regional_endpoint
32
- endpoint = context.config.endpoint.to_s
33
- end
34
39
  Aws::SSOOIDC::EndpointParameters.new(
35
40
  region: context.config.region,
36
41
  use_dual_stack: context.config.use_dualstack_endpoint,
37
42
  use_fips: context.config.use_fips_endpoint,
38
- endpoint: endpoint,
43
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
39
44
  )
40
45
  end
41
46
  end
42
47
 
43
48
  class StartDeviceAuthorization
44
49
  def self.build(context)
45
- unless context.config.regional_endpoint
46
- endpoint = context.config.endpoint.to_s
47
- end
48
50
  Aws::SSOOIDC::EndpointParameters.new(
49
51
  region: context.config.region,
50
52
  use_dual_stack: context.config.use_dualstack_endpoint,
51
53
  use_fips: context.config.use_fips_endpoint,
52
- endpoint: endpoint,
54
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
53
55
  )
54
56
  end
55
57
  end
@@ -34,7 +34,9 @@ module Aws::SSOOIDC
34
34
  # * {InvalidClientException}
35
35
  # * {InvalidClientMetadataException}
36
36
  # * {InvalidGrantException}
37
+ # * {InvalidRedirectUriException}
37
38
  # * {InvalidRequestException}
39
+ # * {InvalidRequestRegionException}
38
40
  # * {InvalidScopeException}
39
41
  # * {SlowDownException}
40
42
  # * {UnauthorizedClientException}
@@ -186,6 +188,26 @@ module Aws::SSOOIDC
186
188
  end
187
189
  end
188
190
 
191
+ class InvalidRedirectUriException < ServiceError
192
+
193
+ # @param [Seahorse::Client::RequestContext] context
194
+ # @param [String] message
195
+ # @param [Aws::SSOOIDC::Types::InvalidRedirectUriException] data
196
+ def initialize(context, message, data = Aws::EmptyStructure.new)
197
+ super(context, message, data)
198
+ end
199
+
200
+ # @return [String]
201
+ def error
202
+ @data[:error]
203
+ end
204
+
205
+ # @return [String]
206
+ def error_description
207
+ @data[:error_description]
208
+ end
209
+ end
210
+
189
211
  class InvalidRequestException < ServiceError
190
212
 
191
213
  # @param [Seahorse::Client::RequestContext] context
@@ -206,6 +228,36 @@ module Aws::SSOOIDC
206
228
  end
207
229
  end
208
230
 
231
+ class InvalidRequestRegionException < ServiceError
232
+
233
+ # @param [Seahorse::Client::RequestContext] context
234
+ # @param [String] message
235
+ # @param [Aws::SSOOIDC::Types::InvalidRequestRegionException] data
236
+ def initialize(context, message, data = Aws::EmptyStructure.new)
237
+ super(context, message, data)
238
+ end
239
+
240
+ # @return [String]
241
+ def error
242
+ @data[:error]
243
+ end
244
+
245
+ # @return [String]
246
+ def error_description
247
+ @data[:error_description]
248
+ end
249
+
250
+ # @return [String]
251
+ def endpoint
252
+ @data[:endpoint]
253
+ end
254
+
255
+ # @return [String]
256
+ def region
257
+ @data[:region]
258
+ end
259
+ end
260
+
209
261
  class InvalidScopeException < ServiceError
210
262
 
211
263
  # @param [Seahorse::Client::RequestContext] context
@@ -14,35 +14,49 @@ 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
 
25
26
  # @api private
26
27
  class Handler < Seahorse::Client::Handler
27
28
  def call(context)
28
- # If endpoint was discovered, do not resolve or apply the endpoint.
29
29
  unless context[:discovered_endpoint]
30
30
  params = parameters_for_operation(context)
31
31
  endpoint = context.config.endpoint_provider.resolve_endpoint(params)
32
32
 
33
33
  context.http_request.endpoint = endpoint.url
34
34
  apply_endpoint_headers(context, endpoint.headers)
35
+
36
+ context[:endpoint_params] = params
37
+ context[:endpoint_properties] = endpoint.properties
35
38
  end
36
39
 
37
- context[:endpoint_params] = params
38
40
  context[:auth_scheme] =
39
41
  Aws::Endpoints.resolve_auth_scheme(context, endpoint)
40
42
 
41
- @handler.call(context)
43
+ with_metrics(context) { @handler.call(context) }
42
44
  end
43
45
 
44
46
  private
45
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
+
46
60
  def apply_endpoint_headers(context, headers)
47
61
  headers.each do |key, values|
48
62
  value = values
@@ -58,6 +72,8 @@ module Aws::SSOOIDC
58
72
  case context.operation_name
59
73
  when :create_token
60
74
  Aws::SSOOIDC::Endpoints::CreateToken.build(context)
75
+ when :create_token_with_iam
76
+ Aws::SSOOIDC::Endpoints::CreateTokenWithIAM.build(context)
61
77
  when :register_client
62
78
  Aws::SSOOIDC::Endpoints::RegisterClient.build(context)
63
79
  when :start_device_authorization