1#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct Invoke;
6impl Invoke {
7 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 .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#[non_exhaustive]
270#[derive(::std::fmt::Debug)]
271pub enum InvokeError {
272 DurableExecutionAlreadyStartedException(crate::types::error::DurableExecutionAlreadyStartedException),
274 Ec2AccessDeniedException(crate::types::error::Ec2AccessDeniedException),
276 Ec2ThrottledException(crate::types::error::Ec2ThrottledException),
278 Ec2UnexpectedException(crate::types::error::Ec2UnexpectedException),
280 EfsioException(crate::types::error::EfsioException),
282 EfsMountConnectivityException(crate::types::error::EfsMountConnectivityException),
284 EfsMountFailureException(crate::types::error::EfsMountFailureException),
286 EfsMountTimeoutException(crate::types::error::EfsMountTimeoutException),
288 EniLimitReachedException(crate::types::error::EniLimitReachedException),
290 InvalidParameterValueException(crate::types::error::InvalidParameterValueException),
292 InvalidRequestContentException(crate::types::error::InvalidRequestContentException),
294 InvalidRuntimeException(crate::types::error::InvalidRuntimeException),
296 InvalidSecurityGroupIdException(crate::types::error::InvalidSecurityGroupIdException),
298 InvalidSubnetIdException(crate::types::error::InvalidSubnetIdException),
300 InvalidZipFileException(crate::types::error::InvalidZipFileException),
302 KmsAccessDeniedException(crate::types::error::KmsAccessDeniedException),
304 KmsDisabledException(crate::types::error::KmsDisabledException),
306 KmsInvalidStateException(crate::types::error::KmsInvalidStateException),
308 KmsNotFoundException(crate::types::error::KmsNotFoundException),
310 NoPublishedVersionException(crate::types::error::NoPublishedVersionException),
312 RecursiveInvocationException(crate::types::error::RecursiveInvocationException),
314 RequestTooLargeException(crate::types::error::RequestTooLargeException),
316 ResourceConflictException(crate::types::error::ResourceConflictException),
318 ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
320 ResourceNotReadyException(crate::types::error::ResourceNotReadyException),
322 S3FilesMountConnectivityException(crate::types::error::S3FilesMountConnectivityException),
324 S3FilesMountFailureException(crate::types::error::S3FilesMountFailureException),
326 S3FilesMountTimeoutException(crate::types::error::S3FilesMountTimeoutException),
328 SerializedRequestEntityTooLargeException(crate::types::error::SerializedRequestEntityTooLargeException),
330 ServiceException(crate::types::error::ServiceException),
332 SnapStartException(crate::types::error::SnapStartException),
334 SnapStartNotReadyException(crate::types::error::SnapStartNotReadyException),
336 SnapStartTimeoutException(crate::types::error::SnapStartTimeoutException),
338 SubnetIpAddressLimitReachedException(crate::types::error::SubnetIpAddressLimitReachedException),
340 TooManyRequestsException(crate::types::error::TooManyRequestsException),
342 UnsupportedMediaTypeException(crate::types::error::UnsupportedMediaTypeException),
344 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
346 variable wildcard pattern and check `.code()`:
347 \
348 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
349 \
350 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-InvokeError) for what information is available for the error.")]
351 Unhandled(crate::error::sealed_unhandled::Unhandled),
352}
353impl InvokeError {
354 pub fn unhandled(
356 err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
357 ) -> Self {
358 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
359 source: err.into(),
360 meta: ::std::default::Default::default(),
361 })
362 }
363
364 pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
366 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
367 source: err.clone().into(),
368 meta: err,
369 })
370 }
371 pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
376 match self {
377 Self::DurableExecutionAlreadyStartedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
378 Self::Ec2AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
379 Self::Ec2ThrottledException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
380 Self::Ec2UnexpectedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
381 Self::EfsioException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
382 Self::EfsMountConnectivityException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
383 Self::EfsMountFailureException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
384 Self::EfsMountTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
385 Self::EniLimitReachedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
386 Self::InvalidParameterValueException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
387 Self::InvalidRequestContentException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
388 Self::InvalidRuntimeException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
389 Self::InvalidSecurityGroupIdException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
390 Self::InvalidSubnetIdException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
391 Self::InvalidZipFileException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
392 Self::KmsAccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
393 Self::KmsDisabledException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
394 Self::KmsInvalidStateException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
395 Self::KmsNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
396 Self::NoPublishedVersionException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
397 Self::RecursiveInvocationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
398 Self::RequestTooLargeException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
399 Self::ResourceConflictException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
400 Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
401 Self::ResourceNotReadyException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
402 Self::S3FilesMountConnectivityException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
403 Self::S3FilesMountFailureException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
404 Self::S3FilesMountTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
405 Self::SerializedRequestEntityTooLargeException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
406 Self::ServiceException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
407 Self::SnapStartException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
408 Self::SnapStartNotReadyException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
409 Self::SnapStartTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
410 Self::SubnetIpAddressLimitReachedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
411 Self::TooManyRequestsException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
412 Self::UnsupportedMediaTypeException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
413 Self::Unhandled(e) => &e.meta,
414 }
415 }
416 pub fn is_durable_execution_already_started_exception(&self) -> bool {
418 matches!(self, Self::DurableExecutionAlreadyStartedException(_))
419 }
420 pub fn is_ec2_access_denied_exception(&self) -> bool {
422 matches!(self, Self::Ec2AccessDeniedException(_))
423 }
424 pub fn is_ec2_throttled_exception(&self) -> bool {
426 matches!(self, Self::Ec2ThrottledException(_))
427 }
428 pub fn is_ec2_unexpected_exception(&self) -> bool {
430 matches!(self, Self::Ec2UnexpectedException(_))
431 }
432 pub fn is_efsio_exception(&self) -> bool {
434 matches!(self, Self::EfsioException(_))
435 }
436 pub fn is_efs_mount_connectivity_exception(&self) -> bool {
438 matches!(self, Self::EfsMountConnectivityException(_))
439 }
440 pub fn is_efs_mount_failure_exception(&self) -> bool {
442 matches!(self, Self::EfsMountFailureException(_))
443 }
444 pub fn is_efs_mount_timeout_exception(&self) -> bool {
446 matches!(self, Self::EfsMountTimeoutException(_))
447 }
448 pub fn is_eni_limit_reached_exception(&self) -> bool {
450 matches!(self, Self::EniLimitReachedException(_))
451 }
452 pub fn is_invalid_parameter_value_exception(&self) -> bool {
454 matches!(self, Self::InvalidParameterValueException(_))
455 }
456 pub fn is_invalid_request_content_exception(&self) -> bool {
458 matches!(self, Self::InvalidRequestContentException(_))
459 }
460 pub fn is_invalid_runtime_exception(&self) -> bool {
462 matches!(self, Self::InvalidRuntimeException(_))
463 }
464 pub fn is_invalid_security_group_id_exception(&self) -> bool {
466 matches!(self, Self::InvalidSecurityGroupIdException(_))
467 }
468 pub fn is_invalid_subnet_id_exception(&self) -> bool {
470 matches!(self, Self::InvalidSubnetIdException(_))
471 }
472 pub fn is_invalid_zip_file_exception(&self) -> bool {
474 matches!(self, Self::InvalidZipFileException(_))
475 }
476 pub fn is_kms_access_denied_exception(&self) -> bool {
478 matches!(self, Self::KmsAccessDeniedException(_))
479 }
480 pub fn is_kms_disabled_exception(&self) -> bool {
482 matches!(self, Self::KmsDisabledException(_))
483 }
484 pub fn is_kms_invalid_state_exception(&self) -> bool {
486 matches!(self, Self::KmsInvalidStateException(_))
487 }
488 pub fn is_kms_not_found_exception(&self) -> bool {
490 matches!(self, Self::KmsNotFoundException(_))
491 }
492 pub fn is_no_published_version_exception(&self) -> bool {
494 matches!(self, Self::NoPublishedVersionException(_))
495 }
496 pub fn is_recursive_invocation_exception(&self) -> bool {
498 matches!(self, Self::RecursiveInvocationException(_))
499 }
500 pub fn is_request_too_large_exception(&self) -> bool {
502 matches!(self, Self::RequestTooLargeException(_))
503 }
504 pub fn is_resource_conflict_exception(&self) -> bool {
506 matches!(self, Self::ResourceConflictException(_))
507 }
508 pub fn is_resource_not_found_exception(&self) -> bool {
510 matches!(self, Self::ResourceNotFoundException(_))
511 }
512 pub fn is_resource_not_ready_exception(&self) -> bool {
514 matches!(self, Self::ResourceNotReadyException(_))
515 }
516 pub fn is_s3_files_mount_connectivity_exception(&self) -> bool {
518 matches!(self, Self::S3FilesMountConnectivityException(_))
519 }
520 pub fn is_s3_files_mount_failure_exception(&self) -> bool {
522 matches!(self, Self::S3FilesMountFailureException(_))
523 }
524 pub fn is_s3_files_mount_timeout_exception(&self) -> bool {
526 matches!(self, Self::S3FilesMountTimeoutException(_))
527 }
528 pub fn is_serialized_request_entity_too_large_exception(&self) -> bool {
530 matches!(self, Self::SerializedRequestEntityTooLargeException(_))
531 }
532 pub fn is_service_exception(&self) -> bool {
534 matches!(self, Self::ServiceException(_))
535 }
536 pub fn is_snap_start_exception(&self) -> bool {
538 matches!(self, Self::SnapStartException(_))
539 }
540 pub fn is_snap_start_not_ready_exception(&self) -> bool {
542 matches!(self, Self::SnapStartNotReadyException(_))
543 }
544 pub fn is_snap_start_timeout_exception(&self) -> bool {
546 matches!(self, Self::SnapStartTimeoutException(_))
547 }
548 pub fn is_subnet_ip_address_limit_reached_exception(&self) -> bool {
550 matches!(self, Self::SubnetIpAddressLimitReachedException(_))
551 }
552 pub fn is_too_many_requests_exception(&self) -> bool {
554 matches!(self, Self::TooManyRequestsException(_))
555 }
556 pub fn is_unsupported_media_type_exception(&self) -> bool {
558 matches!(self, Self::UnsupportedMediaTypeException(_))
559 }
560}
561impl ::std::error::Error for InvokeError {
562 fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
563 match self {
564 Self::DurableExecutionAlreadyStartedException(_inner) => ::std::option::Option::Some(_inner),
565 Self::Ec2AccessDeniedException(_inner) => ::std::option::Option::Some(_inner),
566 Self::Ec2ThrottledException(_inner) => ::std::option::Option::Some(_inner),
567 Self::Ec2UnexpectedException(_inner) => ::std::option::Option::Some(_inner),
568 Self::EfsioException(_inner) => ::std::option::Option::Some(_inner),
569 Self::EfsMountConnectivityException(_inner) => ::std::option::Option::Some(_inner),
570 Self::EfsMountFailureException(_inner) => ::std::option::Option::Some(_inner),
571 Self::EfsMountTimeoutException(_inner) => ::std::option::Option::Some(_inner),
572 Self::EniLimitReachedException(_inner) => ::std::option::Option::Some(_inner),
573 Self::InvalidParameterValueException(_inner) => ::std::option::Option::Some(_inner),
574 Self::InvalidRequestContentException(_inner) => ::std::option::Option::Some(_inner),
575 Self::InvalidRuntimeException(_inner) => ::std::option::Option::Some(_inner),
576 Self::InvalidSecurityGroupIdException(_inner) => ::std::option::Option::Some(_inner),
577 Self::InvalidSubnetIdException(_inner) => ::std::option::Option::Some(_inner),
578 Self::InvalidZipFileException(_inner) => ::std::option::Option::Some(_inner),
579 Self::KmsAccessDeniedException(_inner) => ::std::option::Option::Some(_inner),
580 Self::KmsDisabledException(_inner) => ::std::option::Option::Some(_inner),
581 Self::KmsInvalidStateException(_inner) => ::std::option::Option::Some(_inner),
582 Self::KmsNotFoundException(_inner) => ::std::option::Option::Some(_inner),
583 Self::NoPublishedVersionException(_inner) => ::std::option::Option::Some(_inner),
584 Self::RecursiveInvocationException(_inner) => ::std::option::Option::Some(_inner),
585 Self::RequestTooLargeException(_inner) => ::std::option::Option::Some(_inner),
586 Self::ResourceConflictException(_inner) => ::std::option::Option::Some(_inner),
587 Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner),
588 Self::ResourceNotReadyException(_inner) => ::std::option::Option::Some(_inner),
589 Self::S3FilesMountConnectivityException(_inner) => ::std::option::Option::Some(_inner),
590 Self::S3FilesMountFailureException(_inner) => ::std::option::Option::Some(_inner),
591 Self::S3FilesMountTimeoutException(_inner) => ::std::option::Option::Some(_inner),
592 Self::SerializedRequestEntityTooLargeException(_inner) => ::std::option::Option::Some(_inner),
593 Self::ServiceException(_inner) => ::std::option::Option::Some(_inner),
594 Self::SnapStartException(_inner) => ::std::option::Option::Some(_inner),
595 Self::SnapStartNotReadyException(_inner) => ::std::option::Option::Some(_inner),
596 Self::SnapStartTimeoutException(_inner) => ::std::option::Option::Some(_inner),
597 Self::SubnetIpAddressLimitReachedException(_inner) => ::std::option::Option::Some(_inner),
598 Self::TooManyRequestsException(_inner) => ::std::option::Option::Some(_inner),
599 Self::UnsupportedMediaTypeException(_inner) => ::std::option::Option::Some(_inner),
600 Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
601 }
602 }
603}
604impl ::std::fmt::Display for InvokeError {
605 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
606 match self {
607 Self::DurableExecutionAlreadyStartedException(_inner) => _inner.fmt(f),
608 Self::Ec2AccessDeniedException(_inner) => _inner.fmt(f),
609 Self::Ec2ThrottledException(_inner) => _inner.fmt(f),
610 Self::Ec2UnexpectedException(_inner) => _inner.fmt(f),
611 Self::EfsioException(_inner) => _inner.fmt(f),
612 Self::EfsMountConnectivityException(_inner) => _inner.fmt(f),
613 Self::EfsMountFailureException(_inner) => _inner.fmt(f),
614 Self::EfsMountTimeoutException(_inner) => _inner.fmt(f),
615 Self::EniLimitReachedException(_inner) => _inner.fmt(f),
616 Self::InvalidParameterValueException(_inner) => _inner.fmt(f),
617 Self::InvalidRequestContentException(_inner) => _inner.fmt(f),
618 Self::InvalidRuntimeException(_inner) => _inner.fmt(f),
619 Self::InvalidSecurityGroupIdException(_inner) => _inner.fmt(f),
620 Self::InvalidSubnetIdException(_inner) => _inner.fmt(f),
621 Self::InvalidZipFileException(_inner) => _inner.fmt(f),
622 Self::KmsAccessDeniedException(_inner) => _inner.fmt(f),
623 Self::KmsDisabledException(_inner) => _inner.fmt(f),
624 Self::KmsInvalidStateException(_inner) => _inner.fmt(f),
625 Self::KmsNotFoundException(_inner) => _inner.fmt(f),
626 Self::NoPublishedVersionException(_inner) => _inner.fmt(f),
627 Self::RecursiveInvocationException(_inner) => _inner.fmt(f),
628 Self::RequestTooLargeException(_inner) => _inner.fmt(f),
629 Self::ResourceConflictException(_inner) => _inner.fmt(f),
630 Self::ResourceNotFoundException(_inner) => _inner.fmt(f),
631 Self::ResourceNotReadyException(_inner) => _inner.fmt(f),
632 Self::S3FilesMountConnectivityException(_inner) => _inner.fmt(f),
633 Self::S3FilesMountFailureException(_inner) => _inner.fmt(f),
634 Self::S3FilesMountTimeoutException(_inner) => _inner.fmt(f),
635 Self::SerializedRequestEntityTooLargeException(_inner) => _inner.fmt(f),
636 Self::ServiceException(_inner) => _inner.fmt(f),
637 Self::SnapStartException(_inner) => _inner.fmt(f),
638 Self::SnapStartNotReadyException(_inner) => _inner.fmt(f),
639 Self::SnapStartTimeoutException(_inner) => _inner.fmt(f),
640 Self::SubnetIpAddressLimitReachedException(_inner) => _inner.fmt(f),
641 Self::TooManyRequestsException(_inner) => _inner.fmt(f),
642 Self::UnsupportedMediaTypeException(_inner) => _inner.fmt(f),
643 Self::Unhandled(_inner) => {
644 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
645 write!(f, "unhandled error ({code})")
646 } else {
647 f.write_str("unhandled error")
648 }
649 }
650 }
651 }
652}
653impl ::aws_smithy_types::retry::ProvideErrorKind for InvokeError {
654 fn code(&self) -> ::std::option::Option<&str> {
655 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
656 }
657 fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
658 ::std::option::Option::None
659 }
660}
661impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for InvokeError {
662 fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
663 match self {
664 Self::DurableExecutionAlreadyStartedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
665 Self::Ec2AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
666 Self::Ec2ThrottledException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
667 Self::Ec2UnexpectedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
668 Self::EfsioException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
669 Self::EfsMountConnectivityException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
670 Self::EfsMountFailureException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
671 Self::EfsMountTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
672 Self::EniLimitReachedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
673 Self::InvalidParameterValueException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
674 Self::InvalidRequestContentException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
675 Self::InvalidRuntimeException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
676 Self::InvalidSecurityGroupIdException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
677 Self::InvalidSubnetIdException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
678 Self::InvalidZipFileException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
679 Self::KmsAccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
680 Self::KmsDisabledException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
681 Self::KmsInvalidStateException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
682 Self::KmsNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
683 Self::NoPublishedVersionException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
684 Self::RecursiveInvocationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
685 Self::RequestTooLargeException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
686 Self::ResourceConflictException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
687 Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
688 Self::ResourceNotReadyException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
689 Self::S3FilesMountConnectivityException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
690 Self::S3FilesMountFailureException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
691 Self::S3FilesMountTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
692 Self::SerializedRequestEntityTooLargeException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
693 Self::ServiceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
694 Self::SnapStartException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
695 Self::SnapStartNotReadyException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
696 Self::SnapStartTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
697 Self::SubnetIpAddressLimitReachedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
698 Self::TooManyRequestsException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
699 Self::UnsupportedMediaTypeException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
700 Self::Unhandled(_inner) => &_inner.meta,
701 }
702 }
703}
704impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for InvokeError {
705 fn create_unhandled_error(
706 source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
707 meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
708 ) -> Self {
709 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
710 source,
711 meta: meta.unwrap_or_default(),
712 })
713 }
714}
715impl ::aws_types::request_id::RequestId for crate::operation::invoke::InvokeError {
716 fn request_id(&self) -> Option<&str> {
717 self.meta().request_id()
718 }
719}
720
721pub use crate::operation::invoke::_invoke_input::InvokeInput;
722
723pub use crate::operation::invoke::_invoke_output::InvokeOutput;
724
725mod _invoke_input;
726
727mod _invoke_output;
728
729pub mod builders;