213 213 |
|
214 214 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for EnableMFADeviceEndpointParamsInterceptor {
|
215 215 | fn name(&self) -> &'static str {
|
216 216 | "EnableMFADeviceEndpointParamsInterceptor"
|
217 217 | }
|
218 218 |
|
219 219 | fn read_before_execution(
|
220 220 | &self,
|
221 221 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
222 222 | '_,
|
223 223 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
224 224 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
225 225 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
226 226 | >,
|
227 227 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
228 228 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
229 229 | let _input = context
|
230 230 | .input()
|
231 231 | .downcast_ref::<EnableMfaDeviceInput>()
|
232 232 | .ok_or("failed to downcast to EnableMfaDeviceInput")?;
|
233 233 |
|
234 234 | let params = crate::config::endpoint::Params::builder()
|
235 235 | .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
|
236 236 | .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
|
237 237 | .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
|
238 238 | .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
|
239 239 | .build()
|
240 240 | .map_err(|err| {
|
241 241 | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
242 242 | })?;
|
243 + |
|
243 244 | cfg.interceptor_state()
|
244 245 | .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
|
246 + |
|
245 247 | ::std::result::Result::Ok(())
|
246 248 | }
|
247 249 | }
|
248 250 |
|
249 251 | // The get_* functions below are generated from JMESPath expressions in the
|
250 252 | // operationContextParams trait. They target the operation's input shape.
|
251 253 |
|
252 254 | /// Error type for the `EnableMFADeviceError` operation.
|
253 255 | #[non_exhaustive]
|
254 256 | #[derive(::std::fmt::Debug)]
|
255 257 | pub enum EnableMFADeviceError {
|
256 258 | /// <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>
|
257 259 | ConcurrentModificationException(crate::types::error::ConcurrentModificationException),
|
258 260 | /// <p>The request was rejected because it attempted to create a resource that already exists.</p>
|
259 261 | EntityAlreadyExistsException(crate::types::error::EntityAlreadyExistsException),
|
260 262 | /// <p>The request was rejected because it referenced an entity that is temporarily unmodifiable, such as a user name that was deleted and then recreated. The error indicates that the request is likely to succeed if you try again after waiting several minutes. The error message describes the entity.</p>
|
261 263 | EntityTemporarilyUnmodifiableException(crate::types::error::EntityTemporarilyUnmodifiableException),
|
262 264 | /// <p>The request was rejected because the authentication code was not recognized. The error message describes the specific error.</p>
|
263 265 | InvalidAuthenticationCodeException(crate::types::error::InvalidAuthenticationCodeException),
|
264 266 | /// <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>
|
265 267 | LimitExceededException(crate::types::error::LimitExceededException),
|
266 268 | /// <p>The request was rejected because it referenced a resource entity that does not exist. The error message describes the resource.</p>
|
267 269 | NoSuchEntityException(crate::types::error::NoSuchEntityException),
|
268 270 | /// <p>The request processing has failed because of an unknown error, exception or failure.</p>
|
269 271 | ServiceFailureException(crate::types::error::ServiceFailureException),
|
270 272 | /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
|
271 273 | #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
|
272 274 | variable wildcard pattern and check `.code()`:
|
273 275 | \
|
274 276 | `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
|