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            .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
135                crate::operation::invoke::InvokeError,
136            >::new());
137
138        ::std::borrow::Cow::Owned(rcb)
139    }
140}
141
142#[derive(Debug)]
143struct InvokeTelemetryInputCaptureInterceptor;
144
145#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
146impl ::aws_smithy_runtime_api::client::interceptors::Intercept for InvokeTelemetryInputCaptureInterceptor {
147    fn name(&self) -> &'static str {
148        "InvokeTelemetryInputCaptureInterceptor"
149    }
150
151    fn read_before_execution(
152        &self,
153        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
154            '_,
155            ::aws_smithy_runtime_api::client::interceptors::context::Input,
156            ::aws_smithy_runtime_api::client::interceptors::context::Output,
157            ::aws_smithy_runtime_api::client::interceptors::context::Error,
158        >,
159        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
160    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
161        // Nothing to do unless the customer opted in by naming members to record.
162        let ::std::option::Option::Some(requested) = cfg
163            .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
164            .filter(|r| !r.is_empty())
165        else {
166            return ::std::result::Result::Ok(());
167        };
168
169        let ::std::option::Option::Some(input) = context.input().downcast_ref::<InvokeInput>() else {
170            // A mismatched input is not this interceptor's concern; skip quietly.
171            return ::std::result::Result::Ok(());
172        };
173
174        let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
175        if requested.should_capture("FunctionName") {
176            if let ::std::option::Option::Some(value) = input.function_name.as_deref() {
177                captured.insert("FunctionName", value);
178            }
179        }
180        if requested.should_capture("ClientContext") {
181            if let ::std::option::Option::Some(value) = input.client_context.as_deref() {
182                captured.insert("ClientContext", value);
183            }
184        }
185        if requested.should_capture("DurableExecutionName") {
186            if let ::std::option::Option::Some(value) = input.durable_execution_name.as_deref() {
187                captured.insert("DurableExecutionName", value);
188            }
189        }
190        if requested.should_capture("Qualifier") {
191            if let ::std::option::Option::Some(value) = input.qualifier.as_deref() {
192                captured.insert("Qualifier", value);
193            }
194        }
195        if requested.should_capture("TenantId") {
196            if let ::std::option::Option::Some(value) = input.tenant_id.as_deref() {
197                captured.insert("TenantId", value);
198            }
199        }
200
201        cfg.interceptor_state().store_put(captured);
202        ::std::result::Result::Ok(())
203    }
204}
205#[derive(Debug)]
206struct InvokeResponseDeserializer;
207impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for InvokeResponseDeserializer {
208    fn deserialize_nonstreaming_with_config(
209        &self,
210        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
211        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
212    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
213        let (success, status) = (response.status().is_success(), response.status().as_u16());
214        let headers = response.headers();
215        let body = response.body().bytes().expect("body loaded");
216        #[allow(unused_mut)]
217        let mut force_error = false;
218        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
219        let parse_result = if !success && status != 200 || force_error {
220            crate::protocol_serde::shape_invoke::de_invoke_http_error(status, headers, body)
221        } else {
222            crate::protocol_serde::shape_invoke::de_invoke_http_response(status, headers, body)
223        };
224        crate::protocol_serde::type_erase_result(parse_result)
225    }
226}
227#[derive(Debug)]
228struct InvokeRequestSerializer;
229impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for InvokeRequestSerializer {
230    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
231    fn serialize_input(
232        &self,
233        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
234        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
235    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
236        let input = input.downcast::<crate::operation::invoke::InvokeInput>().expect("correct type");
237        let _header_serialization_settings = _cfg
238            .load::<crate::serialization_settings::HeaderSerializationSettings>()
239            .cloned()
240            .unwrap_or_default();
241        let mut request_builder = {
242            #[allow(clippy::uninlined_format_args)]
243            fn uri_base(
244                _input: &crate::operation::invoke::InvokeInput,
245                output: &mut ::std::string::String,
246            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
247                use ::std::fmt::Write as _;
248                let input_1 = &_input.function_name;
249                let input_1 = input_1
250                    .as_ref()
251                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("function_name", "cannot be empty or unset"))?;
252                let function_name = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
253                if function_name.is_empty() {
254                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
255                        "function_name",
256                        "cannot be empty or unset",
257                    ));
258                }
259                ::std::write!(output, "/2015-03-31/functions/{FunctionName}/invocations", FunctionName = function_name)
260                    .expect("formatting should succeed");
261                ::std::result::Result::Ok(())
262            }
263            fn uri_query(
264                _input: &crate::operation::invoke::InvokeInput,
265                mut output: &mut ::std::string::String,
266            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
267                let mut query = ::aws_smithy_http::query::Writer::new(output);
268                if let ::std::option::Option::Some(inner_2) = &_input.qualifier {
269                    {
270                        query.push_kv("Qualifier", &::aws_smithy_http::query::fmt_string(inner_2));
271                    }
272                }
273                ::std::result::Result::Ok(())
274            }
275            #[allow(clippy::unnecessary_wraps)]
276            fn update_http_builder(
277                input: &crate::operation::invoke::InvokeInput,
278                builder: ::http_1x::request::Builder,
279            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
280                let mut uri = ::std::string::String::new();
281                uri_base(input, &mut uri)?;
282                uri_query(input, &mut uri)?;
283                let builder = crate::protocol_serde::shape_invoke::ser_invoke_headers(input, builder)?;
284                ::std::result::Result::Ok(builder.method("POST").uri(uri))
285            }
286            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
287            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/octet-stream");
288            builder
289        };
290        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_invoke_input::ser_payload_http_payload(input.payload)?);
291        if let Some(content_length) = body.content_length() {
292            let content_length = content_length.to_string();
293            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
294        }
295        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
296    }
297}
298#[derive(Debug)]
299struct InvokeEndpointParamsInterceptor;
300
301#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
302impl ::aws_smithy_runtime_api::client::interceptors::Intercept for InvokeEndpointParamsInterceptor {
303    fn name(&self) -> &'static str {
304        "InvokeEndpointParamsInterceptor"
305    }
306
307    fn read_before_execution(
308        &self,
309        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
310            '_,
311            ::aws_smithy_runtime_api::client::interceptors::context::Input,
312            ::aws_smithy_runtime_api::client::interceptors::context::Output,
313            ::aws_smithy_runtime_api::client::interceptors::context::Error,
314        >,
315        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
316    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
317        let _input = context.input().downcast_ref::<InvokeInput>().ok_or("failed to downcast to InvokeInput")?;
318
319        let params = crate::config::endpoint::Params::builder()
320            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
321            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
322            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
323            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
324            .build()
325            .map_err(|err| {
326                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
327            })?;
328        cfg.interceptor_state()
329            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
330        ::std::result::Result::Ok(())
331    }
332}
333
334// The get_* functions below are generated from JMESPath expressions in the
335// operationContextParams trait. They target the operation's input shape.
336
337/// Error type for the `InvokeError` operation.
338#[non_exhaustive]
339#[derive(::std::fmt::Debug)]
340pub enum InvokeError {
341    /// <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>
342    CodeArtifactUserDeletedException(crate::types::error::CodeArtifactUserDeletedException),
343    /// <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>
344    CodeArtifactUserFailedException(crate::types::error::CodeArtifactUserFailedException),
345    /// <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>
346    CodeArtifactUserPendingException(crate::types::error::CodeArtifactUserPendingException),
347    /// <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>
348    DurableExecutionAlreadyStartedException(crate::types::error::DurableExecutionAlreadyStartedException),
349    /// <p>Need additional permissions to configure VPC settings.</p>
350    Ec2AccessDeniedException(crate::types::error::Ec2AccessDeniedException),
351    /// <p>Amazon EC2 throttled Lambda during Lambda function initialization using the execution role provided for the function.</p>
352    Ec2ThrottledException(crate::types::error::Ec2ThrottledException),
353    /// <p>Lambda received an unexpected Amazon EC2 client exception while setting up for the Lambda function.</p>
354    Ec2UnexpectedException(crate::types::error::Ec2UnexpectedException),
355    /// <p>An error occurred when reading from or writing to a connected file system.</p>
356    EfsioException(crate::types::error::EfsioException),
357    /// <p>The Lambda function couldn't make a network connection to the configured file system.</p>
358    EfsMountConnectivityException(crate::types::error::EfsMountConnectivityException),
359    /// <p>The Lambda function couldn't mount the configured file system due to a permission or configuration issue.</p>
360    EfsMountFailureException(crate::types::error::EfsMountFailureException),
361    /// <p>The Lambda function made a network connection to the configured file system, but the mount operation timed out.</p>
362    EfsMountTimeoutException(crate::types::error::EfsMountTimeoutException),
363    /// <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>
364    EniLimitReachedException(crate::types::error::EniLimitReachedException),
365    /// <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>
366    EniNotReadyException(crate::types::error::EniNotReadyException),
367    /// <p>One of the parameters in the request is not valid.</p>
368    InvalidParameterValueException(crate::types::error::InvalidParameterValueException),
369    /// <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>
370    InvalidRequestContentException(crate::types::error::InvalidRequestContentException),
371    /// <p>The runtime or runtime version specified is not supported.</p>
372    InvalidRuntimeException(crate::types::error::InvalidRuntimeException),
373    /// <p>The security group ID provided in the Lambda function VPC configuration is not valid.</p>
374    InvalidSecurityGroupIdException(crate::types::error::InvalidSecurityGroupIdException),
375    /// <p>The subnet ID provided in the Lambda function VPC configuration is not valid.</p>
376    InvalidSubnetIdException(crate::types::error::InvalidSubnetIdException),
377    /// <p>Lambda could not unzip the deployment package.</p>
378    InvalidZipFileException(crate::types::error::InvalidZipFileException),
379    /// <p>Lambda couldn't decrypt the environment variables because KMS access was denied. Check the Lambda function's KMS permissions.</p>
380    KmsAccessDeniedException(crate::types::error::KmsAccessDeniedException),
381    /// <p>Lambda couldn't decrypt the environment variables because the KMS key used is disabled. Check the Lambda function's KMS key settings.</p>
382    KmsDisabledException(crate::types::error::KmsDisabledException),
383    /// <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>
384    KmsInvalidStateException(crate::types::error::KmsInvalidStateException),
385    /// <p>Lambda couldn't decrypt the environment variables because the KMS key was not found. Check the function's KMS key settings.</p>
386    KmsNotFoundException(crate::types::error::KmsNotFoundException),
387    /// <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>
388    ModeNotSupportedException(crate::types::error::ModeNotSupportedException),
389    /// <p>The function has no published versions available.</p>
390    NoPublishedVersionException(crate::types::error::NoPublishedVersionException),
391    /// <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>
392    RecursiveInvocationException(crate::types::error::RecursiveInvocationException),
393    /// <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>
394    RequestTooLargeException(crate::types::error::RequestTooLargeException),
395    /// <p>The resource already exists, or another operation is in progress.</p>
396    ResourceConflictException(crate::types::error::ResourceConflictException),
397    /// <p>The resource specified in the request does not exist.</p>
398    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
399    /// <p>The function is inactive and its VPC connection is no longer available. Wait for the VPC connection to reestablish and try again.</p>
400    ResourceNotReadyException(crate::types::error::ResourceNotReadyException),
401    /// <p>The Lambda function couldn't make a network connection to the configured S3 Files access point.</p>
402    S3FilesMountConnectivityException(crate::types::error::S3FilesMountConnectivityException),
403    /// <p>The Lambda function couldn't mount the configured S3 Files access point due to a permission or configuration issue.</p>
404    S3FilesMountFailureException(crate::types::error::S3FilesMountFailureException),
405    /// <p>The Lambda function made a network connection to the configured S3 Files access point, but the mount operation timed out.</p>
406    S3FilesMountTimeoutException(crate::types::error::S3FilesMountTimeoutException),
407    /// <p>The request payload exceeded the maximum allowed size for serialized request entities.</p>
408    SerializedRequestEntityTooLargeException(crate::types::error::SerializedRequestEntityTooLargeException),
409    /// <p>The Lambda service encountered an internal error.</p>
410    ServiceException(crate::types::error::ServiceException),
411    /// <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>
412    ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
413    /// <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>
414    SnapStartException(crate::types::error::SnapStartException),
415    /// <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>
416    SnapStartNotReadyException(crate::types::error::SnapStartNotReadyException),
417    /// <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>
418    SnapStartRegenerationFailureException(crate::types::error::SnapStartRegenerationFailureException),
419    /// <p>Lambda couldn't restore the snapshot within the timeout limit.</p>
420    SnapStartTimeoutException(crate::types::error::SnapStartTimeoutException),
421    /// <p>Lambda couldn't set up VPC access for the Lambda function because one or more configured subnets has no available IP addresses.</p>
422    SubnetIpAddressLimitReachedException(crate::types::error::SubnetIpAddressLimitReachedException),
423    /// <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>
424    TooManyRequestsException(crate::types::error::TooManyRequestsException),
425    /// <p>The content type of the <code>Invoke</code> request body is not JSON.</p>
426    UnsupportedMediaTypeException(crate::types::error::UnsupportedMediaTypeException),
427    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
428    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
429    variable wildcard pattern and check `.code()`:
430     \
431    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
432     \
433    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-InvokeError) for what information is available for the error.")]
434    Unhandled(crate::error::sealed_unhandled::Unhandled),
435}
436impl InvokeError {
437    /// Creates the `InvokeError::Unhandled` variant from any error type.
438    pub fn unhandled(
439        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
440    ) -> Self {
441        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
442            source: err.into(),
443            meta: ::std::default::Default::default(),
444        })
445    }
446
447    /// Creates the `InvokeError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
448    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
449        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
450            source: err.clone().into(),
451            meta: err,
452        })
453    }
454    ///
455    /// Returns error metadata, which includes the error code, message,
456    /// request ID, and potentially additional information.
457    ///
458    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
459        match self {
460            Self::CodeArtifactUserDeletedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
461            Self::CodeArtifactUserFailedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
462            Self::CodeArtifactUserPendingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
463            Self::DurableExecutionAlreadyStartedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
464            Self::Ec2AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
465            Self::Ec2ThrottledException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
466            Self::Ec2UnexpectedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
467            Self::EfsioException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
468            Self::EfsMountConnectivityException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
469            Self::EfsMountFailureException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
470            Self::EfsMountTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
471            Self::EniLimitReachedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
472            Self::EniNotReadyException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
473            Self::InvalidParameterValueException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
474            Self::InvalidRequestContentException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
475            Self::InvalidRuntimeException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
476            Self::InvalidSecurityGroupIdException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
477            Self::InvalidSubnetIdException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
478            Self::InvalidZipFileException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
479            Self::KmsAccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
480            Self::KmsDisabledException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
481            Self::KmsInvalidStateException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
482            Self::KmsNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
483            Self::ModeNotSupportedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
484            Self::NoPublishedVersionException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
485            Self::RecursiveInvocationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
486            Self::RequestTooLargeException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
487            Self::ResourceConflictException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
488            Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
489            Self::ResourceNotReadyException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
490            Self::S3FilesMountConnectivityException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
491            Self::S3FilesMountFailureException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
492            Self::S3FilesMountTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
493            Self::SerializedRequestEntityTooLargeException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
494            Self::ServiceException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
495            Self::ServiceQuotaExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
496            Self::SnapStartException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
497            Self::SnapStartNotReadyException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
498            Self::SnapStartRegenerationFailureException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
499            Self::SnapStartTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
500            Self::SubnetIpAddressLimitReachedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
501            Self::TooManyRequestsException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
502            Self::UnsupportedMediaTypeException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
503            Self::Unhandled(e) => &e.meta,
504        }
505    }
506    /// Returns `true` if the error kind is `InvokeError::CodeArtifactUserDeletedException`.
507    pub fn is_code_artifact_user_deleted_exception(&self) -> bool {
508        matches!(self, Self::CodeArtifactUserDeletedException(_))
509    }
510    /// Returns `true` if the error kind is `InvokeError::CodeArtifactUserFailedException`.
511    pub fn is_code_artifact_user_failed_exception(&self) -> bool {
512        matches!(self, Self::CodeArtifactUserFailedException(_))
513    }
514    /// Returns `true` if the error kind is `InvokeError::CodeArtifactUserPendingException`.
515    pub fn is_code_artifact_user_pending_exception(&self) -> bool {
516        matches!(self, Self::CodeArtifactUserPendingException(_))
517    }
518    /// Returns `true` if the error kind is `InvokeError::DurableExecutionAlreadyStartedException`.
519    pub fn is_durable_execution_already_started_exception(&self) -> bool {
520        matches!(self, Self::DurableExecutionAlreadyStartedException(_))
521    }
522    /// Returns `true` if the error kind is `InvokeError::Ec2AccessDeniedException`.
523    pub fn is_ec2_access_denied_exception(&self) -> bool {
524        matches!(self, Self::Ec2AccessDeniedException(_))
525    }
526    /// Returns `true` if the error kind is `InvokeError::Ec2ThrottledException`.
527    pub fn is_ec2_throttled_exception(&self) -> bool {
528        matches!(self, Self::Ec2ThrottledException(_))
529    }
530    /// Returns `true` if the error kind is `InvokeError::Ec2UnexpectedException`.
531    pub fn is_ec2_unexpected_exception(&self) -> bool {
532        matches!(self, Self::Ec2UnexpectedException(_))
533    }
534    /// Returns `true` if the error kind is `InvokeError::EfsioException`.
535    pub fn is_efsio_exception(&self) -> bool {
536        matches!(self, Self::EfsioException(_))
537    }
538    /// Returns `true` if the error kind is `InvokeError::EfsMountConnectivityException`.
539    pub fn is_efs_mount_connectivity_exception(&self) -> bool {
540        matches!(self, Self::EfsMountConnectivityException(_))
541    }
542    /// Returns `true` if the error kind is `InvokeError::EfsMountFailureException`.
543    pub fn is_efs_mount_failure_exception(&self) -> bool {
544        matches!(self, Self::EfsMountFailureException(_))
545    }
546    /// Returns `true` if the error kind is `InvokeError::EfsMountTimeoutException`.
547    pub fn is_efs_mount_timeout_exception(&self) -> bool {
548        matches!(self, Self::EfsMountTimeoutException(_))
549    }
550    /// Returns `true` if the error kind is `InvokeError::EniLimitReachedException`.
551    pub fn is_eni_limit_reached_exception(&self) -> bool {
552        matches!(self, Self::EniLimitReachedException(_))
553    }
554    /// Returns `true` if the error kind is `InvokeError::EniNotReadyException`.
555    pub fn is_eni_not_ready_exception(&self) -> bool {
556        matches!(self, Self::EniNotReadyException(_))
557    }
558    /// Returns `true` if the error kind is `InvokeError::InvalidParameterValueException`.
559    pub fn is_invalid_parameter_value_exception(&self) -> bool {
560        matches!(self, Self::InvalidParameterValueException(_))
561    }
562    /// Returns `true` if the error kind is `InvokeError::InvalidRequestContentException`.
563    pub fn is_invalid_request_content_exception(&self) -> bool {
564        matches!(self, Self::InvalidRequestContentException(_))
565    }
566    /// Returns `true` if the error kind is `InvokeError::InvalidRuntimeException`.
567    pub fn is_invalid_runtime_exception(&self) -> bool {
568        matches!(self, Self::InvalidRuntimeException(_))
569    }
570    /// Returns `true` if the error kind is `InvokeError::InvalidSecurityGroupIdException`.
571    pub fn is_invalid_security_group_id_exception(&self) -> bool {
572        matches!(self, Self::InvalidSecurityGroupIdException(_))
573    }
574    /// Returns `true` if the error kind is `InvokeError::InvalidSubnetIdException`.
575    pub fn is_invalid_subnet_id_exception(&self) -> bool {
576        matches!(self, Self::InvalidSubnetIdException(_))
577    }
578    /// Returns `true` if the error kind is `InvokeError::InvalidZipFileException`.
579    pub fn is_invalid_zip_file_exception(&self) -> bool {
580        matches!(self, Self::InvalidZipFileException(_))
581    }
582    /// Returns `true` if the error kind is `InvokeError::KmsAccessDeniedException`.
583    pub fn is_kms_access_denied_exception(&self) -> bool {
584        matches!(self, Self::KmsAccessDeniedException(_))
585    }
586    /// Returns `true` if the error kind is `InvokeError::KmsDisabledException`.
587    pub fn is_kms_disabled_exception(&self) -> bool {
588        matches!(self, Self::KmsDisabledException(_))
589    }
590    /// Returns `true` if the error kind is `InvokeError::KmsInvalidStateException`.
591    pub fn is_kms_invalid_state_exception(&self) -> bool {
592        matches!(self, Self::KmsInvalidStateException(_))
593    }
594    /// Returns `true` if the error kind is `InvokeError::KmsNotFoundException`.
595    pub fn is_kms_not_found_exception(&self) -> bool {
596        matches!(self, Self::KmsNotFoundException(_))
597    }
598    /// Returns `true` if the error kind is `InvokeError::ModeNotSupportedException`.
599    pub fn is_mode_not_supported_exception(&self) -> bool {
600        matches!(self, Self::ModeNotSupportedException(_))
601    }
602    /// Returns `true` if the error kind is `InvokeError::NoPublishedVersionException`.
603    pub fn is_no_published_version_exception(&self) -> bool {
604        matches!(self, Self::NoPublishedVersionException(_))
605    }
606    /// Returns `true` if the error kind is `InvokeError::RecursiveInvocationException`.
607    pub fn is_recursive_invocation_exception(&self) -> bool {
608        matches!(self, Self::RecursiveInvocationException(_))
609    }
610    /// Returns `true` if the error kind is `InvokeError::RequestTooLargeException`.
611    pub fn is_request_too_large_exception(&self) -> bool {
612        matches!(self, Self::RequestTooLargeException(_))
613    }
614    /// Returns `true` if the error kind is `InvokeError::ResourceConflictException`.
615    pub fn is_resource_conflict_exception(&self) -> bool {
616        matches!(self, Self::ResourceConflictException(_))
617    }
618    /// Returns `true` if the error kind is `InvokeError::ResourceNotFoundException`.
619    pub fn is_resource_not_found_exception(&self) -> bool {
620        matches!(self, Self::ResourceNotFoundException(_))
621    }
622    /// Returns `true` if the error kind is `InvokeError::ResourceNotReadyException`.
623    pub fn is_resource_not_ready_exception(&self) -> bool {
624        matches!(self, Self::ResourceNotReadyException(_))
625    }
626    /// Returns `true` if the error kind is `InvokeError::S3FilesMountConnectivityException`.
627    pub fn is_s3_files_mount_connectivity_exception(&self) -> bool {
628        matches!(self, Self::S3FilesMountConnectivityException(_))
629    }
630    /// Returns `true` if the error kind is `InvokeError::S3FilesMountFailureException`.
631    pub fn is_s3_files_mount_failure_exception(&self) -> bool {
632        matches!(self, Self::S3FilesMountFailureException(_))
633    }
634    /// Returns `true` if the error kind is `InvokeError::S3FilesMountTimeoutException`.
635    pub fn is_s3_files_mount_timeout_exception(&self) -> bool {
636        matches!(self, Self::S3FilesMountTimeoutException(_))
637    }
638    /// Returns `true` if the error kind is `InvokeError::SerializedRequestEntityTooLargeException`.
639    pub fn is_serialized_request_entity_too_large_exception(&self) -> bool {
640        matches!(self, Self::SerializedRequestEntityTooLargeException(_))
641    }
642    /// Returns `true` if the error kind is `InvokeError::ServiceException`.
643    pub fn is_service_exception(&self) -> bool {
644        matches!(self, Self::ServiceException(_))
645    }
646    /// Returns `true` if the error kind is `InvokeError::ServiceQuotaExceededException`.
647    pub fn is_service_quota_exceeded_exception(&self) -> bool {
648        matches!(self, Self::ServiceQuotaExceededException(_))
649    }
650    /// Returns `true` if the error kind is `InvokeError::SnapStartException`.
651    pub fn is_snap_start_exception(&self) -> bool {
652        matches!(self, Self::SnapStartException(_))
653    }
654    /// Returns `true` if the error kind is `InvokeError::SnapStartNotReadyException`.
655    pub fn is_snap_start_not_ready_exception(&self) -> bool {
656        matches!(self, Self::SnapStartNotReadyException(_))
657    }
658    /// Returns `true` if the error kind is `InvokeError::SnapStartRegenerationFailureException`.
659    pub fn is_snap_start_regeneration_failure_exception(&self) -> bool {
660        matches!(self, Self::SnapStartRegenerationFailureException(_))
661    }
662    /// Returns `true` if the error kind is `InvokeError::SnapStartTimeoutException`.
663    pub fn is_snap_start_timeout_exception(&self) -> bool {
664        matches!(self, Self::SnapStartTimeoutException(_))
665    }
666    /// Returns `true` if the error kind is `InvokeError::SubnetIpAddressLimitReachedException`.
667    pub fn is_subnet_ip_address_limit_reached_exception(&self) -> bool {
668        matches!(self, Self::SubnetIpAddressLimitReachedException(_))
669    }
670    /// Returns `true` if the error kind is `InvokeError::TooManyRequestsException`.
671    pub fn is_too_many_requests_exception(&self) -> bool {
672        matches!(self, Self::TooManyRequestsException(_))
673    }
674    /// Returns `true` if the error kind is `InvokeError::UnsupportedMediaTypeException`.
675    pub fn is_unsupported_media_type_exception(&self) -> bool {
676        matches!(self, Self::UnsupportedMediaTypeException(_))
677    }
678}
679impl ::std::error::Error for InvokeError {
680    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
681        match self {
682            Self::CodeArtifactUserDeletedException(_inner) => ::std::option::Option::Some(_inner),
683            Self::CodeArtifactUserFailedException(_inner) => ::std::option::Option::Some(_inner),
684            Self::CodeArtifactUserPendingException(_inner) => ::std::option::Option::Some(_inner),
685            Self::DurableExecutionAlreadyStartedException(_inner) => ::std::option::Option::Some(_inner),
686            Self::Ec2AccessDeniedException(_inner) => ::std::option::Option::Some(_inner),
687            Self::Ec2ThrottledException(_inner) => ::std::option::Option::Some(_inner),
688            Self::Ec2UnexpectedException(_inner) => ::std::option::Option::Some(_inner),
689            Self::EfsioException(_inner) => ::std::option::Option::Some(_inner),
690            Self::EfsMountConnectivityException(_inner) => ::std::option::Option::Some(_inner),
691            Self::EfsMountFailureException(_inner) => ::std::option::Option::Some(_inner),
692            Self::EfsMountTimeoutException(_inner) => ::std::option::Option::Some(_inner),
693            Self::EniLimitReachedException(_inner) => ::std::option::Option::Some(_inner),
694            Self::EniNotReadyException(_inner) => ::std::option::Option::Some(_inner),
695            Self::InvalidParameterValueException(_inner) => ::std::option::Option::Some(_inner),
696            Self::InvalidRequestContentException(_inner) => ::std::option::Option::Some(_inner),
697            Self::InvalidRuntimeException(_inner) => ::std::option::Option::Some(_inner),
698            Self::InvalidSecurityGroupIdException(_inner) => ::std::option::Option::Some(_inner),
699            Self::InvalidSubnetIdException(_inner) => ::std::option::Option::Some(_inner),
700            Self::InvalidZipFileException(_inner) => ::std::option::Option::Some(_inner),
701            Self::KmsAccessDeniedException(_inner) => ::std::option::Option::Some(_inner),
702            Self::KmsDisabledException(_inner) => ::std::option::Option::Some(_inner),
703            Self::KmsInvalidStateException(_inner) => ::std::option::Option::Some(_inner),
704            Self::KmsNotFoundException(_inner) => ::std::option::Option::Some(_inner),
705            Self::ModeNotSupportedException(_inner) => ::std::option::Option::Some(_inner),
706            Self::NoPublishedVersionException(_inner) => ::std::option::Option::Some(_inner),
707            Self::RecursiveInvocationException(_inner) => ::std::option::Option::Some(_inner),
708            Self::RequestTooLargeException(_inner) => ::std::option::Option::Some(_inner),
709            Self::ResourceConflictException(_inner) => ::std::option::Option::Some(_inner),
710            Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner),
711            Self::ResourceNotReadyException(_inner) => ::std::option::Option::Some(_inner),
712            Self::S3FilesMountConnectivityException(_inner) => ::std::option::Option::Some(_inner),
713            Self::S3FilesMountFailureException(_inner) => ::std::option::Option::Some(_inner),
714            Self::S3FilesMountTimeoutException(_inner) => ::std::option::Option::Some(_inner),
715            Self::SerializedRequestEntityTooLargeException(_inner) => ::std::option::Option::Some(_inner),
716            Self::ServiceException(_inner) => ::std::option::Option::Some(_inner),
717            Self::ServiceQuotaExceededException(_inner) => ::std::option::Option::Some(_inner),
718            Self::SnapStartException(_inner) => ::std::option::Option::Some(_inner),
719            Self::SnapStartNotReadyException(_inner) => ::std::option::Option::Some(_inner),
720            Self::SnapStartRegenerationFailureException(_inner) => ::std::option::Option::Some(_inner),
721            Self::SnapStartTimeoutException(_inner) => ::std::option::Option::Some(_inner),
722            Self::SubnetIpAddressLimitReachedException(_inner) => ::std::option::Option::Some(_inner),
723            Self::TooManyRequestsException(_inner) => ::std::option::Option::Some(_inner),
724            Self::UnsupportedMediaTypeException(_inner) => ::std::option::Option::Some(_inner),
725            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
726        }
727    }
728}
729impl ::std::fmt::Display for InvokeError {
730    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
731        match self {
732            Self::CodeArtifactUserDeletedException(_inner) => _inner.fmt(f),
733            Self::CodeArtifactUserFailedException(_inner) => _inner.fmt(f),
734            Self::CodeArtifactUserPendingException(_inner) => _inner.fmt(f),
735            Self::DurableExecutionAlreadyStartedException(_inner) => _inner.fmt(f),
736            Self::Ec2AccessDeniedException(_inner) => _inner.fmt(f),
737            Self::Ec2ThrottledException(_inner) => _inner.fmt(f),
738            Self::Ec2UnexpectedException(_inner) => _inner.fmt(f),
739            Self::EfsioException(_inner) => _inner.fmt(f),
740            Self::EfsMountConnectivityException(_inner) => _inner.fmt(f),
741            Self::EfsMountFailureException(_inner) => _inner.fmt(f),
742            Self::EfsMountTimeoutException(_inner) => _inner.fmt(f),
743            Self::EniLimitReachedException(_inner) => _inner.fmt(f),
744            Self::EniNotReadyException(_inner) => _inner.fmt(f),
745            Self::InvalidParameterValueException(_inner) => _inner.fmt(f),
746            Self::InvalidRequestContentException(_inner) => _inner.fmt(f),
747            Self::InvalidRuntimeException(_inner) => _inner.fmt(f),
748            Self::InvalidSecurityGroupIdException(_inner) => _inner.fmt(f),
749            Self::InvalidSubnetIdException(_inner) => _inner.fmt(f),
750            Self::InvalidZipFileException(_inner) => _inner.fmt(f),
751            Self::KmsAccessDeniedException(_inner) => _inner.fmt(f),
752            Self::KmsDisabledException(_inner) => _inner.fmt(f),
753            Self::KmsInvalidStateException(_inner) => _inner.fmt(f),
754            Self::KmsNotFoundException(_inner) => _inner.fmt(f),
755            Self::ModeNotSupportedException(_inner) => _inner.fmt(f),
756            Self::NoPublishedVersionException(_inner) => _inner.fmt(f),
757            Self::RecursiveInvocationException(_inner) => _inner.fmt(f),
758            Self::RequestTooLargeException(_inner) => _inner.fmt(f),
759            Self::ResourceConflictException(_inner) => _inner.fmt(f),
760            Self::ResourceNotFoundException(_inner) => _inner.fmt(f),
761            Self::ResourceNotReadyException(_inner) => _inner.fmt(f),
762            Self::S3FilesMountConnectivityException(_inner) => _inner.fmt(f),
763            Self::S3FilesMountFailureException(_inner) => _inner.fmt(f),
764            Self::S3FilesMountTimeoutException(_inner) => _inner.fmt(f),
765            Self::SerializedRequestEntityTooLargeException(_inner) => _inner.fmt(f),
766            Self::ServiceException(_inner) => _inner.fmt(f),
767            Self::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
768            Self::SnapStartException(_inner) => _inner.fmt(f),
769            Self::SnapStartNotReadyException(_inner) => _inner.fmt(f),
770            Self::SnapStartRegenerationFailureException(_inner) => _inner.fmt(f),
771            Self::SnapStartTimeoutException(_inner) => _inner.fmt(f),
772            Self::SubnetIpAddressLimitReachedException(_inner) => _inner.fmt(f),
773            Self::TooManyRequestsException(_inner) => _inner.fmt(f),
774            Self::UnsupportedMediaTypeException(_inner) => _inner.fmt(f),
775            Self::Unhandled(_inner) => {
776                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
777                    write!(f, "unhandled error ({code})")
778                } else {
779                    f.write_str("unhandled error")
780                }
781            }
782        }
783    }
784}
785impl ::aws_smithy_types::retry::ProvideErrorKind for InvokeError {
786    fn code(&self) -> ::std::option::Option<&str> {
787        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
788    }
789    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
790        ::std::option::Option::None
791    }
792}
793impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for InvokeError {
794    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
795        match self {
796            Self::CodeArtifactUserDeletedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
797            Self::CodeArtifactUserFailedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
798            Self::CodeArtifactUserPendingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
799            Self::DurableExecutionAlreadyStartedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
800            Self::Ec2AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
801            Self::Ec2ThrottledException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
802            Self::Ec2UnexpectedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
803            Self::EfsioException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
804            Self::EfsMountConnectivityException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
805            Self::EfsMountFailureException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
806            Self::EfsMountTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
807            Self::EniLimitReachedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
808            Self::EniNotReadyException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
809            Self::InvalidParameterValueException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
810            Self::InvalidRequestContentException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
811            Self::InvalidRuntimeException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
812            Self::InvalidSecurityGroupIdException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
813            Self::InvalidSubnetIdException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
814            Self::InvalidZipFileException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
815            Self::KmsAccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
816            Self::KmsDisabledException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
817            Self::KmsInvalidStateException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
818            Self::KmsNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
819            Self::ModeNotSupportedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
820            Self::NoPublishedVersionException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
821            Self::RecursiveInvocationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
822            Self::RequestTooLargeException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
823            Self::ResourceConflictException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
824            Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
825            Self::ResourceNotReadyException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
826            Self::S3FilesMountConnectivityException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
827            Self::S3FilesMountFailureException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
828            Self::S3FilesMountTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
829            Self::SerializedRequestEntityTooLargeException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
830            Self::ServiceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
831            Self::ServiceQuotaExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
832            Self::SnapStartException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
833            Self::SnapStartNotReadyException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
834            Self::SnapStartRegenerationFailureException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
835            Self::SnapStartTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
836            Self::SubnetIpAddressLimitReachedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
837            Self::TooManyRequestsException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
838            Self::UnsupportedMediaTypeException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
839            Self::Unhandled(_inner) => &_inner.meta,
840        }
841    }
842}
843impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for InvokeError {
844    fn create_unhandled_error(
845        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
846        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
847    ) -> Self {
848        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
849            source,
850            meta: meta.unwrap_or_default(),
851        })
852    }
853}
854impl ::aws_types::request_id::RequestId for crate::operation::invoke::InvokeError {
855    fn request_id(&self) -> Option<&str> {
856        self.meta().request_id()
857    }
858}
859
860pub use crate::operation::invoke::_invoke_input::InvokeInput;
861
862pub use crate::operation::invoke::_invoke_output::InvokeOutput;
863
864mod _invoke_input;
865
866mod _invoke_output;
867
868/// Builders
869pub mod builders;