Skip to main content

aws_sdk_lambda/operation/
invoke.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Orchestration and serialization glue logic for `Invoke`.
3#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct Invoke;
6impl Invoke {
7    /// Creates a new `Invoke`
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::invoke::InvokeInput,
14    ) -> ::std::result::Result<
15        crate::operation::invoke::InvokeOutput,
16        ::aws_smithy_runtime_api::client::result::SdkError<
17            crate::operation::invoke::InvokeError,
18            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
19        >,
20    > {
21        let map_err =
22            |err: ::aws_smithy_runtime_api::client::result::SdkError<
23                ::aws_smithy_runtime_api::client::interceptors::context::Error,
24                ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
25            >| { err.map_service_error(|err| err.downcast::<crate::operation::invoke::InvokeError>().expect("correct error type")) };
26        let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
27            .await
28            .map_err(map_err)?;
29        let output = context.finalize().map_err(map_err)?;
30        ::std::result::Result::Ok(output.downcast::<crate::operation::invoke::InvokeOutput>().expect("correct output type"))
31    }
32
33    pub(crate) async fn orchestrate_with_stop_point(
34        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
35        input: crate::operation::invoke::InvokeInput,
36        stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
37    ) -> ::std::result::Result<
38        ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
39        ::aws_smithy_runtime_api::client::result::SdkError<
40            ::aws_smithy_runtime_api::client::interceptors::context::Error,
41            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
42        >,
43    > {
44        let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
45        use ::tracing::Instrument;
46        ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("Lambda", "Invoke", input, runtime_plugins, stop_point)
47            // Create a parent span for the entire operation. Includes a random, internal-only,
48            // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
49            .instrument(::tracing::debug_span!(
50                "Lambda.Invoke",
51                "rpc.service" = "Lambda",
52                "rpc.method" = "Invoke",
53                "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
54                "rpc.system" = "aws-api",
55            ))
56            .await
57    }
58
59    pub(crate) fn operation_runtime_plugins(
60        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
61        client_config: &crate::config::Config,
62        config_override: ::std::option::Option<crate::config::Builder>,
63    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
64        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
65
66        if let ::std::option::Option::Some(config_override) = config_override {
67            for plugin in config_override.runtime_plugins.iter().cloned() {
68                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
69            }
70            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
71                config_override,
72                client_config.config.clone(),
73                &client_config.runtime_components,
74            ));
75        }
76        runtime_plugins
77    }
78}
79impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for Invoke {
80    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
81        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("Invoke");
82
83        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
84            InvokeRequestSerializer,
85        ));
86        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
87            InvokeResponseDeserializer,
88        ));
89
90        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
91            crate::config::auth::Params::builder()
92                .operation_name("Invoke")
93                .build()
94                .expect("required fields set"),
95        ));
96
97        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::SensitiveOutput);
98        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("Invoke", "Lambda"));
99        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
100        signing_options.double_uri_encode = true;
101        signing_options.content_sha256_header = false;
102        signing_options.normalize_uri_path = true;
103        signing_options.payload_override = None;
104
105        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
106            signing_options,
107            ..::std::default::Default::default()
108        });
109
110        ::std::option::Option::Some(cfg.freeze())
111    }
112
113    fn runtime_components(
114        &self,
115        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
116    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
117        #[allow(unused_mut)]
118        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("Invoke")
119            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
120                InvokeTelemetryInputCaptureInterceptor,
121            ))
122            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
123                InvokeEndpointParamsInterceptor,
124            ))
125            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
126                crate::operation::invoke::InvokeError,
127            >::new())
128            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
129                crate::operation::invoke::InvokeError,
130            >::new())
131            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
132                crate::operation::invoke::InvokeError,
133            >::new());
134
135        ::std::borrow::Cow::Owned(rcb)
136    }
137}
138
139#[derive(Debug)]
140struct InvokeTelemetryInputCaptureInterceptor;
141
142#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
143impl ::aws_smithy_runtime_api::client::interceptors::Intercept for InvokeTelemetryInputCaptureInterceptor {
144    fn name(&self) -> &'static str {
145        "InvokeTelemetryInputCaptureInterceptor"
146    }
147
148    fn read_before_execution(
149        &self,
150        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
151            '_,
152            ::aws_smithy_runtime_api::client::interceptors::context::Input,
153            ::aws_smithy_runtime_api::client::interceptors::context::Output,
154            ::aws_smithy_runtime_api::client::interceptors::context::Error,
155        >,
156        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
157    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
158        // Nothing to do unless the customer opted in by naming members to record.
159        let ::std::option::Option::Some(requested) = cfg
160            .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
161            .filter(|r| !r.is_empty())
162        else {
163            return ::std::result::Result::Ok(());
164        };
165
166        let ::std::option::Option::Some(input) = context.input().downcast_ref::<InvokeInput>() else {
167            // A mismatched input is not this interceptor's concern; skip quietly.
168            return ::std::result::Result::Ok(());
169        };
170
171        let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
172        if requested.should_capture("FunctionName") {
173            if let ::std::option::Option::Some(value) = input.function_name.as_deref() {
174                captured.insert("FunctionName", value);
175            }
176        }
177        if requested.should_capture("ClientContext") {
178            if let ::std::option::Option::Some(value) = input.client_context.as_deref() {
179                captured.insert("ClientContext", value);
180            }
181        }
182        if requested.should_capture("DurableExecutionName") {
183            if let ::std::option::Option::Some(value) = input.durable_execution_name.as_deref() {
184                captured.insert("DurableExecutionName", value);
185            }
186        }
187        if requested.should_capture("Qualifier") {
188            if let ::std::option::Option::Some(value) = input.qualifier.as_deref() {
189                captured.insert("Qualifier", value);
190            }
191        }
192        if requested.should_capture("TenantId") {
193            if let ::std::option::Option::Some(value) = input.tenant_id.as_deref() {
194                captured.insert("TenantId", value);
195            }
196        }
197
198        cfg.interceptor_state().store_put(captured);
199        ::std::result::Result::Ok(())
200    }
201}
202#[derive(Debug)]
203struct InvokeResponseDeserializer;
204impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for InvokeResponseDeserializer {
205    fn deserialize_nonstreaming_with_config(
206        &self,
207        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
208        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
209    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
210        let (success, status) = (response.status().is_success(), response.status().as_u16());
211        let headers = response.headers();
212        let body = response.body().bytes().expect("body loaded");
213        #[allow(unused_mut)]
214        let mut force_error = false;
215        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
216        let parse_result = if !success && status != 200 || force_error {
217            crate::protocol_serde::shape_invoke::de_invoke_http_error(status, headers, body)
218        } else {
219            crate::protocol_serde::shape_invoke::de_invoke_http_response(status, headers, body)
220        };
221        crate::protocol_serde::type_erase_result(parse_result)
222    }
223}
224#[derive(Debug)]
225struct InvokeRequestSerializer;
226impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for InvokeRequestSerializer {
227    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
228    fn serialize_input(
229        &self,
230        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
231        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
232    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
233        let input = input.downcast::<crate::operation::invoke::InvokeInput>().expect("correct type");
234        let _header_serialization_settings = _cfg
235            .load::<crate::serialization_settings::HeaderSerializationSettings>()
236            .cloned()
237            .unwrap_or_default();
238        let mut request_builder = {
239            #[allow(clippy::uninlined_format_args)]
240            fn uri_base(
241                _input: &crate::operation::invoke::InvokeInput,
242                output: &mut ::std::string::String,
243            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
244                use ::std::fmt::Write as _;
245                let input_1 = &_input.function_name;
246                let input_1 = input_1
247                    .as_ref()
248                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("function_name", "cannot be empty or unset"))?;
249                let function_name = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
250                if function_name.is_empty() {
251                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
252                        "function_name",
253                        "cannot be empty or unset",
254                    ));
255                }
256                ::std::write!(output, "/2015-03-31/functions/{FunctionName}/invocations", FunctionName = function_name)
257                    .expect("formatting should succeed");
258                ::std::result::Result::Ok(())
259            }
260            fn uri_query(
261                _input: &crate::operation::invoke::InvokeInput,
262                mut output: &mut ::std::string::String,
263            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
264                let mut query = ::aws_smithy_http::query::Writer::new(output);
265                if let ::std::option::Option::Some(inner_2) = &_input.qualifier {
266                    {
267                        query.push_kv("Qualifier", &::aws_smithy_http::query::fmt_string(inner_2));
268                    }
269                }
270                ::std::result::Result::Ok(())
271            }
272            #[allow(clippy::unnecessary_wraps)]
273            fn update_http_builder(
274                input: &crate::operation::invoke::InvokeInput,
275                builder: ::http_1x::request::Builder,
276            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
277                let mut uri = ::std::string::String::new();
278                uri_base(input, &mut uri)?;
279                uri_query(input, &mut uri)?;
280                let builder = crate::protocol_serde::shape_invoke::ser_invoke_headers(input, builder)?;
281                ::std::result::Result::Ok(builder.method("POST").uri(uri))
282            }
283            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
284            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/octet-stream");
285            builder
286        };
287        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_invoke_input::ser_payload_http_payload(input.payload)?);
288        if let Some(content_length) = body.content_length() {
289            let content_length = content_length.to_string();
290            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
291        }
292        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
293    }
294}
295#[derive(Debug)]
296struct InvokeEndpointParamsInterceptor;
297
298#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
299impl ::aws_smithy_runtime_api::client::interceptors::Intercept for InvokeEndpointParamsInterceptor {
300    fn name(&self) -> &'static str {
301        "InvokeEndpointParamsInterceptor"
302    }
303
304    fn read_before_execution(
305        &self,
306        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
307            '_,
308            ::aws_smithy_runtime_api::client::interceptors::context::Input,
309            ::aws_smithy_runtime_api::client::interceptors::context::Output,
310            ::aws_smithy_runtime_api::client::interceptors::context::Error,
311        >,
312        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
313    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
314        let _input = context.input().downcast_ref::<InvokeInput>().ok_or("failed to downcast to InvokeInput")?;
315
316        let params = crate::config::endpoint::Params::builder()
317            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
318            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
319            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
320            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
321            .build()
322            .map_err(|err| {
323                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
324            })?;
325        cfg.interceptor_state()
326            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
327        ::std::result::Result::Ok(())
328    }
329}
330
331// The get_* functions below are generated from JMESPath expressions in the
332// operationContextParams trait. They target the operation's input shape.
333
334/// Error type for the `InvokeError` operation.
335#[non_exhaustive]
336#[derive(::std::fmt::Debug)]
337pub enum InvokeError {
338    /// <p>The Lambda function couldn't be invoked because its code artifact user has been deleted. Wait for Lambda to provision a new code artifact user, or update the function's code package to recreate it.</p>
339    CodeArtifactUserDeletedException(crate::types::error::CodeArtifactUserDeletedException),
340    /// <p>The Lambda function couldn't be invoked because provisioning of its code artifact user failed. Update the function's code package or check the Lambda function's <code>State</code> and <code>StateReasonCode</code> for additional context.</p>
341    CodeArtifactUserFailedException(crate::types::error::CodeArtifactUserFailedException),
342    /// <p>The Lambda function couldn't be invoked because its code artifact user is still being provisioned. Wait for the function's <code>State</code> to become <code>Active</code> and try the request again.</p>
343    CodeArtifactUserPendingException(crate::types::error::CodeArtifactUserPendingException),
344    /// <p>The durable execution with the specified name has already been started. Each durable execution name must be unique within the function. Use a different name or check the status of the existing execution.</p>
345    DurableExecutionAlreadyStartedException(crate::types::error::DurableExecutionAlreadyStartedException),
346    /// <p>Need additional permissions to configure VPC settings.</p>
347    Ec2AccessDeniedException(crate::types::error::Ec2AccessDeniedException),
348    /// <p>Amazon EC2 throttled Lambda during Lambda function initialization using the execution role provided for the function.</p>
349    Ec2ThrottledException(crate::types::error::Ec2ThrottledException),
350    /// <p>Lambda received an unexpected Amazon EC2 client exception while setting up for the Lambda function.</p>
351    Ec2UnexpectedException(crate::types::error::Ec2UnexpectedException),
352    /// <p>An error occurred when reading from or writing to a connected file system.</p>
353    EfsioException(crate::types::error::EfsioException),
354    /// <p>The Lambda function couldn't make a network connection to the configured file system.</p>
355    EfsMountConnectivityException(crate::types::error::EfsMountConnectivityException),
356    /// <p>The Lambda function couldn't mount the configured file system due to a permission or configuration issue.</p>
357    EfsMountFailureException(crate::types::error::EfsMountFailureException),
358    /// <p>The Lambda function made a network connection to the configured file system, but the mount operation timed out.</p>
359    EfsMountTimeoutException(crate::types::error::EfsMountTimeoutException),
360    /// <p>Lambda couldn't create an elastic network interface in the VPC, specified as part of Lambda function configuration, because the limit for network interfaces has been reached. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html">Lambda quotas</a>.</p>
361    EniLimitReachedException(crate::types::error::EniLimitReachedException),
362    /// <p>Lambda couldn't invoke the Lambda function because the elastic network interface (ENI) configured for its VPC connection isn't ready yet. Wait a few moments and try the request again. For more information about VPC configuration, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html">Configuring a Lambda function to access resources in a VPC</a>.</p>
363    EniNotReadyException(crate::types::error::EniNotReadyException),
364    /// <p>One of the parameters in the request is not valid.</p>
365    InvalidParameterValueException(crate::types::error::InvalidParameterValueException),
366    /// <p>The request body could not be parsed as JSON, or a request header is invalid. For example, the 'x-amzn-RequestId' header is not a valid UUID string.</p>
367    InvalidRequestContentException(crate::types::error::InvalidRequestContentException),
368    /// <p>The runtime or runtime version specified is not supported.</p>
369    InvalidRuntimeException(crate::types::error::InvalidRuntimeException),
370    /// <p>The security group ID provided in the Lambda function VPC configuration is not valid.</p>
371    InvalidSecurityGroupIdException(crate::types::error::InvalidSecurityGroupIdException),
372    /// <p>The subnet ID provided in the Lambda function VPC configuration is not valid.</p>
373    InvalidSubnetIdException(crate::types::error::InvalidSubnetIdException),
374    /// <p>Lambda could not unzip the deployment package.</p>
375    InvalidZipFileException(crate::types::error::InvalidZipFileException),
376    /// <p>Lambda couldn't decrypt the environment variables because KMS access was denied. Check the Lambda function's KMS permissions.</p>
377    KmsAccessDeniedException(crate::types::error::KmsAccessDeniedException),
378    /// <p>Lambda couldn't decrypt the environment variables because the KMS key used is disabled. Check the Lambda function's KMS key settings.</p>
379    KmsDisabledException(crate::types::error::KmsDisabledException),
380    /// <p>Lambda couldn't decrypt the environment variables because the state of the KMS key used is not valid for Decrypt. Check the function's KMS key settings.</p>
381    KmsInvalidStateException(crate::types::error::KmsInvalidStateException),
382    /// <p>Lambda couldn't decrypt the environment variables because the KMS key was not found. Check the function's KMS key settings.</p>
383    KmsNotFoundException(crate::types::error::KmsNotFoundException),
384    /// <p>The Lambda function doesn't support the invocation mode requested. For example, calling <code>Invoke</code> with <code>InvocationType=RequestResponse</code> on a function configured for asynchronous-only invocation, or vice versa. For more information about invocation types, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-options.html">Invoking Lambda functions</a>.</p>
385    ModeNotSupportedException(crate::types::error::ModeNotSupportedException),
386    /// <p>The function has no published versions available.</p>
387    NoPublishedVersionException(crate::types::error::NoPublishedVersionException),
388    /// <p>Lambda has detected your function being invoked in a recursive loop with other Amazon Web Services resources and stopped your function's invocation.</p>
389    RecursiveInvocationException(crate::types::error::RecursiveInvocationException),
390    /// <p>The request payload exceeded the <code>Invoke</code> request body JSON input quota. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html">Lambda quotas</a>.</p>
391    RequestTooLargeException(crate::types::error::RequestTooLargeException),
392    /// <p>The resource already exists, or another operation is in progress.</p>
393    ResourceConflictException(crate::types::error::ResourceConflictException),
394    /// <p>The resource specified in the request does not exist.</p>
395    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
396    /// <p>The function is inactive and its VPC connection is no longer available. Wait for the VPC connection to reestablish and try again.</p>
397    ResourceNotReadyException(crate::types::error::ResourceNotReadyException),
398    /// <p>The Lambda function couldn't make a network connection to the configured S3 Files access point.</p>
399    S3FilesMountConnectivityException(crate::types::error::S3FilesMountConnectivityException),
400    /// <p>The Lambda function couldn't mount the configured S3 Files access point due to a permission or configuration issue.</p>
401    S3FilesMountFailureException(crate::types::error::S3FilesMountFailureException),
402    /// <p>The Lambda function made a network connection to the configured S3 Files access point, but the mount operation timed out.</p>
403    S3FilesMountTimeoutException(crate::types::error::S3FilesMountTimeoutException),
404    /// <p>The request payload exceeded the maximum allowed size for serialized request entities.</p>
405    SerializedRequestEntityTooLargeException(crate::types::error::SerializedRequestEntityTooLargeException),
406    /// <p>The Lambda service encountered an internal error.</p>
407    ServiceException(crate::types::error::ServiceException),
408    /// <p>The request would exceed a service quota. For more information about Lambda service quotas, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html">Lambda quotas</a>. To request a quota increase, see <a href="https://docs.aws.amazon.com/servicequotas/latest/userguide/request-quota-increase.html">Requesting a quota increase</a> in the <i>Service Quotas User Guide</i>.</p>
409    ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
410    /// <p>The <code>afterRestore()</code> <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart-runtime-hooks.html">runtime hook</a> encountered an error. For more information, check the Amazon CloudWatch logs.</p>
411    SnapStartException(crate::types::error::SnapStartException),
412    /// <p>Lambda is initializing your function. You can invoke the function when the <a href="https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html">function state</a> becomes <code>Active</code>.</p>
413    SnapStartNotReadyException(crate::types::error::SnapStartNotReadyException),
414    /// <p>Lambda couldn't regenerate the SnapStart snapshot for the function. SnapStart-enabled functions periodically regenerate snapshots when their underlying runtime or dependencies change; this regeneration failed. Wait for Lambda to retry, or update the function's configuration to trigger a new snapshot. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html">Lambda SnapStart</a>.</p>
415    SnapStartRegenerationFailureException(crate::types::error::SnapStartRegenerationFailureException),
416    /// <p>Lambda couldn't restore the snapshot within the timeout limit.</p>
417    SnapStartTimeoutException(crate::types::error::SnapStartTimeoutException),
418    /// <p>Lambda couldn't set up VPC access for the Lambda function because one or more configured subnets has no available IP addresses.</p>
419    SubnetIpAddressLimitReachedException(crate::types::error::SubnetIpAddressLimitReachedException),
420    /// <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>
421    TooManyRequestsException(crate::types::error::TooManyRequestsException),
422    /// <p>The content type of the <code>Invoke</code> request body is not JSON.</p>
423    UnsupportedMediaTypeException(crate::types::error::UnsupportedMediaTypeException),
424    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
425    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
426    variable wildcard pattern and check `.code()`:
427     \
428    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
429     \
430    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-InvokeError) for what information is available for the error.")]
431    Unhandled(crate::error::sealed_unhandled::Unhandled),
432}
433impl InvokeError {
434    /// Creates the `InvokeError::Unhandled` variant from any error type.
435    pub fn unhandled(
436        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
437    ) -> Self {
438        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
439            source: err.into(),
440            meta: ::std::default::Default::default(),
441        })
442    }
443
444    /// Creates the `InvokeError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
445    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
446        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
447            source: err.clone().into(),
448            meta: err,
449        })
450    }
451    ///
452    /// Returns error metadata, which includes the error code, message,
453    /// request ID, and potentially additional information.
454    ///
455    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
456        match self {
457            Self::CodeArtifactUserDeletedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
458            Self::CodeArtifactUserFailedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
459            Self::CodeArtifactUserPendingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
460            Self::DurableExecutionAlreadyStartedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
461            Self::Ec2AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
462            Self::Ec2ThrottledException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
463            Self::Ec2UnexpectedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
464            Self::EfsioException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
465            Self::EfsMountConnectivityException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
466            Self::EfsMountFailureException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
467            Self::EfsMountTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
468            Self::EniLimitReachedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
469            Self::EniNotReadyException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
470            Self::InvalidParameterValueException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
471            Self::InvalidRequestContentException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
472            Self::InvalidRuntimeException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
473            Self::InvalidSecurityGroupIdException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
474            Self::InvalidSubnetIdException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
475            Self::InvalidZipFileException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
476            Self::KmsAccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
477            Self::KmsDisabledException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
478            Self::KmsInvalidStateException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
479            Self::KmsNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
480            Self::ModeNotSupportedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
481            Self::NoPublishedVersionException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
482            Self::RecursiveInvocationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
483            Self::RequestTooLargeException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
484            Self::ResourceConflictException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
485            Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
486            Self::ResourceNotReadyException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
487            Self::S3FilesMountConnectivityException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
488            Self::S3FilesMountFailureException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
489            Self::S3FilesMountTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
490            Self::SerializedRequestEntityTooLargeException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
491            Self::ServiceException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
492            Self::ServiceQuotaExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
493            Self::SnapStartException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
494            Self::SnapStartNotReadyException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
495            Self::SnapStartRegenerationFailureException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
496            Self::SnapStartTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
497            Self::SubnetIpAddressLimitReachedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
498            Self::TooManyRequestsException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
499            Self::UnsupportedMediaTypeException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
500            Self::Unhandled(e) => &e.meta,
501        }
502    }
503    /// Returns `true` if the error kind is `InvokeError::CodeArtifactUserDeletedException`.
504    pub fn is_code_artifact_user_deleted_exception(&self) -> bool {
505        matches!(self, Self::CodeArtifactUserDeletedException(_))
506    }
507    /// Returns `true` if the error kind is `InvokeError::CodeArtifactUserFailedException`.
508    pub fn is_code_artifact_user_failed_exception(&self) -> bool {
509        matches!(self, Self::CodeArtifactUserFailedException(_))
510    }
511    /// Returns `true` if the error kind is `InvokeError::CodeArtifactUserPendingException`.
512    pub fn is_code_artifact_user_pending_exception(&self) -> bool {
513        matches!(self, Self::CodeArtifactUserPendingException(_))
514    }
515    /// Returns `true` if the error kind is `InvokeError::DurableExecutionAlreadyStartedException`.
516    pub fn is_durable_execution_already_started_exception(&self) -> bool {
517        matches!(self, Self::DurableExecutionAlreadyStartedException(_))
518    }
519    /// Returns `true` if the error kind is `InvokeError::Ec2AccessDeniedException`.
520    pub fn is_ec2_access_denied_exception(&self) -> bool {
521        matches!(self, Self::Ec2AccessDeniedException(_))
522    }
523    /// Returns `true` if the error kind is `InvokeError::Ec2ThrottledException`.
524    pub fn is_ec2_throttled_exception(&self) -> bool {
525        matches!(self, Self::Ec2ThrottledException(_))
526    }
527    /// Returns `true` if the error kind is `InvokeError::Ec2UnexpectedException`.
528    pub fn is_ec2_unexpected_exception(&self) -> bool {
529        matches!(self, Self::Ec2UnexpectedException(_))
530    }
531    /// Returns `true` if the error kind is `InvokeError::EfsioException`.
532    pub fn is_efsio_exception(&self) -> bool {
533        matches!(self, Self::EfsioException(_))
534    }
535    /// Returns `true` if the error kind is `InvokeError::EfsMountConnectivityException`.
536    pub fn is_efs_mount_connectivity_exception(&self) -> bool {
537        matches!(self, Self::EfsMountConnectivityException(_))
538    }
539    /// Returns `true` if the error kind is `InvokeError::EfsMountFailureException`.
540    pub fn is_efs_mount_failure_exception(&self) -> bool {
541        matches!(self, Self::EfsMountFailureException(_))
542    }
543    /// Returns `true` if the error kind is `InvokeError::EfsMountTimeoutException`.
544    pub fn is_efs_mount_timeout_exception(&self) -> bool {
545        matches!(self, Self::EfsMountTimeoutException(_))
546    }
547    /// Returns `true` if the error kind is `InvokeError::EniLimitReachedException`.
548    pub fn is_eni_limit_reached_exception(&self) -> bool {
549        matches!(self, Self::EniLimitReachedException(_))
550    }
551    /// Returns `true` if the error kind is `InvokeError::EniNotReadyException`.
552    pub fn is_eni_not_ready_exception(&self) -> bool {
553        matches!(self, Self::EniNotReadyException(_))
554    }
555    /// Returns `true` if the error kind is `InvokeError::InvalidParameterValueException`.
556    pub fn is_invalid_parameter_value_exception(&self) -> bool {
557        matches!(self, Self::InvalidParameterValueException(_))
558    }
559    /// Returns `true` if the error kind is `InvokeError::InvalidRequestContentException`.
560    pub fn is_invalid_request_content_exception(&self) -> bool {
561        matches!(self, Self::InvalidRequestContentException(_))
562    }
563    /// Returns `true` if the error kind is `InvokeError::InvalidRuntimeException`.
564    pub fn is_invalid_runtime_exception(&self) -> bool {
565        matches!(self, Self::InvalidRuntimeException(_))
566    }
567    /// Returns `true` if the error kind is `InvokeError::InvalidSecurityGroupIdException`.
568    pub fn is_invalid_security_group_id_exception(&self) -> bool {
569        matches!(self, Self::InvalidSecurityGroupIdException(_))
570    }
571    /// Returns `true` if the error kind is `InvokeError::InvalidSubnetIdException`.
572    pub fn is_invalid_subnet_id_exception(&self) -> bool {
573        matches!(self, Self::InvalidSubnetIdException(_))
574    }
575    /// Returns `true` if the error kind is `InvokeError::InvalidZipFileException`.
576    pub fn is_invalid_zip_file_exception(&self) -> bool {
577        matches!(self, Self::InvalidZipFileException(_))
578    }
579    /// Returns `true` if the error kind is `InvokeError::KmsAccessDeniedException`.
580    pub fn is_kms_access_denied_exception(&self) -> bool {
581        matches!(self, Self::KmsAccessDeniedException(_))
582    }
583    /// Returns `true` if the error kind is `InvokeError::KmsDisabledException`.
584    pub fn is_kms_disabled_exception(&self) -> bool {
585        matches!(self, Self::KmsDisabledException(_))
586    }
587    /// Returns `true` if the error kind is `InvokeError::KmsInvalidStateException`.
588    pub fn is_kms_invalid_state_exception(&self) -> bool {
589        matches!(self, Self::KmsInvalidStateException(_))
590    }
591    /// Returns `true` if the error kind is `InvokeError::KmsNotFoundException`.
592    pub fn is_kms_not_found_exception(&self) -> bool {
593        matches!(self, Self::KmsNotFoundException(_))
594    }
595    /// Returns `true` if the error kind is `InvokeError::ModeNotSupportedException`.
596    pub fn is_mode_not_supported_exception(&self) -> bool {
597        matches!(self, Self::ModeNotSupportedException(_))
598    }
599    /// Returns `true` if the error kind is `InvokeError::NoPublishedVersionException`.
600    pub fn is_no_published_version_exception(&self) -> bool {
601        matches!(self, Self::NoPublishedVersionException(_))
602    }
603    /// Returns `true` if the error kind is `InvokeError::RecursiveInvocationException`.
604    pub fn is_recursive_invocation_exception(&self) -> bool {
605        matches!(self, Self::RecursiveInvocationException(_))
606    }
607    /// Returns `true` if the error kind is `InvokeError::RequestTooLargeException`.
608    pub fn is_request_too_large_exception(&self) -> bool {
609        matches!(self, Self::RequestTooLargeException(_))
610    }
611    /// Returns `true` if the error kind is `InvokeError::ResourceConflictException`.
612    pub fn is_resource_conflict_exception(&self) -> bool {
613        matches!(self, Self::ResourceConflictException(_))
614    }
615    /// Returns `true` if the error kind is `InvokeError::ResourceNotFoundException`.
616    pub fn is_resource_not_found_exception(&self) -> bool {
617        matches!(self, Self::ResourceNotFoundException(_))
618    }
619    /// Returns `true` if the error kind is `InvokeError::ResourceNotReadyException`.
620    pub fn is_resource_not_ready_exception(&self) -> bool {
621        matches!(self, Self::ResourceNotReadyException(_))
622    }
623    /// Returns `true` if the error kind is `InvokeError::S3FilesMountConnectivityException`.
624    pub fn is_s3_files_mount_connectivity_exception(&self) -> bool {
625        matches!(self, Self::S3FilesMountConnectivityException(_))
626    }
627    /// Returns `true` if the error kind is `InvokeError::S3FilesMountFailureException`.
628    pub fn is_s3_files_mount_failure_exception(&self) -> bool {
629        matches!(self, Self::S3FilesMountFailureException(_))
630    }
631    /// Returns `true` if the error kind is `InvokeError::S3FilesMountTimeoutException`.
632    pub fn is_s3_files_mount_timeout_exception(&self) -> bool {
633        matches!(self, Self::S3FilesMountTimeoutException(_))
634    }
635    /// Returns `true` if the error kind is `InvokeError::SerializedRequestEntityTooLargeException`.
636    pub fn is_serialized_request_entity_too_large_exception(&self) -> bool {
637        matches!(self, Self::SerializedRequestEntityTooLargeException(_))
638    }
639    /// Returns `true` if the error kind is `InvokeError::ServiceException`.
640    pub fn is_service_exception(&self) -> bool {
641        matches!(self, Self::ServiceException(_))
642    }
643    /// Returns `true` if the error kind is `InvokeError::ServiceQuotaExceededException`.
644    pub fn is_service_quota_exceeded_exception(&self) -> bool {
645        matches!(self, Self::ServiceQuotaExceededException(_))
646    }
647    /// Returns `true` if the error kind is `InvokeError::SnapStartException`.
648    pub fn is_snap_start_exception(&self) -> bool {
649        matches!(self, Self::SnapStartException(_))
650    }
651    /// Returns `true` if the error kind is `InvokeError::SnapStartNotReadyException`.
652    pub fn is_snap_start_not_ready_exception(&self) -> bool {
653        matches!(self, Self::SnapStartNotReadyException(_))
654    }
655    /// Returns `true` if the error kind is `InvokeError::SnapStartRegenerationFailureException`.
656    pub fn is_snap_start_regeneration_failure_exception(&self) -> bool {
657        matches!(self, Self::SnapStartRegenerationFailureException(_))
658    }
659    /// Returns `true` if the error kind is `InvokeError::SnapStartTimeoutException`.
660    pub fn is_snap_start_timeout_exception(&self) -> bool {
661        matches!(self, Self::SnapStartTimeoutException(_))
662    }
663    /// Returns `true` if the error kind is `InvokeError::SubnetIpAddressLimitReachedException`.
664    pub fn is_subnet_ip_address_limit_reached_exception(&self) -> bool {
665        matches!(self, Self::SubnetIpAddressLimitReachedException(_))
666    }
667    /// Returns `true` if the error kind is `InvokeError::TooManyRequestsException`.
668    pub fn is_too_many_requests_exception(&self) -> bool {
669        matches!(self, Self::TooManyRequestsException(_))
670    }
671    /// Returns `true` if the error kind is `InvokeError::UnsupportedMediaTypeException`.
672    pub fn is_unsupported_media_type_exception(&self) -> bool {
673        matches!(self, Self::UnsupportedMediaTypeException(_))
674    }
675}
676impl ::std::error::Error for InvokeError {
677    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
678        match self {
679            Self::CodeArtifactUserDeletedException(_inner) => ::std::option::Option::Some(_inner),
680            Self::CodeArtifactUserFailedException(_inner) => ::std::option::Option::Some(_inner),
681            Self::CodeArtifactUserPendingException(_inner) => ::std::option::Option::Some(_inner),
682            Self::DurableExecutionAlreadyStartedException(_inner) => ::std::option::Option::Some(_inner),
683            Self::Ec2AccessDeniedException(_inner) => ::std::option::Option::Some(_inner),
684            Self::Ec2ThrottledException(_inner) => ::std::option::Option::Some(_inner),
685            Self::Ec2UnexpectedException(_inner) => ::std::option::Option::Some(_inner),
686            Self::EfsioException(_inner) => ::std::option::Option::Some(_inner),
687            Self::EfsMountConnectivityException(_inner) => ::std::option::Option::Some(_inner),
688            Self::EfsMountFailureException(_inner) => ::std::option::Option::Some(_inner),
689            Self::EfsMountTimeoutException(_inner) => ::std::option::Option::Some(_inner),
690            Self::EniLimitReachedException(_inner) => ::std::option::Option::Some(_inner),
691            Self::EniNotReadyException(_inner) => ::std::option::Option::Some(_inner),
692            Self::InvalidParameterValueException(_inner) => ::std::option::Option::Some(_inner),
693            Self::InvalidRequestContentException(_inner) => ::std::option::Option::Some(_inner),
694            Self::InvalidRuntimeException(_inner) => ::std::option::Option::Some(_inner),
695            Self::InvalidSecurityGroupIdException(_inner) => ::std::option::Option::Some(_inner),
696            Self::InvalidSubnetIdException(_inner) => ::std::option::Option::Some(_inner),
697            Self::InvalidZipFileException(_inner) => ::std::option::Option::Some(_inner),
698            Self::KmsAccessDeniedException(_inner) => ::std::option::Option::Some(_inner),
699            Self::KmsDisabledException(_inner) => ::std::option::Option::Some(_inner),
700            Self::KmsInvalidStateException(_inner) => ::std::option::Option::Some(_inner),
701            Self::KmsNotFoundException(_inner) => ::std::option::Option::Some(_inner),
702            Self::ModeNotSupportedException(_inner) => ::std::option::Option::Some(_inner),
703            Self::NoPublishedVersionException(_inner) => ::std::option::Option::Some(_inner),
704            Self::RecursiveInvocationException(_inner) => ::std::option::Option::Some(_inner),
705            Self::RequestTooLargeException(_inner) => ::std::option::Option::Some(_inner),
706            Self::ResourceConflictException(_inner) => ::std::option::Option::Some(_inner),
707            Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner),
708            Self::ResourceNotReadyException(_inner) => ::std::option::Option::Some(_inner),
709            Self::S3FilesMountConnectivityException(_inner) => ::std::option::Option::Some(_inner),
710            Self::S3FilesMountFailureException(_inner) => ::std::option::Option::Some(_inner),
711            Self::S3FilesMountTimeoutException(_inner) => ::std::option::Option::Some(_inner),
712            Self::SerializedRequestEntityTooLargeException(_inner) => ::std::option::Option::Some(_inner),
713            Self::ServiceException(_inner) => ::std::option::Option::Some(_inner),
714            Self::ServiceQuotaExceededException(_inner) => ::std::option::Option::Some(_inner),
715            Self::SnapStartException(_inner) => ::std::option::Option::Some(_inner),
716            Self::SnapStartNotReadyException(_inner) => ::std::option::Option::Some(_inner),
717            Self::SnapStartRegenerationFailureException(_inner) => ::std::option::Option::Some(_inner),
718            Self::SnapStartTimeoutException(_inner) => ::std::option::Option::Some(_inner),
719            Self::SubnetIpAddressLimitReachedException(_inner) => ::std::option::Option::Some(_inner),
720            Self::TooManyRequestsException(_inner) => ::std::option::Option::Some(_inner),
721            Self::UnsupportedMediaTypeException(_inner) => ::std::option::Option::Some(_inner),
722            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
723        }
724    }
725}
726impl ::std::fmt::Display for InvokeError {
727    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
728        match self {
729            Self::CodeArtifactUserDeletedException(_inner) => _inner.fmt(f),
730            Self::CodeArtifactUserFailedException(_inner) => _inner.fmt(f),
731            Self::CodeArtifactUserPendingException(_inner) => _inner.fmt(f),
732            Self::DurableExecutionAlreadyStartedException(_inner) => _inner.fmt(f),
733            Self::Ec2AccessDeniedException(_inner) => _inner.fmt(f),
734            Self::Ec2ThrottledException(_inner) => _inner.fmt(f),
735            Self::Ec2UnexpectedException(_inner) => _inner.fmt(f),
736            Self::EfsioException(_inner) => _inner.fmt(f),
737            Self::EfsMountConnectivityException(_inner) => _inner.fmt(f),
738            Self::EfsMountFailureException(_inner) => _inner.fmt(f),
739            Self::EfsMountTimeoutException(_inner) => _inner.fmt(f),
740            Self::EniLimitReachedException(_inner) => _inner.fmt(f),
741            Self::EniNotReadyException(_inner) => _inner.fmt(f),
742            Self::InvalidParameterValueException(_inner) => _inner.fmt(f),
743            Self::InvalidRequestContentException(_inner) => _inner.fmt(f),
744            Self::InvalidRuntimeException(_inner) => _inner.fmt(f),
745            Self::InvalidSecurityGroupIdException(_inner) => _inner.fmt(f),
746            Self::InvalidSubnetIdException(_inner) => _inner.fmt(f),
747            Self::InvalidZipFileException(_inner) => _inner.fmt(f),
748            Self::KmsAccessDeniedException(_inner) => _inner.fmt(f),
749            Self::KmsDisabledException(_inner) => _inner.fmt(f),
750            Self::KmsInvalidStateException(_inner) => _inner.fmt(f),
751            Self::KmsNotFoundException(_inner) => _inner.fmt(f),
752            Self::ModeNotSupportedException(_inner) => _inner.fmt(f),
753            Self::NoPublishedVersionException(_inner) => _inner.fmt(f),
754            Self::RecursiveInvocationException(_inner) => _inner.fmt(f),
755            Self::RequestTooLargeException(_inner) => _inner.fmt(f),
756            Self::ResourceConflictException(_inner) => _inner.fmt(f),
757            Self::ResourceNotFoundException(_inner) => _inner.fmt(f),
758            Self::ResourceNotReadyException(_inner) => _inner.fmt(f),
759            Self::S3FilesMountConnectivityException(_inner) => _inner.fmt(f),
760            Self::S3FilesMountFailureException(_inner) => _inner.fmt(f),
761            Self::S3FilesMountTimeoutException(_inner) => _inner.fmt(f),
762            Self::SerializedRequestEntityTooLargeException(_inner) => _inner.fmt(f),
763            Self::ServiceException(_inner) => _inner.fmt(f),
764            Self::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
765            Self::SnapStartException(_inner) => _inner.fmt(f),
766            Self::SnapStartNotReadyException(_inner) => _inner.fmt(f),
767            Self::SnapStartRegenerationFailureException(_inner) => _inner.fmt(f),
768            Self::SnapStartTimeoutException(_inner) => _inner.fmt(f),
769            Self::SubnetIpAddressLimitReachedException(_inner) => _inner.fmt(f),
770            Self::TooManyRequestsException(_inner) => _inner.fmt(f),
771            Self::UnsupportedMediaTypeException(_inner) => _inner.fmt(f),
772            Self::Unhandled(_inner) => {
773                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
774                    write!(f, "unhandled error ({code})")
775                } else {
776                    f.write_str("unhandled error")
777                }
778            }
779        }
780    }
781}
782impl ::aws_smithy_types::retry::ProvideErrorKind for InvokeError {
783    fn code(&self) -> ::std::option::Option<&str> {
784        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
785    }
786    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
787        ::std::option::Option::None
788    }
789}
790impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for InvokeError {
791    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
792        match self {
793            Self::CodeArtifactUserDeletedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
794            Self::CodeArtifactUserFailedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
795            Self::CodeArtifactUserPendingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
796            Self::DurableExecutionAlreadyStartedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
797            Self::Ec2AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
798            Self::Ec2ThrottledException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
799            Self::Ec2UnexpectedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
800            Self::EfsioException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
801            Self::EfsMountConnectivityException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
802            Self::EfsMountFailureException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
803            Self::EfsMountTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
804            Self::EniLimitReachedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
805            Self::EniNotReadyException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
806            Self::InvalidParameterValueException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
807            Self::InvalidRequestContentException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
808            Self::InvalidRuntimeException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
809            Self::InvalidSecurityGroupIdException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
810            Self::InvalidSubnetIdException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
811            Self::InvalidZipFileException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
812            Self::KmsAccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
813            Self::KmsDisabledException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
814            Self::KmsInvalidStateException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
815            Self::KmsNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
816            Self::ModeNotSupportedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
817            Self::NoPublishedVersionException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
818            Self::RecursiveInvocationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
819            Self::RequestTooLargeException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
820            Self::ResourceConflictException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
821            Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
822            Self::ResourceNotReadyException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
823            Self::S3FilesMountConnectivityException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
824            Self::S3FilesMountFailureException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
825            Self::S3FilesMountTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
826            Self::SerializedRequestEntityTooLargeException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
827            Self::ServiceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
828            Self::ServiceQuotaExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
829            Self::SnapStartException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
830            Self::SnapStartNotReadyException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
831            Self::SnapStartRegenerationFailureException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
832            Self::SnapStartTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
833            Self::SubnetIpAddressLimitReachedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
834            Self::TooManyRequestsException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
835            Self::UnsupportedMediaTypeException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
836            Self::Unhandled(_inner) => &_inner.meta,
837        }
838    }
839}
840impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for InvokeError {
841    fn create_unhandled_error(
842        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
843        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
844    ) -> Self {
845        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
846            source,
847            meta: meta.unwrap_or_default(),
848        })
849    }
850}
851impl ::aws_types::request_id::RequestId for crate::operation::invoke::InvokeError {
852    fn request_id(&self) -> Option<&str> {
853        self.meta().request_id()
854    }
855}
856
857pub use crate::operation::invoke::_invoke_input::InvokeInput;
858
859pub use crate::operation::invoke::_invoke_output::InvokeOutput;
860
861mod _invoke_input;
862
863mod _invoke_output;
864
865/// Builders
866pub mod builders;