219 219 |
|
220 220 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateDatabaseEndpointParamsInterceptor {
|
221 221 | fn name(&self) -> &'static str {
|
222 222 | "UpdateDatabaseEndpointParamsInterceptor"
|
223 223 | }
|
224 224 |
|
225 225 | fn read_before_execution(
|
226 226 | &self,
|
227 227 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
228 228 | '_,
|
229 229 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
230 230 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
231 231 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
232 232 | >,
|
233 233 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
234 234 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
235 235 | let _input = context
|
236 236 | .input()
|
237 237 | .downcast_ref::<UpdateDatabaseInput>()
|
238 238 | .ok_or("failed to downcast to UpdateDatabaseInput")?;
|
239 239 |
|
240 240 | let params = crate::config::endpoint::Params::builder()
|
241 241 | .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
|
242 242 | .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
|
243 243 | .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
|
244 244 | .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
|
245 245 | .build()
|
246 246 | .map_err(|err| {
|
247 247 | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
248 248 | })?;
|
249 + |
|
249 250 | cfg.interceptor_state()
|
250 251 | .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
|
252 + |
|
251 253 | ::std::result::Result::Ok(())
|
252 254 | }
|
253 255 | }
|
254 256 |
|
255 257 | // The get_* functions below are generated from JMESPath expressions in the
|
256 258 | // operationContextParams trait. They target the operation's input shape.
|
257 259 |
|
258 260 | /// Error type for the `UpdateDatabaseError` operation.
|
259 261 | #[non_exhaustive]
|
260 262 | #[derive(::std::fmt::Debug)]
|
261 263 | pub enum UpdateDatabaseError {
|
262 264 | /// <p>You are not authorized to perform this action.</p>
|
263 265 | AccessDeniedException(crate::types::error::AccessDeniedException),
|
264 266 | /// <p>Timestream was unable to fully process this request because of an internal server error.</p>
|
265 267 | InternalServerException(crate::types::error::InternalServerException),
|
266 268 | /// <p>The requested endpoint was not valid.</p>
|
267 269 | InvalidEndpointException(crate::types::error::InvalidEndpointException),
|
268 270 | /// <p>The operation tried to access a nonexistent resource. The resource might not be specified correctly, or its status might not be ACTIVE.</p>
|
269 271 | ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
|
270 272 | /// <p>The instance quota of resource exceeded for this account.</p>
|
271 273 | ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
|
272 274 | /// <p>Too many requests were made by a user and they exceeded the service quotas. The request was throttled.</p>
|
273 275 | ThrottlingException(crate::types::error::ThrottlingException),
|
274 276 | /// <p>An invalid or malformed request.</p>
|
275 277 | ValidationException(crate::types::error::ValidationException),
|
276 278 | /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
|
277 279 | #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
|
278 280 | variable wildcard pattern and check `.code()`:
|
279 281 | \
|
280 282 | `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
|