aws-sdk-core 3.122.0 → 3.180.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +505 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-defaults/default_configuration.rb +153 -0
  5. data/lib/aws-defaults/defaults_mode_config_resolver.rb +107 -0
  6. data/lib/aws-defaults.rb +3 -0
  7. data/lib/aws-sdk-core/arn.rb +13 -0
  8. data/lib/aws-sdk-core/assume_role_credentials.rb +21 -7
  9. data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +14 -10
  10. data/lib/aws-sdk-core/binary/encode_handler.rb +12 -1
  11. data/lib/aws-sdk-core/client_stubs.rb +5 -1
  12. data/lib/aws-sdk-core/credential_provider.rb +3 -0
  13. data/lib/aws-sdk-core/credential_provider_chain.rb +8 -5
  14. data/lib/aws-sdk-core/ec2_metadata.rb +3 -2
  15. data/lib/aws-sdk-core/ecs_credentials.rb +121 -53
  16. data/lib/aws-sdk-core/endpoints/condition.rb +41 -0
  17. data/lib/aws-sdk-core/endpoints/endpoint.rb +17 -0
  18. data/lib/aws-sdk-core/endpoints/endpoint_rule.rb +75 -0
  19. data/lib/aws-sdk-core/endpoints/error_rule.rb +42 -0
  20. data/lib/aws-sdk-core/endpoints/function.rb +80 -0
  21. data/lib/aws-sdk-core/endpoints/matchers.rb +127 -0
  22. data/lib/aws-sdk-core/endpoints/reference.rb +31 -0
  23. data/lib/aws-sdk-core/endpoints/rule.rb +25 -0
  24. data/lib/aws-sdk-core/endpoints/rule_set.rb +52 -0
  25. data/lib/aws-sdk-core/endpoints/rules_provider.rb +37 -0
  26. data/lib/aws-sdk-core/endpoints/templater.rb +58 -0
  27. data/lib/aws-sdk-core/endpoints/tree_rule.rb +45 -0
  28. data/lib/aws-sdk-core/endpoints/url.rb +60 -0
  29. data/lib/aws-sdk-core/endpoints.rb +78 -0
  30. data/lib/aws-sdk-core/errors.rb +14 -1
  31. data/lib/aws-sdk-core/ini_parser.rb +1 -1
  32. data/lib/aws-sdk-core/instance_profile_credentials.rb +85 -14
  33. data/lib/aws-sdk-core/json/error_handler.rb +20 -1
  34. data/lib/aws-sdk-core/log/formatter.rb +6 -0
  35. data/lib/aws-sdk-core/pageable_response.rb +81 -32
  36. data/lib/aws-sdk-core/plugins/bearer_authorization.rb +67 -0
  37. data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +340 -0
  38. data/lib/aws-sdk-core/plugins/credentials_configuration.rb +27 -1
  39. data/lib/aws-sdk-core/plugins/defaults_mode.rb +40 -0
  40. data/lib/aws-sdk-core/plugins/endpoint_discovery.rb +6 -2
  41. data/lib/aws-sdk-core/plugins/http_checksum.rb +8 -1
  42. data/lib/aws-sdk-core/plugins/jsonvalue_converter.rb +34 -6
  43. data/lib/aws-sdk-core/plugins/recursion_detection.rb +38 -0
  44. data/lib/aws-sdk-core/plugins/regional_endpoint.rb +111 -30
  45. data/lib/aws-sdk-core/plugins/request_compression.rb +217 -0
  46. data/lib/aws-sdk-core/plugins/response_paging.rb +1 -1
  47. data/lib/aws-sdk-core/plugins/retries/error_inspector.rb +7 -4
  48. data/lib/aws-sdk-core/plugins/retry_errors.rb +21 -5
  49. data/lib/aws-sdk-core/plugins/sign.rb +201 -0
  50. data/lib/aws-sdk-core/plugins/signature_v2.rb +1 -0
  51. data/lib/aws-sdk-core/plugins/signature_v4.rb +15 -8
  52. data/lib/aws-sdk-core/plugins/stub_responses.rb +5 -1
  53. data/lib/aws-sdk-core/plugins/user_agent.rb +117 -14
  54. data/lib/aws-sdk-core/process_credentials.rb +9 -11
  55. data/lib/aws-sdk-core/refreshing_credentials.rb +41 -16
  56. data/lib/aws-sdk-core/refreshing_token.rb +71 -0
  57. data/lib/aws-sdk-core/rest/handler.rb +1 -1
  58. data/lib/aws-sdk-core/rest/request/headers.rb +14 -6
  59. data/lib/aws-sdk-core/rest/response/headers.rb +2 -0
  60. data/lib/aws-sdk-core/shared_config.rb +103 -12
  61. data/lib/aws-sdk-core/sso_credentials.rb +91 -50
  62. data/lib/aws-sdk-core/sso_token_provider.rb +135 -0
  63. data/lib/aws-sdk-core/static_token_provider.rb +14 -0
  64. data/lib/aws-sdk-core/structure.rb +6 -4
  65. data/lib/aws-sdk-core/stubbing/stub_data.rb +11 -0
  66. data/lib/aws-sdk-core/token.rb +31 -0
  67. data/lib/aws-sdk-core/token_provider.rb +15 -0
  68. data/lib/aws-sdk-core/token_provider_chain.rb +51 -0
  69. data/lib/aws-sdk-core/waiters/poller.rb +3 -1
  70. data/lib/aws-sdk-core/xml/error_handler.rb +7 -0
  71. data/lib/aws-sdk-core/xml/parser/engines/oga.rb +2 -0
  72. data/lib/aws-sdk-core/xml/parser/engines/ox.rb +1 -1
  73. data/lib/aws-sdk-core.rb +17 -0
  74. data/lib/aws-sdk-sso/client.rb +88 -13
  75. data/lib/aws-sdk-sso/endpoint_parameters.rb +66 -0
  76. data/lib/aws-sdk-sso/endpoint_provider.rb +51 -0
  77. data/lib/aws-sdk-sso/endpoints.rb +72 -0
  78. data/lib/aws-sdk-sso/plugins/endpoints.rb +76 -0
  79. data/lib/aws-sdk-sso/types.rb +8 -43
  80. data/lib/aws-sdk-sso.rb +5 -1
  81. data/lib/aws-sdk-ssooidc/client.rb +626 -0
  82. data/lib/aws-sdk-ssooidc/client_api.rb +216 -0
  83. data/lib/aws-sdk-ssooidc/customizations.rb +1 -0
  84. data/lib/aws-sdk-ssooidc/endpoint_parameters.rb +66 -0
  85. data/lib/aws-sdk-ssooidc/endpoint_provider.rb +51 -0
  86. data/lib/aws-sdk-ssooidc/endpoints.rb +58 -0
  87. data/lib/aws-sdk-ssooidc/errors.rb +290 -0
  88. data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +74 -0
  89. data/lib/aws-sdk-ssooidc/resource.rb +26 -0
  90. data/lib/aws-sdk-ssooidc/types.rb +502 -0
  91. data/lib/aws-sdk-ssooidc.rb +59 -0
  92. data/lib/aws-sdk-sts/client.rb +394 -362
  93. data/lib/aws-sdk-sts/client_api.rb +10 -0
  94. data/lib/aws-sdk-sts/endpoint_parameters.rb +78 -0
  95. data/lib/aws-sdk-sts/endpoint_provider.rb +112 -0
  96. data/lib/aws-sdk-sts/endpoints.rb +136 -0
  97. data/lib/aws-sdk-sts/plugins/endpoints.rb +84 -0
  98. data/lib/aws-sdk-sts/plugins/sts_regional_endpoints.rb +5 -1
  99. data/lib/aws-sdk-sts/presigner.rb +13 -15
  100. data/lib/aws-sdk-sts/types.rb +154 -227
  101. data/lib/aws-sdk-sts.rb +5 -1
  102. data/lib/seahorse/client/async_base.rb +0 -1
  103. data/lib/seahorse/client/configuration.rb +1 -5
  104. data/lib/seahorse/client/h2/connection.rb +12 -11
  105. data/lib/seahorse/client/net_http/connection_pool.rb +7 -0
  106. data/lib/seahorse/client/plugins/net_http.rb +33 -2
  107. data/lib/seahorse/client/plugins/request_callback.rb +9 -9
  108. data/lib/seahorse/client/response.rb +6 -0
  109. data/lib/seahorse/model/operation.rb +6 -0
  110. data/lib/seahorse/util.rb +4 -0
  111. metadata +62 -8
