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