216 216 |
|
217 217 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateOpenIDConnectProviderEndpointParamsInterceptor {
|
218 218 | fn name(&self) -> &'static str {
|
219 219 | "CreateOpenIDConnectProviderEndpointParamsInterceptor"
|
220 220 | }
|
221 221 |
|
222 222 | fn read_before_execution(
|
223 223 | &self,
|
224 224 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
225 225 | '_,
|
226 226 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
227 227 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
228 228 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
229 229 | >,
|
230 230 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
231 231 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
232 232 | let _input = context
|
233 233 | .input()
|
234 234 | .downcast_ref::<CreateOpenIdConnectProviderInput>()
|
235 235 | .ok_or("failed to downcast to CreateOpenIdConnectProviderInput")?;
|
236 236 |
|
237 237 | let params = crate::config::endpoint::Params::builder()
|
238 238 | .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
|
239 239 | .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
|
240 240 | .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
|
241 241 | .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
|
242 242 | .build()
|
243 243 | .map_err(|err| {
|
244 244 | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
245 245 | })?;
|
246 + |
|
246 247 | cfg.interceptor_state()
|
247 248 | .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
|
249 + |
|
248 250 | ::std::result::Result::Ok(())
|
249 251 | }
|
250 252 | }
|
251 253 |
|
252 254 | // The get_* functions below are generated from JMESPath expressions in the
|
253 255 | // operationContextParams trait. They target the operation's input shape.
|
254 256 |
|
255 257 | /// Error type for the `CreateOpenIDConnectProviderError` operation.
|
256 258 | #[non_exhaustive]
|
257 259 | #[derive(::std::fmt::Debug)]
|
258 260 | pub enum CreateOpenIDConnectProviderError {
|
259 261 | /// <p>The request was rejected because multiple requests to change this object were submitted simultaneously. Wait a few minutes and submit your request again.</p>
|
260 262 | ConcurrentModificationException(crate::types::error::ConcurrentModificationException),
|
261 263 | /// <p>The request was rejected because it attempted to create a resource that already exists.</p>
|
262 264 | EntityAlreadyExistsException(crate::types::error::EntityAlreadyExistsException),
|
263 265 | /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
|
264 266 | InvalidInputException(crate::types::error::InvalidInputException),
|
265 267 | /// <p>The request was rejected because it attempted to create resources beyond the current Amazon Web Services account limits. The error message describes the limit exceeded.</p>
|
266 268 | LimitExceededException(crate::types::error::LimitExceededException),
|
267 269 | /// <p>The request failed because IAM cannot connect to the OpenID Connect identity provider URL.</p>
|
268 270 | OpenIdIdpCommunicationErrorException(crate::types::error::OpenIdIdpCommunicationErrorException),
|
269 271 | /// <p>The request processing has failed because of an unknown error, exception or failure.</p>
|
270 272 | ServiceFailureException(crate::types::error::ServiceFailureException),
|
271 273 | /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
|
272 274 | #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
|
273 275 | variable wildcard pattern and check `.code()`:
|
274 276 | \
|
275 277 | `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
|
276 278 | \
|
277 279 | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-CreateOpenIDConnectProviderError) for what information is available for the error.")]
|