Skip to main content

aws_sdk_lambda/operation/
update_function_configuration.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Orchestration and serialization glue logic for `UpdateFunctionConfiguration`.
3#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct UpdateFunctionConfiguration;
6impl UpdateFunctionConfiguration {
7    /// Creates a new `UpdateFunctionConfiguration`
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_function_configuration::UpdateFunctionConfigurationInput,
14    ) -> ::std::result::Result<
15        crate::operation::update_function_configuration::UpdateFunctionConfigurationOutput,
16        ::aws_smithy_runtime_api::client::result::SdkError<
17            crate::operation::update_function_configuration::UpdateFunctionConfigurationError,
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_function_configuration::UpdateFunctionConfigurationError>()
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_function_configuration::UpdateFunctionConfigurationOutput>()
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_function_configuration::UpdateFunctionConfigurationInput,
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            "Lambda",
56            "UpdateFunctionConfiguration",
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            "Lambda.UpdateFunctionConfiguration",
65            "rpc.service" = "Lambda",
66            "rpc.method" = "UpdateFunctionConfiguration",
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
80        if let ::std::option::Option::Some(config_override) = config_override {
81            for plugin in config_override.runtime_plugins.iter().cloned() {
82                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
83            }
84            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
85                config_override,
86                client_config.config.clone(),
87                &client_config.runtime_components,
88            ));
89        }
90        runtime_plugins
91    }
92}
93impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for UpdateFunctionConfiguration {
94    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
95        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("UpdateFunctionConfiguration");
96
97        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
98            UpdateFunctionConfigurationRequestSerializer,
99        ));
100        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
101            UpdateFunctionConfigurationResponseDeserializer,
102        ));
103
104        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
105            crate::config::auth::Params::builder()
106                .operation_name("UpdateFunctionConfiguration")
107                .build()
108                .expect("required fields set"),
109        ));
110
111        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::SensitiveOutput);
112        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
113            "UpdateFunctionConfiguration",
114            "Lambda",
115        ));
116        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
117        signing_options.double_uri_encode = true;
118        signing_options.content_sha256_header = false;
119        signing_options.normalize_uri_path = true;
120        signing_options.payload_override = None;
121
122        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
123            signing_options,
124            ..::std::default::Default::default()
125        });
126
127        ::std::option::Option::Some(cfg.freeze())
128    }
129
130    fn runtime_components(
131        &self,
132        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
133    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
134        #[allow(unused_mut)]
135        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("UpdateFunctionConfiguration")
136            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
137                UpdateFunctionConfigurationTelemetryInputCaptureInterceptor,
138            ))
139            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
140                ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
141            ))
142            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
143                UpdateFunctionConfigurationEndpointParamsInterceptor,
144            ))
145            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
146                crate::operation::update_function_configuration::UpdateFunctionConfigurationError,
147            >::new())
148            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
149                crate::operation::update_function_configuration::UpdateFunctionConfigurationError,
150            >::new())
151            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
152                crate::operation::update_function_configuration::UpdateFunctionConfigurationError,
153            >::new())
154            .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
155                crate::operation::update_function_configuration::UpdateFunctionConfigurationError,
156            >::new());
157
158        ::std::borrow::Cow::Owned(rcb)
159    }
160}
161
162#[derive(Debug)]
163struct UpdateFunctionConfigurationTelemetryInputCaptureInterceptor;
164
165#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
166impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateFunctionConfigurationTelemetryInputCaptureInterceptor {
167    fn name(&self) -> &'static str {
168        "UpdateFunctionConfigurationTelemetryInputCaptureInterceptor"
169    }
170
171    fn read_before_execution(
172        &self,
173        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
174            '_,
175            ::aws_smithy_runtime_api::client::interceptors::context::Input,
176            ::aws_smithy_runtime_api::client::interceptors::context::Output,
177            ::aws_smithy_runtime_api::client::interceptors::context::Error,
178        >,
179        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
180    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
181        // Nothing to do unless the customer opted in by naming members to record.
182        let ::std::option::Option::Some(requested) = cfg
183            .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
184            .filter(|r| !r.is_empty())
185        else {
186            return ::std::result::Result::Ok(());
187        };
188
189        let ::std::option::Option::Some(input) = context.input().downcast_ref::<UpdateFunctionConfigurationInput>() else {
190            // A mismatched input is not this interceptor's concern; skip quietly.
191            return ::std::result::Result::Ok(());
192        };
193
194        let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
195        if requested.should_capture("FunctionName") {
196            if let ::std::option::Option::Some(value) = input.function_name.as_deref() {
197                captured.insert("FunctionName", value);
198            }
199        }
200        if requested.should_capture("Role") {
201            if let ::std::option::Option::Some(value) = input.role.as_deref() {
202                captured.insert("Role", value);
203            }
204        }
205        if requested.should_capture("Handler") {
206            if let ::std::option::Option::Some(value) = input.handler.as_deref() {
207                captured.insert("Handler", value);
208            }
209        }
210        if requested.should_capture("Description") {
211            if let ::std::option::Option::Some(value) = input.description.as_deref() {
212                captured.insert("Description", value);
213            }
214        }
215        if requested.should_capture("KMSKeyArn") {
216            if let ::std::option::Option::Some(value) = input.kms_key_arn.as_deref() {
217                captured.insert("KMSKeyArn", value);
218            }
219        }
220        if requested.should_capture("RevisionId") {
221            if let ::std::option::Option::Some(value) = input.revision_id.as_deref() {
222                captured.insert("RevisionId", value);
223            }
224        }
225
226        cfg.interceptor_state().store_put(captured);
227        ::std::result::Result::Ok(())
228    }
229}
230#[derive(Debug)]
231struct UpdateFunctionConfigurationResponseDeserializer;
232impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateFunctionConfigurationResponseDeserializer {
233    fn deserialize_nonstreaming_with_config(
234        &self,
235        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
236        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
237    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
238        let (success, status) = (response.status().is_success(), response.status().as_u16());
239        let headers = response.headers();
240        let body = response.body().bytes().expect("body loaded");
241        #[allow(unused_mut)]
242        let mut force_error = false;
243        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
244        let parse_result = if !success && status != 200 || force_error {
245            crate::protocol_serde::shape_update_function_configuration::de_update_function_configuration_http_error(status, headers, body)
246        } else {
247            crate::protocol_serde::shape_update_function_configuration::de_update_function_configuration_http_response(status, headers, body)
248        };
249        crate::protocol_serde::type_erase_result(parse_result)
250    }
251}
252#[derive(Debug)]
253struct UpdateFunctionConfigurationRequestSerializer;
254impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateFunctionConfigurationRequestSerializer {
255    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
256    fn serialize_input(
257        &self,
258        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
259        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
260    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
261        let input = input
262            .downcast::<crate::operation::update_function_configuration::UpdateFunctionConfigurationInput>()
263            .expect("correct type");
264        let _header_serialization_settings = _cfg
265            .load::<crate::serialization_settings::HeaderSerializationSettings>()
266            .cloned()
267            .unwrap_or_default();
268        let mut request_builder = {
269            #[allow(clippy::uninlined_format_args)]
270            fn uri_base(
271                _input: &crate::operation::update_function_configuration::UpdateFunctionConfigurationInput,
272                output: &mut ::std::string::String,
273            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
274                use ::std::fmt::Write as _;
275                let input_1 = &_input.function_name;
276                let input_1 = input_1
277                    .as_ref()
278                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("function_name", "cannot be empty or unset"))?;
279                let function_name = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
280                if function_name.is_empty() {
281                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
282                        "function_name",
283                        "cannot be empty or unset",
284                    ));
285                }
286                ::std::write!(output, "/2015-03-31/functions/{FunctionName}/configuration", FunctionName = function_name)
287                    .expect("formatting should succeed");
288                ::std::result::Result::Ok(())
289            }
290            #[allow(clippy::unnecessary_wraps)]
291            fn update_http_builder(
292                input: &crate::operation::update_function_configuration::UpdateFunctionConfigurationInput,
293                builder: ::http_1x::request::Builder,
294            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
295                let mut uri = ::std::string::String::new();
296                uri_base(input, &mut uri)?;
297                ::std::result::Result::Ok(builder.method("PUT").uri(uri))
298            }
299            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
300            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/json");
301            builder
302        };
303        let body = ::aws_smithy_types::body::SdkBody::from(
304            crate::protocol_serde::shape_update_function_configuration::ser_update_function_configuration_input(&input)?,
305        );
306        if let Some(content_length) = body.content_length() {
307            let content_length = content_length.to_string();
308            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
309        }
310        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
311    }
312}
313#[derive(Debug)]
314struct UpdateFunctionConfigurationEndpointParamsInterceptor;
315
316#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
317impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateFunctionConfigurationEndpointParamsInterceptor {
318    fn name(&self) -> &'static str {
319        "UpdateFunctionConfigurationEndpointParamsInterceptor"
320    }
321
322    fn read_before_execution(
323        &self,
324        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
325            '_,
326            ::aws_smithy_runtime_api::client::interceptors::context::Input,
327            ::aws_smithy_runtime_api::client::interceptors::context::Output,
328            ::aws_smithy_runtime_api::client::interceptors::context::Error,
329        >,
330        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
331    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
332        let _input = context
333            .input()
334            .downcast_ref::<UpdateFunctionConfigurationInput>()
335            .ok_or("failed to downcast to UpdateFunctionConfigurationInput")?;
336
337        let params = crate::config::endpoint::Params::builder()
338            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
339            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
340            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
341            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
342            .build()
343            .map_err(|err| {
344                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
345            })?;
346        cfg.interceptor_state()
347            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
348        ::std::result::Result::Ok(())
349    }
350}
351
352// The get_* functions below are generated from JMESPath expressions in the
353// operationContextParams trait. They target the operation's input shape.
354
355/// Error type for the `UpdateFunctionConfigurationError` operation.
356#[non_exhaustive]
357#[derive(::std::fmt::Debug)]
358pub enum UpdateFunctionConfigurationError {
359    /// <p>The specified code signing configuration does not exist.</p>
360    CodeSigningConfigNotFoundException(crate::types::error::CodeSigningConfigNotFoundException),
361    /// <p>The code signature failed one or more of the validation checks for signature mismatch or expiry, and the code signing policy is set to ENFORCE. Lambda blocks the deployment.</p>
362    CodeVerificationFailedException(crate::types::error::CodeVerificationFailedException),
363    /// <p>The code signature failed the integrity check. If the integrity check fails, then Lambda blocks deployment, even if the code signing policy is set to WARN.</p>
364    InvalidCodeSignatureException(crate::types::error::InvalidCodeSignatureException),
365    /// <p>One of the parameters in the request is not valid.</p>
366    InvalidParameterValueException(crate::types::error::InvalidParameterValueException),
367    /// <p>The RevisionId provided does not match the latest RevisionId for the Lambda function or alias.</p>
368    /// <ul>
369    /// <li>
370    /// <p><b>For AddPermission and RemovePermission API operations:</b> Call <code>GetPolicy</code> to retrieve the latest RevisionId for your resource.</p></li>
371    /// <li>
372    /// <p><b>For all other API operations:</b> Call <code>GetFunction</code> or <code>GetAlias</code> to retrieve the latest RevisionId for your resource.</p></li>
373    /// </ul>
374    PreconditionFailedException(crate::types::error::PreconditionFailedException),
375    /// <p>The resource already exists, or another operation is in progress.</p>
376    ResourceConflictException(crate::types::error::ResourceConflictException),
377    /// <p>The resource specified in the request does not exist.</p>
378    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
379    /// <p>The Lambda service encountered an internal error.</p>
380    ServiceException(crate::types::error::ServiceException),
381    /// <p>The request throughput limit was exceeded. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html#api-requests">Lambda quotas</a>.</p>
382    TooManyRequestsException(crate::types::error::TooManyRequestsException),
383    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
384    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
385    variable wildcard pattern and check `.code()`:
386     \
387    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
388     \
389    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-UpdateFunctionConfigurationError) for what information is available for the error.")]
390    Unhandled(crate::error::sealed_unhandled::Unhandled),
391}
392impl UpdateFunctionConfigurationError {
393    /// Creates the `UpdateFunctionConfigurationError::Unhandled` variant from any error type.
394    pub fn unhandled(
395        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
396    ) -> Self {
397        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
398            source: err.into(),
399            meta: ::std::default::Default::default(),
400        })
401    }
402
403    /// Creates the `UpdateFunctionConfigurationError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
404    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
405        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
406            source: err.clone().into(),
407            meta: err,
408        })
409    }
410    ///
411    /// Returns error metadata, which includes the error code, message,
412    /// request ID, and potentially additional information.
413    ///
414    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
415        match self {
416            Self::CodeSigningConfigNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
417            Self::CodeVerificationFailedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
418            Self::InvalidCodeSignatureException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
419            Self::InvalidParameterValueException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
420            Self::PreconditionFailedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
421            Self::ResourceConflictException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
422            Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
423            Self::ServiceException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
424            Self::TooManyRequestsException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
425            Self::Unhandled(e) => &e.meta,
426        }
427    }
428    /// Returns `true` if the error kind is `UpdateFunctionConfigurationError::CodeSigningConfigNotFoundException`.
429    pub fn is_code_signing_config_not_found_exception(&self) -> bool {
430        matches!(self, Self::CodeSigningConfigNotFoundException(_))
431    }
432    /// Returns `true` if the error kind is `UpdateFunctionConfigurationError::CodeVerificationFailedException`.
433    pub fn is_code_verification_failed_exception(&self) -> bool {
434        matches!(self, Self::CodeVerificationFailedException(_))
435    }
436    /// Returns `true` if the error kind is `UpdateFunctionConfigurationError::InvalidCodeSignatureException`.
437    pub fn is_invalid_code_signature_exception(&self) -> bool {
438        matches!(self, Self::InvalidCodeSignatureException(_))
439    }
440    /// Returns `true` if the error kind is `UpdateFunctionConfigurationError::InvalidParameterValueException`.
441    pub fn is_invalid_parameter_value_exception(&self) -> bool {
442        matches!(self, Self::InvalidParameterValueException(_))
443    }
444    /// Returns `true` if the error kind is `UpdateFunctionConfigurationError::PreconditionFailedException`.
445    pub fn is_precondition_failed_exception(&self) -> bool {
446        matches!(self, Self::PreconditionFailedException(_))
447    }
448    /// Returns `true` if the error kind is `UpdateFunctionConfigurationError::ResourceConflictException`.
449    pub fn is_resource_conflict_exception(&self) -> bool {
450        matches!(self, Self::ResourceConflictException(_))
451    }
452    /// Returns `true` if the error kind is `UpdateFunctionConfigurationError::ResourceNotFoundException`.
453    pub fn is_resource_not_found_exception(&self) -> bool {
454        matches!(self, Self::ResourceNotFoundException(_))
455    }
456    /// Returns `true` if the error kind is `UpdateFunctionConfigurationError::ServiceException`.
457    pub fn is_service_exception(&self) -> bool {
458        matches!(self, Self::ServiceException(_))
459    }
460    /// Returns `true` if the error kind is `UpdateFunctionConfigurationError::TooManyRequestsException`.
461    pub fn is_too_many_requests_exception(&self) -> bool {
462        matches!(self, Self::TooManyRequestsException(_))
463    }
464}
465impl ::std::error::Error for UpdateFunctionConfigurationError {
466    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
467        match self {
468            Self::CodeSigningConfigNotFoundException(_inner) => ::std::option::Option::Some(_inner),
469            Self::CodeVerificationFailedException(_inner) => ::std::option::Option::Some(_inner),
470            Self::InvalidCodeSignatureException(_inner) => ::std::option::Option::Some(_inner),
471            Self::InvalidParameterValueException(_inner) => ::std::option::Option::Some(_inner),
472            Self::PreconditionFailedException(_inner) => ::std::option::Option::Some(_inner),
473            Self::ResourceConflictException(_inner) => ::std::option::Option::Some(_inner),
474            Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner),
475            Self::ServiceException(_inner) => ::std::option::Option::Some(_inner),
476            Self::TooManyRequestsException(_inner) => ::std::option::Option::Some(_inner),
477            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
478        }
479    }
480}
481impl ::std::fmt::Display for UpdateFunctionConfigurationError {
482    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
483        match self {
484            Self::CodeSigningConfigNotFoundException(_inner) => _inner.fmt(f),
485            Self::CodeVerificationFailedException(_inner) => _inner.fmt(f),
486            Self::InvalidCodeSignatureException(_inner) => _inner.fmt(f),
487            Self::InvalidParameterValueException(_inner) => _inner.fmt(f),
488            Self::PreconditionFailedException(_inner) => _inner.fmt(f),
489            Self::ResourceConflictException(_inner) => _inner.fmt(f),
490            Self::ResourceNotFoundException(_inner) => _inner.fmt(f),
491            Self::ServiceException(_inner) => _inner.fmt(f),
492            Self::TooManyRequestsException(_inner) => _inner.fmt(f),
493            Self::Unhandled(_inner) => {
494                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
495                    write!(f, "unhandled error ({code})")
496                } else {
497                    f.write_str("unhandled error")
498                }
499            }
500        }
501    }
502}
503impl ::aws_smithy_types::retry::ProvideErrorKind for UpdateFunctionConfigurationError {
504    fn code(&self) -> ::std::option::Option<&str> {
505        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
506    }
507    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
508        ::std::option::Option::None
509    }
510}
511impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for UpdateFunctionConfigurationError {
512    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
513        match self {
514            Self::CodeSigningConfigNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
515            Self::CodeVerificationFailedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
516            Self::InvalidCodeSignatureException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
517            Self::InvalidParameterValueException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
518            Self::PreconditionFailedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
519            Self::ResourceConflictException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
520            Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
521            Self::ServiceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
522            Self::TooManyRequestsException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
523            Self::Unhandled(_inner) => &_inner.meta,
524        }
525    }
526}
527impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UpdateFunctionConfigurationError {
528    fn create_unhandled_error(
529        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
530        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
531    ) -> Self {
532        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
533            source,
534            meta: meta.unwrap_or_default(),
535        })
536    }
537}
538impl ::aws_types::request_id::RequestId for crate::operation::update_function_configuration::UpdateFunctionConfigurationError {
539    fn request_id(&self) -> Option<&str> {
540        self.meta().request_id()
541    }
542}
543
544pub use crate::operation::update_function_configuration::_update_function_configuration_input::UpdateFunctionConfigurationInput;
545
546pub use crate::operation::update_function_configuration::_update_function_configuration_output::UpdateFunctionConfigurationOutput;
547
548mod _update_function_configuration_input;
549
550mod _update_function_configuration_output;
551
552/// Builders
553pub mod builders;