1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | /// Orchestration and serialization glue logic for `CreateAssociationBatch`.
|
3 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
4 + | #[non_exhaustive]
|
5 + | pub struct CreateAssociationBatch;
|
6 + | impl CreateAssociationBatch {
|
7 + | /// Creates a new `CreateAssociationBatch`
|
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::create_association_batch::CreateAssociationBatchInput::SCHEMA;
|
14 + | /// The schema for this operation's output shape.
|
15 + | pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> =
|
16 + | crate::operation::create_association_batch::CreateAssociationBatchOutput::SCHEMA;
|
17 + | pub(crate) async fn orchestrate(
|
18 + | runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
|
19 + | input: crate::operation::create_association_batch::CreateAssociationBatchInput,
|
20 + | ) -> ::std::result::Result<
|
21 + | crate::operation::create_association_batch::CreateAssociationBatchOutput,
|
22 + | ::aws_smithy_runtime_api::client::result::SdkError<
|
23 + | crate::operation::create_association_batch::CreateAssociationBatchError,
|
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::create_association_batch::CreateAssociationBatchError>()
|
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::create_association_batch::CreateAssociationBatchOutput>()
|
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::create_association_batch::CreateAssociationBatchInput,
|
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", "CreateAssociationBatch", 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.CreateAssociationBatch",
|
65 + | "rpc.service" = "SSM",
|
66 + | "rpc.method" = "CreateAssociationBatch",
|
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::AssociationLimitExceeded::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::AssociationLimitExceeded::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::AssociationLimitExceeded::deserialize(d)?))
|
111 + | },
|
112 + | )
|
113 + | .insert_error_shape(
|
114 + | crate::types::error::DuplicateInstanceId::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::DuplicateInstanceId::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::DuplicateInstanceId::deserialize(d)?))
|
120 + | },
|
121 + | )
|
122 + | .insert_error_shape(
|
123 + | crate::types::error::InternalServerError::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::InternalServerError::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::InternalServerError::deserialize(d)?))
|
129 + | },
|
130 + | )
|
131 + | .insert_error_shape(
|
132 + | crate::types::error::InvalidDocument::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::InvalidDocument::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::InvalidDocument::deserialize(d)?))
|
138 + | },
|
139 + | )
|
140 + | .insert_error_shape(
|
141 + | crate::types::error::InvalidDocumentVersion::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::InvalidDocumentVersion::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::InvalidDocumentVersion::deserialize(d)?))
|
147 + | },
|
148 + | )
|
149 + | .insert_error_shape(
|
150 + | crate::types::error::InvalidInstanceId::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::InvalidInstanceId::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::InvalidInstanceId::deserialize(d)?))
|
156 + | },
|
157 + | )
|
158 + | .insert_error_shape(
|
159 + | crate::types::error::InvalidOutputLocation::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::InvalidOutputLocation::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::InvalidOutputLocation::deserialize(d)?))
|
165 + | },
|
166 + | )
|
167 + | .insert_error_shape(
|
168 + | crate::types::error::InvalidParameters::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::InvalidParameters::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::InvalidParameters::deserialize(d)?))
|
174 + | },
|
175 + | )
|
176 + | .insert_error_shape(
|
177 + | crate::types::error::InvalidSchedule::SCHEMA,
|
178 + | |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
|
179 + | ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InvalidSchedule::deserialize(d)?))
|
180 + | },
|
181 + | |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> {
|
182 + | ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InvalidSchedule::deserialize(d)?))
|
183 + | },
|
184 + | )
|
185 + | .insert_error_shape(
|
186 + | crate::types::error::InvalidTarget::SCHEMA,
|
187 + | |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
|
188 + | ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InvalidTarget::deserialize(d)?))
|
189 + | },
|
190 + | |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> {
|
191 + | ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InvalidTarget::deserialize(d)?))
|
192 + | },
|
193 + | )
|
194 + | .insert_error_shape(
|
195 + | crate::types::error::InvalidTargetMaps::SCHEMA,
|
196 + | |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
|
197 + | ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InvalidTargetMaps::deserialize(d)?))
|
198 + | },
|
199 + | |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> {
|
200 + | ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InvalidTargetMaps::deserialize(d)?))
|
201 + | },
|
202 + | )
|
203 + | .insert_error_shape(
|
204 + | crate::types::error::UnsupportedPlatformType::SCHEMA,
|
205 + | |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
|
206 + | ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::UnsupportedPlatformType::deserialize(d)?))
|
207 + | },
|
208 + | |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> {
|
209 + | ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::UnsupportedPlatformType::deserialize(d)?))
|
210 + | },
|
211 + | )
|
212 + | .build()
|
213 + | });
|
214 + | }
|
215 + | impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for CreateAssociationBatch {
|
216 + | fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
|
217 + | let mut cfg = ::aws_smithy_types::config_bag::Layer::new("CreateAssociationBatch");
|
218 + |
|
219 + | cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
|
220 + | CreateAssociationBatchRequestSerializer,
|
221 + | ));
|
222 + | cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
|
223 + | CreateAssociationBatchResponseDeserializer,
|
224 + | ));
|
225 + |
|
226 + | cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
|
227 + | crate::config::auth::Params::builder()
|
228 + | .operation_name("CreateAssociationBatch")
|
229 + | .build()
|
230 + | .expect("required fields set"),
|
231 + | ));
|
232 + |
|
233 + | cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::SensitiveOutput);
|
234 + | cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
|
235 + | "CreateAssociationBatch",
|
236 + | "SSM",
|
237 + | ));
|
238 + | let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
|
239 + | signing_options.double_uri_encode = true;
|
240 + | signing_options.content_sha256_header = false;
|
241 + | signing_options.normalize_uri_path = true;
|
242 + | signing_options.payload_override = None;
|
243 + |
|
244 + | cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
|
245 + | signing_options,
|
246 + | ..::std::default::Default::default()
|
247 + | });
|
248 + |
|
249 + | ::std::option::Option::Some(cfg.freeze())
|
250 + | }
|
251 + |
|
252 + | fn runtime_components(
|
253 + | &self,
|
254 + | _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
|
255 + | ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
|
256 + | #[allow(unused_mut)]
|
257 + | let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("CreateAssociationBatch")
|
258 + | .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
|
259 + | CreateAssociationBatchTelemetryInputCaptureInterceptor,
|
260 + | ))
|
261 + | .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
|
262 + | ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
|
263 + | ))
|
264 + | .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
|
265 + | CreateAssociationBatchEndpointParamsInterceptor,
|
266 + | ))
|
267 + | .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
|
268 + | crate::operation::create_association_batch::CreateAssociationBatchError,
|
269 + | >::new())
|
270 + | .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
|
271 + | crate::operation::create_association_batch::CreateAssociationBatchError,
|
272 + | >::new())
|
273 + | .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
|
274 + | crate::operation::create_association_batch::CreateAssociationBatchError,
|
275 + | >::new())
|
276 + | .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
|
277 + | crate::operation::create_association_batch::CreateAssociationBatchError,
|
278 + | >::new());
|
279 + |
|
280 + | ::std::borrow::Cow::Owned(rcb)
|
281 + | }
|
282 + | }
|
283 + |
|
284 + | #[derive(Debug)]
|
285 + | struct CreateAssociationBatchTelemetryInputCaptureInterceptor;
|
286 + |
|
287 + | #[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
|
288 + | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateAssociationBatchTelemetryInputCaptureInterceptor {
|
289 + | fn name(&self) -> &'static str {
|
290 + | "CreateAssociationBatchTelemetryInputCaptureInterceptor"
|
291 + | }
|
292 + |
|
293 + | fn read_before_execution(
|
294 + | &self,
|
295 + | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
296 + | '_,
|
297 + | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
298 + | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
299 + | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
300 + | >,
|
301 + | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
302 + | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
303 + | // Nothing to do unless the customer opted in by naming members to record.
|
304 + | let ::std::option::Option::Some(requested) = cfg
|
305 + | .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
|
306 + | .filter(|r| !r.is_empty())
|
307 + | else {
|
308 + | return ::std::result::Result::Ok(());
|
309 + | };
|
310 + |
|
311 + | let ::std::option::Option::Some(input) = context.input().downcast_ref::<CreateAssociationBatchInput>() else {
|
312 + | // A mismatched input is not this interceptor's concern; skip quietly.
|
313 + | return ::std::result::Result::Ok(());
|
314 + | };
|
315 + |
|
316 + | let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
|
317 + | if requested.should_capture("AssociationDispatchAssumeRole") {
|
318 + | if let ::std::option::Option::Some(value) = input.association_dispatch_assume_role.as_deref() {
|
319 + | captured.insert("AssociationDispatchAssumeRole", value);
|
320 + | }
|
321 + | }
|
322 + |
|
323 + | cfg.interceptor_state().store_put(captured);
|
324 + | ::std::result::Result::Ok(())
|
325 + | }
|
326 + | }
|
327 + | #[derive(Debug)]
|
328 + | struct CreateAssociationBatchResponseDeserializer;
|
329 + | impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateAssociationBatchResponseDeserializer {
|
330 + | fn deserialize_nonstreaming_with_config(
|
331 + | &self,
|
332 + | response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
|
333 + | _cfg: &::aws_smithy_types::config_bag::ConfigBag,
|
334 + | ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
|
335 + | let (success, status) = (response.status().is_success(), response.status().as_u16());
|
336 + | // Load body and headers BEFORE BeforeParseResponse so customizations
|
337 + | // (e.g., S3's `body_is_error` check that detects errors returned with
|
338 + | // HTTP 200) can inspect them. The legacy non-streaming path also
|
339 + | // loads `body` before firing this hook.
|
340 + | let body = response.body().bytes().expect("body loaded");
|
341 + | let headers = response.headers();
|
342 + | #[allow(unused_mut)]
|
343 + | let mut force_error = false;
|
344 + | ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
|
345 + | if !success && status != 200 || force_error {
|
346 + | let protocol = _cfg
|
347 + | .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
|
348 + | .expect("a SharedClientProtocol is required");
|
349 + | #[allow(unused_mut)]
|
350 + | let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
|
351 + | ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
|
352 + | })?;
|
353 + | generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
|
354 + | let generic = generic_builder.build();
|
355 + | let error_code = match generic.code() {
|
356 + | ::std::option::Option::Some(code) => code,
|
357 + | ::std::option::Option::None => {
|
358 + | return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
|
359 + | ::aws_smithy_runtime_api::box_error::BoxError::from(
|
360 + | crate::operation::create_association_batch::CreateAssociationBatchError::unhandled(generic),
|
361 + | ),
|
362 + | ))
|
363 + | }
|
364 + | };
|
365 + | let _error_message = generic.message().map(|msg| msg.to_owned());
|
366 + | let err = match error_code {
|
367 + | "AssociationLimitExceeded" => crate::operation::create_association_batch::CreateAssociationBatchError::AssociationLimitExceeded({
|
368 + | let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
|
369 + | crate::types::error::AssociationLimitExceeded::deserialize_with_response(
|
370 + | &mut *deser,
|
371 + | response.headers(),
|
372 + | response.status().into(),
|
373 + | body,
|
374 + | )
|
375 + | }) {
|
376 + | ::std::result::Result::Ok(val) => val,
|
377 + | ::std::result::Result::Err(e) => {
|
378 + | return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
|
379 + | ::aws_smithy_runtime_api::box_error::BoxError::from(e),
|
380 + | ))
|
381 + | }
|
382 + | };
|
383 + | tmp.meta = generic;
|
384 + | if tmp.message.is_none() {
|
385 + | tmp.message = _error_message;
|
386 + | }
|
387 + | tmp
|
388 + | }),
|
389 + | "DuplicateInstanceId" => crate::operation::create_association_batch::CreateAssociationBatchError::DuplicateInstanceId({
|
390 + | let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
|
391 + | crate::types::error::DuplicateInstanceId::deserialize_with_response(
|
392 + | &mut *deser,
|
393 + | response.headers(),
|
394 + | response.status().into(),
|
395 + | body,
|
396 + | )
|
397 + | }) {
|
398 + | ::std::result::Result::Ok(val) => val,
|
399 + | ::std::result::Result::Err(e) => {
|
400 + | return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
|
401 + | ::aws_smithy_runtime_api::box_error::BoxError::from(e),
|
402 + | ))
|
403 + | }
|
404 + | };
|
405 + | tmp.meta = generic;
|
406 + | if tmp.message.is_none() {
|
407 + | tmp.message = _error_message;
|
408 + | }
|
409 + | tmp
|
410 + | }),
|
411 + | "InternalServerError" => crate::operation::create_association_batch::CreateAssociationBatchError::InternalServerError({
|
412 + | let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
|
413 + | crate::types::error::InternalServerError::deserialize_with_response(
|
414 + | &mut *deser,
|
415 + | response.headers(),
|
416 + | response.status().into(),
|
417 + | body,
|
418 + | )
|
419 + | }) {
|
420 + | ::std::result::Result::Ok(val) => val,
|
421 + | ::std::result::Result::Err(e) => {
|
422 + | return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
|
423 + | ::aws_smithy_runtime_api::box_error::BoxError::from(e),
|
424 + | ))
|
425 + | }
|
426 + | };
|
427 + | tmp.meta = generic;
|
428 + | if tmp.message.is_none() {
|
429 + | tmp.message = _error_message;
|
430 + | }
|
431 + | tmp
|
432 + | }),
|
433 + | "InvalidDocument" => crate::operation::create_association_batch::CreateAssociationBatchError::InvalidDocument({
|
434 + | let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
|
435 + | crate::types::error::InvalidDocument::deserialize_with_response(
|
436 + | &mut *deser,
|
437 + | response.headers(),
|
438 + | response.status().into(),
|
439 + | body,
|
440 + | )
|
441 + | }) {
|
442 + | ::std::result::Result::Ok(val) => val,
|
443 + | ::std::result::Result::Err(e) => {
|
444 + | return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
|
445 + | ::aws_smithy_runtime_api::box_error::BoxError::from(e),
|
446 + | ))
|
447 + | }
|
448 + | };
|
449 + | tmp.meta = generic;
|
450 + | if tmp.message.is_none() {
|
451 + | tmp.message = _error_message;
|
452 + | }
|
453 + | tmp
|
454 + | }),
|
455 + | "InvalidDocumentVersion" => crate::operation::create_association_batch::CreateAssociationBatchError::InvalidDocumentVersion({
|
456 + | let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
|
457 + | crate::types::error::InvalidDocumentVersion::deserialize_with_response(
|
458 + | &mut *deser,
|
459 + | response.headers(),
|
460 + | response.status().into(),
|
461 + | body,
|
462 + | )
|
463 + | }) {
|
464 + | ::std::result::Result::Ok(val) => val,
|
465 + | ::std::result::Result::Err(e) => {
|
466 + | return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
|
467 + | ::aws_smithy_runtime_api::box_error::BoxError::from(e),
|
468 + | ))
|
469 + | }
|
470 + | };
|
471 + | tmp.meta = generic;
|
472 + | if tmp.message.is_none() {
|
473 + | tmp.message = _error_message;
|
474 + | }
|
475 + | tmp
|
476 + | }),
|
477 + | "InvalidInstanceId" => crate::operation::create_association_batch::CreateAssociationBatchError::InvalidInstanceId({
|
478 + | let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
|
479 + | crate::types::error::InvalidInstanceId::deserialize_with_response(
|
480 + | &mut *deser,
|
481 + | response.headers(),
|
482 + | response.status().into(),
|
483 + | body,
|
484 + | )
|
485 + | }) {
|
486 + | ::std::result::Result::Ok(val) => val,
|
487 + | ::std::result::Result::Err(e) => {
|
488 + | return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
|
489 + | ::aws_smithy_runtime_api::box_error::BoxError::from(e),
|
490 + | ))
|
491 + | }
|
492 + | };
|
493 + | tmp.meta = generic;
|
494 + | if tmp.message.is_none() {
|
495 + | tmp.message = _error_message;
|
496 + | }
|
497 + | tmp
|
498 + | }),
|
499 + | "InvalidOutputLocation" => crate::operation::create_association_batch::CreateAssociationBatchError::InvalidOutputLocation({
|
500 + | let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
|
501 + | crate::types::error::InvalidOutputLocation::deserialize_with_response(
|
502 + | &mut *deser,
|
503 + | response.headers(),
|
504 + | response.status().into(),
|
505 + | body,
|
506 + | )
|
507 + | }) {
|
508 + | ::std::result::Result::Ok(val) => val,
|
509 + | ::std::result::Result::Err(e) => {
|
510 + | return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
|
511 + | ::aws_smithy_runtime_api::box_error::BoxError::from(e),
|
512 + | ))
|
513 + | }
|
514 + | };
|
515 + | tmp.meta = generic;
|
516 + | if tmp.message.is_none() {
|
517 + | tmp.message = _error_message;
|
518 + | }
|
519 + | tmp
|
520 + | }),
|
521 + | "InvalidParameters" => crate::operation::create_association_batch::CreateAssociationBatchError::InvalidParameters({
|
522 + | let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
|
523 + | crate::types::error::InvalidParameters::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 + | "InvalidSchedule" => crate::operation::create_association_batch::CreateAssociationBatchError::InvalidSchedule({
|
544 + | let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
|
545 + | crate::types::error::InvalidSchedule::deserialize_with_response(
|
546 + | &mut *deser,
|
547 + | response.headers(),
|
548 + | response.status().into(),
|
549 + | body,
|
550 + | )
|
551 + | }) {
|
552 + | ::std::result::Result::Ok(val) => val,
|
553 + | ::std::result::Result::Err(e) => {
|
554 + | return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
|
555 + | ::aws_smithy_runtime_api::box_error::BoxError::from(e),
|
556 + | ))
|
557 + | }
|
558 + | };
|
559 + | tmp.meta = generic;
|
560 + | if tmp.message.is_none() {
|
561 + | tmp.message = _error_message;
|
562 + | }
|
563 + | tmp
|
564 + | }),
|
565 + | "InvalidTarget" => crate::operation::create_association_batch::CreateAssociationBatchError::InvalidTarget({
|
566 + | let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
|
567 + | crate::types::error::InvalidTarget::deserialize_with_response(&mut *deser, response.headers(), response.status().into(), body)
|
568 + | }) {
|
569 + | ::std::result::Result::Ok(val) => val,
|
570 + | ::std::result::Result::Err(e) => {
|
571 + | return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
|
572 + | ::aws_smithy_runtime_api::box_error::BoxError::from(e),
|
573 + | ))
|
574 + | }
|
575 + | };
|
576 + | tmp.meta = generic;
|
577 + | if tmp.message.is_none() {
|
578 + | tmp.message = _error_message;
|
579 + | }
|
580 + | tmp
|
581 + | }),
|
582 + | "InvalidTargetMaps" => crate::operation::create_association_batch::CreateAssociationBatchError::InvalidTargetMaps({
|
583 + | let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
|
584 + | crate::types::error::InvalidTargetMaps::deserialize_with_response(
|
585 + | &mut *deser,
|
586 + | response.headers(),
|
587 + | response.status().into(),
|
588 + | body,
|
589 + | )
|
590 + | }) {
|
591 + | ::std::result::Result::Ok(val) => val,
|
592 + | ::std::result::Result::Err(e) => {
|
593 + | return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
|
594 + | ::aws_smithy_runtime_api::box_error::BoxError::from(e),
|
595 + | ))
|
596 + | }
|
597 + | };
|
598 + | tmp.meta = generic;
|
599 + | if tmp.message.is_none() {
|
600 + | tmp.message = _error_message;
|
601 + | }
|
602 + | tmp
|
603 + | }),
|
604 + | "UnsupportedPlatformType" => crate::operation::create_association_batch::CreateAssociationBatchError::UnsupportedPlatformType({
|
605 + | let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
|
606 + | crate::types::error::UnsupportedPlatformType::deserialize_with_response(
|
607 + | &mut *deser,
|
608 + | response.headers(),
|
609 + | response.status().into(),
|
610 + | body,
|
611 + | )
|
612 + | }) {
|
613 + | ::std::result::Result::Ok(val) => val,
|
614 + | ::std::result::Result::Err(e) => {
|
615 + | return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
|
616 + | ::aws_smithy_runtime_api::box_error::BoxError::from(e),
|
617 + | ))
|
618 + | }
|
619 + | };
|
620 + | tmp.meta = generic;
|
621 + | if tmp.message.is_none() {
|
622 + | tmp.message = _error_message;
|
623 + | }
|
624 + | tmp
|
625 + | }),
|
626 + | _ => {
|
627 + | // Registry-backed, operation-scoped reification of an error whose
|
628 + | // code this operation does not model directly: the operation's own
|
629 + | // error registry is consulted first, then the lookup widens to the
|
630 + | // service-wide error registry. On a hit, the reified error is attached
|
631 + | // as the source of the returned unhandled error while its metadata
|
632 + | // (code, message, request id) is preserved; on a miss the generic
|
633 + | // error is returned unchanged.
|
634 + | match protocol
|
635 + | .deserialize_error_response(response, _cfg)
|
636 + | .ok()
|
637 + | .and_then(|mut deser| {
|
638 + | ::aws_smithy_schema::registry::reify_error(
|
639 + | crate::operation::create_association_batch::error_registry::REGISTRY
|
640 + | .or(&crate::error_type_registry::REGISTRY),
|
641 + | error_code,
|
642 + | &mut *deser,
|
643 + | )
|
644 + | }) {
|
645 + | ::std::option::Option::Some(source) => <crate::operation::create_association_batch::CreateAssociationBatchError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
|
646 + | ::std::option::Option::None => crate::operation::create_association_batch::CreateAssociationBatchError::generic(generic),
|
647 + | }
|
648 + | }
|
649 + | };
|
650 + | ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
|
651 + | ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
|
652 + | ))
|
653 + | } else {
|
654 + | let protocol = _cfg
|
655 + | .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
|
656 + | .expect("a SharedClientProtocol is required");
|
657 + | let mut deser = protocol
|
658 + | .deserialize_response(response, CreateAssociationBatch::OUTPUT_SCHEMA, _cfg)
|
659 + | .map_err(|e| {
|
660 + | ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
|
661 + | })?;
|
662 + | // body and headers are already in scope from the top of the function;
|
663 + | // alias `headers` as `_response_headers` so MutateOutput
|
664 + | // customizations have a stable name to read from.
|
665 + | let _response_headers = headers;
|
666 + | #[allow(unused_mut)]
|
667 + | let mut output = crate::operation::create_association_batch::CreateAssociationBatchOutput::deserialize_with_response(
|
668 + | &mut *deser,
|
669 + | _response_headers,
|
670 + | response.status().into(),
|
671 + | body,
|
672 + | )
|
673 + | .map_err(|e| {
|
674 + | ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
|
675 + | })?;
|
676 + | output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
|
677 + | ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
|
678 + | }
|
679 + | }
|
680 + | }
|
681 + | #[derive(Debug)]
|
682 + | struct CreateAssociationBatchRequestSerializer;
|
683 + | impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateAssociationBatchRequestSerializer {
|
684 + | #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
|
685 + | fn serialize_input(
|
686 + | &self,
|
687 + | input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
688 + | _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
689 + | ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
|
690 + | let input = input
|
691 + | .downcast::<crate::operation::create_association_batch::CreateAssociationBatchInput>()
|
692 + | .expect("correct type");
|
693 + |
|
694 + | let protocol = _cfg
|
695 + | .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
|
696 + | .expect("a SharedClientProtocol is required");
|
697 + | let mut request = protocol
|
698 + | .serialize_request(&input, CreateAssociationBatch::INPUT_SCHEMA, "/", _cfg)
|
699 + | .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
|
700 + |
|
701 + | return ::std::result::Result::Ok(request);
|
702 + | }
|
703 + | }
|
704 + | #[derive(Debug)]
|
705 + | struct CreateAssociationBatchEndpointParamsInterceptor;
|
706 + |
|
707 + | #[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
|
708 + | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateAssociationBatchEndpointParamsInterceptor {
|
709 + | fn name(&self) -> &'static str {
|
710 + | "CreateAssociationBatchEndpointParamsInterceptor"
|
711 + | }
|
712 + |
|
713 + | fn read_before_execution(
|
714 + | &self,
|
715 + | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
716 + | '_,
|
717 + | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
718 + | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
719 + | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
720 + | >,
|
721 + | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
722 + | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
723 + | let _input = context
|
724 + | .input()
|
725 + | .downcast_ref::<CreateAssociationBatchInput>()
|
726 + | .ok_or("failed to downcast to CreateAssociationBatchInput")?;
|
727 + |
|
728 + | let params = crate::config::endpoint::Params::builder()
|
729 + | .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
|
730 + | .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
|
731 + | .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
|
732 + | .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
|
733 + | .build()
|
734 + | .map_err(|err| {
|
735 + | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
736 + | })?;
|
737 + | cfg.interceptor_state()
|
738 + | .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
|
739 + | ::std::result::Result::Ok(())
|
740 + | }
|
741 + | }
|
742 + |
|
743 + | // The get_* functions below are generated from JMESPath expressions in the
|
744 + | // operationContextParams trait. They target the operation's input shape.
|
745 + |
|
746 + | /// Error type for the `CreateAssociationBatchError` operation.
|
747 + | #[non_exhaustive]
|
748 + | #[derive(::std::fmt::Debug)]
|
749 + | pub enum CreateAssociationBatchError {
|
750 + | /// <p>You can have at most 2,000 active associations.</p>
|
751 + | AssociationLimitExceeded(crate::types::error::AssociationLimitExceeded),
|
752 + | /// <p>You can't specify a managed node ID in more than one association.</p>
|
753 + | DuplicateInstanceId(crate::types::error::DuplicateInstanceId),
|
754 + | /// <p>An error occurred on the server side.</p>
|
755 + | InternalServerError(crate::types::error::InternalServerError),
|
756 + | /// <p>The specified SSM document doesn't exist.</p>
|
757 + | InvalidDocument(crate::types::error::InvalidDocument),
|
758 + | /// <p>The document version isn't valid or doesn't exist.</p>
|
759 + | InvalidDocumentVersion(crate::types::error::InvalidDocumentVersion),
|
760 + | /// <p>The following problems can cause this exception:</p>
|
761 + | /// <ul>
|
762 + | /// <li>
|
763 + | /// <p>You don't have permission to access the managed node.</p></li>
|
764 + | /// <li>
|
765 + | /// <p>Amazon Web Services Systems Manager Agent (SSM Agent) isn't running. Verify that SSM Agent is running.</p></li>
|
766 + | /// <li>
|
767 + | /// <p>SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM Agent.</p></li>
|
768 + | /// <li>
|
769 + | /// <p>The managed node isn't in a valid state. Valid states are: <code>Running</code>, <code>Pending</code>, <code>Stopped</code>, and <code>Stopping</code>. Invalid states are: <code>Shutting-down</code> and <code>Terminated</code>.</p></li>
|
770 + | /// </ul>
|
771 + | InvalidInstanceId(crate::types::error::InvalidInstanceId),
|
772 + | /// <p>The output location isn't valid or doesn't exist.</p>
|
773 + | InvalidOutputLocation(crate::types::error::InvalidOutputLocation),
|
774 + | /// <p>You must specify values for all required parameters in the Amazon Web Services Systems Manager document (SSM document). You can only supply values to parameters defined in the SSM document.</p>
|
775 + | InvalidParameters(crate::types::error::InvalidParameters),
|
776 + | /// <p>The schedule is invalid. Verify your cron or rate expression and try again.</p>
|
777 + | InvalidSchedule(crate::types::error::InvalidSchedule),
|
778 + | /// <p>The target isn't valid or doesn't exist. It might not be configured for Systems Manager or you might not have permission to perform the operation.</p>
|
779 + | InvalidTarget(crate::types::error::InvalidTarget),
|
780 + | /// <p>TargetMap parameter isn't valid.</p>
|
781 + | InvalidTargetMaps(crate::types::error::InvalidTargetMaps),
|
782 + | /// <p>The document doesn't support the platform type of the given managed node IDs. For example, you sent an document for a Windows managed node to a Linux node.</p>
|
783 + | UnsupportedPlatformType(crate::types::error::UnsupportedPlatformType),
|
784 + | /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
|
785 + | #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
|
786 + | variable wildcard pattern and check `.code()`:
|
787 + | \
|
788 + | `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
|
789 + | \
|
790 + | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-CreateAssociationBatchError) for what information is available for the error.")]
|
791 + | Unhandled(crate::error::sealed_unhandled::Unhandled),
|
792 + | }
|
793 + | impl CreateAssociationBatchError {
|
794 + | /// Creates the `CreateAssociationBatchError::Unhandled` variant from any error type.
|
795 + | pub fn unhandled(
|
796 + | err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
|
797 + | ) -> Self {
|
798 + | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
799 + | source: err.into(),
|
800 + | meta: ::std::default::Default::default(),
|
801 + | })
|
802 + | }
|
803 + |
|
804 + | /// Creates the `CreateAssociationBatchError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
|
805 + | pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
|
806 + | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
807 + | source: err.clone().into(),
|
808 + | meta: err,
|
809 + | })
|
810 + | }
|
811 + | ///
|
812 + | /// Returns error metadata, which includes the error code, message,
|
813 + | /// request ID, and potentially additional information.
|
814 + | ///
|
815 + | pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
816 + | match self {
|
817 + | Self::AssociationLimitExceeded(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
818 + | Self::DuplicateInstanceId(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
819 + | Self::InternalServerError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
820 + | Self::InvalidDocument(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
821 + | Self::InvalidDocumentVersion(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
822 + | Self::InvalidInstanceId(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
823 + | Self::InvalidOutputLocation(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
824 + | Self::InvalidParameters(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
825 + | Self::InvalidSchedule(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
826 + | Self::InvalidTarget(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
827 + | Self::InvalidTargetMaps(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
828 + | Self::UnsupportedPlatformType(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
|
829 + | Self::Unhandled(e) => &e.meta,
|
830 + | }
|
831 + | }
|
832 + | /// Returns `true` if the error kind is `CreateAssociationBatchError::AssociationLimitExceeded`.
|
833 + | pub fn is_association_limit_exceeded(&self) -> bool {
|
834 + | matches!(self, Self::AssociationLimitExceeded(_))
|
835 + | }
|
836 + | /// Returns `true` if the error kind is `CreateAssociationBatchError::DuplicateInstanceId`.
|
837 + | pub fn is_duplicate_instance_id(&self) -> bool {
|
838 + | matches!(self, Self::DuplicateInstanceId(_))
|
839 + | }
|
840 + | /// Returns `true` if the error kind is `CreateAssociationBatchError::InternalServerError`.
|
841 + | pub fn is_internal_server_error(&self) -> bool {
|
842 + | matches!(self, Self::InternalServerError(_))
|
843 + | }
|
844 + | /// Returns `true` if the error kind is `CreateAssociationBatchError::InvalidDocument`.
|
845 + | pub fn is_invalid_document(&self) -> bool {
|
846 + | matches!(self, Self::InvalidDocument(_))
|
847 + | }
|
848 + | /// Returns `true` if the error kind is `CreateAssociationBatchError::InvalidDocumentVersion`.
|
849 + | pub fn is_invalid_document_version(&self) -> bool {
|
850 + | matches!(self, Self::InvalidDocumentVersion(_))
|
851 + | }
|
852 + | /// Returns `true` if the error kind is `CreateAssociationBatchError::InvalidInstanceId`.
|
853 + | pub fn is_invalid_instance_id(&self) -> bool {
|
854 + | matches!(self, Self::InvalidInstanceId(_))
|
855 + | }
|
856 + | /// Returns `true` if the error kind is `CreateAssociationBatchError::InvalidOutputLocation`.
|
857 + | pub fn is_invalid_output_location(&self) -> bool {
|
858 + | matches!(self, Self::InvalidOutputLocation(_))
|
859 + | }
|
860 + | /// Returns `true` if the error kind is `CreateAssociationBatchError::InvalidParameters`.
|
861 + | pub fn is_invalid_parameters(&self) -> bool {
|
862 + | matches!(self, Self::InvalidParameters(_))
|
863 + | }
|
864 + | /// Returns `true` if the error kind is `CreateAssociationBatchError::InvalidSchedule`.
|
865 + | pub fn is_invalid_schedule(&self) -> bool {
|
866 + | matches!(self, Self::InvalidSchedule(_))
|
867 + | }
|
868 + | /// Returns `true` if the error kind is `CreateAssociationBatchError::InvalidTarget`.
|
869 + | pub fn is_invalid_target(&self) -> bool {
|
870 + | matches!(self, Self::InvalidTarget(_))
|
871 + | }
|
872 + | /// Returns `true` if the error kind is `CreateAssociationBatchError::InvalidTargetMaps`.
|
873 + | pub fn is_invalid_target_maps(&self) -> bool {
|
874 + | matches!(self, Self::InvalidTargetMaps(_))
|
875 + | }
|
876 + | /// Returns `true` if the error kind is `CreateAssociationBatchError::UnsupportedPlatformType`.
|
877 + | pub fn is_unsupported_platform_type(&self) -> bool {
|
878 + | matches!(self, Self::UnsupportedPlatformType(_))
|
879 + | }
|
880 + | }
|
881 + | impl ::std::error::Error for CreateAssociationBatchError {
|
882 + | fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
883 + | match self {
|
884 + | Self::AssociationLimitExceeded(_inner) => ::std::option::Option::Some(_inner),
|
885 + | Self::DuplicateInstanceId(_inner) => ::std::option::Option::Some(_inner),
|
886 + | Self::InternalServerError(_inner) => ::std::option::Option::Some(_inner),
|
887 + | Self::InvalidDocument(_inner) => ::std::option::Option::Some(_inner),
|
888 + | Self::InvalidDocumentVersion(_inner) => ::std::option::Option::Some(_inner),
|
889 + | Self::InvalidInstanceId(_inner) => ::std::option::Option::Some(_inner),
|
890 + | Self::InvalidOutputLocation(_inner) => ::std::option::Option::Some(_inner),
|
891 + | Self::InvalidParameters(_inner) => ::std::option::Option::Some(_inner),
|
892 + | Self::InvalidSchedule(_inner) => ::std::option::Option::Some(_inner),
|
893 + | Self::InvalidTarget(_inner) => ::std::option::Option::Some(_inner),
|
894 + | Self::InvalidTargetMaps(_inner) => ::std::option::Option::Some(_inner),
|
895 + | Self::UnsupportedPlatformType(_inner) => ::std::option::Option::Some(_inner),
|
896 + | Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
|
897 + | }
|
898 + | }
|
899 + | }
|
900 + | impl ::std::fmt::Display for CreateAssociationBatchError {
|
901 + | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
902 + | match self {
|
903 + | Self::AssociationLimitExceeded(_inner) => _inner.fmt(f),
|
904 + | Self::DuplicateInstanceId(_inner) => _inner.fmt(f),
|
905 + | Self::InternalServerError(_inner) => _inner.fmt(f),
|
906 + | Self::InvalidDocument(_inner) => _inner.fmt(f),
|
907 + | Self::InvalidDocumentVersion(_inner) => _inner.fmt(f),
|
908 + | Self::InvalidInstanceId(_inner) => _inner.fmt(f),
|
909 + | Self::InvalidOutputLocation(_inner) => _inner.fmt(f),
|
910 + | Self::InvalidParameters(_inner) => _inner.fmt(f),
|
911 + | Self::InvalidSchedule(_inner) => _inner.fmt(f),
|
912 + | Self::InvalidTarget(_inner) => _inner.fmt(f),
|
913 + | Self::InvalidTargetMaps(_inner) => _inner.fmt(f),
|
914 + | Self::UnsupportedPlatformType(_inner) => _inner.fmt(f),
|
915 + | Self::Unhandled(_inner) => {
|
916 + | if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
|
917 + | write!(f, "unhandled error ({code})")
|
918 + | } else {
|
919 + | f.write_str("unhandled error")
|
920 + | }
|
921 + | }
|
922 + | }
|
923 + | }
|
924 + | }
|
925 + | impl ::aws_smithy_types::retry::ProvideErrorKind for CreateAssociationBatchError {
|
926 + | fn code(&self) -> ::std::option::Option<&str> {
|
927 + | ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
|
928 + | }
|
929 + | fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
|
930 + | ::std::option::Option::None
|
931 + | }
|
932 + | }
|
933 + | impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for CreateAssociationBatchError {
|
934 + | fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
935 + | match self {
|
936 + | Self::AssociationLimitExceeded(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
937 + | Self::DuplicateInstanceId(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
938 + | Self::InternalServerError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
939 + | Self::InvalidDocument(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
940 + | Self::InvalidDocumentVersion(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
941 + | Self::InvalidInstanceId(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
942 + | Self::InvalidOutputLocation(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
943 + | Self::InvalidParameters(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
944 + | Self::InvalidSchedule(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
945 + | Self::InvalidTarget(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
946 + | Self::InvalidTargetMaps(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
947 + | Self::UnsupportedPlatformType(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
|
948 + | Self::Unhandled(_inner) => &_inner.meta,
|
949 + | }
|
950 + | }
|
951 + | }
|
952 + | impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for CreateAssociationBatchError {
|
953 + | fn create_unhandled_error(
|
954 + | source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
|
955 + | meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
|
956 + | ) -> Self {
|
957 + | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
958 + | source,
|
959 + | meta: meta.unwrap_or_default(),
|
960 + | })
|
961 + | }
|
962 + | }
|
963 + | impl ::aws_types::request_id::RequestId for crate::operation::create_association_batch::CreateAssociationBatchError {
|
964 + | fn request_id(&self) -> Option<&str> {
|
965 + | self.meta().request_id()
|
966 + | }
|
967 + | }
|
968 + |
|
969 + | pub use crate::operation::create_association_batch::_create_association_batch_input::CreateAssociationBatchInput;
|
970 + |
|
971 + | pub use crate::operation::create_association_batch::_create_association_batch_output::CreateAssociationBatchOutput;
|
972 + |
|
973 + | mod _create_association_batch_input;
|
974 + |
|
975 + | mod _create_association_batch_output;
|
976 + |
|
977 + | /// Builders
|
978 + | pub mod builders;
|