1#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct UpdateCustomKeyStore;
6impl UpdateCustomKeyStore {
7 pub fn new() -> Self {
9 Self
10 }
11 pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> =
13 crate::operation::update_custom_key_store::UpdateCustomKeyStoreInput::SCHEMA;
14 pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> =
16 crate::operation::update_custom_key_store::UpdateCustomKeyStoreOutput::SCHEMA;
17 pub(crate) async fn orchestrate(
18 runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
19 input: crate::operation::update_custom_key_store::UpdateCustomKeyStoreInput,
20 ) -> ::std::result::Result<
21 crate::operation::update_custom_key_store::UpdateCustomKeyStoreOutput,
22 ::aws_smithy_runtime_api::client::result::SdkError<
23 crate::operation::update_custom_key_store::UpdateCustomKeyStoreError,
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::update_custom_key_store::UpdateCustomKeyStoreError>()
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::update_custom_key_store::UpdateCustomKeyStoreOutput>()
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::update_custom_key_store::UpdateCustomKeyStoreInput,
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("KMS", "UpdateCustomKeyStore", input, runtime_plugins, stop_point)
61 .instrument(::tracing::debug_span!(
64 "KMS.UpdateCustomKeyStore",
65 "rpc.service" = "KMS",
66 "rpc.method" = "UpdateCustomKeyStore",
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}
93pub(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::CloudHsmClusterInvalidConfigurationException::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::CloudHsmClusterInvalidConfigurationException::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::CloudHsmClusterInvalidConfigurationException::deserialize(d)?))
111 },
112 )
113.insert_error_shape(
114 crate::types::error::CloudHsmClusterNotActiveException::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::CloudHsmClusterNotActiveException::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::CloudHsmClusterNotActiveException::deserialize(d)?))
120 },
121 )
122.insert_error_shape(
123 crate::types::error::CloudHsmClusterNotFoundException::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::CloudHsmClusterNotFoundException::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::CloudHsmClusterNotFoundException::deserialize(d)?))
129 },
130 )
131.insert_error_shape(
132 crate::types::error::CloudHsmClusterNotRelatedException::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::CloudHsmClusterNotRelatedException::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::CloudHsmClusterNotRelatedException::deserialize(d)?))
138 },
139 )
140.insert_error_shape(
141 crate::types::error::CustomKeyStoreInvalidStateException::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::CustomKeyStoreInvalidStateException::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::CustomKeyStoreInvalidStateException::deserialize(d)?))
147 },
148 )
149.insert_error_shape(
150 crate::types::error::CustomKeyStoreNameInUseException::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::CustomKeyStoreNameInUseException::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::CustomKeyStoreNameInUseException::deserialize(d)?))
156 },
157 )
158.insert_error_shape(
159 crate::types::error::CustomKeyStoreNotFoundException::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::CustomKeyStoreNotFoundException::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::CustomKeyStoreNotFoundException::deserialize(d)?))
165 },
166 )
167.insert_error_shape(
168 crate::types::error::KmsInternalException::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::KmsInternalException::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::KmsInternalException::deserialize(d)?))
174 },
175 )
176.insert_error_shape(
177 crate::types::error::XksProxyIncorrectAuthenticationCredentialException::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::XksProxyIncorrectAuthenticationCredentialException::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::XksProxyIncorrectAuthenticationCredentialException::deserialize(d)?))
183 },
184 )
185.insert_error_shape(
186 crate::types::error::XksProxyInvalidConfigurationException::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::XksProxyInvalidConfigurationException::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::XksProxyInvalidConfigurationException::deserialize(d)?))
192 },
193 )
194.insert_error_shape(
195 crate::types::error::XksProxyInvalidResponseException::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::XksProxyInvalidResponseException::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::XksProxyInvalidResponseException::deserialize(d)?))
201 },
202 )
203.insert_error_shape(
204 crate::types::error::XksProxyUriEndpointInUseException::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::XksProxyUriEndpointInUseException::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::XksProxyUriEndpointInUseException::deserialize(d)?))
210 },
211 )
212.insert_error_shape(
213 crate::types::error::XksProxyUriInUseException::SCHEMA,
214 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
215 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::XksProxyUriInUseException::deserialize(d)?))
216 },
217 |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> {
218 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::XksProxyUriInUseException::deserialize(d)?))
219 },
220 )
221.insert_error_shape(
222 crate::types::error::XksProxyUriUnreachableException::SCHEMA,
223 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
224 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::XksProxyUriUnreachableException::deserialize(d)?))
225 },
226 |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> {
227 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::XksProxyUriUnreachableException::deserialize(d)?))
228 },
229 )
230.insert_error_shape(
231 crate::types::error::XksProxyVpcEndpointServiceInUseException::SCHEMA,
232 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
233 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::XksProxyVpcEndpointServiceInUseException::deserialize(d)?))
234 },
235 |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> {
236 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::XksProxyVpcEndpointServiceInUseException::deserialize(d)?))
237 },
238 )
239.insert_error_shape(
240 crate::types::error::XksProxyVpcEndpointServiceInvalidConfigurationException::SCHEMA,
241 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
242 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::XksProxyVpcEndpointServiceInvalidConfigurationException::deserialize(d)?))
243 },
244 |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> {
245 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::XksProxyVpcEndpointServiceInvalidConfigurationException::deserialize(d)?))
246 },
247 )
248.insert_error_shape(
249 crate::types::error::XksProxyVpcEndpointServiceNotFoundException::SCHEMA,
250 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
251 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::XksProxyVpcEndpointServiceNotFoundException::deserialize(d)?))
252 },
253 |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> {
254 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::XksProxyVpcEndpointServiceNotFoundException::deserialize(d)?))
255 },
256 )
257 .build()
258 });
259}
260impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for UpdateCustomKeyStore {
261 fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
262 let mut cfg = ::aws_smithy_types::config_bag::Layer::new("UpdateCustomKeyStore");
263
264 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
265 UpdateCustomKeyStoreRequestSerializer,
266 ));
267 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
268 UpdateCustomKeyStoreResponseDeserializer,
269 ));
270
271 cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
272 crate::config::auth::Params::builder()
273 .operation_name("UpdateCustomKeyStore")
274 .build()
275 .expect("required fields set"),
276 ));
277
278 cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
279 "UpdateCustomKeyStore",
280 "KMS",
281 ));
282 let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
283 signing_options.double_uri_encode = true;
284 signing_options.content_sha256_header = false;
285 signing_options.normalize_uri_path = true;
286 signing_options.payload_override = None;
287
288 cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
289 signing_options,
290 ..::std::default::Default::default()
291 });
292
293 ::std::option::Option::Some(cfg.freeze())
294 }
295
296 fn runtime_components(
297 &self,
298 _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
299 ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
300 #[allow(unused_mut)]
301 let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("UpdateCustomKeyStore")
302 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
303 UpdateCustomKeyStoreTelemetryInputCaptureInterceptor,
304 ))
305 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
306 ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
307 ))
308 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
309 UpdateCustomKeyStoreEndpointParamsInterceptor,
310 ))
311 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
312 crate::operation::update_custom_key_store::UpdateCustomKeyStoreError,
313 >::new())
314 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
315 crate::operation::update_custom_key_store::UpdateCustomKeyStoreError,
316 >::new())
317 .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
318 crate::operation::update_custom_key_store::UpdateCustomKeyStoreError,
319 >::new())
320 .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
321 crate::operation::update_custom_key_store::UpdateCustomKeyStoreError,
322 >::new());
323
324 ::std::borrow::Cow::Owned(rcb)
325 }
326}
327
328#[derive(Debug)]
329struct UpdateCustomKeyStoreTelemetryInputCaptureInterceptor;
330
331#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
332impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateCustomKeyStoreTelemetryInputCaptureInterceptor {
333 fn name(&self) -> &'static str {
334 "UpdateCustomKeyStoreTelemetryInputCaptureInterceptor"
335 }
336
337 fn read_before_execution(
338 &self,
339 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
340 '_,
341 ::aws_smithy_runtime_api::client::interceptors::context::Input,
342 ::aws_smithy_runtime_api::client::interceptors::context::Output,
343 ::aws_smithy_runtime_api::client::interceptors::context::Error,
344 >,
345 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
346 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
347 let ::std::option::Option::Some(requested) = cfg
349 .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
350 .filter(|r| !r.is_empty())
351 else {
352 return ::std::result::Result::Ok(());
353 };
354
355 let ::std::option::Option::Some(input) = context.input().downcast_ref::<UpdateCustomKeyStoreInput>() else {
356 return ::std::result::Result::Ok(());
358 };
359
360 let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
361 if requested.should_capture("CustomKeyStoreId") {
362 if let ::std::option::Option::Some(value) = input.custom_key_store_id.as_deref() {
363 captured.insert("CustomKeyStoreId", value);
364 }
365 }
366 if requested.should_capture("NewCustomKeyStoreName") {
367 if let ::std::option::Option::Some(value) = input.new_custom_key_store_name.as_deref() {
368 captured.insert("NewCustomKeyStoreName", value);
369 }
370 }
371 if requested.should_capture("CloudHsmClusterId") {
372 if let ::std::option::Option::Some(value) = input.cloud_hsm_cluster_id.as_deref() {
373 captured.insert("CloudHsmClusterId", value);
374 }
375 }
376 if requested.should_capture("XksProxyUriEndpoint") {
377 if let ::std::option::Option::Some(value) = input.xks_proxy_uri_endpoint.as_deref() {
378 captured.insert("XksProxyUriEndpoint", value);
379 }
380 }
381 if requested.should_capture("XksProxyUriPath") {
382 if let ::std::option::Option::Some(value) = input.xks_proxy_uri_path.as_deref() {
383 captured.insert("XksProxyUriPath", value);
384 }
385 }
386 if requested.should_capture("XksProxyVpcEndpointServiceName") {
387 if let ::std::option::Option::Some(value) = input.xks_proxy_vpc_endpoint_service_name.as_deref() {
388 captured.insert("XksProxyVpcEndpointServiceName", value);
389 }
390 }
391 if requested.should_capture("XksProxyVpcEndpointServiceOwner") {
392 if let ::std::option::Option::Some(value) = input.xks_proxy_vpc_endpoint_service_owner.as_deref() {
393 captured.insert("XksProxyVpcEndpointServiceOwner", value);
394 }
395 }
396
397 cfg.interceptor_state().store_put(captured);
398 ::std::result::Result::Ok(())
399 }
400}
401#[derive(Debug)]
402struct UpdateCustomKeyStoreResponseDeserializer;
403impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateCustomKeyStoreResponseDeserializer {
404 fn deserialize_nonstreaming_with_config(
405 &self,
406 response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
407 _cfg: &::aws_smithy_types::config_bag::ConfigBag,
408 ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
409 let (success, status) = (response.status().is_success(), response.status().as_u16());
410 #[allow(unused_variables)]
415 let body = response.body().bytes().expect("body loaded");
416 let headers = response.headers();
417 #[allow(unused_mut)]
418 let mut force_error = false;
419 ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
420 if !success && status != 200 || force_error {
421 let protocol = _cfg
422 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
423 .expect("a SharedClientProtocol is required");
424 #[allow(unused_mut)]
425 let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
426 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
427 })?;
428 generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
429 let generic = generic_builder.build();
430 let error_code = match generic.code() {
431 ::std::option::Option::Some(code) => code,
432 ::std::option::Option::None => {
433 return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
434 ::aws_smithy_runtime_api::box_error::BoxError::from(
435 crate::operation::update_custom_key_store::UpdateCustomKeyStoreError::unhandled(generic),
436 ),
437 ))
438 }
439 };
440 let _error_message = generic.message().map(|msg| msg.to_owned());
441 let err = match error_code {
442 "CloudHsmClusterInvalidConfigurationException" => {
443 crate::operation::update_custom_key_store::UpdateCustomKeyStoreError::CloudHsmClusterInvalidConfigurationException({
444 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
445 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
446 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
447 )
448 })?;
449 let mut tmp = <crate::types::error::builders::CloudHsmClusterInvalidConfigurationExceptionBuilder>::default();
450 tmp.deserialize_members(&mut *deser).map_err(|e| {
451 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
452 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
453 )
454 })?;
455 if tmp.message.is_none() {
456 tmp.message = _error_message;
457 }
458 let tmp = tmp.meta(generic);
459 tmp.build()
460 })
461 }
462 "CloudHsmClusterNotActiveException" => {
463 crate::operation::update_custom_key_store::UpdateCustomKeyStoreError::CloudHsmClusterNotActiveException({
464 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
465 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
466 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
467 )
468 })?;
469 let mut tmp = <crate::types::error::builders::CloudHsmClusterNotActiveExceptionBuilder>::default();
470 tmp.deserialize_members(&mut *deser).map_err(|e| {
471 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
472 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
473 )
474 })?;
475 if tmp.message.is_none() {
476 tmp.message = _error_message;
477 }
478 let tmp = tmp.meta(generic);
479 tmp.build()
480 })
481 }
482 "CloudHsmClusterNotFoundException" => {
483 crate::operation::update_custom_key_store::UpdateCustomKeyStoreError::CloudHsmClusterNotFoundException({
484 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
485 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
486 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
487 )
488 })?;
489 let mut tmp = <crate::types::error::builders::CloudHsmClusterNotFoundExceptionBuilder>::default();
490 tmp.deserialize_members(&mut *deser).map_err(|e| {
491 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
492 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
493 )
494 })?;
495 if tmp.message.is_none() {
496 tmp.message = _error_message;
497 }
498 let tmp = tmp.meta(generic);
499 tmp.build()
500 })
501 }
502 "CloudHsmClusterNotRelatedException" => {
503 crate::operation::update_custom_key_store::UpdateCustomKeyStoreError::CloudHsmClusterNotRelatedException({
504 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
505 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
506 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
507 )
508 })?;
509 let mut tmp = <crate::types::error::builders::CloudHsmClusterNotRelatedExceptionBuilder>::default();
510 tmp.deserialize_members(&mut *deser).map_err(|e| {
511 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
512 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
513 )
514 })?;
515 if tmp.message.is_none() {
516 tmp.message = _error_message;
517 }
518 let tmp = tmp.meta(generic);
519 tmp.build()
520 })
521 }
522 "CustomKeyStoreInvalidStateException" => {
523 crate::operation::update_custom_key_store::UpdateCustomKeyStoreError::CustomKeyStoreInvalidStateException({
524 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
525 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
526 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
527 )
528 })?;
529 let mut tmp = <crate::types::error::builders::CustomKeyStoreInvalidStateExceptionBuilder>::default();
530 tmp.deserialize_members(&mut *deser).map_err(|e| {
531 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
532 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
533 )
534 })?;
535 if tmp.message.is_none() {
536 tmp.message = _error_message;
537 }
538 let tmp = tmp.meta(generic);
539 tmp.build()
540 })
541 }
542 "CustomKeyStoreNameInUseException" => {
543 crate::operation::update_custom_key_store::UpdateCustomKeyStoreError::CustomKeyStoreNameInUseException({
544 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
545 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
546 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
547 )
548 })?;
549 let mut tmp = <crate::types::error::builders::CustomKeyStoreNameInUseExceptionBuilder>::default();
550 tmp.deserialize_members(&mut *deser).map_err(|e| {
551 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
552 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
553 )
554 })?;
555 if tmp.message.is_none() {
556 tmp.message = _error_message;
557 }
558 let tmp = tmp.meta(generic);
559 tmp.build()
560 })
561 }
562 "CustomKeyStoreNotFoundException" => {
563 crate::operation::update_custom_key_store::UpdateCustomKeyStoreError::CustomKeyStoreNotFoundException({
564 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
565 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
566 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
567 )
568 })?;
569 let mut tmp = <crate::types::error::builders::CustomKeyStoreNotFoundExceptionBuilder>::default();
570 tmp.deserialize_members(&mut *deser).map_err(|e| {
571 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
572 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
573 )
574 })?;
575 if tmp.message.is_none() {
576 tmp.message = _error_message;
577 }
578 let tmp = tmp.meta(generic);
579 tmp.build()
580 })
581 }
582 "KMSInternalException" => crate::operation::update_custom_key_store::UpdateCustomKeyStoreError::KmsInternalException({
583 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
584 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
585 e,
586 ))
587 })?;
588 let mut tmp = <crate::types::error::builders::KmsInternalExceptionBuilder>::default();
589 tmp.deserialize_members(&mut *deser).map_err(|e| {
590 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
591 e,
592 ))
593 })?;
594 if tmp.message.is_none() {
595 tmp.message = _error_message;
596 }
597 let tmp = tmp.meta(generic);
598 tmp.build()
599 }),
600 "XksProxyIncorrectAuthenticationCredentialException" => {
601 crate::operation::update_custom_key_store::UpdateCustomKeyStoreError::XksProxyIncorrectAuthenticationCredentialException({
602 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
603 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
604 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
605 )
606 })?;
607 let mut tmp = <crate::types::error::builders::XksProxyIncorrectAuthenticationCredentialExceptionBuilder>::default();
608 tmp.deserialize_members(&mut *deser).map_err(|e| {
609 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
610 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
611 )
612 })?;
613 if tmp.message.is_none() {
614 tmp.message = _error_message;
615 }
616 let tmp = tmp.meta(generic);
617 tmp.build()
618 })
619 }
620 "XksProxyInvalidConfigurationException" => {
621 crate::operation::update_custom_key_store::UpdateCustomKeyStoreError::XksProxyInvalidConfigurationException({
622 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
623 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
624 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
625 )
626 })?;
627 let mut tmp = <crate::types::error::builders::XksProxyInvalidConfigurationExceptionBuilder>::default();
628 tmp.deserialize_members(&mut *deser).map_err(|e| {
629 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
630 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
631 )
632 })?;
633 if tmp.message.is_none() {
634 tmp.message = _error_message;
635 }
636 let tmp = tmp.meta(generic);
637 tmp.build()
638 })
639 }
640 "XksProxyInvalidResponseException" => {
641 crate::operation::update_custom_key_store::UpdateCustomKeyStoreError::XksProxyInvalidResponseException({
642 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
643 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
644 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
645 )
646 })?;
647 let mut tmp = <crate::types::error::builders::XksProxyInvalidResponseExceptionBuilder>::default();
648 tmp.deserialize_members(&mut *deser).map_err(|e| {
649 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
650 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
651 )
652 })?;
653 if tmp.message.is_none() {
654 tmp.message = _error_message;
655 }
656 let tmp = tmp.meta(generic);
657 tmp.build()
658 })
659 }
660 "XksProxyUriEndpointInUseException" => {
661 crate::operation::update_custom_key_store::UpdateCustomKeyStoreError::XksProxyUriEndpointInUseException({
662 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
663 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
664 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
665 )
666 })?;
667 let mut tmp = <crate::types::error::builders::XksProxyUriEndpointInUseExceptionBuilder>::default();
668 tmp.deserialize_members(&mut *deser).map_err(|e| {
669 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
670 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
671 )
672 })?;
673 if tmp.message.is_none() {
674 tmp.message = _error_message;
675 }
676 let tmp = tmp.meta(generic);
677 tmp.build()
678 })
679 }
680 "XksProxyUriInUseException" => crate::operation::update_custom_key_store::UpdateCustomKeyStoreError::XksProxyUriInUseException({
681 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
682 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
683 e,
684 ))
685 })?;
686 let mut tmp = <crate::types::error::builders::XksProxyUriInUseExceptionBuilder>::default();
687 tmp.deserialize_members(&mut *deser).map_err(|e| {
688 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
689 e,
690 ))
691 })?;
692 if tmp.message.is_none() {
693 tmp.message = _error_message;
694 }
695 let tmp = tmp.meta(generic);
696 tmp.build()
697 }),
698 "XksProxyUriUnreachableException" => {
699 crate::operation::update_custom_key_store::UpdateCustomKeyStoreError::XksProxyUriUnreachableException({
700 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
701 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
702 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
703 )
704 })?;
705 let mut tmp = <crate::types::error::builders::XksProxyUriUnreachableExceptionBuilder>::default();
706 tmp.deserialize_members(&mut *deser).map_err(|e| {
707 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
708 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
709 )
710 })?;
711 if tmp.message.is_none() {
712 tmp.message = _error_message;
713 }
714 let tmp = tmp.meta(generic);
715 tmp.build()
716 })
717 }
718 "XksProxyVpcEndpointServiceInUseException" => {
719 crate::operation::update_custom_key_store::UpdateCustomKeyStoreError::XksProxyVpcEndpointServiceInUseException({
720 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
721 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
722 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
723 )
724 })?;
725 let mut tmp = <crate::types::error::builders::XksProxyVpcEndpointServiceInUseExceptionBuilder>::default();
726 tmp.deserialize_members(&mut *deser).map_err(|e| {
727 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
728 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
729 )
730 })?;
731 if tmp.message.is_none() {
732 tmp.message = _error_message;
733 }
734 let tmp = tmp.meta(generic);
735 tmp.build()
736 })
737 }
738 "XksProxyVpcEndpointServiceInvalidConfigurationException" => {
739 crate::operation::update_custom_key_store::UpdateCustomKeyStoreError::XksProxyVpcEndpointServiceInvalidConfigurationException({
740 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
741 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
742 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
743 )
744 })?;
745 let mut tmp = <crate::types::error::builders::XksProxyVpcEndpointServiceInvalidConfigurationExceptionBuilder>::default();
746 tmp.deserialize_members(&mut *deser).map_err(|e| {
747 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
748 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
749 )
750 })?;
751 if tmp.message.is_none() {
752 tmp.message = _error_message;
753 }
754 let tmp = tmp.meta(generic);
755 tmp.build()
756 })
757 }
758 "XksProxyVpcEndpointServiceNotFoundException" => {
759 crate::operation::update_custom_key_store::UpdateCustomKeyStoreError::XksProxyVpcEndpointServiceNotFoundException({
760 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
761 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
762 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
763 )
764 })?;
765 let mut tmp = <crate::types::error::builders::XksProxyVpcEndpointServiceNotFoundExceptionBuilder>::default();
766 tmp.deserialize_members(&mut *deser).map_err(|e| {
767 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
768 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
769 )
770 })?;
771 if tmp.message.is_none() {
772 tmp.message = _error_message;
773 }
774 let tmp = tmp.meta(generic);
775 tmp.build()
776 })
777 }
778 _ => {
779 match protocol
787 .deserialize_error_response(response, _cfg)
788 .ok()
789 .and_then(|mut deser| {
790 ::aws_smithy_schema::registry::reify_error(
791 crate::operation::update_custom_key_store::error_registry::REGISTRY
792 .or(&crate::error_type_registry::REGISTRY),
793 error_code,
794 &mut *deser,
795 )
796 }) {
797 ::std::option::Option::Some(source) => <crate::operation::update_custom_key_store::UpdateCustomKeyStoreError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
798 ::std::option::Option::None => crate::operation::update_custom_key_store::UpdateCustomKeyStoreError::generic(generic),
799 }
800 }
801 };
802 ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
803 ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
804 ))
805 } else {
806 let protocol = _cfg
807 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
808 .expect("a SharedClientProtocol is required");
809 let mut deser = protocol
810 .deserialize_response(response, UpdateCustomKeyStore::OUTPUT_SCHEMA, _cfg)
811 .map_err(|e| {
812 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
813 })?;
814 let _response_headers = headers;
818 #[allow(unused_mut)]
822 let mut output = <crate::operation::update_custom_key_store::builders::UpdateCustomKeyStoreOutputBuilder>::default();
823 output.deserialize_members(&mut *deser).map_err(|e| {
824 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
825 })?;
826 output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
827 let output = output.build();
828 ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
829 }
830 }
831}
832#[derive(Debug)]
833struct UpdateCustomKeyStoreRequestSerializer;
834impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateCustomKeyStoreRequestSerializer {
835 #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
836 fn serialize_input(
837 &self,
838 input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
839 _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
840 ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
841 let input = input
842 .downcast::<crate::operation::update_custom_key_store::UpdateCustomKeyStoreInput>()
843 .expect("correct type");
844
845 let protocol = _cfg
846 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
847 .expect("a SharedClientProtocol is required");
848 let mut request = protocol
849 .serialize_request(&input, UpdateCustomKeyStore::INPUT_SCHEMA, "/", _cfg)
850 .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
851
852 return ::std::result::Result::Ok(request);
853 }
854}
855#[derive(Debug)]
856struct UpdateCustomKeyStoreEndpointParamsInterceptor;
857
858#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
859impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateCustomKeyStoreEndpointParamsInterceptor {
860 fn name(&self) -> &'static str {
861 "UpdateCustomKeyStoreEndpointParamsInterceptor"
862 }
863
864 fn read_before_execution(
865 &self,
866 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
867 '_,
868 ::aws_smithy_runtime_api::client::interceptors::context::Input,
869 ::aws_smithy_runtime_api::client::interceptors::context::Output,
870 ::aws_smithy_runtime_api::client::interceptors::context::Error,
871 >,
872 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
873 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
874 let _input = context
875 .input()
876 .downcast_ref::<UpdateCustomKeyStoreInput>()
877 .ok_or("failed to downcast to UpdateCustomKeyStoreInput")?;
878
879 let params = crate::config::endpoint::Params::builder()
880 .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
881 .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
882 .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
883 .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
884 .build()
885 .map_err(|err| {
886 ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
887 })?;
888 cfg.interceptor_state()
889 .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
890 ::std::result::Result::Ok(())
891 }
892}
893
894#[non_exhaustive]
899#[derive(::std::fmt::Debug)]
900pub enum UpdateCustomKeyStoreError {
901 CloudHsmClusterInvalidConfigurationException(crate::types::error::CloudHsmClusterInvalidConfigurationException),
913 CloudHsmClusterNotActiveException(crate::types::error::CloudHsmClusterNotActiveException),
915 CloudHsmClusterNotFoundException(crate::types::error::CloudHsmClusterNotFoundException),
917 CloudHsmClusterNotRelatedException(crate::types::error::CloudHsmClusterNotRelatedException),
921 CustomKeyStoreInvalidStateException(crate::types::error::CustomKeyStoreInvalidStateException),
936 CustomKeyStoreNameInUseException(crate::types::error::CustomKeyStoreNameInUseException),
938 CustomKeyStoreNotFoundException(crate::types::error::CustomKeyStoreNotFoundException),
940 KmsInternalException(crate::types::error::KmsInternalException),
942 XksProxyIncorrectAuthenticationCredentialException(crate::types::error::XksProxyIncorrectAuthenticationCredentialException),
944 XksProxyInvalidConfigurationException(crate::types::error::XksProxyInvalidConfigurationException),
946 XksProxyInvalidResponseException(crate::types::error::XksProxyInvalidResponseException),
949 XksProxyUriEndpointInUseException(crate::types::error::XksProxyUriEndpointInUseException),
951 XksProxyUriInUseException(crate::types::error::XksProxyUriInUseException),
953 XksProxyUriUnreachableException(crate::types::error::XksProxyUriUnreachableException),
956 XksProxyVpcEndpointServiceInUseException(crate::types::error::XksProxyVpcEndpointServiceInUseException),
958 XksProxyVpcEndpointServiceInvalidConfigurationException(crate::types::error::XksProxyVpcEndpointServiceInvalidConfigurationException),
960 XksProxyVpcEndpointServiceNotFoundException(crate::types::error::XksProxyVpcEndpointServiceNotFoundException),
962 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
964 variable wildcard pattern and check `.code()`:
965 \
966 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
967 \
968 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-UpdateCustomKeyStoreError) for what information is available for the error.")]
969 Unhandled(crate::error::sealed_unhandled::Unhandled),
970}
971impl UpdateCustomKeyStoreError {
972 pub fn unhandled(
974 err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
975 ) -> Self {
976 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
977 source: err.into(),
978 meta: ::std::default::Default::default(),
979 })
980 }
981
982 pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
984 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
985 source: err.clone().into(),
986 meta: err,
987 })
988 }
989 pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
994 match self {
995 Self::CloudHsmClusterInvalidConfigurationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
996 Self::CloudHsmClusterNotActiveException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
997 Self::CloudHsmClusterNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
998 Self::CloudHsmClusterNotRelatedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
999 Self::CustomKeyStoreInvalidStateException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
1000 Self::CustomKeyStoreNameInUseException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
1001 Self::CustomKeyStoreNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
1002 Self::KmsInternalException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
1003 Self::XksProxyIncorrectAuthenticationCredentialException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
1004 Self::XksProxyInvalidConfigurationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
1005 Self::XksProxyInvalidResponseException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
1006 Self::XksProxyUriEndpointInUseException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
1007 Self::XksProxyUriInUseException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
1008 Self::XksProxyUriUnreachableException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
1009 Self::XksProxyVpcEndpointServiceInUseException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
1010 Self::XksProxyVpcEndpointServiceInvalidConfigurationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
1011 Self::XksProxyVpcEndpointServiceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
1012 Self::Unhandled(e) => &e.meta,
1013 }
1014 }
1015 pub fn is_cloud_hsm_cluster_invalid_configuration_exception(&self) -> bool {
1017 matches!(self, Self::CloudHsmClusterInvalidConfigurationException(_))
1018 }
1019 pub fn is_cloud_hsm_cluster_not_active_exception(&self) -> bool {
1021 matches!(self, Self::CloudHsmClusterNotActiveException(_))
1022 }
1023 pub fn is_cloud_hsm_cluster_not_found_exception(&self) -> bool {
1025 matches!(self, Self::CloudHsmClusterNotFoundException(_))
1026 }
1027 pub fn is_cloud_hsm_cluster_not_related_exception(&self) -> bool {
1029 matches!(self, Self::CloudHsmClusterNotRelatedException(_))
1030 }
1031 pub fn is_custom_key_store_invalid_state_exception(&self) -> bool {
1033 matches!(self, Self::CustomKeyStoreInvalidStateException(_))
1034 }
1035 pub fn is_custom_key_store_name_in_use_exception(&self) -> bool {
1037 matches!(self, Self::CustomKeyStoreNameInUseException(_))
1038 }
1039 pub fn is_custom_key_store_not_found_exception(&self) -> bool {
1041 matches!(self, Self::CustomKeyStoreNotFoundException(_))
1042 }
1043 pub fn is_kms_internal_exception(&self) -> bool {
1045 matches!(self, Self::KmsInternalException(_))
1046 }
1047 pub fn is_xks_proxy_incorrect_authentication_credential_exception(&self) -> bool {
1049 matches!(self, Self::XksProxyIncorrectAuthenticationCredentialException(_))
1050 }
1051 pub fn is_xks_proxy_invalid_configuration_exception(&self) -> bool {
1053 matches!(self, Self::XksProxyInvalidConfigurationException(_))
1054 }
1055 pub fn is_xks_proxy_invalid_response_exception(&self) -> bool {
1057 matches!(self, Self::XksProxyInvalidResponseException(_))
1058 }
1059 pub fn is_xks_proxy_uri_endpoint_in_use_exception(&self) -> bool {
1061 matches!(self, Self::XksProxyUriEndpointInUseException(_))
1062 }
1063 pub fn is_xks_proxy_uri_in_use_exception(&self) -> bool {
1065 matches!(self, Self::XksProxyUriInUseException(_))
1066 }
1067 pub fn is_xks_proxy_uri_unreachable_exception(&self) -> bool {
1069 matches!(self, Self::XksProxyUriUnreachableException(_))
1070 }
1071 pub fn is_xks_proxy_vpc_endpoint_service_in_use_exception(&self) -> bool {
1073 matches!(self, Self::XksProxyVpcEndpointServiceInUseException(_))
1074 }
1075 pub fn is_xks_proxy_vpc_endpoint_service_invalid_configuration_exception(&self) -> bool {
1077 matches!(self, Self::XksProxyVpcEndpointServiceInvalidConfigurationException(_))
1078 }
1079 pub fn is_xks_proxy_vpc_endpoint_service_not_found_exception(&self) -> bool {
1081 matches!(self, Self::XksProxyVpcEndpointServiceNotFoundException(_))
1082 }
1083}
1084impl ::std::error::Error for UpdateCustomKeyStoreError {
1085 fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
1086 match self {
1087 Self::CloudHsmClusterInvalidConfigurationException(_inner) => ::std::option::Option::Some(_inner),
1088 Self::CloudHsmClusterNotActiveException(_inner) => ::std::option::Option::Some(_inner),
1089 Self::CloudHsmClusterNotFoundException(_inner) => ::std::option::Option::Some(_inner),
1090 Self::CloudHsmClusterNotRelatedException(_inner) => ::std::option::Option::Some(_inner),
1091 Self::CustomKeyStoreInvalidStateException(_inner) => ::std::option::Option::Some(_inner),
1092 Self::CustomKeyStoreNameInUseException(_inner) => ::std::option::Option::Some(_inner),
1093 Self::CustomKeyStoreNotFoundException(_inner) => ::std::option::Option::Some(_inner),
1094 Self::KmsInternalException(_inner) => ::std::option::Option::Some(_inner),
1095 Self::XksProxyIncorrectAuthenticationCredentialException(_inner) => ::std::option::Option::Some(_inner),
1096 Self::XksProxyInvalidConfigurationException(_inner) => ::std::option::Option::Some(_inner),
1097 Self::XksProxyInvalidResponseException(_inner) => ::std::option::Option::Some(_inner),
1098 Self::XksProxyUriEndpointInUseException(_inner) => ::std::option::Option::Some(_inner),
1099 Self::XksProxyUriInUseException(_inner) => ::std::option::Option::Some(_inner),
1100 Self::XksProxyUriUnreachableException(_inner) => ::std::option::Option::Some(_inner),
1101 Self::XksProxyVpcEndpointServiceInUseException(_inner) => ::std::option::Option::Some(_inner),
1102 Self::XksProxyVpcEndpointServiceInvalidConfigurationException(_inner) => ::std::option::Option::Some(_inner),
1103 Self::XksProxyVpcEndpointServiceNotFoundException(_inner) => ::std::option::Option::Some(_inner),
1104 Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
1105 }
1106 }
1107}
1108impl ::std::fmt::Display for UpdateCustomKeyStoreError {
1109 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1110 match self {
1111 Self::CloudHsmClusterInvalidConfigurationException(_inner) => _inner.fmt(f),
1112 Self::CloudHsmClusterNotActiveException(_inner) => _inner.fmt(f),
1113 Self::CloudHsmClusterNotFoundException(_inner) => _inner.fmt(f),
1114 Self::CloudHsmClusterNotRelatedException(_inner) => _inner.fmt(f),
1115 Self::CustomKeyStoreInvalidStateException(_inner) => _inner.fmt(f),
1116 Self::CustomKeyStoreNameInUseException(_inner) => _inner.fmt(f),
1117 Self::CustomKeyStoreNotFoundException(_inner) => _inner.fmt(f),
1118 Self::KmsInternalException(_inner) => _inner.fmt(f),
1119 Self::XksProxyIncorrectAuthenticationCredentialException(_inner) => _inner.fmt(f),
1120 Self::XksProxyInvalidConfigurationException(_inner) => _inner.fmt(f),
1121 Self::XksProxyInvalidResponseException(_inner) => _inner.fmt(f),
1122 Self::XksProxyUriEndpointInUseException(_inner) => _inner.fmt(f),
1123 Self::XksProxyUriInUseException(_inner) => _inner.fmt(f),
1124 Self::XksProxyUriUnreachableException(_inner) => _inner.fmt(f),
1125 Self::XksProxyVpcEndpointServiceInUseException(_inner) => _inner.fmt(f),
1126 Self::XksProxyVpcEndpointServiceInvalidConfigurationException(_inner) => _inner.fmt(f),
1127 Self::XksProxyVpcEndpointServiceNotFoundException(_inner) => _inner.fmt(f),
1128 Self::Unhandled(_inner) => {
1129 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
1130 write!(f, "unhandled error ({code})")
1131 } else {
1132 f.write_str("unhandled error")
1133 }
1134 }
1135 }
1136 }
1137}
1138impl ::aws_smithy_types::retry::ProvideErrorKind for UpdateCustomKeyStoreError {
1139 fn code(&self) -> ::std::option::Option<&str> {
1140 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
1141 }
1142 fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
1143 ::std::option::Option::None
1144 }
1145}
1146impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for UpdateCustomKeyStoreError {
1147 fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
1148 match self {
1149 Self::CloudHsmClusterInvalidConfigurationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1150 Self::CloudHsmClusterNotActiveException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1151 Self::CloudHsmClusterNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1152 Self::CloudHsmClusterNotRelatedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1153 Self::CustomKeyStoreInvalidStateException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1154 Self::CustomKeyStoreNameInUseException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1155 Self::CustomKeyStoreNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1156 Self::KmsInternalException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1157 Self::XksProxyIncorrectAuthenticationCredentialException(_inner) => {
1158 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
1159 }
1160 Self::XksProxyInvalidConfigurationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1161 Self::XksProxyInvalidResponseException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1162 Self::XksProxyUriEndpointInUseException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1163 Self::XksProxyUriInUseException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1164 Self::XksProxyUriUnreachableException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1165 Self::XksProxyVpcEndpointServiceInUseException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1166 Self::XksProxyVpcEndpointServiceInvalidConfigurationException(_inner) => {
1167 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
1168 }
1169 Self::XksProxyVpcEndpointServiceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1170 Self::Unhandled(_inner) => &_inner.meta,
1171 }
1172 }
1173}
1174impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UpdateCustomKeyStoreError {
1175 fn create_unhandled_error(
1176 source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
1177 meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
1178 ) -> Self {
1179 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
1180 source,
1181 meta: meta.unwrap_or_default(),
1182 })
1183 }
1184}
1185impl ::aws_types::request_id::RequestId for crate::operation::update_custom_key_store::UpdateCustomKeyStoreError {
1186 fn request_id(&self) -> Option<&str> {
1187 self.meta().request_id()
1188 }
1189}
1190
1191pub use crate::operation::update_custom_key_store::_update_custom_key_store_input::UpdateCustomKeyStoreInput;
1192
1193pub use crate::operation::update_custom_key_store::_update_custom_key_store_output::UpdateCustomKeyStoreOutput;
1194
1195mod _update_custom_key_store_input;
1196
1197mod _update_custom_key_store_output;
1198
1199pub mod builders;