1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | /// Orchestration and serialization glue logic for `StartChangeRequestExecution`.
|
3 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4 + | #[non_exhaustive]
|
5 + | pub struct StartChangeRequestExecution;
|
6 + | impl StartChangeRequestExecution {
|
7 + | /// Creates a new `StartChangeRequestExecution`
|
8 + | pub fn new() -> Self {
|
9 + | Self
|
10 + | }
|
11 + | /// The schema for this operation's input shape.
|
12 + | pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> =
|
13 + | crate::operation::start_change_request_execution::StartChangeRequestExecutionInput::SCHEMA;
|
14 + | /// The schema for this operation's output shape.
|
15 + | pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> =
|
16 + | crate::operation::start_change_request_execution::StartChangeRequestExecutionOutput::SCHEMA;
|
17 + | pub(crate) async fn orchestrate(
|
18 + | runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
|
19 + | input: crate::operation::start_change_request_execution::StartChangeRequestExecutionInput,
|
20 + | ) -> ::std::result::Result<
|
21 + | crate::operation::start_change_request_execution::StartChangeRequestExecutionOutput,
|
22 + | ::aws_smithy_runtime_api::client::result::SdkError<
|
23 + | crate::operation::start_change_request_execution::StartChangeRequestExecutionError,
|
24 + | ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
|
25 + | >,
|
26 + | > {
|
27 + | let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError<
|
28 + | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
29 + | ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
|
30 + | >| {
|
31 + | err.map_service_error(|err| {
|
32 + | err.downcast::<crate::operation::start_change_request_execution::StartChangeRequestExecutionError>()
|
33 + | .expect("correct error type")
|
34 + | })
|
35 + | };
|
36 + | let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
|
37 + | .await
|
38 + | .map_err(map_err)?;
|
39 + | let output = context.finalize().map_err(map_err)?;
|
40 + | ::std::result::Result::Ok(
|
41 + | output
|
42 + | .downcast::<crate::operation::start_change_request_execution::StartChangeRequestExecutionOutput>()
|
43 + | .expect("correct output type"),
|
44 + | )
|
45 + | }
|
46 + |
|
47 + | pub(crate) async fn orchestrate_with_stop_point(
|
48 + | runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
|
49 + | input: crate::operation::start_change_request_execution::StartChangeRequestExecutionInput,
|
50 + | stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
|
51 + | ) -> ::std::result::Result<
|
52 + | ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
|
53 + | ::aws_smithy_runtime_api::client::result::SdkError<
|
54 + | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
55 + | ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
|
56 + | >,
|
57 + | > {
|
58 + | let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
|
59 + | use ::tracing::Instrument;
|
60 + | ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("SSM", "StartChangeRequestExecution", input, runtime_plugins, stop_point)
|
61 + | // Create a parent span for the entire operation. Includes a random, internal-only,
|
62 + | // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
|
63 + | .instrument(::tracing::debug_span!(
|
64 + | "SSM.StartChangeRequestExecution",
|
65 + | "rpc.service" = "SSM",
|
66 + | "rpc.method" = "StartChangeRequestExecution",
|
67 + | "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
|
68 + | "rpc.system" = "aws-api",
|
69 + | ))
|
70 + | .await
|
71 + | }
|
72 + |
|
73 + | pub(crate) fn operation_runtime_plugins(
|
74 + | client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
|
75 + | client_config: &crate::config::Config,
|
76 + | config_override: ::std::option::Option<crate::config::Builder>,
|
77 + | ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
|
78 + | let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
|
79 + |
|
80 + | if let ::std::option::Option::Some(config_override) = config_override {
|
81 + | for plugin in config_override.runtime_plugins.iter().cloned() {
|
82 + | runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
|
83 + | }
|
84 + | runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
|
85 + | config_override,
|
86 + | client_config.config.clone(),
|
87 + | &client_config.runtime_components,
|
88 + | ));
|
89 + | }
|
90 + | runtime_plugins
|
91 + | }
|
92 + | }
|
93 + | /// Per-operation error registry. Contains an entry for every modeled
|
94 + | /// error this operation can throw.
|
95 + | ///
|
96 + | /// Used by the schema-serde error path as the operation-scoped lookup
|
97 + | /// for registry-backed error reification: an error code that does not
|
98 + | /// match one of the operation's modeled errors directly is resolved
|
99 + | /// against this registry first, then widened to the service-wide error
|
100 + | /// registry.
|
101 + | pub(crate) mod error_registry {
|
102 + | pub(crate) static REGISTRY: ::std::sync::LazyLock<::aws_smithy_schema::registry::TypeRegistry> = ::std::sync::LazyLock::new(|| {
|
103 + | ::aws_smithy_schema::registry::TypeRegistry::builder()
|
104 + | .insert_error_shape(
|
105 + | crate::types::error::AutomationDefinitionNotApprovedException::SCHEMA,
|
106 + | |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
|
107 + | ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::AutomationDefinitionNotApprovedException::deserialize(d)?))
|
108 + | },
|
109 + | |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
|
110 + | ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::AutomationDefinitionNotApprovedException::deserialize(d)?))
|
111 + | },
|
112 + | )
|
113 + | .insert_error_shape(
|
114 + | crate::types::error::AutomationDefinitionNotFoundException::SCHEMA,
|
115 + | |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
|
116 + | ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::AutomationDefinitionNotFoundException::deserialize(d)?))
|
117 + | },
|
118 + | |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
|
119 + | ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::AutomationDefinitionNotFoundException::deserialize(d)?))
|
120 + | },
|
121 + | )
|
122 + | .insert_error_shape(
|
123 + | crate::types::error::AutomationDefinitionVersionNotFoundException::SCHEMA,
|
124 + | |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
|
125 + | ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::AutomationDefinitionVersionNotFoundException::deserialize(d)?))
|
126 + | },
|
127 + | |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
|
128 + | ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::AutomationDefinitionVersionNotFoundException::deserialize(d)?))
|
129 + | },
|
130 + | )
|
131 + | .insert_error_shape(
|
132 + | crate::types::error::AutomationExecutionLimitExceededException::SCHEMA,
|
133 + | |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
|
134 + | ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::AutomationExecutionLimitExceededException::deserialize(d)?))
|
135 + | },
|
136 + | |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
|
137 + | ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::AutomationExecutionLimitExceededException::deserialize(d)?))
|
138 + | },
|
139 + | )
|
140 + | .insert_error_shape(
|
141 + | crate::types::error::IdempotentParameterMismatch::SCHEMA,
|
142 + | |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
|
143 + | ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::IdempotentParameterMismatch::deserialize(d)?))
|
144 + | },
|
145 + | |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
|
146 + | ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::IdempotentParameterMismatch::deserialize(d)?))
|
147 + | },
|
148 + | )
|
149 + | .insert_error_shape(
|
150 + | crate::types::error::InternalServerError::SCHEMA,
|
151 + | |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
|
152 + | ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InternalServerError::deserialize(d)?))
|
153 + | },
|
154 + | |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
|
155 + | ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InternalServerError::deserialize(d)?))
|
156 + | },
|
157 + | )
|
158 + | .insert_error_shape(
|
159 + | crate::types::error::InvalidAutomationExecutionParametersException::SCHEMA,
|
160 + | |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
|
161 + | ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InvalidAutomationExecutionParametersException::deserialize(d)?))
|
162 + | },
|
163 + | |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
|
164 + | ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InvalidAutomationExecutionParametersException::deserialize(d)?))
|
165 + | },
|
166 + | )
|
167 + | .insert_error_shape(
|
168 + | crate::types::error::NoLongerSupportedException::SCHEMA,
|
169 + | |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
|
170 + | ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::NoLongerSupportedException::deserialize(d)?))
|
171 + | },
|
172 + | |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
|
173 + | ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::NoLongerSupportedException::deserialize(d)?))
|
174 + | },
|
175 + | )
|
176 + | .build()
|
177 + | });
|
178 + | }
|
179 + | impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for StartChangeRequestExecution {
|
180 + | fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
|
181 + | let mut cfg = ::aws_smithy_types::config_bag::Layer::new("StartChangeRequestExecution");
|
182 + |
|
183 + | cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
|
184 + | StartChangeRequestExecutionRequestSerializer,
|
185 + | ));
|
186 + | cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
|
187 + | StartChangeRequestExecutionResponseDeserializer,
|
188 + | ));
|
189 + |
|
190 + | cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
|
191 + | crate::config::auth::Params::builder()
|
192 + | .operation_name("StartChangeRequestExecution")
|
193 + | .build()
|
194 + | .expect("required fields set"),
|
195 + | ));
|
196 + |
|
197 + | cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
|
198 + | "StartChangeRequestExecution",
|
199 + | "SSM",
|
200 + | ));
|
201 + | let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
|
202 + | signing_options.double_uri_encode = true;
|
203 + | signing_options.content_sha256_header = false;
|
204 + | signing_options.normalize_uri_path = true;
|
205 + | signing_options.payload_override = None;
|
206 + |
|
207 + | cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
|
208 + | signing_options,
|
209 + | ..::std::default::Default::default()
|
210 + | });
|
211 + |
|
212 + | ::std::option::Option::Some(cfg.freeze())
|
213 + | }
|
214 + |
|
215 + | fn runtime_components(
|
216 + | &self,
|
217 + | _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
|
218 + | ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
|
219 + | #[allow(unused_mut)]
|
220 + | let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("StartChangeRequestExecution")
|
221 + | .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
|
222 + | StartChangeRequestExecutionTelemetryInputCaptureInterceptor,
|
223 + | ))
|
224 + | .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
|
225 + | ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
|
226 + | ))
|
227 + | .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
|
228 + | StartChangeRequestExecutionEndpointParamsInterceptor,
|
229 + | ))
|
230 + | .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
|
231 + | crate::operation::start_change_request_execution::StartChangeRequestExecutionError,
|
232 + | >::new())
|
233 + | .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
|
234 + | crate::operation::start_change_request_execution::StartChangeRequestExecutionError,
|
235 + | >::new())
|
236 + | .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
|
237 + | crate::operation::start_change_request_execution::StartChangeRequestExecutionError,
|
238 + | >::new())
|
239 + | .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
|
240 + | crate::operation::start_change_request_execution::StartChangeRequestExecutionError,
|
241 + | >::new());
|
242 + |
|
243 + | ::std::borrow::Cow::Owned(rcb)
|
244 + | }
|
245 + | }
|
246 + |
|
247 + | #[derive(Debug)]
|
248 + | struct StartChangeRequestExecutionTelemetryInputCaptureInterceptor;
|
249 + |
|
250 + | #[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
|
251 + | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for StartChangeRequestExecutionTelemetryInputCaptureInterceptor {
|
252 + | fn name(&self) -> &'static str {
|
253 + | "StartChangeRequestExecutionTelemetryInputCaptureInterceptor"
|
254 + | }
|
255 + |
|
256 + | fn read_before_execution(
|
257 + | &self,
|
258 + | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
259 + | '_,
|
260 + | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
261 + | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
262 + | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
263 + | >,
|
264 + | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
265 + | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
266 + | // Nothing to do unless the customer opted in by naming members to record.
|
267 + | let ::std::option::Option::Some(requested) = cfg
|
268 + | .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
|
269 + | .filter(|r| !r.is_empty())
|
270 + | else {
|
271 + | return ::std::result::Result::Ok(());
|
272 + | };
|
273 + |
|
274 + | let ::std::option::Option::Some(input) = context.input().downcast_ref::<StartChangeRequestExecutionInput>() else {
|
275 + | // A mismatched input is not this interceptor's concern; skip quietly.
|
276 + | return ::std::result::Result::Ok(());
|
277 + | };
|
278 + |
|
279 + | let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
|
280 + | if requested.should_capture("DocumentName") {
|
281 + | if let ::std::option::Option::Some(value) = input.document_name.as_deref() {
|
282 + | captured.insert("DocumentName", value);
|
283 + | }
|
284 + | }
|
285 + | if requested.should_capture("DocumentVersion") {
|
286 + | if let ::std::option::Option::Some(value) = input.document_version.as_deref() {
|
287 + | captured.insert("DocumentVersion", value);
|
288 + | }
|
289 + | }
|
290 + | if requested.should_capture("ChangeRequestName") {
|
291 + | if let ::std::option::Option::Some(value) = input.change_request_name.as_deref() {
|
292 + | captured.insert("ChangeRequestName", value);
|
293 + | }
|
294 + | }
|
295 + | if requested.should_capture("ClientToken") {
|
296 + | if let ::std::option::Option::Some(value) = input.client_token.as_deref() {
|
297 + | captured.insert("ClientToken", value);
|
298 + | }
|
299 + | }
|
300 + | if requested.should_capture("ChangeDetails") {
|
301 + | if let ::std::option::Option::Some(value) = input.change_details.as_deref() {
|
302 + | captured.insert("ChangeDetails", value);
|
303 + | }
|
304 + | }
|
305 + |
|
306 + | cfg.interceptor_state().store_put(captured);
|
307 + | ::std::result::Result::Ok(())
|
308 + | }
|
309 + | }
|
310 + | #[derive(Debug)]
|
311 + | struct StartChangeRequestExecutionResponseDeserializer;
|
312 + | impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for StartChangeRequestExecutionResponseDeserializer {
|
313 + | fn deserialize_nonstreaming_with_config(
|
314 + | &self,
|
315 + | response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
|
316 + | _cfg: &::aws_smithy_types::config_bag::ConfigBag,
|
317 + | ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
|
318 + | let (success, status) = (response.status().is_success(), response.status().as_u16());
|
319 + | // Load body and headers BEFORE BeforeParseResponse so customizations
|
320 + | // (e.g., S3's `body_is_error` check that detects errors returned with
|
321 + | // HTTP 200) can inspect them. The legacy non-streaming path also
|
322 + | // loads `body` before firing this hook.
|
323 + | let body = response.body().bytes().expect("body loaded");
|
324 + | let headers = response.headers();
|
325 + | #[allow(unused_mut)]
|
326 + | let mut force_error = false;
|
327 + | ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
|
328 + | if !success && status != 200 || force_error {
|
329 + | let protocol = _cfg
|
330 + | .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
|
331 + | .expect("a SharedClientProtocol is required");
|
332 + | #[allow(unused_mut)]
|
333 + | let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
|
334 + | ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
|
335 + | })?;
|
336 + | generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
|
337 + | let generic = generic_builder.build();
|
338 + | let error_code = match generic.code() {
|
339 + | ::std::option::Option::Some(code) => code,
|
340 + | ::std::option::Option::None => {
|
341 + | return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
|
342 + | ::aws_smithy_runtime_api::box_error::BoxError::from(
|
343 + | crate::operation::start_change_request_execution::StartChangeRequestExecutionError::unhandled(generic),
|
344 + | ),
|
345 + | ))
|
346 + | }
|
347 + | };
|
348 + | let _error_message = generic.message().map(|msg| msg.to_owned());
|
349 + | let err = match error_code {
|
350 + | "AutomationDefinitionNotApprovedException" => {
|
351 + | crate::operation::start_change_request_execution::StartChangeRequestExecutionError::AutomationDefinitionNotApprovedException({
|
352 + | let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
|
353 + | crate::types::error::AutomationDefinitionNotApprovedException::deserialize_with_response(
|
354 + | &mut *deser,
|
355 + | response.headers(),
|
356 + | response.status().into(),
|
357 + | body,
|
358 + | )
|
359 + | }) {
|
360 + | ::std::result::Result::Ok(val) => val,
|
361 + | ::std::result::Result::Err(e) => {
|
362 + | return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
|
363 + | ::aws_smithy_runtime_api::box_error::BoxError::from(e),
|
364 + | ))
|
365 + | }
|
366 + | };
|
367 + | tmp.meta = generic;
|
368 + | if tmp.message.is_none() {
|
369 + | tmp.message = _error_message;
|
370 + | }
|
371 + | tmp
|
372 + | })
|
373 + | }
|
374 + | "AutomationDefinitionNotFoundException" => {
|
375 + | crate::operation::start_change_request_execution::StartChangeRequestExecutionError::AutomationDefinitionNotFoundException({
|
376 + | let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
|
377 + | crate::types::error::AutomationDefinitionNotFoundException::deserialize_with_response(
|
378 + | &mut *deser,
|
379 + | response.headers(),
|
380 + | response.status().into(),
|
381 + | body,
|
382 + | )
|
383 + | }) {
|
384 + | ::std::result::Result::Ok(val) => val,
|
385 + | ::std::result::Result::Err(e) => {
|
386 + | return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
|
387 + | ::aws_smithy_runtime_api::box_error::BoxError::from(e),
|
388 + | ))
|
389 + | }
|
390 + | };
|
391 + | tmp.meta = generic;
|
392 + | if tmp.message.is_none() {
|
393 + | tmp.message = _error_message;
|
394 + | }
|
395 + | tmp
|
396 + | })
|
397 + | }
|
398 + | "AutomationDefinitionVersionNotFoundException" => {
|
399 + | crate::operation::start_change_request_execution::StartChangeRequestExecutionError::AutomationDefinitionVersionNotFoundException(
|
400 + | {
|
401 + | let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
|
402 + | crate::types::error::AutomationDefinitionVersionNotFoundException::deserialize_with_response(
|
403 + | &mut *deser,
|
404 + | response.headers(),
|
405 + | response.status().into(),
|
406 + | body,
|
407 + | )
|
408 + | }) {
|
409 + | ::std::result::Result::Ok(val) => val,
|
410 + | ::std::result::Result::Err(e) => {
|
411 + | return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
|
412 + | ::aws_smithy_runtime_api::box_error::BoxError::from(e),
|
413 + | ))
|
414 + | }
|
415 + | };
|
416 + | tmp.meta = generic;
|
417 + | if tmp.message.is_none() {
|
418 + | tmp.message = _error_message;
|
419 + | }
|
420 + | tmp
|
421 + | },
|
422 + | )
|
423 + | }
|
424 + | "AutomationExecutionLimitExceededException" => {
|
425 + | crate::operation::start_change_request_execution::StartChangeRequestExecutionError::AutomationExecutionLimitExceededException({
|
426 + | let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
|
427 + | crate::types::error::AutomationExecutionLimitExceededException::deserialize_with_response(
|
428 + | &mut *deser,
|
429 + | response.headers(),
|
430 + | response.status().into(),
|
431 + | body,
|
432 + | )
|
433 + | }) {
|
434 + | ::std::result::Result::Ok(val) => val,
|
435 + | ::std::result::Result::Err(e) => {
|
436 + | return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
|
437 + | ::aws_smithy_runtime_api::box_error::BoxError::from(e),
|
438 + | ))
|
439 + | }
|
440 + | };
|
441 + | tmp.meta = generic;
|
442 + | if tmp.message.is_none() {
|
443 + | tmp.message = _error_message;
|
444 + | }
|
445 + | tmp
|
446 + | })
|
447 + | }
|
448 + | "IdempotentParameterMismatch" => {
|
449 + | crate::operation::start_change_request_execution::StartChangeRequestExecutionError::IdempotentParameterMismatch({
|
450 + | let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
|
451 + | crate::types::error::IdempotentParameterMismatch::deserialize_with_response(
|
452 + | &mut *deser,
|
453 + | response.headers(),
|
454 + | response.status().into(),
|
455 + | body,
|
456 + | )
|
457 + | }) {
|
458 + | ::std::result::Result::Ok(val) => val,
|
459 + | ::std::result::Result::Err(e) => {
|
460 + | return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
|
461 + | ::aws_smithy_runtime_api::box_error::BoxError::from(e),
|
462 + | ))
|
463 + | }
|
464 + | };
|
465 + | tmp.meta = generic;
|
466 + | if tmp.message.is_none() {
|
467 + | tmp.message = _error_message;
|
468 + | }
|
469 + | tmp
|
470 + | })
|
471 + | }
|
472 + | "InternalServerError" => crate::operation::start_change_request_execution::StartChangeRequestExecutionError::InternalServerError({
|
473 + | let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
|
474 + | crate::types::error::InternalServerError::deserialize_with_response(
|
475 + | &mut *deser,
|
476 + | response.headers(),
|
477 + | response.status().into(),
|
478 + | body,
|
479 + | )
|
480 + | }) {
|
481 + | ::std::result::Result::Ok(val) => val,
|
482 + | ::std::result::Result::Err(e) => {
|
483 + | return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
|
484 + | ::aws_smithy_runtime_api::box_error::BoxError::from(e),
|
485 + | ))
|
486 + | }
|
487 + | };
|
488 + | tmp.meta = generic;
|
489 + | if tmp.message.is_none() {
|
490 + | tmp.message = _error_message;
|
491 + | }
|
492 + | tmp
|
493 + | }),
|
494 + | "InvalidAutomationExecutionParametersException" => {
|
495 + | crate::operation::start_change_request_execution::StartChangeRequestExecutionError::InvalidAutomationExecutionParametersException(
|
496 + | {
|
497 + | let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
|
498 + | crate::types::error::InvalidAutomationExecutionParametersException::deserialize_with_response(
|
499 + | &mut *deser,
|
500 + | response.headers(),
|
501 + | response.status().into(),
|
502 + | body,
|
503 + | )
|
504 + | }) {
|
505 + | ::std::result::Result::Ok(val) => val,
|
506 + | ::std::result::Result::Err(e) => {
|
507 + | return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
|
508 + | ::aws_smithy_runtime_api::box_error::BoxError::from(e),
|
509 + | ))
|
510 + | }
|
511 + | };
|
512 + | tmp.meta = generic;
|
513 + | if tmp.message.is_none() {
|
514 + | tmp.message = _error_message;
|
515 + | }
|
516 + | tmp
|
517 + | },
|
518 + | )
|
519 + | }
|
520 + | "NoLongerSupportedException" => {
|
521 + | crate::operation::start_change_request_execution::StartChangeRequestExecutionError::NoLongerSupportedException({
|
522 + | let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
|
523 + | crate::types::error::NoLongerSupportedException::deserialize_with_response(
|
524 + | &mut *deser,
|
525 + | response.headers(),
|
526 + | response.status().into(),
|
527 + | body,
|
528 + | )
|
529 + | }) {
|
530 + | ::std::result::Result::Ok(val) => val,
|
531 + | ::std::result::Result::Err(e) => {
|
532 + | return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
|
533 + | ::aws_smithy_runtime_api::box_error::BoxError::from(e),
|
534 + | ))
|
535 + | }
|
536 + | };
|
537 + | tmp.meta = generic;
|
538 + | if tmp.message.is_none() {
|
539 + | tmp.message = _error_message;
|
540 + | }
|
541 + | tmp
|
542 + | })
|
543 + | }
|
544 + | _ => {
|
545 + | // Registry-backed, operation-scoped reification of an error whose
|
546 + | // code this operation does not model directly: the operation's own
|
547 + | // error registry is consulted first, then the lookup widens to the
|
548 + | // service-wide error registry. On a hit, the reified error is attached
|
549 + | // as the source of the returned unhandled error while its metadata
|
550 + | // (code, message, request id) is preserved; on a miss the generic
|
551 + | // error is returned unchanged.
|
552 + | match protocol
|
553 + | .deserialize_error_response(response, _cfg)
|
554 + | .ok()
|
555 + | .and_then(|mut deser| {
|
556 + | ::aws_smithy_schema::registry::reify_error(
|
557 + | crate::operation::start_change_request_execution::error_registry::REGISTRY
|
558 + | .or(&crate::error_type_registry::REGISTRY),
|
559 + | error_code,
|
560 + | &mut *deser,
|
561 + | )
|
562 + | }) {
|
563 + | ::std::option::Option::Some(source) => <crate::operation::start_change_request_execution::StartChangeRequestExecutionError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
|
564 + | ::std::option::Option::None => crate::operation::start_change_request_execution::StartChangeRequestExecutionError::generic(generic),
|
565 + | }
|
566 + | }
|
567 + | };
|
568 + | ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
|
569 + | ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
|
570 + | ))
|
571 + | } else {
|
572 + | let protocol = _cfg
|
573 + | .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
|
574 + | .expect("a SharedClientProtocol is required");
|
575 + | let mut deser = protocol
|
576 + | .deserialize_response(response, StartChangeRequestExecution::OUTPUT_SCHEMA, _cfg)
|
577 + | .map_err(|e| {
|
578 + | ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
|
579 + | })?;
|
580 + | // body and headers are already in scope from the top of the function;
|
581 + | // alias `headers` as `_response_headers` so MutateOutput
|
582 + | // customizations have a stable name to read from.
|
583 + | let _response_headers = headers;
|
584 + | #[allow(unused_mut)]
|
585 + | let mut output = crate::operation::start_change_request_execution::StartChangeRequestExecutionOutput::deserialize_with_response(
|
586 + | &mut *deser,
|
587 + | _response_headers,
|
588 + | response.status().into(),
|
589 + | body,
|
590 + | )
|
591 + | .map_err(|e| {
|
592 + | ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
|
593 + | })?;
|
594 + | output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
|
595 + | ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
|
596 + | }
|
597 + | }
|
598 + | }
|
599 + | #[derive(Debug)]
|
600 + | struct StartChangeRequestExecutionRequestSerializer;
|
601 + | impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for StartChangeRequestExecutionRequestSerializer {
|
602 + | #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
|
603 + | fn serialize_input(
|
604 + | &self,
|
605 + | input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
606 + | _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
607 + | ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
|
608 + | let input = input
|
609 + | .downcast::<crate::operation::start_change_request_execution::StartChangeRequestExecutionInput>()
|
610 + | .expect("correct type");
|
611 + |
|
612 + | let protocol = _cfg
|
613 + | .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
|
614 + | .expect("a SharedClientProtocol is required");
|
615 + | let mut request = protocol
|
616 + | .serialize_request(&input, StartChangeRequestExecution::INPUT_SCHEMA, "/", _cfg)
|
617 + | .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
|
618 + |
|
619 + | return ::std::result::Result::Ok(request);
|
620 + | }
|
621 + | }
|
622 + | #[derive(Debug)]
|
623 + | struct StartChangeRequestExecutionEndpointParamsInterceptor;
|
624 + |
|
625 + | #[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
|
626 + | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for StartChangeRequestExecutionEndpointParamsInterceptor {
|
627 + | fn name(&self) -> &'static str {
|
628 + | "StartChangeRequestExecutionEndpointParamsInterceptor"
|
629 + | }
|
630 + |
|
631 + | fn read_before_execution(
|
632 + | &self,
|
633 + | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
634 + | '_,
|
635 + | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
636 + | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
637 + | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
638 + | >,
|
639 + | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
640 + | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
641 + | let _input = context
|
642 + | .input()
|
643 + | .downcast_ref::<StartChangeRequestExecutionInput>()
|
644 + | .ok_or("failed to downcast to StartChangeRequestExecutionInput")?;
|
645 + |
|
646 + | let params = crate::config::endpoint::Params::builder()
|
647 + | .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
|
648 + | .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
|
649 + | .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
|
650 + | .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
|
651 + | .build()
|
652 + | .map_err(|err| {
|
653 + | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
654 + | })?;
|
655 + | cfg.interceptor_state()
|
656 + | .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
|
657 + | ::std::result::Result::Ok(())
|
658 + | }
|
659 + | }
|
660 + |
|
661 + | // The get_* functions below are generated from JMESPath expressions in the
|
662 + | // operationContextParams trait. They target the operation's input shape.
|
663 + |
|
664 + | /// Error type for the `StartChangeRequestExecutionError` operation.
|
665 + | #[non_exhaustive]
|
666 + | #[derive(::std::fmt::Debug)]
|
667 + | pub enum StartChangeRequestExecutionError {
|
668 + | /// <p>Indicates that the Change Manager change template used in the change request was rejected or is still in a pending state.</p>
|
669 + | AutomationDefinitionNotApprovedException(crate::types::error::AutomationDefinitionNotApprovedException),
|
670 + | /// <p>An Automation runbook with the specified name couldn't be found.</p>
|
671 + | AutomationDefinitionNotFoundException(crate::types::error::AutomationDefinitionNotFoundException),
|
672 + | /// <p>An Automation runbook with the specified name and version couldn't be found.</p>
|
673 + | AutomationDefinitionVersionNotFoundException(crate::types::error::AutomationDefinitionVersionNotFoundException),
|
674 + | /// <p>The number of simultaneously running Automation executions exceeded the allowable limit.</p>
|
675 + | AutomationExecutionLimitExceededException(crate::types::error::AutomationExecutionLimitExceededException),
|
676 + | /// <p>Error returned when an idempotent operation is retried and the parameters don't match the original call to the API with the same idempotency token.</p>
|
677 + | IdempotentParameterMismatch(crate::types::error::IdempotentParameterMismatch),
|
678 + | /// <p>An error occurred on the server side.</p>
|
679 + | InternalServerError(crate::types::error::InternalServerError),
|
680 + | /// <p>The supplied parameters for invoking the specified Automation runbook are incorrect. For example, they may not match the set of parameters permitted for the specified Automation document.</p>
|
681 + | InvalidAutomationExecutionParametersException(crate::types::error::InvalidAutomationExecutionParametersException),
|
682 + | /// <p>The requested operation is no longer supported by Systems Manager.</p>
|
683 + | NoLongerSupportedException(crate::types::error::NoLongerSupportedException),
|
684 + | /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
|
685 + | #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
|
686 + | variable wildcard pattern and check `.code()`:
|
687 + | \
|
688 + | `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
|
689 + | \
|
690 + | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-StartChangeRequestExecutionError) for what information is available for the error.")]
|
691 + | Unhandled(crate::error::sealed_unhandled::Unhandled),
|
692 + | }
|
693 + | impl StartChangeRequestExecutionError {
|
694 + | /// Creates the `StartChangeRequestExecutionError::Unhandled` variant from any error type.
|
695 + | pub fn unhandled(
|
696 + | err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
|
697 + | ) -> Self {
|
698 + | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
699 + | source: err.into(),
|
700 + | meta: ::std::default::Default::default(),
|
701 + | })
|
702 + | }
|
703 + |
|
704 + | /// Creates the `StartChangeRequestExecutionError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
|
705 + | pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
|
706 + | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
707 + | source: err.clone().into(),
|
708 + | meta: err,
|
709 + | })
|
710 + | }
|
711 + | ///
|
712 + | /// Returns error metadata, which includes the error code, message,
|
713 + | /// request ID, and potentially additional information.
|
714 + | ///
|
715 + | pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
716 + | match self {
|
717 + | Self::AutomationDefinitionNotApprovedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
718 + | Self::AutomationDefinitionNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
719 + | Self::AutomationDefinitionVersionNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
720 + | Self::AutomationExecutionLimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
721 + | Self::IdempotentParameterMismatch(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
722 + | Self::InternalServerError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
723 + | Self::InvalidAutomationExecutionParametersException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
724 + | Self::NoLongerSupportedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
725 + | Self::Unhandled(e) => &e.meta,
|
726 + | }
|
727 + | }
|
728 + | /// Returns `true` if the error kind is `StartChangeRequestExecutionError::AutomationDefinitionNotApprovedException`.
|
729 + | pub fn is_automation_definition_not_approved_exception(&self) -> bool {
|
730 + | matches!(self, Self::AutomationDefinitionNotApprovedException(_))
|
731 + | }
|
732 + | /// Returns `true` if the error kind is `StartChangeRequestExecutionError::AutomationDefinitionNotFoundException`.
|
733 + | pub fn is_automation_definition_not_found_exception(&self) -> bool {
|
734 + | matches!(self, Self::AutomationDefinitionNotFoundException(_))
|
735 + | }
|
736 + | /// Returns `true` if the error kind is `StartChangeRequestExecutionError::AutomationDefinitionVersionNotFoundException`.
|
737 + | pub fn is_automation_definition_version_not_found_exception(&self) -> bool {
|
738 + | matches!(self, Self::AutomationDefinitionVersionNotFoundException(_))
|
739 + | }
|
740 + | /// Returns `true` if the error kind is `StartChangeRequestExecutionError::AutomationExecutionLimitExceededException`.
|
741 + | pub fn is_automation_execution_limit_exceeded_exception(&self) -> bool {
|
742 + | matches!(self, Self::AutomationExecutionLimitExceededException(_))
|
743 + | }
|
744 + | /// Returns `true` if the error kind is `StartChangeRequestExecutionError::IdempotentParameterMismatch`.
|
745 + | pub fn is_idempotent_parameter_mismatch(&self) -> bool {
|
746 + | matches!(self, Self::IdempotentParameterMismatch(_))
|
747 + | }
|
748 + | /// Returns `true` if the error kind is `StartChangeRequestExecutionError::InternalServerError`.
|
749 + | pub fn is_internal_server_error(&self) -> bool {
|
750 + | matches!(self, Self::InternalServerError(_))
|
751 + | }
|
752 + | /// Returns `true` if the error kind is `StartChangeRequestExecutionError::InvalidAutomationExecutionParametersException`.
|
753 + | pub fn is_invalid_automation_execution_parameters_exception(&self) -> bool {
|
754 + | matches!(self, Self::InvalidAutomationExecutionParametersException(_))
|
755 + | }
|
756 + | /// Returns `true` if the error kind is `StartChangeRequestExecutionError::NoLongerSupportedException`.
|
757 + | pub fn is_no_longer_supported_exception(&self) -> bool {
|
758 + | matches!(self, Self::NoLongerSupportedException(_))
|
759 + | }
|
760 + | }
|
761 + | impl ::std::error::Error for StartChangeRequestExecutionError {
|
762 + | fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
763 + | match self {
|
764 + | Self::AutomationDefinitionNotApprovedException(_inner) => ::std::option::Option::Some(_inner),
|
765 + | Self::AutomationDefinitionNotFoundException(_inner) => ::std::option::Option::Some(_inner),
|
766 + | Self::AutomationDefinitionVersionNotFoundException(_inner) => ::std::option::Option::Some(_inner),
|
767 + | Self::AutomationExecutionLimitExceededException(_inner) => ::std::option::Option::Some(_inner),
|
768 + | Self::IdempotentParameterMismatch(_inner) => ::std::option::Option::Some(_inner),
|
769 + | Self::InternalServerError(_inner) => ::std::option::Option::Some(_inner),
|
770 + | Self::InvalidAutomationExecutionParametersException(_inner) => ::std::option::Option::Some(_inner),
|
771 + | Self::NoLongerSupportedException(_inner) => ::std::option::Option::Some(_inner),
|
772 + | Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
|
773 + | }
|
774 + | }
|
775 + | }
|
776 + | impl ::std::fmt::Display for StartChangeRequestExecutionError {
|
777 + | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
778 + | match self {
|
779 + | Self::AutomationDefinitionNotApprovedException(_inner) => _inner.fmt(f),
|
780 + | Self::AutomationDefinitionNotFoundException(_inner) => _inner.fmt(f),
|
781 + | Self::AutomationDefinitionVersionNotFoundException(_inner) => _inner.fmt(f),
|
782 + | Self::AutomationExecutionLimitExceededException(_inner) => _inner.fmt(f),
|
783 + | Self::IdempotentParameterMismatch(_inner) => _inner.fmt(f),
|
784 + | Self::InternalServerError(_inner) => _inner.fmt(f),
|
785 + | Self::InvalidAutomationExecutionParametersException(_inner) => _inner.fmt(f),
|
786 + | Self::NoLongerSupportedException(_inner) => _inner.fmt(f),
|
787 + | Self::Unhandled(_inner) => {
|
788 + | if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
|
789 + | write!(f, "unhandled error ({code})")
|
790 + | } else {
|
791 + | f.write_str("unhandled error")
|
792 + | }
|
793 + | }
|
794 + | }
|
795 + | }
|
796 + | }
|
797 + | impl ::aws_smithy_types::retry::ProvideErrorKind for StartChangeRequestExecutionError {
|
798 + | fn code(&self) -> ::std::option::Option<&str> {
|
799 + | ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
|
800 + | }
|
801 + | fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
|
802 + | ::std::option::Option::None
|
803 + | }
|
804 + | }
|
805 + | impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for StartChangeRequestExecutionError {
|
806 + | fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
807 + | match self {
|
808 + | Self::AutomationDefinitionNotApprovedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
809 + | Self::AutomationDefinitionNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
810 + | Self::AutomationDefinitionVersionNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
811 + | Self::AutomationExecutionLimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
812 + | Self::IdempotentParameterMismatch(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
813 + | Self::InternalServerError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
814 + | Self::InvalidAutomationExecutionParametersException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
815 + | Self::NoLongerSupportedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
816 + | Self::Unhandled(_inner) => &_inner.meta,
|
817 + | }
|
818 + | }
|
819 + | }
|
820 + | impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for StartChangeRequestExecutionError {
|
821 + | fn create_unhandled_error(
|
822 + | source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
|
823 + | meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
|
824 + | ) -> Self {
|
825 + | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
826 + | source,
|
827 + | meta: meta.unwrap_or_default(),
|
828 + | })
|
829 + | }
|
830 + | }
|
831 + | impl ::aws_types::request_id::RequestId for crate::operation::start_change_request_execution::StartChangeRequestExecutionError {
|
832 + | fn request_id(&self) -> Option<&str> {
|
833 + | self.meta().request_id()
|
834 + | }
|
835 + | }
|
836 + |
|
837 + | pub use crate::operation::start_change_request_execution::_start_change_request_execution_input::StartChangeRequestExecutionInput;
|
838 + |
|
839 + | pub use crate::operation::start_change_request_execution::_start_change_request_execution_output::StartChangeRequestExecutionOutput;
|
840 + |
|
841 + | mod _start_change_request_execution_input;
|
842 + |
|
843 + | mod _start_change_request_execution_output;
|
844 + |
|
845 + | /// Builders
|
846 + | pub mod builders;
|