220 220 |
|
221 221 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ModifyVerifiedAccessInstanceLoggingConfigurationEndpointParamsInterceptor {
|
222 222 | fn name(&self) -> &'static str {
|
223 223 | "ModifyVerifiedAccessInstanceLoggingConfigurationEndpointParamsInterceptor"
|
224 224 | }
|
225 225 |
|
226 226 | fn read_before_execution(
|
227 227 | &self,
|
228 228 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
229 229 | '_,
|
230 230 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
231 231 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
232 232 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
233 233 | >,
|
234 234 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
235 235 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
236 236 | let _input = context
|
237 237 | .input()
|
238 238 | .downcast_ref::<ModifyVerifiedAccessInstanceLoggingConfigurationInput>()
|
239 239 | .ok_or("failed to downcast to ModifyVerifiedAccessInstanceLoggingConfigurationInput")?;
|
240 240 |
|
241 241 | let params = crate::config::endpoint::Params::builder()
|
242 242 | .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
|
243 243 | .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
|
244 244 | .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
|
245 245 | .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
|
246 246 | .build()
|
247 247 | .map_err(|err| {
|
248 248 | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
249 249 | })?;
|
250 + |
|
250 251 | cfg.interceptor_state()
|
251 252 | .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
|
253 + |
|
252 254 | ::std::result::Result::Ok(())
|
253 255 | }
|
254 256 | }
|
255 257 |
|
256 258 | // The get_* functions below are generated from JMESPath expressions in the
|
257 259 | // operationContextParams trait. They target the operation's input shape.
|
258 260 |
|
259 261 | /// Error type for the `ModifyVerifiedAccessInstanceLoggingConfigurationError` operation.
|
260 262 | #[non_exhaustive]
|
261 263 | #[derive(::std::fmt::Debug)]
|
262 264 | pub enum ModifyVerifiedAccessInstanceLoggingConfigurationError {
|
263 265 | /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
|
264 266 | #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
|
265 267 | variable wildcard pattern and check `.code()`:
|
266 268 | \
|
267 269 | `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
|
268 270 | \
|
269 271 | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-ModifyVerifiedAccessInstanceLoggingConfigurationError) for what information is available for the error.")]
|
270 272 | Unhandled(crate::error::sealed_unhandled::Unhandled),
|
271 273 | }
|
272 274 | impl ModifyVerifiedAccessInstanceLoggingConfigurationError {
|
273 275 | /// Creates the `ModifyVerifiedAccessInstanceLoggingConfigurationError::Unhandled` variant from any error type.
|
274 276 | pub fn unhandled(
|
275 277 | err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
|
276 278 | ) -> Self {
|
277 279 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
278 280 | source: err.into(),
|
279 281 | meta: ::std::default::Default::default(),
|
280 282 | })
|
281 283 | }
|