1#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct SendCommand;
6impl SendCommand {
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::send_command::SendCommandInput,
14 ) -> ::std::result::Result<
15 crate::operation::send_command::SendCommandOutput,
16 ::aws_smithy_runtime_api::client::result::SdkError<
17 crate::operation::send_command::SendCommandError,
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::send_command::SendCommandError>()
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::send_command::SendCommandOutput>()
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::send_command::SendCommandInput,
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("SSM", "SendCommand", input, runtime_plugins, stop_point)
55 .instrument(::tracing::debug_span!(
58 "SSM.SendCommand",
59 "rpc.service" = "SSM",
60 "rpc.method" = "SendCommand",
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 SendCommand {
88 fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
89 let mut cfg = ::aws_smithy_types::config_bag::Layer::new("SendCommand");
90
91 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
92 SendCommandRequestSerializer,
93 ));
94 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
95 SendCommandResponseDeserializer,
96 ));
97
98 cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
99 crate::config::auth::Params::builder()
100 .operation_name("SendCommand")
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("SendCommand", "SSM"));
107 let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
108 signing_options.double_uri_encode = true;
109 signing_options.content_sha256_header = false;
110 signing_options.normalize_uri_path = true;
111 signing_options.payload_override = None;
112
113 cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
114 signing_options,
115 ..::std::default::Default::default()
116 });
117
118 ::std::option::Option::Some(cfg.freeze())
119 }
120
121 fn runtime_components(
122 &self,
123 _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
124 ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
125 #[allow(unused_mut)]
126 let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("SendCommand")
127 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
128 SendCommandTelemetryInputCaptureInterceptor,
129 ))
130 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
131 ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
132 ))
133 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
134 SendCommandEndpointParamsInterceptor,
135 ))
136 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
137 crate::operation::send_command::SendCommandError,
138 >::new())
139 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
140 crate::operation::send_command::SendCommandError,
141 >::new())
142 .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
143 crate::operation::send_command::SendCommandError,
144 >::new())
145 .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
146 crate::operation::send_command::SendCommandError,
147 >::new());
148
149 ::std::borrow::Cow::Owned(rcb)
150 }
151}
152
153#[derive(Debug)]
154struct SendCommandTelemetryInputCaptureInterceptor;
155
156#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
157impl ::aws_smithy_runtime_api::client::interceptors::Intercept for SendCommandTelemetryInputCaptureInterceptor {
158 fn name(&self) -> &'static str {
159 "SendCommandTelemetryInputCaptureInterceptor"
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::<SendCommandInput>() else {
181 return ::std::result::Result::Ok(());
183 };
184
185 let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
186 if requested.should_capture("DocumentName") {
187 if let ::std::option::Option::Some(value) = input.document_name.as_deref() {
188 captured.insert("DocumentName", value);
189 }
190 }
191 if requested.should_capture("DocumentVersion") {
192 if let ::std::option::Option::Some(value) = input.document_version.as_deref() {
193 captured.insert("DocumentVersion", value);
194 }
195 }
196 if requested.should_capture("DocumentHash") {
197 if let ::std::option::Option::Some(value) = input.document_hash.as_deref() {
198 captured.insert("DocumentHash", value);
199 }
200 }
201 if requested.should_capture("Comment") {
202 if let ::std::option::Option::Some(value) = input.comment.as_deref() {
203 captured.insert("Comment", value);
204 }
205 }
206 if requested.should_capture("OutputS3Region") {
207 if let ::std::option::Option::Some(value) = input.output_s3_region.as_deref() {
208 captured.insert("OutputS3Region", value);
209 }
210 }
211 if requested.should_capture("OutputS3BucketName") {
212 if let ::std::option::Option::Some(value) = input.output_s3_bucket_name.as_deref() {
213 captured.insert("OutputS3BucketName", value);
214 }
215 }
216 if requested.should_capture("OutputS3KeyPrefix") {
217 if let ::std::option::Option::Some(value) = input.output_s3_key_prefix.as_deref() {
218 captured.insert("OutputS3KeyPrefix", value);
219 }
220 }
221 if requested.should_capture("MaxConcurrency") {
222 if let ::std::option::Option::Some(value) = input.max_concurrency.as_deref() {
223 captured.insert("MaxConcurrency", value);
224 }
225 }
226 if requested.should_capture("MaxErrors") {
227 if let ::std::option::Option::Some(value) = input.max_errors.as_deref() {
228 captured.insert("MaxErrors", value);
229 }
230 }
231 if requested.should_capture("ServiceRoleArn") {
232 if let ::std::option::Option::Some(value) = input.service_role_arn.as_deref() {
233 captured.insert("ServiceRoleArn", value);
234 }
235 }
236
237 cfg.interceptor_state().store_put(captured);
238 ::std::result::Result::Ok(())
239 }
240}
241#[derive(Debug)]
242struct SendCommandResponseDeserializer;
243impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for SendCommandResponseDeserializer {
244 fn deserialize_nonstreaming_with_config(
245 &self,
246 response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
247 _cfg: &::aws_smithy_types::config_bag::ConfigBag,
248 ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
249 let (success, status) = (response.status().is_success(), response.status().as_u16());
250 let headers = response.headers();
251 let body = response.body().bytes().expect("body loaded");
252 #[allow(unused_mut)]
253 let mut force_error = false;
254 ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
255 let parse_result = if !success && status != 200 || force_error {
256 crate::protocol_serde::shape_send_command::de_send_command_http_error(status, headers, body)
257 } else {
258 crate::protocol_serde::shape_send_command::de_send_command_http_response(status, headers, body)
259 };
260 crate::protocol_serde::type_erase_result(parse_result)
261 }
262}
263#[derive(Debug)]
264struct SendCommandRequestSerializer;
265impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for SendCommandRequestSerializer {
266 #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
267 fn serialize_input(
268 &self,
269 input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
270 _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
271 ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
272 let input = input
273 .downcast::<crate::operation::send_command::SendCommandInput>()
274 .expect("correct type");
275 let _header_serialization_settings = _cfg
276 .load::<crate::serialization_settings::HeaderSerializationSettings>()
277 .cloned()
278 .unwrap_or_default();
279 let mut request_builder = {
280 #[allow(clippy::uninlined_format_args)]
281 fn uri_base(
282 _input: &crate::operation::send_command::SendCommandInput,
283 output: &mut ::std::string::String,
284 ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
285 use ::std::fmt::Write as _;
286 ::std::write!(output, "/").expect("formatting should succeed");
287 ::std::result::Result::Ok(())
288 }
289 #[allow(clippy::unnecessary_wraps)]
290 fn update_http_builder(
291 input: &crate::operation::send_command::SendCommandInput,
292 builder: ::http_1x::request::Builder,
293 ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
294 let mut uri = ::std::string::String::new();
295 uri_base(input, &mut uri)?;
296 ::std::result::Result::Ok(builder.method("POST").uri(uri))
297 }
298 let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
299 builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
300 builder = _header_serialization_settings.set_default_header(
301 builder,
302 ::http_1x::header::HeaderName::from_static("x-amz-target"),
303 "AmazonSSM.SendCommand",
304 );
305 builder
306 };
307 let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_send_command::ser_send_command_input(&input)?);
308 if let Some(content_length) = body.content_length() {
309 let content_length = content_length.to_string();
310 request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
311 }
312 ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
313 }
314}
315#[derive(Debug)]
316struct SendCommandEndpointParamsInterceptor;
317
318#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
319impl ::aws_smithy_runtime_api::client::interceptors::Intercept for SendCommandEndpointParamsInterceptor {
320 fn name(&self) -> &'static str {
321 "SendCommandEndpointParamsInterceptor"
322 }
323
324 fn read_before_execution(
325 &self,
326 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
327 '_,
328 ::aws_smithy_runtime_api::client::interceptors::context::Input,
329 ::aws_smithy_runtime_api::client::interceptors::context::Output,
330 ::aws_smithy_runtime_api::client::interceptors::context::Error,
331 >,
332 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
333 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
334 let _input = context
335 .input()
336 .downcast_ref::<SendCommandInput>()
337 .ok_or("failed to downcast to SendCommandInput")?;
338
339 let params = crate::config::endpoint::Params::builder()
340 .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
341 .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
342 .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
343 .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
344 .build()
345 .map_err(|err| {
346 ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
347 })?;
348 cfg.interceptor_state()
349 .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
350 ::std::result::Result::Ok(())
351 }
352}
353
354#[non_exhaustive]
359#[derive(::std::fmt::Debug)]
360pub enum SendCommandError {
361 DuplicateInstanceId(crate::types::error::DuplicateInstanceId),
363 InternalServerError(crate::types::error::InternalServerError),
365 InvalidDocument(crate::types::error::InvalidDocument),
367 InvalidDocumentVersion(crate::types::error::InvalidDocumentVersion),
369 InvalidInstanceId(crate::types::error::InvalidInstanceId),
381 InvalidNotificationConfig(crate::types::error::InvalidNotificationConfig),
383 InvalidOutputFolder(crate::types::error::InvalidOutputFolder),
385 InvalidParameters(crate::types::error::InvalidParameters),
387 InvalidRole(crate::types::error::InvalidRole),
389 MaxDocumentSizeExceeded(crate::types::error::MaxDocumentSizeExceeded),
391 UnsupportedPlatformType(crate::types::error::UnsupportedPlatformType),
393 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
395 variable wildcard pattern and check `.code()`:
396 \
397 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
398 \
399 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-SendCommandError) for what information is available for the error.")]
400 Unhandled(crate::error::sealed_unhandled::Unhandled),
401}
402impl SendCommandError {
403 pub fn unhandled(
405 err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
406 ) -> Self {
407 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
408 source: err.into(),
409 meta: ::std::default::Default::default(),
410 })
411 }
412
413 pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
415 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
416 source: err.clone().into(),
417 meta: err,
418 })
419 }
420 pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
425 match self {
426 Self::DuplicateInstanceId(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
427 Self::InternalServerError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
428 Self::InvalidDocument(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
429 Self::InvalidDocumentVersion(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
430 Self::InvalidInstanceId(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
431 Self::InvalidNotificationConfig(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
432 Self::InvalidOutputFolder(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
433 Self::InvalidParameters(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
434 Self::InvalidRole(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
435 Self::MaxDocumentSizeExceeded(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
436 Self::UnsupportedPlatformType(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
437 Self::Unhandled(e) => &e.meta,
438 }
439 }
440 pub fn is_duplicate_instance_id(&self) -> bool {
442 matches!(self, Self::DuplicateInstanceId(_))
443 }
444 pub fn is_internal_server_error(&self) -> bool {
446 matches!(self, Self::InternalServerError(_))
447 }
448 pub fn is_invalid_document(&self) -> bool {
450 matches!(self, Self::InvalidDocument(_))
451 }
452 pub fn is_invalid_document_version(&self) -> bool {
454 matches!(self, Self::InvalidDocumentVersion(_))
455 }
456 pub fn is_invalid_instance_id(&self) -> bool {
458 matches!(self, Self::InvalidInstanceId(_))
459 }
460 pub fn is_invalid_notification_config(&self) -> bool {
462 matches!(self, Self::InvalidNotificationConfig(_))
463 }
464 pub fn is_invalid_output_folder(&self) -> bool {
466 matches!(self, Self::InvalidOutputFolder(_))
467 }
468 pub fn is_invalid_parameters(&self) -> bool {
470 matches!(self, Self::InvalidParameters(_))
471 }
472 pub fn is_invalid_role(&self) -> bool {
474 matches!(self, Self::InvalidRole(_))
475 }
476 pub fn is_max_document_size_exceeded(&self) -> bool {
478 matches!(self, Self::MaxDocumentSizeExceeded(_))
479 }
480 pub fn is_unsupported_platform_type(&self) -> bool {
482 matches!(self, Self::UnsupportedPlatformType(_))
483 }
484}
485impl ::std::error::Error for SendCommandError {
486 fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
487 match self {
488 Self::DuplicateInstanceId(_inner) => ::std::option::Option::Some(_inner),
489 Self::InternalServerError(_inner) => ::std::option::Option::Some(_inner),
490 Self::InvalidDocument(_inner) => ::std::option::Option::Some(_inner),
491 Self::InvalidDocumentVersion(_inner) => ::std::option::Option::Some(_inner),
492 Self::InvalidInstanceId(_inner) => ::std::option::Option::Some(_inner),
493 Self::InvalidNotificationConfig(_inner) => ::std::option::Option::Some(_inner),
494 Self::InvalidOutputFolder(_inner) => ::std::option::Option::Some(_inner),
495 Self::InvalidParameters(_inner) => ::std::option::Option::Some(_inner),
496 Self::InvalidRole(_inner) => ::std::option::Option::Some(_inner),
497 Self::MaxDocumentSizeExceeded(_inner) => ::std::option::Option::Some(_inner),
498 Self::UnsupportedPlatformType(_inner) => ::std::option::Option::Some(_inner),
499 Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
500 }
501 }
502}
503impl ::std::fmt::Display for SendCommandError {
504 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
505 match self {
506 Self::DuplicateInstanceId(_inner) => _inner.fmt(f),
507 Self::InternalServerError(_inner) => _inner.fmt(f),
508 Self::InvalidDocument(_inner) => _inner.fmt(f),
509 Self::InvalidDocumentVersion(_inner) => _inner.fmt(f),
510 Self::InvalidInstanceId(_inner) => _inner.fmt(f),
511 Self::InvalidNotificationConfig(_inner) => _inner.fmt(f),
512 Self::InvalidOutputFolder(_inner) => _inner.fmt(f),
513 Self::InvalidParameters(_inner) => _inner.fmt(f),
514 Self::InvalidRole(_inner) => _inner.fmt(f),
515 Self::MaxDocumentSizeExceeded(_inner) => _inner.fmt(f),
516 Self::UnsupportedPlatformType(_inner) => _inner.fmt(f),
517 Self::Unhandled(_inner) => {
518 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
519 write!(f, "unhandled error ({code})")
520 } else {
521 f.write_str("unhandled error")
522 }
523 }
524 }
525 }
526}
527impl ::aws_smithy_types::retry::ProvideErrorKind for SendCommandError {
528 fn code(&self) -> ::std::option::Option<&str> {
529 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
530 }
531 fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
532 ::std::option::Option::None
533 }
534}
535impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for SendCommandError {
536 fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
537 match self {
538 Self::DuplicateInstanceId(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
539 Self::InternalServerError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
540 Self::InvalidDocument(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
541 Self::InvalidDocumentVersion(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
542 Self::InvalidInstanceId(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
543 Self::InvalidNotificationConfig(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
544 Self::InvalidOutputFolder(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
545 Self::InvalidParameters(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
546 Self::InvalidRole(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
547 Self::MaxDocumentSizeExceeded(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
548 Self::UnsupportedPlatformType(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
549 Self::Unhandled(_inner) => &_inner.meta,
550 }
551 }
552}
553impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for SendCommandError {
554 fn create_unhandled_error(
555 source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
556 meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
557 ) -> Self {
558 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
559 source,
560 meta: meta.unwrap_or_default(),
561 })
562 }
563}
564impl ::aws_types::request_id::RequestId for crate::operation::send_command::SendCommandError {
565 fn request_id(&self) -> Option<&str> {
566 self.meta().request_id()
567 }
568}
569
570pub use crate::operation::send_command::_send_command_input::SendCommandInput;
571
572pub use crate::operation::send_command::_send_command_output::SendCommandOutput;
573
574mod _send_command_input;
575
576mod _send_command_output;
577
578pub mod builders;