Skip to main content

aws_sdk_imagebuilder/operation/
update_infrastructure_configuration.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Orchestration and serialization glue logic for `UpdateInfrastructureConfiguration`.
3#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct UpdateInfrastructureConfiguration;
6impl UpdateInfrastructureConfiguration {
7    /// Creates a new `UpdateInfrastructureConfiguration`
8    pub fn new() -> Self {
9        Self
10    }
11    pub(crate) async fn orchestrate(
12        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
13        input: crate::operation::update_infrastructure_configuration::UpdateInfrastructureConfigurationInput,
14    ) -> ::std::result::Result<
15        crate::operation::update_infrastructure_configuration::UpdateInfrastructureConfigurationOutput,
16        ::aws_smithy_runtime_api::client::result::SdkError<
17            crate::operation::update_infrastructure_configuration::UpdateInfrastructureConfigurationError,
18            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
19        >,
20    > {
21        let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError<
22            ::aws_smithy_runtime_api::client::interceptors::context::Error,
23            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
24        >| {
25            err.map_service_error(|err| {
26                err.downcast::<crate::operation::update_infrastructure_configuration::UpdateInfrastructureConfigurationError>()
27                    .expect("correct error type")
28            })
29        };
30        let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
31            .await
32            .map_err(map_err)?;
33        let output = context.finalize().map_err(map_err)?;
34        ::std::result::Result::Ok(
35            output
36                .downcast::<crate::operation::update_infrastructure_configuration::UpdateInfrastructureConfigurationOutput>()
37                .expect("correct output type"),
38        )
39    }
40
41    pub(crate) async fn orchestrate_with_stop_point(
42        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
43        input: crate::operation::update_infrastructure_configuration::UpdateInfrastructureConfigurationInput,
44        stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
45    ) -> ::std::result::Result<
46        ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
47        ::aws_smithy_runtime_api::client::result::SdkError<
48            ::aws_smithy_runtime_api::client::interceptors::context::Error,
49            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
50        >,
51    > {
52        let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
53        use ::tracing::Instrument;
54        ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point(
55            "imagebuilder",
56            "UpdateInfrastructureConfiguration",
57            input,
58            runtime_plugins,
59            stop_point,
60        )
61        // Create a parent span for the entire operation. Includes a random, internal-only,
62        // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
63        .instrument(::tracing::debug_span!(
64            "imagebuilder.UpdateInfrastructureConfiguration",
65            "rpc.service" = "imagebuilder",
66            "rpc.method" = "UpdateInfrastructureConfiguration",
67            "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
68            "rpc.system" = "aws-api",
69        ))
70        .await
71    }
72
73    pub(crate) fn operation_runtime_plugins(
74        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
75        client_config: &crate::config::Config,
76        config_override: ::std::option::Option<crate::config::Builder>,
77    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
78        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
79        runtime_plugins = runtime_plugins.with_operation_plugin(crate::client_idempotency_token::IdempotencyTokenRuntimePlugin::new(
80            |token_provider, input| {
81                let input: &mut crate::operation::update_infrastructure_configuration::UpdateInfrastructureConfigurationInput =
82                    input.downcast_mut().expect("correct type");
83                if input.client_token.is_none() {
84                    input.client_token = ::std::option::Option::Some(token_provider.make_idempotency_token());
85                }
86            },
87        ));
88        if let ::std::option::Option::Some(config_override) = config_override {
89            for plugin in config_override.runtime_plugins.iter().cloned() {
90                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
91            }
92            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
93                config_override,
94                client_config.config.clone(),
95                &client_config.runtime_components,
96            ));
97        }
98        runtime_plugins
99    }
100}
101impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for UpdateInfrastructureConfiguration {
102    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
103        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("UpdateInfrastructureConfiguration");
104
105        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
106            UpdateInfrastructureConfigurationRequestSerializer,
107        ));
108        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
109            UpdateInfrastructureConfigurationResponseDeserializer,
110        ));
111
112        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
113            crate::config::auth::Params::builder()
114                .operation_name("UpdateInfrastructureConfiguration")
115                .build()
116                .expect("required fields set"),
117        ));
118
119        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
120            "UpdateInfrastructureConfiguration",
121            "imagebuilder",
122        ));
123        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
124        signing_options.double_uri_encode = true;
125        signing_options.content_sha256_header = false;
126        signing_options.normalize_uri_path = true;
127        signing_options.payload_override = None;
128
129        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
130            signing_options,
131            ..::std::default::Default::default()
132        });
133
134        ::std::option::Option::Some(cfg.freeze())
135    }
136
137    fn runtime_components(
138        &self,
139        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
140    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
141        #[allow(unused_mut)]
142        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("UpdateInfrastructureConfiguration")
143            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
144                UpdateInfrastructureConfigurationTelemetryInputCaptureInterceptor,
145            ))
146            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
147                ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
148            ))
149            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
150                UpdateInfrastructureConfigurationEndpointParamsInterceptor,
151            ))
152            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
153                crate::operation::update_infrastructure_configuration::UpdateInfrastructureConfigurationError,
154            >::new())
155            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
156                crate::operation::update_infrastructure_configuration::UpdateInfrastructureConfigurationError,
157            >::new())
158            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
159                crate::operation::update_infrastructure_configuration::UpdateInfrastructureConfigurationError,
160            >::new())
161            .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
162                crate::operation::update_infrastructure_configuration::UpdateInfrastructureConfigurationError,
163            >::new());
164
165        ::std::borrow::Cow::Owned(rcb)
166    }
167}
168
169#[derive(Debug)]
170struct UpdateInfrastructureConfigurationTelemetryInputCaptureInterceptor;
171
172#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
173impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateInfrastructureConfigurationTelemetryInputCaptureInterceptor {
174    fn name(&self) -> &'static str {
175        "UpdateInfrastructureConfigurationTelemetryInputCaptureInterceptor"
176    }
177
178    fn read_before_execution(
179        &self,
180        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
181            '_,
182            ::aws_smithy_runtime_api::client::interceptors::context::Input,
183            ::aws_smithy_runtime_api::client::interceptors::context::Output,
184            ::aws_smithy_runtime_api::client::interceptors::context::Error,
185        >,
186        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
187    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
188        // Nothing to do unless the customer opted in by naming members to record.
189        let ::std::option::Option::Some(requested) = cfg
190            .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
191            .filter(|r| !r.is_empty())
192        else {
193            return ::std::result::Result::Ok(());
194        };
195
196        let ::std::option::Option::Some(input) = context.input().downcast_ref::<UpdateInfrastructureConfigurationInput>() else {
197            // A mismatched input is not this interceptor's concern; skip quietly.
198            return ::std::result::Result::Ok(());
199        };
200
201        let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
202        if requested.should_capture("infrastructureConfigurationArn") {
203            if let ::std::option::Option::Some(value) = input.infrastructure_configuration_arn.as_deref() {
204                captured.insert("infrastructureConfigurationArn", value);
205            }
206        }
207        if requested.should_capture("description") {
208            if let ::std::option::Option::Some(value) = input.description.as_deref() {
209                captured.insert("description", value);
210            }
211        }
212        if requested.should_capture("instanceProfileName") {
213            if let ::std::option::Option::Some(value) = input.instance_profile_name.as_deref() {
214                captured.insert("instanceProfileName", value);
215            }
216        }
217        if requested.should_capture("subnetId") {
218            if let ::std::option::Option::Some(value) = input.subnet_id.as_deref() {
219                captured.insert("subnetId", value);
220            }
221        }
222        if requested.should_capture("keyPair") {
223            if let ::std::option::Option::Some(value) = input.key_pair.as_deref() {
224                captured.insert("keyPair", value);
225            }
226        }
227        if requested.should_capture("snsTopicArn") {
228            if let ::std::option::Option::Some(value) = input.sns_topic_arn.as_deref() {
229                captured.insert("snsTopicArn", value);
230            }
231        }
232        if requested.should_capture("clientToken") {
233            if let ::std::option::Option::Some(value) = input.client_token.as_deref() {
234                captured.insert("clientToken", value);
235            }
236        }
237
238        cfg.interceptor_state().store_put(captured);
239        ::std::result::Result::Ok(())
240    }
241}
242#[derive(Debug)]
243struct UpdateInfrastructureConfigurationResponseDeserializer;
244impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateInfrastructureConfigurationResponseDeserializer {
245    fn deserialize_nonstreaming_with_config(
246        &self,
247        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
248        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
249    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
250        let (success, status) = (response.status().is_success(), response.status().as_u16());
251        let headers = response.headers();
252        let body = response.body().bytes().expect("body loaded");
253        #[allow(unused_mut)]
254        let mut force_error = false;
255        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
256        let parse_result = if !success && status != 200 || force_error {
257            crate::protocol_serde::shape_update_infrastructure_configuration::de_update_infrastructure_configuration_http_error(status, headers, body)
258        } else {
259            crate::protocol_serde::shape_update_infrastructure_configuration::de_update_infrastructure_configuration_http_response(
260                status, headers, body,
261            )
262        };
263        crate::protocol_serde::type_erase_result(parse_result)
264    }
265}
266#[derive(Debug)]
267struct UpdateInfrastructureConfigurationRequestSerializer;
268impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateInfrastructureConfigurationRequestSerializer {
269    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
270    fn serialize_input(
271        &self,
272        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
273        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
274    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
275        let input = input
276            .downcast::<crate::operation::update_infrastructure_configuration::UpdateInfrastructureConfigurationInput>()
277            .expect("correct type");
278        let _header_serialization_settings = _cfg
279            .load::<crate::serialization_settings::HeaderSerializationSettings>()
280            .cloned()
281            .unwrap_or_default();
282        let mut request_builder = {
283            #[allow(clippy::uninlined_format_args)]
284            fn uri_base(
285                _input: &crate::operation::update_infrastructure_configuration::UpdateInfrastructureConfigurationInput,
286                output: &mut ::std::string::String,
287            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
288                use ::std::fmt::Write as _;
289                ::std::write!(output, "/UpdateInfrastructureConfiguration").expect("formatting should succeed");
290                ::std::result::Result::Ok(())
291            }
292            #[allow(clippy::unnecessary_wraps)]
293            fn update_http_builder(
294                input: &crate::operation::update_infrastructure_configuration::UpdateInfrastructureConfigurationInput,
295                builder: ::http_1x::request::Builder,
296            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
297                let mut uri = ::std::string::String::new();
298                uri_base(input, &mut uri)?;
299                ::std::result::Result::Ok(builder.method("PUT").uri(uri))
300            }
301            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
302            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/json");
303            builder
304        };
305        let body = ::aws_smithy_types::body::SdkBody::from(
306            crate::protocol_serde::shape_update_infrastructure_configuration::ser_update_infrastructure_configuration_input(&input)?,
307        );
308        if let Some(content_length) = body.content_length() {
309            let content_length = content_length.to_string();
310            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
311        }
312        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
313    }
314}
315#[derive(Debug)]
316struct UpdateInfrastructureConfigurationEndpointParamsInterceptor;
317
318#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
319impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateInfrastructureConfigurationEndpointParamsInterceptor {
320    fn name(&self) -> &'static str {
321        "UpdateInfrastructureConfigurationEndpointParamsInterceptor"
322    }
323
324    fn read_before_execution(
325        &self,
326        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
327            '_,
328            ::aws_smithy_runtime_api::client::interceptors::context::Input,
329            ::aws_smithy_runtime_api::client::interceptors::context::Output,
330            ::aws_smithy_runtime_api::client::interceptors::context::Error,
331        >,
332        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
333    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
334        let _input = context
335            .input()
336            .downcast_ref::<UpdateInfrastructureConfigurationInput>()
337            .ok_or("failed to downcast to UpdateInfrastructureConfigurationInput")?;
338
339        let params = crate::config::endpoint::Params::builder()
340            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
341            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
342            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
343            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
344            .build()
345            .map_err(|err| {
346                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
347            })?;
348        cfg.interceptor_state()
349            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
350        ::std::result::Result::Ok(())
351    }
352}
353
354// The get_* functions below are generated from JMESPath expressions in the
355// operationContextParams trait. They target the operation's input shape.
356
357/// Error type for the `UpdateInfrastructureConfigurationError` operation.
358#[non_exhaustive]
359#[derive(::std::fmt::Debug)]
360pub enum UpdateInfrastructureConfigurationError {
361    /// <p>You have exceeded the permitted request rate for the specific operation.</p>
362    CallRateLimitExceededException(crate::types::error::CallRateLimitExceededException),
363    /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an invalid resource identifier.</p>
364    ClientException(crate::types::error::ClientException),
365    /// <p>You are not authorized to perform the requested operation.</p>
366    ForbiddenException(crate::types::error::ForbiddenException),
367    /// <p>You have specified a client token for an operation using parameter values that differ from a previous request that used the same client token.</p>
368    IdempotentParameterMismatchException(crate::types::error::IdempotentParameterMismatchException),
369    /// <p>You have requested an action that that the service doesn't support.</p>
370    InvalidRequestException(crate::types::error::InvalidRequestException),
371    /// <p>The resource that you are trying to operate on is currently in use. Review the message details and retry later.</p>
372    ResourceInUseException(crate::types::error::ResourceInUseException),
373    /// <p>This exception is thrown when the service encounters an unrecoverable exception.</p>
374    ServiceException(crate::types::error::ServiceException),
375    /// <p>The service is unable to process your request at this time.</p>
376    ServiceUnavailableException(crate::types::error::ServiceUnavailableException),
377    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
378    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
379    variable wildcard pattern and check `.code()`:
380     \
381    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
382     \
383    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-UpdateInfrastructureConfigurationError) for what information is available for the error.")]
384    Unhandled(crate::error::sealed_unhandled::Unhandled),
385}
386impl UpdateInfrastructureConfigurationError {
387    /// Creates the `UpdateInfrastructureConfigurationError::Unhandled` variant from any error type.
388    pub fn unhandled(
389        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
390    ) -> Self {
391        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
392            source: err.into(),
393            meta: ::std::default::Default::default(),
394        })
395    }
396
397    /// Creates the `UpdateInfrastructureConfigurationError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
398    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
399        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
400            source: err.clone().into(),
401            meta: err,
402        })
403    }
404    ///
405    /// Returns error metadata, which includes the error code, message,
406    /// request ID, and potentially additional information.
407    ///
408    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
409        match self {
410            Self::CallRateLimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
411            Self::ClientException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
412            Self::ForbiddenException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
413            Self::IdempotentParameterMismatchException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
414            Self::InvalidRequestException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
415            Self::ResourceInUseException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
416            Self::ServiceException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
417            Self::ServiceUnavailableException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
418            Self::Unhandled(e) => &e.meta,
419        }
420    }
421    /// Returns `true` if the error kind is `UpdateInfrastructureConfigurationError::CallRateLimitExceededException`.
422    pub fn is_call_rate_limit_exceeded_exception(&self) -> bool {
423        matches!(self, Self::CallRateLimitExceededException(_))
424    }
425    /// Returns `true` if the error kind is `UpdateInfrastructureConfigurationError::ClientException`.
426    pub fn is_client_exception(&self) -> bool {
427        matches!(self, Self::ClientException(_))
428    }
429    /// Returns `true` if the error kind is `UpdateInfrastructureConfigurationError::ForbiddenException`.
430    pub fn is_forbidden_exception(&self) -> bool {
431        matches!(self, Self::ForbiddenException(_))
432    }
433    /// Returns `true` if the error kind is `UpdateInfrastructureConfigurationError::IdempotentParameterMismatchException`.
434    pub fn is_idempotent_parameter_mismatch_exception(&self) -> bool {
435        matches!(self, Self::IdempotentParameterMismatchException(_))
436    }
437    /// Returns `true` if the error kind is `UpdateInfrastructureConfigurationError::InvalidRequestException`.
438    pub fn is_invalid_request_exception(&self) -> bool {
439        matches!(self, Self::InvalidRequestException(_))
440    }
441    /// Returns `true` if the error kind is `UpdateInfrastructureConfigurationError::ResourceInUseException`.
442    pub fn is_resource_in_use_exception(&self) -> bool {
443        matches!(self, Self::ResourceInUseException(_))
444    }
445    /// Returns `true` if the error kind is `UpdateInfrastructureConfigurationError::ServiceException`.
446    pub fn is_service_exception(&self) -> bool {
447        matches!(self, Self::ServiceException(_))
448    }
449    /// Returns `true` if the error kind is `UpdateInfrastructureConfigurationError::ServiceUnavailableException`.
450    pub fn is_service_unavailable_exception(&self) -> bool {
451        matches!(self, Self::ServiceUnavailableException(_))
452    }
453}
454impl ::std::error::Error for UpdateInfrastructureConfigurationError {
455    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
456        match self {
457            Self::CallRateLimitExceededException(_inner) => ::std::option::Option::Some(_inner),
458            Self::ClientException(_inner) => ::std::option::Option::Some(_inner),
459            Self::ForbiddenException(_inner) => ::std::option::Option::Some(_inner),
460            Self::IdempotentParameterMismatchException(_inner) => ::std::option::Option::Some(_inner),
461            Self::InvalidRequestException(_inner) => ::std::option::Option::Some(_inner),
462            Self::ResourceInUseException(_inner) => ::std::option::Option::Some(_inner),
463            Self::ServiceException(_inner) => ::std::option::Option::Some(_inner),
464            Self::ServiceUnavailableException(_inner) => ::std::option::Option::Some(_inner),
465            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
466        }
467    }
468}
469impl ::std::fmt::Display for UpdateInfrastructureConfigurationError {
470    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
471        match self {
472            Self::CallRateLimitExceededException(_inner) => _inner.fmt(f),
473            Self::ClientException(_inner) => _inner.fmt(f),
474            Self::ForbiddenException(_inner) => _inner.fmt(f),
475            Self::IdempotentParameterMismatchException(_inner) => _inner.fmt(f),
476            Self::InvalidRequestException(_inner) => _inner.fmt(f),
477            Self::ResourceInUseException(_inner) => _inner.fmt(f),
478            Self::ServiceException(_inner) => _inner.fmt(f),
479            Self::ServiceUnavailableException(_inner) => _inner.fmt(f),
480            Self::Unhandled(_inner) => {
481                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
482                    write!(f, "unhandled error ({code})")
483                } else {
484                    f.write_str("unhandled error")
485                }
486            }
487        }
488    }
489}
490impl ::aws_smithy_types::retry::ProvideErrorKind for UpdateInfrastructureConfigurationError {
491    fn code(&self) -> ::std::option::Option<&str> {
492        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
493    }
494    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
495        ::std::option::Option::None
496    }
497}
498impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for UpdateInfrastructureConfigurationError {
499    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
500        match self {
501            Self::CallRateLimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
502            Self::ClientException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
503            Self::ForbiddenException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
504            Self::IdempotentParameterMismatchException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
505            Self::InvalidRequestException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
506            Self::ResourceInUseException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
507            Self::ServiceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
508            Self::ServiceUnavailableException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
509            Self::Unhandled(_inner) => &_inner.meta,
510        }
511    }
512}
513impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UpdateInfrastructureConfigurationError {
514    fn create_unhandled_error(
515        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
516        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
517    ) -> Self {
518        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
519            source,
520            meta: meta.unwrap_or_default(),
521        })
522    }
523}
524impl ::aws_types::request_id::RequestId for crate::operation::update_infrastructure_configuration::UpdateInfrastructureConfigurationError {
525    fn request_id(&self) -> Option<&str> {
526        self.meta().request_id()
527    }
528}
529
530pub use crate::operation::update_infrastructure_configuration::_update_infrastructure_configuration_input::UpdateInfrastructureConfigurationInput;
531
532pub use crate::operation::update_infrastructure_configuration::_update_infrastructure_configuration_output::UpdateInfrastructureConfigurationOutput;
533
534mod _update_infrastructure_configuration_input;
535
536mod _update_infrastructure_configuration_output;
537
538/// Builders
539pub mod builders;