1#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct InvokeWithResponseStream;
6impl InvokeWithResponseStream {
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_with_response_stream::InvokeWithResponseStreamInput,
14 ) -> ::std::result::Result<
15 crate::operation::invoke_with_response_stream::InvokeWithResponseStreamOutput,
16 ::aws_smithy_runtime_api::client::result::SdkError<
17 crate::operation::invoke_with_response_stream::InvokeWithResponseStreamError,
18 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
19 >,
20 > {
21 let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError<
22 ::aws_smithy_runtime_api::client::interceptors::context::Error,
23 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
24 >| {
25 err.map_service_error(|err| {
26 err.downcast::<crate::operation::invoke_with_response_stream::InvokeWithResponseStreamError>()
27 .expect("correct error type")
28 })
29 };
30 let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
31 .await
32 .map_err(map_err)?;
33 let output = context.finalize().map_err(map_err)?;
34 ::std::result::Result::Ok(
35 output
36 .downcast::<crate::operation::invoke_with_response_stream::InvokeWithResponseStreamOutput>()
37 .expect("correct output type"),
38 )
39 }
40
41 pub(crate) async fn orchestrate_with_stop_point(
42 runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
43 input: crate::operation::invoke_with_response_stream::InvokeWithResponseStreamInput,
44 stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
45 ) -> ::std::result::Result<
46 ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
47 ::aws_smithy_runtime_api::client::result::SdkError<
48 ::aws_smithy_runtime_api::client::interceptors::context::Error,
49 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
50 >,
51 > {
52 let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
53 use ::tracing::Instrument;
54 ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("Lambda", "InvokeWithResponseStream", input, runtime_plugins, stop_point)
55 .instrument(::tracing::debug_span!(
58 "Lambda.InvokeWithResponseStream",
59 "rpc.service" = "Lambda",
60 "rpc.method" = "InvokeWithResponseStream",
61 "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
62 "rpc.system" = "aws-api",
63 ))
64 .await
65 }
66
67 pub(crate) fn operation_runtime_plugins(
68 client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
69 client_config: &crate::config::Config,
70 config_override: ::std::option::Option<crate::config::Builder>,
71 ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
72 let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
73
74 if let ::std::option::Option::Some(config_override) = config_override {
75 for plugin in config_override.runtime_plugins.iter().cloned() {
76 runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
77 }
78 runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
79 config_override,
80 client_config.config.clone(),
81 &client_config.runtime_components,
82 ));
83 }
84 runtime_plugins
85 }
86}
87impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for InvokeWithResponseStream {
88 fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
89 let mut cfg = ::aws_smithy_types::config_bag::Layer::new("InvokeWithResponseStream");
90
91 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
92 InvokeWithResponseStreamRequestSerializer,
93 ));
94 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
95 InvokeWithResponseStreamResponseDeserializer,
96 ));
97
98 cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
99 crate::config::auth::Params::builder()
100 .operation_name("InvokeWithResponseStream")
101 .build()
102 .expect("required fields set"),
103 ));
104
105 cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::SensitiveOutput);
106 cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
107 "InvokeWithResponseStream",
108 "Lambda",
109 ));
110 let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
111 signing_options.double_uri_encode = true;
112 signing_options.content_sha256_header = false;
113 signing_options.normalize_uri_path = true;
114 signing_options.payload_override = None;
115
116 cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
117 signing_options,
118 ..::std::default::Default::default()
119 });
120
121 ::std::option::Option::Some(cfg.freeze())
122 }
123
124 fn runtime_components(
125 &self,
126 _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
127 ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
128 #[allow(unused_mut)]
129 let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("InvokeWithResponseStream")
130 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
131 InvokeWithResponseStreamTelemetryInputCaptureInterceptor,
132 ))
133 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
134 InvokeWithResponseStreamEndpointParamsInterceptor,
135 ))
136 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
137 crate::operation::invoke_with_response_stream::InvokeWithResponseStreamError,
138 >::new())
139 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
140 crate::operation::invoke_with_response_stream::InvokeWithResponseStreamError,
141 >::new())
142 .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
143 crate::operation::invoke_with_response_stream::InvokeWithResponseStreamError,
144 >::new())
145 .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
146 crate::operation::invoke_with_response_stream::InvokeWithResponseStreamError,
147 >::new());
148
149 ::std::borrow::Cow::Owned(rcb)
150 }
151}
152
153#[derive(Debug)]
154struct InvokeWithResponseStreamTelemetryInputCaptureInterceptor;
155
156#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
157impl ::aws_smithy_runtime_api::client::interceptors::Intercept for InvokeWithResponseStreamTelemetryInputCaptureInterceptor {
158 fn name(&self) -> &'static str {
159 "InvokeWithResponseStreamTelemetryInputCaptureInterceptor"
160 }
161
162 fn read_before_execution(
163 &self,
164 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
165 '_,
166 ::aws_smithy_runtime_api::client::interceptors::context::Input,
167 ::aws_smithy_runtime_api::client::interceptors::context::Output,
168 ::aws_smithy_runtime_api::client::interceptors::context::Error,
169 >,
170 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
171 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
172 let ::std::option::Option::Some(requested) = cfg
174 .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
175 .filter(|r| !r.is_empty())
176 else {
177 return ::std::result::Result::Ok(());
178 };
179
180 let ::std::option::Option::Some(input) = context.input().downcast_ref::<InvokeWithResponseStreamInput>() else {
181 return ::std::result::Result::Ok(());
183 };
184
185 let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
186 if requested.should_capture("FunctionName") {
187 if let ::std::option::Option::Some(value) = input.function_name.as_deref() {
188 captured.insert("FunctionName", value);
189 }
190 }
191 if requested.should_capture("ClientContext") {
192 if let ::std::option::Option::Some(value) = input.client_context.as_deref() {
193 captured.insert("ClientContext", value);
194 }
195 }
196 if requested.should_capture("Qualifier") {
197 if let ::std::option::Option::Some(value) = input.qualifier.as_deref() {
198 captured.insert("Qualifier", value);
199 }
200 }
201 if requested.should_capture("TenantId") {
202 if let ::std::option::Option::Some(value) = input.tenant_id.as_deref() {
203 captured.insert("TenantId", value);
204 }
205 }
206
207 cfg.interceptor_state().store_put(captured);
208 ::std::result::Result::Ok(())
209 }
210}
211#[derive(Debug)]
212struct InvokeWithResponseStreamResponseDeserializer;
213impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for InvokeWithResponseStreamResponseDeserializer {
214 fn deserialize_streaming_with_config(
215 &self,
216 response: &mut ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
217 _cfg: &::aws_smithy_types::config_bag::ConfigBag,
218 ) -> ::std::option::Option<::aws_smithy_runtime_api::client::interceptors::context::OutputOrError> {
219 #[allow(unused_mut)]
220 let mut force_error = false;
221 ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
222
223 if (!response.status().is_success() && response.status().as_u16() != 200) || force_error {
225 return ::std::option::Option::None;
226 }
227 ::std::option::Option::Some(crate::protocol_serde::type_erase_result(
228 crate::protocol_serde::shape_invoke_with_response_stream::de_invoke_with_response_stream_http_response(response, _cfg),
229 ))
230 }
231
232 fn deserialize_nonstreaming_with_config(
233 &self,
234 response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
235 _cfg: &::aws_smithy_types::config_bag::ConfigBag,
236 ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
237 let body = response.body().bytes().expect("body loaded");
239 crate::protocol_serde::type_erase_result(
240 crate::protocol_serde::shape_invoke_with_response_stream::de_invoke_with_response_stream_http_error(
241 response.status().as_u16(),
242 response.headers(),
243 body,
244 _cfg,
245 ),
246 )
247 }
248}
249#[derive(Debug)]
250struct InvokeWithResponseStreamRequestSerializer;
251impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for InvokeWithResponseStreamRequestSerializer {
252 #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
253 fn serialize_input(
254 &self,
255 input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
256 _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
257 ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
258 let input = input
259 .downcast::<crate::operation::invoke_with_response_stream::InvokeWithResponseStreamInput>()
260 .expect("correct type");
261 let _header_serialization_settings = _cfg
262 .load::<crate::serialization_settings::HeaderSerializationSettings>()
263 .cloned()
264 .unwrap_or_default();
265 let mut request_builder = {
266 #[allow(clippy::uninlined_format_args)]
267 fn uri_base(
268 _input: &crate::operation::invoke_with_response_stream::InvokeWithResponseStreamInput,
269 output: &mut ::std::string::String,
270 ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
271 use ::std::fmt::Write as _;
272 let input_1 = &_input.function_name;
273 let input_1 = input_1
274 .as_ref()
275 .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("function_name", "cannot be empty or unset"))?;
276 let function_name = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
277 if function_name.is_empty() {
278 return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
279 "function_name",
280 "cannot be empty or unset",
281 ));
282 }
283 ::std::write!(
284 output,
285 "/2021-11-15/functions/{FunctionName}/response-streaming-invocations",
286 FunctionName = function_name
287 )
288 .expect("formatting should succeed");
289 ::std::result::Result::Ok(())
290 }
291 fn uri_query(
292 _input: &crate::operation::invoke_with_response_stream::InvokeWithResponseStreamInput,
293 mut output: &mut ::std::string::String,
294 ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
295 let mut query = ::aws_smithy_http::query::Writer::new(output);
296 if let ::std::option::Option::Some(inner_2) = &_input.qualifier {
297 {
298 query.push_kv("Qualifier", &::aws_smithy_http::query::fmt_string(inner_2));
299 }
300 }
301 ::std::result::Result::Ok(())
302 }
303 #[allow(clippy::unnecessary_wraps)]
304 fn update_http_builder(
305 input: &crate::operation::invoke_with_response_stream::InvokeWithResponseStreamInput,
306 builder: ::http_1x::request::Builder,
307 ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
308 let mut uri = ::std::string::String::new();
309 uri_base(input, &mut uri)?;
310 uri_query(input, &mut uri)?;
311 let builder = crate::protocol_serde::shape_invoke_with_response_stream::ser_invoke_with_response_stream_headers(input, builder)?;
312 ::std::result::Result::Ok(builder.method("POST").uri(uri))
313 }
314 let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
315 builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/octet-stream");
316 builder
317 };
318 let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_invoke_with_response_stream_input::ser_payload_http_payload(
319 input.payload,
320 )?);
321 if let Some(content_length) = body.content_length() {
322 let content_length = content_length.to_string();
323 request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
324 }
325 ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
326 }
327}
328#[derive(Debug)]
329struct InvokeWithResponseStreamEndpointParamsInterceptor;
330
331#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
332impl ::aws_smithy_runtime_api::client::interceptors::Intercept for InvokeWithResponseStreamEndpointParamsInterceptor {
333 fn name(&self) -> &'static str {
334 "InvokeWithResponseStreamEndpointParamsInterceptor"
335 }
336
337 fn read_before_execution(
338 &self,
339 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
340 '_,
341 ::aws_smithy_runtime_api::client::interceptors::context::Input,
342 ::aws_smithy_runtime_api::client::interceptors::context::Output,
343 ::aws_smithy_runtime_api::client::interceptors::context::Error,
344 >,
345 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
346 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
347 let _input = context
348 .input()
349 .downcast_ref::<InvokeWithResponseStreamInput>()
350 .ok_or("failed to downcast to InvokeWithResponseStreamInput")?;
351
352 let params = crate::config::endpoint::Params::builder()
353 .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
354 .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
355 .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
356 .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
357 .build()
358 .map_err(|err| {
359 ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
360 })?;
361 cfg.interceptor_state()
362 .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
363 ::std::result::Result::Ok(())
364 }
365}
366
367#[non_exhaustive]
372#[derive(::std::fmt::Debug)]
373pub enum InvokeWithResponseStreamError {
374 CodeArtifactUserDeletedException(crate::types::error::CodeArtifactUserDeletedException),
376 CodeArtifactUserFailedException(crate::types::error::CodeArtifactUserFailedException),
378 CodeArtifactUserPendingException(crate::types::error::CodeArtifactUserPendingException),
380 Ec2AccessDeniedException(crate::types::error::Ec2AccessDeniedException),
382 Ec2ThrottledException(crate::types::error::Ec2ThrottledException),
384 Ec2UnexpectedException(crate::types::error::Ec2UnexpectedException),
386 EfsioException(crate::types::error::EfsioException),
388 EfsMountConnectivityException(crate::types::error::EfsMountConnectivityException),
390 EfsMountFailureException(crate::types::error::EfsMountFailureException),
392 EfsMountTimeoutException(crate::types::error::EfsMountTimeoutException),
394 EniLimitReachedException(crate::types::error::EniLimitReachedException),
396 InvalidParameterValueException(crate::types::error::InvalidParameterValueException),
398 InvalidRequestContentException(crate::types::error::InvalidRequestContentException),
400 InvalidRuntimeException(crate::types::error::InvalidRuntimeException),
402 InvalidSecurityGroupIdException(crate::types::error::InvalidSecurityGroupIdException),
404 InvalidSubnetIdException(crate::types::error::InvalidSubnetIdException),
406 InvalidZipFileException(crate::types::error::InvalidZipFileException),
408 KmsAccessDeniedException(crate::types::error::KmsAccessDeniedException),
410 KmsDisabledException(crate::types::error::KmsDisabledException),
412 KmsInvalidStateException(crate::types::error::KmsInvalidStateException),
414 KmsNotFoundException(crate::types::error::KmsNotFoundException),
416 NoPublishedVersionException(crate::types::error::NoPublishedVersionException),
418 RecursiveInvocationException(crate::types::error::RecursiveInvocationException),
420 RequestTooLargeException(crate::types::error::RequestTooLargeException),
422 ResourceConflictException(crate::types::error::ResourceConflictException),
424 ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
426 ResourceNotReadyException(crate::types::error::ResourceNotReadyException),
428 S3FilesMountConnectivityException(crate::types::error::S3FilesMountConnectivityException),
430 S3FilesMountFailureException(crate::types::error::S3FilesMountFailureException),
432 S3FilesMountTimeoutException(crate::types::error::S3FilesMountTimeoutException),
434 SerializedRequestEntityTooLargeException(crate::types::error::SerializedRequestEntityTooLargeException),
436 ServiceException(crate::types::error::ServiceException),
438 ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
440 SnapStartException(crate::types::error::SnapStartException),
442 SnapStartNotReadyException(crate::types::error::SnapStartNotReadyException),
444 SnapStartRegenerationFailureException(crate::types::error::SnapStartRegenerationFailureException),
446 SnapStartTimeoutException(crate::types::error::SnapStartTimeoutException),
448 SubnetIpAddressLimitReachedException(crate::types::error::SubnetIpAddressLimitReachedException),
450 TooManyRequestsException(crate::types::error::TooManyRequestsException),
452 UnsupportedMediaTypeException(crate::types::error::UnsupportedMediaTypeException),
454 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
456 variable wildcard pattern and check `.code()`:
457 \
458 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
459 \
460 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-InvokeWithResponseStreamError) for what information is available for the error.")]
461 Unhandled(crate::error::sealed_unhandled::Unhandled),
462}
463impl InvokeWithResponseStreamError {
464 pub fn unhandled(
466 err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
467 ) -> Self {
468 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
469 source: err.into(),
470 meta: ::std::default::Default::default(),
471 })
472 }
473
474 pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
476 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
477 source: err.clone().into(),
478 meta: err,
479 })
480 }
481 pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
486 match self {
487 Self::CodeArtifactUserDeletedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
488 Self::CodeArtifactUserFailedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
489 Self::CodeArtifactUserPendingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
490 Self::Ec2AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
491 Self::Ec2ThrottledException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
492 Self::Ec2UnexpectedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
493 Self::EfsioException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
494 Self::EfsMountConnectivityException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
495 Self::EfsMountFailureException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
496 Self::EfsMountTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
497 Self::EniLimitReachedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
498 Self::InvalidParameterValueException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
499 Self::InvalidRequestContentException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
500 Self::InvalidRuntimeException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
501 Self::InvalidSecurityGroupIdException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
502 Self::InvalidSubnetIdException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
503 Self::InvalidZipFileException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
504 Self::KmsAccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
505 Self::KmsDisabledException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
506 Self::KmsInvalidStateException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
507 Self::KmsNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
508 Self::NoPublishedVersionException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
509 Self::RecursiveInvocationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
510 Self::RequestTooLargeException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
511 Self::ResourceConflictException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
512 Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
513 Self::ResourceNotReadyException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
514 Self::S3FilesMountConnectivityException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
515 Self::S3FilesMountFailureException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
516 Self::S3FilesMountTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
517 Self::SerializedRequestEntityTooLargeException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
518 Self::ServiceException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
519 Self::ServiceQuotaExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
520 Self::SnapStartException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
521 Self::SnapStartNotReadyException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
522 Self::SnapStartRegenerationFailureException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
523 Self::SnapStartTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
524 Self::SubnetIpAddressLimitReachedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
525 Self::TooManyRequestsException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
526 Self::UnsupportedMediaTypeException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
527 Self::Unhandled(e) => &e.meta,
528 }
529 }
530 pub fn is_code_artifact_user_deleted_exception(&self) -> bool {
532 matches!(self, Self::CodeArtifactUserDeletedException(_))
533 }
534 pub fn is_code_artifact_user_failed_exception(&self) -> bool {
536 matches!(self, Self::CodeArtifactUserFailedException(_))
537 }
538 pub fn is_code_artifact_user_pending_exception(&self) -> bool {
540 matches!(self, Self::CodeArtifactUserPendingException(_))
541 }
542 pub fn is_ec2_access_denied_exception(&self) -> bool {
544 matches!(self, Self::Ec2AccessDeniedException(_))
545 }
546 pub fn is_ec2_throttled_exception(&self) -> bool {
548 matches!(self, Self::Ec2ThrottledException(_))
549 }
550 pub fn is_ec2_unexpected_exception(&self) -> bool {
552 matches!(self, Self::Ec2UnexpectedException(_))
553 }
554 pub fn is_efsio_exception(&self) -> bool {
556 matches!(self, Self::EfsioException(_))
557 }
558 pub fn is_efs_mount_connectivity_exception(&self) -> bool {
560 matches!(self, Self::EfsMountConnectivityException(_))
561 }
562 pub fn is_efs_mount_failure_exception(&self) -> bool {
564 matches!(self, Self::EfsMountFailureException(_))
565 }
566 pub fn is_efs_mount_timeout_exception(&self) -> bool {
568 matches!(self, Self::EfsMountTimeoutException(_))
569 }
570 pub fn is_eni_limit_reached_exception(&self) -> bool {
572 matches!(self, Self::EniLimitReachedException(_))
573 }
574 pub fn is_invalid_parameter_value_exception(&self) -> bool {
576 matches!(self, Self::InvalidParameterValueException(_))
577 }
578 pub fn is_invalid_request_content_exception(&self) -> bool {
580 matches!(self, Self::InvalidRequestContentException(_))
581 }
582 pub fn is_invalid_runtime_exception(&self) -> bool {
584 matches!(self, Self::InvalidRuntimeException(_))
585 }
586 pub fn is_invalid_security_group_id_exception(&self) -> bool {
588 matches!(self, Self::InvalidSecurityGroupIdException(_))
589 }
590 pub fn is_invalid_subnet_id_exception(&self) -> bool {
592 matches!(self, Self::InvalidSubnetIdException(_))
593 }
594 pub fn is_invalid_zip_file_exception(&self) -> bool {
596 matches!(self, Self::InvalidZipFileException(_))
597 }
598 pub fn is_kms_access_denied_exception(&self) -> bool {
600 matches!(self, Self::KmsAccessDeniedException(_))
601 }
602 pub fn is_kms_disabled_exception(&self) -> bool {
604 matches!(self, Self::KmsDisabledException(_))
605 }
606 pub fn is_kms_invalid_state_exception(&self) -> bool {
608 matches!(self, Self::KmsInvalidStateException(_))
609 }
610 pub fn is_kms_not_found_exception(&self) -> bool {
612 matches!(self, Self::KmsNotFoundException(_))
613 }
614 pub fn is_no_published_version_exception(&self) -> bool {
616 matches!(self, Self::NoPublishedVersionException(_))
617 }
618 pub fn is_recursive_invocation_exception(&self) -> bool {
620 matches!(self, Self::RecursiveInvocationException(_))
621 }
622 pub fn is_request_too_large_exception(&self) -> bool {
624 matches!(self, Self::RequestTooLargeException(_))
625 }
626 pub fn is_resource_conflict_exception(&self) -> bool {
628 matches!(self, Self::ResourceConflictException(_))
629 }
630 pub fn is_resource_not_found_exception(&self) -> bool {
632 matches!(self, Self::ResourceNotFoundException(_))
633 }
634 pub fn is_resource_not_ready_exception(&self) -> bool {
636 matches!(self, Self::ResourceNotReadyException(_))
637 }
638 pub fn is_s3_files_mount_connectivity_exception(&self) -> bool {
640 matches!(self, Self::S3FilesMountConnectivityException(_))
641 }
642 pub fn is_s3_files_mount_failure_exception(&self) -> bool {
644 matches!(self, Self::S3FilesMountFailureException(_))
645 }
646 pub fn is_s3_files_mount_timeout_exception(&self) -> bool {
648 matches!(self, Self::S3FilesMountTimeoutException(_))
649 }
650 pub fn is_serialized_request_entity_too_large_exception(&self) -> bool {
652 matches!(self, Self::SerializedRequestEntityTooLargeException(_))
653 }
654 pub fn is_service_exception(&self) -> bool {
656 matches!(self, Self::ServiceException(_))
657 }
658 pub fn is_service_quota_exceeded_exception(&self) -> bool {
660 matches!(self, Self::ServiceQuotaExceededException(_))
661 }
662 pub fn is_snap_start_exception(&self) -> bool {
664 matches!(self, Self::SnapStartException(_))
665 }
666 pub fn is_snap_start_not_ready_exception(&self) -> bool {
668 matches!(self, Self::SnapStartNotReadyException(_))
669 }
670 pub fn is_snap_start_regeneration_failure_exception(&self) -> bool {
672 matches!(self, Self::SnapStartRegenerationFailureException(_))
673 }
674 pub fn is_snap_start_timeout_exception(&self) -> bool {
676 matches!(self, Self::SnapStartTimeoutException(_))
677 }
678 pub fn is_subnet_ip_address_limit_reached_exception(&self) -> bool {
680 matches!(self, Self::SubnetIpAddressLimitReachedException(_))
681 }
682 pub fn is_too_many_requests_exception(&self) -> bool {
684 matches!(self, Self::TooManyRequestsException(_))
685 }
686 pub fn is_unsupported_media_type_exception(&self) -> bool {
688 matches!(self, Self::UnsupportedMediaTypeException(_))
689 }
690}
691impl ::std::error::Error for InvokeWithResponseStreamError {
692 fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
693 match self {
694 Self::CodeArtifactUserDeletedException(_inner) => ::std::option::Option::Some(_inner),
695 Self::CodeArtifactUserFailedException(_inner) => ::std::option::Option::Some(_inner),
696 Self::CodeArtifactUserPendingException(_inner) => ::std::option::Option::Some(_inner),
697 Self::Ec2AccessDeniedException(_inner) => ::std::option::Option::Some(_inner),
698 Self::Ec2ThrottledException(_inner) => ::std::option::Option::Some(_inner),
699 Self::Ec2UnexpectedException(_inner) => ::std::option::Option::Some(_inner),
700 Self::EfsioException(_inner) => ::std::option::Option::Some(_inner),
701 Self::EfsMountConnectivityException(_inner) => ::std::option::Option::Some(_inner),
702 Self::EfsMountFailureException(_inner) => ::std::option::Option::Some(_inner),
703 Self::EfsMountTimeoutException(_inner) => ::std::option::Option::Some(_inner),
704 Self::EniLimitReachedException(_inner) => ::std::option::Option::Some(_inner),
705 Self::InvalidParameterValueException(_inner) => ::std::option::Option::Some(_inner),
706 Self::InvalidRequestContentException(_inner) => ::std::option::Option::Some(_inner),
707 Self::InvalidRuntimeException(_inner) => ::std::option::Option::Some(_inner),
708 Self::InvalidSecurityGroupIdException(_inner) => ::std::option::Option::Some(_inner),
709 Self::InvalidSubnetIdException(_inner) => ::std::option::Option::Some(_inner),
710 Self::InvalidZipFileException(_inner) => ::std::option::Option::Some(_inner),
711 Self::KmsAccessDeniedException(_inner) => ::std::option::Option::Some(_inner),
712 Self::KmsDisabledException(_inner) => ::std::option::Option::Some(_inner),
713 Self::KmsInvalidStateException(_inner) => ::std::option::Option::Some(_inner),
714 Self::KmsNotFoundException(_inner) => ::std::option::Option::Some(_inner),
715 Self::NoPublishedVersionException(_inner) => ::std::option::Option::Some(_inner),
716 Self::RecursiveInvocationException(_inner) => ::std::option::Option::Some(_inner),
717 Self::RequestTooLargeException(_inner) => ::std::option::Option::Some(_inner),
718 Self::ResourceConflictException(_inner) => ::std::option::Option::Some(_inner),
719 Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner),
720 Self::ResourceNotReadyException(_inner) => ::std::option::Option::Some(_inner),
721 Self::S3FilesMountConnectivityException(_inner) => ::std::option::Option::Some(_inner),
722 Self::S3FilesMountFailureException(_inner) => ::std::option::Option::Some(_inner),
723 Self::S3FilesMountTimeoutException(_inner) => ::std::option::Option::Some(_inner),
724 Self::SerializedRequestEntityTooLargeException(_inner) => ::std::option::Option::Some(_inner),
725 Self::ServiceException(_inner) => ::std::option::Option::Some(_inner),
726 Self::ServiceQuotaExceededException(_inner) => ::std::option::Option::Some(_inner),
727 Self::SnapStartException(_inner) => ::std::option::Option::Some(_inner),
728 Self::SnapStartNotReadyException(_inner) => ::std::option::Option::Some(_inner),
729 Self::SnapStartRegenerationFailureException(_inner) => ::std::option::Option::Some(_inner),
730 Self::SnapStartTimeoutException(_inner) => ::std::option::Option::Some(_inner),
731 Self::SubnetIpAddressLimitReachedException(_inner) => ::std::option::Option::Some(_inner),
732 Self::TooManyRequestsException(_inner) => ::std::option::Option::Some(_inner),
733 Self::UnsupportedMediaTypeException(_inner) => ::std::option::Option::Some(_inner),
734 Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
735 }
736 }
737}
738impl ::std::fmt::Display for InvokeWithResponseStreamError {
739 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
740 match self {
741 Self::CodeArtifactUserDeletedException(_inner) => _inner.fmt(f),
742 Self::CodeArtifactUserFailedException(_inner) => _inner.fmt(f),
743 Self::CodeArtifactUserPendingException(_inner) => _inner.fmt(f),
744 Self::Ec2AccessDeniedException(_inner) => _inner.fmt(f),
745 Self::Ec2ThrottledException(_inner) => _inner.fmt(f),
746 Self::Ec2UnexpectedException(_inner) => _inner.fmt(f),
747 Self::EfsioException(_inner) => _inner.fmt(f),
748 Self::EfsMountConnectivityException(_inner) => _inner.fmt(f),
749 Self::EfsMountFailureException(_inner) => _inner.fmt(f),
750 Self::EfsMountTimeoutException(_inner) => _inner.fmt(f),
751 Self::EniLimitReachedException(_inner) => _inner.fmt(f),
752 Self::InvalidParameterValueException(_inner) => _inner.fmt(f),
753 Self::InvalidRequestContentException(_inner) => _inner.fmt(f),
754 Self::InvalidRuntimeException(_inner) => _inner.fmt(f),
755 Self::InvalidSecurityGroupIdException(_inner) => _inner.fmt(f),
756 Self::InvalidSubnetIdException(_inner) => _inner.fmt(f),
757 Self::InvalidZipFileException(_inner) => _inner.fmt(f),
758 Self::KmsAccessDeniedException(_inner) => _inner.fmt(f),
759 Self::KmsDisabledException(_inner) => _inner.fmt(f),
760 Self::KmsInvalidStateException(_inner) => _inner.fmt(f),
761 Self::KmsNotFoundException(_inner) => _inner.fmt(f),
762 Self::NoPublishedVersionException(_inner) => _inner.fmt(f),
763 Self::RecursiveInvocationException(_inner) => _inner.fmt(f),
764 Self::RequestTooLargeException(_inner) => _inner.fmt(f),
765 Self::ResourceConflictException(_inner) => _inner.fmt(f),
766 Self::ResourceNotFoundException(_inner) => _inner.fmt(f),
767 Self::ResourceNotReadyException(_inner) => _inner.fmt(f),
768 Self::S3FilesMountConnectivityException(_inner) => _inner.fmt(f),
769 Self::S3FilesMountFailureException(_inner) => _inner.fmt(f),
770 Self::S3FilesMountTimeoutException(_inner) => _inner.fmt(f),
771 Self::SerializedRequestEntityTooLargeException(_inner) => _inner.fmt(f),
772 Self::ServiceException(_inner) => _inner.fmt(f),
773 Self::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
774 Self::SnapStartException(_inner) => _inner.fmt(f),
775 Self::SnapStartNotReadyException(_inner) => _inner.fmt(f),
776 Self::SnapStartRegenerationFailureException(_inner) => _inner.fmt(f),
777 Self::SnapStartTimeoutException(_inner) => _inner.fmt(f),
778 Self::SubnetIpAddressLimitReachedException(_inner) => _inner.fmt(f),
779 Self::TooManyRequestsException(_inner) => _inner.fmt(f),
780 Self::UnsupportedMediaTypeException(_inner) => _inner.fmt(f),
781 Self::Unhandled(_inner) => {
782 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
783 write!(f, "unhandled error ({code})")
784 } else {
785 f.write_str("unhandled error")
786 }
787 }
788 }
789 }
790}
791impl ::aws_smithy_types::retry::ProvideErrorKind for InvokeWithResponseStreamError {
792 fn code(&self) -> ::std::option::Option<&str> {
793 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
794 }
795 fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
796 ::std::option::Option::None
797 }
798}
799impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for InvokeWithResponseStreamError {
800 fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
801 match self {
802 Self::CodeArtifactUserDeletedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
803 Self::CodeArtifactUserFailedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
804 Self::CodeArtifactUserPendingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
805 Self::Ec2AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
806 Self::Ec2ThrottledException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
807 Self::Ec2UnexpectedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
808 Self::EfsioException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
809 Self::EfsMountConnectivityException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
810 Self::EfsMountFailureException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
811 Self::EfsMountTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
812 Self::EniLimitReachedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
813 Self::InvalidParameterValueException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
814 Self::InvalidRequestContentException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
815 Self::InvalidRuntimeException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
816 Self::InvalidSecurityGroupIdException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
817 Self::InvalidSubnetIdException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
818 Self::InvalidZipFileException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
819 Self::KmsAccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
820 Self::KmsDisabledException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
821 Self::KmsInvalidStateException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
822 Self::KmsNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
823 Self::NoPublishedVersionException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
824 Self::RecursiveInvocationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
825 Self::RequestTooLargeException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
826 Self::ResourceConflictException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
827 Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
828 Self::ResourceNotReadyException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
829 Self::S3FilesMountConnectivityException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
830 Self::S3FilesMountFailureException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
831 Self::S3FilesMountTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
832 Self::SerializedRequestEntityTooLargeException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
833 Self::ServiceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
834 Self::ServiceQuotaExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
835 Self::SnapStartException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
836 Self::SnapStartNotReadyException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
837 Self::SnapStartRegenerationFailureException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
838 Self::SnapStartTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
839 Self::SubnetIpAddressLimitReachedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
840 Self::TooManyRequestsException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
841 Self::UnsupportedMediaTypeException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
842 Self::Unhandled(_inner) => &_inner.meta,
843 }
844 }
845}
846impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for InvokeWithResponseStreamError {
847 fn create_unhandled_error(
848 source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
849 meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
850 ) -> Self {
851 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
852 source,
853 meta: meta.unwrap_or_default(),
854 })
855 }
856}
857impl ::aws_types::request_id::RequestId for crate::operation::invoke_with_response_stream::InvokeWithResponseStreamError {
858 fn request_id(&self) -> Option<&str> {
859 self.meta().request_id()
860 }
861}
862
863pub use crate::operation::invoke_with_response_stream::_invoke_with_response_stream_input::InvokeWithResponseStreamInput;
864
865pub use crate::operation::invoke_with_response_stream::_invoke_with_response_stream_output::InvokeWithResponseStreamOutput;
866
867mod _invoke_with_response_stream_input;
868
869mod _invoke_with_response_stream_output;
870
871pub mod builders;