233 233 |
|
234 234 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateTrafficPolicyInstanceEndpointParamsInterceptor {
|
235 235 | fn name(&self) -> &'static str {
|
236 236 | "UpdateTrafficPolicyInstanceEndpointParamsInterceptor"
|
237 237 | }
|
238 238 |
|
239 239 | fn read_before_execution(
|
240 240 | &self,
|
241 241 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
242 242 | '_,
|
243 243 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
244 244 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
245 245 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
246 246 | >,
|
247 247 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
248 248 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
249 249 | let _input = context
|
250 250 | .input()
|
251 251 | .downcast_ref::<UpdateTrafficPolicyInstanceInput>()
|
252 252 | .ok_or("failed to downcast to UpdateTrafficPolicyInstanceInput")?;
|
253 253 |
|
254 254 | let params = crate::config::endpoint::Params::builder()
|
255 255 | .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
|
256 256 | .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
|
257 257 | .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
|
258 258 | .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
|
259 259 | .build()
|
260 260 | .map_err(|err| {
|
261 261 | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
262 262 | })?;
|
263 + |
|
263 264 | cfg.interceptor_state()
|
264 265 | .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
|
266 + |
|
265 267 | ::std::result::Result::Ok(())
|
266 268 | }
|
267 269 | }
|
268 270 |
|
269 271 | // The get_* functions below are generated from JMESPath expressions in the
|
270 272 | // operationContextParams trait. They target the operation's input shape.
|
271 273 |
|
272 274 | /// Error type for the `UpdateTrafficPolicyInstanceError` operation.
|
273 275 | #[non_exhaustive]
|
274 276 | #[derive(::std::fmt::Debug)]
|
275 277 | pub enum UpdateTrafficPolicyInstanceError {
|
276 278 | /// <p>You tried to update a traffic policy instance by using a traffic policy version that has a different DNS type than the current type for the instance. You specified the type in the JSON document in the <code>CreateTrafficPolicy</code> or <code>CreateTrafficPolicyVersion</code>request.</p>
|
277 279 | ConflictingTypes(crate::types::error::ConflictingTypes),
|
278 280 | /// <p>The input is not valid.</p>
|
279 281 | InvalidInput(crate::types::error::InvalidInput),
|
280 282 | /// <p>No traffic policy exists with the specified ID.</p>
|
281 283 | NoSuchTrafficPolicy(crate::types::error::NoSuchTrafficPolicy),
|
282 284 | /// <p>No traffic policy instance exists with the specified ID.</p>
|
283 285 | NoSuchTrafficPolicyInstance(crate::types::error::NoSuchTrafficPolicyInstance),
|
284 286 | /// <p>If Amazon Route 53 can't process a request before the next request arrives, it will reject subsequent requests for the same hosted zone and return an <code>HTTP 400 error</code> (<code>Bad request</code>). If Route 53 returns this error repeatedly for the same request, we recommend that you wait, in intervals of increasing duration, before you try the request again.</p>
|
285 287 | PriorRequestNotComplete(crate::types::error::PriorRequestNotComplete),
|
286 288 | /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
|
287 289 | #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
|
288 290 | variable wildcard pattern and check `.code()`:
|
289 291 | \
|
290 292 | `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
|
291 293 | \
|
292 294 | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-UpdateTrafficPolicyInstanceError) for what information is available for the error.")]
|
293 295 | Unhandled(crate::error::sealed_unhandled::Unhandled),
|
294 296 | }
|