@@ -0,0 +1,216 @@
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::SSOOIDC
11
+ # @api private
12
+ module ClientApi
13
+
14
+ include Seahorse::Model
15
+
16
+ AccessDeniedException = Shapes::StructureShape.new(name: 'AccessDeniedException')
17
+ AccessToken = Shapes::StringShape.new(name: 'AccessToken')
18
+ AuthCode = Shapes::StringShape.new(name: 'AuthCode')
19
+ AuthorizationPendingException = Shapes::StructureShape.new(name: 'AuthorizationPendingException')
20
+ ClientId = Shapes::StringShape.new(name: 'ClientId')
21
+ ClientName = Shapes::StringShape.new(name: 'ClientName')
22
+ ClientSecret = Shapes::StringShape.new(name: 'ClientSecret')
23
+ ClientType = Shapes::StringShape.new(name: 'ClientType')
24
+ CreateTokenRequest = Shapes::StructureShape.new(name: 'CreateTokenRequest')
25
+ CreateTokenResponse = Shapes::StructureShape.new(name: 'CreateTokenResponse')
26
+ DeviceCode = Shapes::StringShape.new(name: 'DeviceCode')
27
+ Error = Shapes::StringShape.new(name: 'Error')
28
+ ErrorDescription = Shapes::StringShape.new(name: 'ErrorDescription')
29
+ ExpirationInSeconds = Shapes::IntegerShape.new(name: 'ExpirationInSeconds')
30
+ ExpiredTokenException = Shapes::StructureShape.new(name: 'ExpiredTokenException')
31
+ GrantType = Shapes::StringShape.new(name: 'GrantType')
32
+ IdToken = Shapes::StringShape.new(name: 'IdToken')
33
+ InternalServerException = Shapes::StructureShape.new(name: 'InternalServerException')
34
+ IntervalInSeconds = Shapes::IntegerShape.new(name: 'IntervalInSeconds')
35
+ InvalidClientException = Shapes::StructureShape.new(name: 'InvalidClientException')
36
+ InvalidClientMetadataException = Shapes::StructureShape.new(name: 'InvalidClientMetadataException')
37
+ InvalidGrantException = Shapes::StructureShape.new(name: 'InvalidGrantException')
38
+ InvalidRequestException = Shapes::StructureShape.new(name: 'InvalidRequestException')
39
+ InvalidScopeException = Shapes::StructureShape.new(name: 'InvalidScopeException')
40
+ LongTimeStampType = Shapes::IntegerShape.new(name: 'LongTimeStampType')
41
+ RefreshToken = Shapes::StringShape.new(name: 'RefreshToken')
42
+ RegisterClientRequest = Shapes::StructureShape.new(name: 'RegisterClientRequest')
43
+ RegisterClientResponse = Shapes::StructureShape.new(name: 'RegisterClientResponse')
44
+ Scope = Shapes::StringShape.new(name: 'Scope')
45
+ Scopes = Shapes::ListShape.new(name: 'Scopes')
46
+ SlowDownException = Shapes::StructureShape.new(name: 'SlowDownException')
47
+ StartDeviceAuthorizationRequest = Shapes::StructureShape.new(name: 'StartDeviceAuthorizationRequest')
48
+ StartDeviceAuthorizationResponse = Shapes::StructureShape.new(name: 'StartDeviceAuthorizationResponse')
49
+ TokenType = Shapes::StringShape.new(name: 'TokenType')
50
+ URI = Shapes::StringShape.new(name: 'URI')
51
+ UnauthorizedClientException = Shapes::StructureShape.new(name: 'UnauthorizedClientException')
52
+ UnsupportedGrantTypeException = Shapes::StructureShape.new(name: 'UnsupportedGrantTypeException')
53
+ UserCode = Shapes::StringShape.new(name: 'UserCode')
54
+
55
+ AccessDeniedException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
56
+ AccessDeniedException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
57
+ AccessDeniedException.struct_class = Types::AccessDeniedException
58
+
59
+ AuthorizationPendingException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
60
+ AuthorizationPendingException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
61
+ AuthorizationPendingException.struct_class = Types::AuthorizationPendingException
62
+
63
+ CreateTokenRequest.add_member(:client_id, Shapes::ShapeRef.new(shape: ClientId, required: true, location_name: "clientId"))
64
+ CreateTokenRequest.add_member(:client_secret, Shapes::ShapeRef.new(shape: ClientSecret, required: true, location_name: "clientSecret"))
65
+ CreateTokenRequest.add_member(:grant_type, Shapes::ShapeRef.new(shape: GrantType, required: true, location_name: "grantType"))
66
+ CreateTokenRequest.add_member(:device_code, Shapes::ShapeRef.new(shape: DeviceCode, location_name: "deviceCode"))
67
+ CreateTokenRequest.add_member(:code, Shapes::ShapeRef.new(shape: AuthCode, location_name: "code"))
68
+ CreateTokenRequest.add_member(:refresh_token, Shapes::ShapeRef.new(shape: RefreshToken, location_name: "refreshToken"))
69
+ CreateTokenRequest.add_member(:scope, Shapes::ShapeRef.new(shape: Scopes, location_name: "scope"))
70
+ CreateTokenRequest.add_member(:redirect_uri, Shapes::ShapeRef.new(shape: URI, location_name: "redirectUri"))
71
+ CreateTokenRequest.struct_class = Types::CreateTokenRequest
72
+
73
+ CreateTokenResponse.add_member(:access_token, Shapes::ShapeRef.new(shape: AccessToken, location_name: "accessToken"))
74
+ CreateTokenResponse.add_member(:token_type, Shapes::ShapeRef.new(shape: TokenType, location_name: "tokenType"))
75
+ CreateTokenResponse.add_member(:expires_in, Shapes::ShapeRef.new(shape: ExpirationInSeconds, location_name: "expiresIn"))
76
+ CreateTokenResponse.add_member(:refresh_token, Shapes::ShapeRef.new(shape: RefreshToken, location_name: "refreshToken"))
77
+ CreateTokenResponse.add_member(:id_token, Shapes::ShapeRef.new(shape: IdToken, location_name: "idToken"))
78
+ CreateTokenResponse.struct_class = Types::CreateTokenResponse
79
+
80
+ ExpiredTokenException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
81
+ ExpiredTokenException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
82
+ ExpiredTokenException.struct_class = Types::ExpiredTokenException
83
+
84
+ InternalServerException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
85
+ InternalServerException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
86
+ InternalServerException.struct_class = Types::InternalServerException
87
+
88
+ InvalidClientException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
89
+ InvalidClientException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
90
+ InvalidClientException.struct_class = Types::InvalidClientException
91
+
92
+ InvalidClientMetadataException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
93
+ InvalidClientMetadataException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
94
+ InvalidClientMetadataException.struct_class = Types::InvalidClientMetadataException
95
+
96
+ InvalidGrantException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
97
+ InvalidGrantException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
98
+ InvalidGrantException.struct_class = Types::InvalidGrantException
99
+
100
+ InvalidRequestException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
101
+ InvalidRequestException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
102
+ InvalidRequestException.struct_class = Types::InvalidRequestException
103
+
104
+ InvalidScopeException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
105
+ InvalidScopeException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
106
+ InvalidScopeException.struct_class = Types::InvalidScopeException
107
+
108
+ RegisterClientRequest.add_member(:client_name, Shapes::ShapeRef.new(shape: ClientName, required: true, location_name: "clientName"))
109
+ RegisterClientRequest.add_member(:client_type, Shapes::ShapeRef.new(shape: ClientType, required: true, location_name: "clientType"))
110
+ RegisterClientRequest.add_member(:scopes, Shapes::ShapeRef.new(shape: Scopes, location_name: "scopes"))
111
+ RegisterClientRequest.struct_class = Types::RegisterClientRequest
112
+
113
+ RegisterClientResponse.add_member(:client_id, Shapes::ShapeRef.new(shape: ClientId, location_name: "clientId"))
114
+ RegisterClientResponse.add_member(:client_secret, Shapes::ShapeRef.new(shape: ClientSecret, location_name: "clientSecret"))
115
+ RegisterClientResponse.add_member(:client_id_issued_at, Shapes::ShapeRef.new(shape: LongTimeStampType, location_name: "clientIdIssuedAt"))
116
+ RegisterClientResponse.add_member(:client_secret_expires_at, Shapes::ShapeRef.new(shape: LongTimeStampType, location_name: "clientSecretExpiresAt"))
117
+ RegisterClientResponse.add_member(:authorization_endpoint, Shapes::ShapeRef.new(shape: URI, location_name: "authorizationEndpoint"))
118
+ RegisterClientResponse.add_member(:token_endpoint, Shapes::ShapeRef.new(shape: URI, location_name: "tokenEndpoint"))
119
+ RegisterClientResponse.struct_class = Types::RegisterClientResponse
120
+
121
+ Scopes.member = Shapes::ShapeRef.new(shape: Scope)
122
+
123
+ SlowDownException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
124
+ SlowDownException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
125
+ SlowDownException.struct_class = Types::SlowDownException
126
+
127
+ StartDeviceAuthorizationRequest.add_member(:client_id, Shapes::ShapeRef.new(shape: ClientId, required: true, location_name: "clientId"))
128
+ StartDeviceAuthorizationRequest.add_member(:client_secret, Shapes::ShapeRef.new(shape: ClientSecret, required: true, location_name: "clientSecret"))
129
+ StartDeviceAuthorizationRequest.add_member(:start_url, Shapes::ShapeRef.new(shape: URI, required: true, location_name: "startUrl"))
130
+ StartDeviceAuthorizationRequest.struct_class = Types::StartDeviceAuthorizationRequest
131
+
132
+ StartDeviceAuthorizationResponse.add_member(:device_code, Shapes::ShapeRef.new(shape: DeviceCode, location_name: "deviceCode"))
133
+ StartDeviceAuthorizationResponse.add_member(:user_code, Shapes::ShapeRef.new(shape: UserCode, location_name: "userCode"))
134
+ StartDeviceAuthorizationResponse.add_member(:verification_uri, Shapes::ShapeRef.new(shape: URI, location_name: "verificationUri"))
135
+ StartDeviceAuthorizationResponse.add_member(:verification_uri_complete, Shapes::ShapeRef.new(shape: URI, location_name: "verificationUriComplete"))
136
+ StartDeviceAuthorizationResponse.add_member(:expires_in, Shapes::ShapeRef.new(shape: ExpirationInSeconds, location_name: "expiresIn"))
137
+ StartDeviceAuthorizationResponse.add_member(:interval, Shapes::ShapeRef.new(shape: IntervalInSeconds, location_name: "interval"))
138
+ StartDeviceAuthorizationResponse.struct_class = Types::StartDeviceAuthorizationResponse
139
+
140
+ UnauthorizedClientException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
141
+ UnauthorizedClientException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
142
+ UnauthorizedClientException.struct_class = Types::UnauthorizedClientException
143
+
144
+ UnsupportedGrantTypeException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
145
+ UnsupportedGrantTypeException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
146
+ UnsupportedGrantTypeException.struct_class = Types::UnsupportedGrantTypeException
147
+
148
+
149
+ # @api private
150
+ API = Seahorse::Model::Api.new.tap do |api|
151
+
152
+ api.version = "2019-06-10"
153
+
154
+ api.metadata = {
155
+ "apiVersion" => "2019-06-10",
156
+ "endpointPrefix" => "oidc",
157
+ "jsonVersion" => "1.1",
158
+ "protocol" => "rest-json",
159
+ "serviceAbbreviation" => "SSO OIDC",
160
+ "serviceFullName" => "AWS SSO OIDC",
161
+ "serviceId" => "SSO OIDC",
162
+ "signatureVersion" => "v4",
163
+ "signingName" => "awsssooidc",
164
+ "uid" => "sso-oidc-2019-06-10",
165
+ }
166
+
167
+ api.add_operation(:create_token, Seahorse::Model::Operation.new.tap do |o|
168
+ o.name = "CreateToken"
169
+ o.http_method = "POST"
170
+ o.http_request_uri = "/token"
171
+ o['authtype'] = "none"
172
+ o.input = Shapes::ShapeRef.new(shape: CreateTokenRequest)
173
+ o.output = Shapes::ShapeRef.new(shape: CreateTokenResponse)
174
+ o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
175
+ o.errors << Shapes::ShapeRef.new(shape: InvalidClientException)
176
+ o.errors << Shapes::ShapeRef.new(shape: InvalidGrantException)
177
+ o.errors << Shapes::ShapeRef.new(shape: UnauthorizedClientException)
178
+ o.errors << Shapes::ShapeRef.new(shape: UnsupportedGrantTypeException)
179
+ o.errors << Shapes::ShapeRef.new(shape: InvalidScopeException)
180
+ o.errors << Shapes::ShapeRef.new(shape: AuthorizationPendingException)
181
+ o.errors << Shapes::ShapeRef.new(shape: SlowDownException)
182
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
183
+ o.errors << Shapes::ShapeRef.new(shape: ExpiredTokenException)
184
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
185
+ end)
186
+
187
+ api.add_operation(:register_client, Seahorse::Model::Operation.new.tap do |o|
188
+ o.name = "RegisterClient"
189
+ o.http_method = "POST"
190
+ o.http_request_uri = "/client/register"
191
+ o['authtype'] = "none"
192
+ o.input = Shapes::ShapeRef.new(shape: RegisterClientRequest)
193
+ o.output = Shapes::ShapeRef.new(shape: RegisterClientResponse)
194
+ o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
195
+ o.errors << Shapes::ShapeRef.new(shape: InvalidScopeException)
196
+ o.errors << Shapes::ShapeRef.new(shape: InvalidClientMetadataException)
197
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
198
+ end)
199
+
200
+ api.add_operation(:start_device_authorization, Seahorse::Model::Operation.new.tap do |o|
201
+ o.name = "StartDeviceAuthorization"
202
+ o.http_method = "POST"
203
+ o.http_request_uri = "/device_authorization"
204
+ o['authtype'] = "none"
205
+ o.input = Shapes::ShapeRef.new(shape: StartDeviceAuthorizationRequest)
206
+ o.output = Shapes::ShapeRef.new(shape: StartDeviceAuthorizationResponse)
207
+ o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
208
+ o.errors << Shapes::ShapeRef.new(shape: InvalidClientException)
209
+ o.errors << Shapes::ShapeRef.new(shape: UnauthorizedClientException)
210
+ o.errors << Shapes::ShapeRef.new(shape: SlowDownException)
211
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
212
+ end)
213
+ end
214
+
215
+ end
216
+ end
@@ -0,0 +1 @@
1
+ # frozen_string_literal: true
@@ -0,0 +1,66 @@
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::SSOOIDC
11
+ # Endpoint parameters used to influence endpoints per request.
12
+ #
13
+ # @!attribute region
14
+ # The AWS region used to dispatch the request.
15
+ #
16
+ # @return [String]
17
+ #
18
+ # @!attribute use_dual_stack
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
+ #
21
+ # @return [Boolean]
22
+ #
23
+ # @!attribute use_fips
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
+ #
26
+ # @return [Boolean]
27
+ #
28
+ # @!attribute endpoint
29
+ # Override the endpoint used to send this request
30
+ #
31
+ # @return [String]
32
+ #
33
+ EndpointParameters = Struct.new(
34
+ :region,
35
+ :use_dual_stack,
36
+ :use_fips,
37
+ :endpoint,
38
+ ) do
39
+ include Aws::Structure
40
+
41
+ # @api private
42
+ class << self
43
+ PARAM_MAP = {
44
+ 'Region' => :region,
45
+ 'UseDualStack' => :use_dual_stack,
46
+ 'UseFIPS' => :use_fips,
47
+ 'Endpoint' => :endpoint,
48
+ }.freeze
49
+ end
50
+
51
+ def initialize(options = {})
52
+ self[:region] = options[:region]
53
+ self[:use_dual_stack] = options[:use_dual_stack]
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
+ self[:use_fips] = options[:use_fips]
59
+ 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
+ self[:endpoint] = options[:endpoint]
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,51 @@
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::SSOOIDC
11
+ class EndpointProvider
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 (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
33
+ 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"
38
+ end
39
+ 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: {})
42
+ end
43
+ raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
44
+ end
45
+ return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
46
+ end
47
+ raise ArgumentError, 'No endpoint could be resolved'
48
+
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,58 @@
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
+
11
+ module Aws::SSOOIDC
12
+ # @api private
13
+ module Endpoints
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 RegisterClient
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
+
43
+ class StartDeviceAuthorization
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
55
+ end
56
+
57
+ end
58
+ end
@@ -0,0 +1,290 @@
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::SSOOIDC
11
+
12
+ # When SSOOIDC returns an error response, the Ruby SDK constructs and raises an error.
13
+ # These errors all extend Aws::SSOOIDC::Errors::ServiceError < {Aws::Errors::ServiceError}
14
+ #
15
+ # You can rescue all SSOOIDC errors using ServiceError:
16
+ #
17
+ # begin
18
+ # # do stuff
19
+ # rescue Aws::SSOOIDC::Errors::ServiceError
20
+ # # rescues all SSOOIDC 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
+ # * {AccessDeniedException}
31
+ # * {AuthorizationPendingException}
32
+ # * {ExpiredTokenException}
33
+ # * {InternalServerException}
34
+ # * {InvalidClientException}
35
+ # * {InvalidClientMetadataException}
36
+ # * {InvalidGrantException}
37
+ # * {InvalidRequestException}
38
+ # * {InvalidScopeException}
39
+ # * {SlowDownException}
40
+ # * {UnauthorizedClientException}
41
+ # * {UnsupportedGrantTypeException}
42
+ #
43
+ # Additionally, error classes are dynamically generated for service errors based on the error code
44
+ # if they are not defined above.
45
+ module Errors
46
+
47
+ extend Aws::Errors::DynamicErrors
48
+
49
+ class AccessDeniedException < ServiceError
50
+
51
+ # @param [Seahorse::Client::RequestContext] context
52
+ # @param [String] message
53
+ # @param [Aws::SSOOIDC::Types::AccessDeniedException] data
54
+ def initialize(context, message, data = Aws::EmptyStructure.new)
55
+ super(context, message, data)
56
+ end
57
+
58
+ # @return [String]
59
+ def error
60
+ @data[:error]
61
+ end
62
+
63
+ # @return [String]
64
+ def error_description
65
+ @data[:error_description]
66
+ end
67
+ end
68
+
69
+ class AuthorizationPendingException < ServiceError
70
+
71
+ # @param [Seahorse::Client::RequestContext] context
72
+ # @param [String] message
73
+ # @param [Aws::SSOOIDC::Types::AuthorizationPendingException] data
74
+ def initialize(context, message, data = Aws::EmptyStructure.new)
75
+ super(context, message, data)
76
+ end
77
+
78
+ # @return [String]
79
+ def error
80
+ @data[:error]
81
+ end
82
+
83
+ # @return [String]
84
+ def error_description
85
+ @data[:error_description]
86
+ end
87
+ end
88
+
89
+ class ExpiredTokenException < ServiceError
90
+
91
+ # @param [Seahorse::Client::RequestContext] context
92
+ # @param [String] message
93
+ # @param [Aws::SSOOIDC::Types::ExpiredTokenException] data
94
+ def initialize(context, message, data = Aws::EmptyStructure.new)
95
+ super(context, message, data)
96
+ end
97
+
98
+ # @return [String]
99
+ def error
100
+ @data[:error]
101
+ end
102
+
103
+ # @return [String]
104
+ def error_description
105
+ @data[:error_description]
106
+ end
107
+ end
108
+
109
+ class InternalServerException < ServiceError
110
+
111
+ # @param [Seahorse::Client::RequestContext] context
112
+ # @param [String] message
113
+ # @param [Aws::SSOOIDC::Types::InternalServerException] data
114
+ def initialize(context, message, data = Aws::EmptyStructure.new)
115
+ super(context, message, data)
116
+ end
117
+
118
+ # @return [String]
119
+ def error
120
+ @data[:error]
121
+ end
122
+
123
+ # @return [String]
124
+ def error_description
125
+ @data[:error_description]
126
+ end
127
+ end
128
+
129
+ class InvalidClientException < ServiceError
130
+
131
+ # @param [Seahorse::Client::RequestContext] context
132
+ # @param [String] message
133
+ # @param [Aws::SSOOIDC::Types::InvalidClientException] data
134
+ def initialize(context, message, data = Aws::EmptyStructure.new)
135
+ super(context, message, data)
136
+ end
137
+
138
+ # @return [String]
139
+ def error
140
+ @data[:error]
141
+ end
142
+
143
+ # @return [String]
144
+ def error_description
145
+ @data[:error_description]
146
+ end
147
+ end
148
+
149
+ class InvalidClientMetadataException < ServiceError
150
+
151
+ # @param [Seahorse::Client::RequestContext] context
152
+ # @param [String] message
153
+ # @param [Aws::SSOOIDC::Types::InvalidClientMetadataException] data
154
+ def initialize(context, message, data = Aws::EmptyStructure.new)
155
+ super(context, message, data)
156
+ end
157
+
158
+ # @return [String]
159
+ def error
160
+ @data[:error]
161
+ end
162
+
163
+ # @return [String]
164
+ def error_description
165
+ @data[:error_description]
166
+ end
167
+ end
168
+
169
+ class InvalidGrantException < ServiceError
170
+
171
+ # @param [Seahorse::Client::RequestContext] context
172
+ # @param [String] message
173
+ # @param [Aws::SSOOIDC::Types::InvalidGrantException] data
174
+ def initialize(context, message, data = Aws::EmptyStructure.new)
175
+ super(context, message, data)
176
+ end
177
+
178
+ # @return [String]
179
+ def error
180
+ @data[:error]
181
+ end
182
+
183
+ # @return [String]
184
+ def error_description
185
+ @data[:error_description]
186
+ end
187
+ end
188
+
189
+ class InvalidRequestException < ServiceError
190
+
191
+ # @param [Seahorse::Client::RequestContext] context
192
+ # @param [String] message
193
+ # @param [Aws::SSOOIDC::Types::InvalidRequestException] data
194
+ def initialize(context, message, data = Aws::EmptyStructure.new)
195
+ super(context, message, data)
196
+ end
197
+
198
+ # @return [String]
199
+ def error
200
+ @data[:error]
201
+ end
202
+
203
+ # @return [String]
204
+ def error_description
205
+ @data[:error_description]
206
+ end
207
+ end
208
+
209
+ class InvalidScopeException < ServiceError
210
+
211
+ # @param [Seahorse::Client::RequestContext] context
212
+ # @param [String] message
213
+ # @param [Aws::SSOOIDC::Types::InvalidScopeException] data
214
+ def initialize(context, message, data = Aws::EmptyStructure.new)
215
+ super(context, message, data)
216
+ end
217
+
218
+ # @return [String]
219
+ def error
220
+ @data[:error]
221
+ end
222
+
223
+ # @return [String]
224
+ def error_description
225
+ @data[:error_description]
226
+ end
227
+ end
228
+
229
+ class SlowDownException < ServiceError
230
+
231
+ # @param [Seahorse::Client::RequestContext] context
232
+ # @param [String] message
233
+ # @param [Aws::SSOOIDC::Types::SlowDownException] data
234
+ def initialize(context, message, data = Aws::EmptyStructure.new)
235
+ super(context, message, data)
236
+ end
237
+
238
+ # @return [String]
239
+ def error
240
+ @data[:error]
241
+ end
242
+
243
+ # @return [String]
244
+ def error_description
245
+ @data[:error_description]
246
+ end
247
+ end
248
+
249
+ class UnauthorizedClientException < ServiceError
250
+
251
+ # @param [Seahorse::Client::RequestContext] context
252
+ # @param [String] message
253
+ # @param [Aws::SSOOIDC::Types::UnauthorizedClientException] data
254
+ def initialize(context, message, data = Aws::EmptyStructure.new)
255
+ super(context, message, data)
256
+ end
257
+
258
+ # @return [String]
259
+ def error
260
+ @data[:error]
261
+ end
262
+
263
+ # @return [String]
264
+ def error_description
265
+ @data[:error_description]
266
+ end
267
+ end
268
+
269
+ class UnsupportedGrantTypeException < ServiceError
270
+
271
+ # @param [Seahorse::Client::RequestContext] context
272
+ # @param [String] message
273
+ # @param [Aws::SSOOIDC::Types::UnsupportedGrantTypeException] data
274
+ def initialize(context, message, data = Aws::EmptyStructure.new)
275
+ super(context, message, data)
276
+ end
277
+
278
+ # @return [String]
279
+ def error
280
+ @data[:error]
281
+ end
282
+
283
+ # @return [String]
284
+ def error_description
285
+ @data[:error_description]
286
+ end
287
+ end
288
+
289
+ end
290
+ end