244 244 |
|
245 245 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for InitiateJobEndpointParamsInterceptor {
|
246 246 | fn name(&self) -> &'static str {
|
247 247 | "InitiateJobEndpointParamsInterceptor"
|
248 248 | }
|
249 249 |
|
250 250 | fn read_before_execution(
|
251 251 | &self,
|
252 252 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
253 253 | '_,
|
254 254 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
255 255 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
256 256 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
257 257 | >,
|
258 258 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
259 259 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
260 260 | let _input = context
|
261 261 | .input()
|
262 262 | .downcast_ref::<InitiateJobInput>()
|
263 263 | .ok_or("failed to downcast to InitiateJobInput")?;
|
264 264 |
|
265 265 | let params = crate::config::endpoint::Params::builder()
|
266 266 | .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
|
267 267 | .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
|
268 268 | .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
|
269 269 | .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
|
270 270 | .build()
|
271 271 | .map_err(|err| {
|
272 272 | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
273 273 | })?;
|
274 + |
|
274 275 | cfg.interceptor_state()
|
275 276 | .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
|
277 + |
|
276 278 | ::std::result::Result::Ok(())
|
277 279 | }
|
278 280 | }
|
279 281 |
|
280 282 | // The get_* functions below are generated from JMESPath expressions in the
|
281 283 | // operationContextParams trait. They target the operation's input shape.
|
282 284 |
|
283 285 | /// Error type for the `InitiateJobError` operation.
|
284 286 | #[non_exhaustive]
|
285 287 | #[derive(::std::fmt::Debug)]
|
286 288 | pub enum InitiateJobError {
|
287 289 | /// <p>Returned if there is insufficient capacity to process this expedited request. This error only applies to expedited retrievals and not to standard or bulk retrievals.</p>
|
288 290 | InsufficientCapacityException(crate::types::error::InsufficientCapacityException),
|
289 291 | /// <p>Returned if a parameter of the request is incorrectly specified.</p>
|
290 292 | InvalidParameterValueException(crate::types::error::InvalidParameterValueException),
|
291 293 | /// <p>Returned if a required header or parameter is missing from the request.</p>
|
292 294 | MissingParameterValueException(crate::types::error::MissingParameterValueException),
|
293 295 | /// <p>Returned if a retrieval job would exceed the current data policy's retrieval rate limit. For more information about data retrieval policies,</p>
|
294 296 | PolicyEnforcedException(crate::types::error::PolicyEnforcedException),
|
295 297 | /// <p>Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.</p>
|
296 298 | ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
|
297 299 | /// <p>Returned if the service cannot complete the request.</p>
|
298 300 | ServiceUnavailableException(crate::types::error::ServiceUnavailableException),
|
299 301 | /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
|
300 302 | #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
|
301 303 | variable wildcard pattern and check `.code()`:
|
302 304 | \
|
303 305 | `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
|
304 306 | \
|
305 307 | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-InitiateJobError) for what information is available for the error.")]
|