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