221 221 |
|
222 222 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateContainerAgentEndpointParamsInterceptor {
|
223 223 | fn name(&self) -> &'static str {
|
224 224 | "UpdateContainerAgentEndpointParamsInterceptor"
|
225 225 | }
|
226 226 |
|
227 227 | fn read_before_execution(
|
228 228 | &self,
|
229 229 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
230 230 | '_,
|
231 231 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
232 232 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
233 233 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
234 234 | >,
|
235 235 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
236 236 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
237 237 | let _input = context
|
238 238 | .input()
|
239 239 | .downcast_ref::<UpdateContainerAgentInput>()
|
240 240 | .ok_or("failed to downcast to UpdateContainerAgentInput")?;
|
241 241 |
|
242 242 | let params = crate::config::endpoint::Params::builder()
|
243 243 | .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
|
244 244 | .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
|
245 245 | .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
|
246 246 | .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
|
247 247 | .build()
|
248 248 | .map_err(|err| {
|
249 249 | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
250 250 | })?;
|
251 + |
|
251 252 | cfg.interceptor_state()
|
252 253 | .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
|
254 + |
|
253 255 | ::std::result::Result::Ok(())
|
254 256 | }
|
255 257 | }
|
256 258 |
|
257 259 | // The get_* functions below are generated from JMESPath expressions in the
|
258 260 | // operationContextParams trait. They target the operation's input shape.
|
259 261 |
|
260 262 | /// Error type for the `UpdateContainerAgentError` operation.
|
261 263 | #[non_exhaustive]
|
262 264 | #[derive(::std::fmt::Debug)]
|
263 265 | pub enum UpdateContainerAgentError {
|
264 266 | /// <p>These errors are usually caused by a client action. This client action might be using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Or, it might be specifying an identifier that isn't valid.</p>
|
265 267 | ClientException(crate::types::error::ClientException),
|
266 268 | /// <p>The specified cluster wasn't found. You can view your available clusters with <code>ListClusters</code>. Amazon ECS clusters are Region specific.</p>
|
267 269 | ClusterNotFoundException(crate::types::error::ClusterNotFoundException),
|
268 270 | /// <p>The specified parameter isn't valid. Review the available parameters for the API request.</p>
|
269 271 | InvalidParameterException(crate::types::error::InvalidParameterException),
|
270 272 | /// <p>Amazon ECS can't determine the current version of the Amazon ECS container agent on the container instance and doesn't have enough information to proceed with an update. This could be because the agent running on the container instance is a previous or custom version that doesn't use our version information.</p>
|
271 273 | MissingVersionException(crate::types::error::MissingVersionException),
|
272 274 | /// <p>There's no update available for this Amazon ECS container agent. This might be because the agent is already running the latest version or because it's so old that there's no update path to the current version.</p>
|
273 275 | NoUpdateAvailableException(crate::types::error::NoUpdateAvailableException),
|
274 276 | /// <p>These errors are usually caused by a server issue.</p>
|
275 277 | ServerException(crate::types::error::ServerException),
|
276 278 | /// <p>There's already a current Amazon ECS container agent update in progress on the container instance that's specified. If the container agent becomes disconnected while it's in a transitional stage, such as <code>PENDING</code> or <code>STAGING</code>, the update process can get stuck in that state. However, when the agent reconnects, it resumes where it stopped previously.</p>
|
277 279 | UpdateInProgressException(crate::types::error::UpdateInProgressException),
|
278 280 | /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
|
279 281 | #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
|
280 282 | variable wildcard pattern and check `.code()`:
|
281 283 | \
|
282 284 | `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
|