1#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct CreateGlueIdentityCenterConfiguration;
6impl CreateGlueIdentityCenterConfiguration {
7 pub fn new() -> Self {
9 Self
10 }
11 pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> =
13 crate::operation::create_glue_identity_center_configuration::CreateGlueIdentityCenterConfigurationInput::SCHEMA;
14 pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> =
16 crate::operation::create_glue_identity_center_configuration::CreateGlueIdentityCenterConfigurationOutput::SCHEMA;
17 pub(crate) async fn orchestrate(
18 runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
19 input: crate::operation::create_glue_identity_center_configuration::CreateGlueIdentityCenterConfigurationInput,
20 ) -> ::std::result::Result<
21 crate::operation::create_glue_identity_center_configuration::CreateGlueIdentityCenterConfigurationOutput,
22 ::aws_smithy_runtime_api::client::result::SdkError<
23 crate::operation::create_glue_identity_center_configuration::CreateGlueIdentityCenterConfigurationError,
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_glue_identity_center_configuration::CreateGlueIdentityCenterConfigurationError>()
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_glue_identity_center_configuration::CreateGlueIdentityCenterConfigurationOutput>()
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_glue_identity_center_configuration::CreateGlueIdentityCenterConfigurationInput,
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(
61 "Glue",
62 "CreateGlueIdentityCenterConfiguration",
63 input,
64 runtime_plugins,
65 stop_point,
66 )
67 .instrument(::tracing::debug_span!(
70 "Glue.CreateGlueIdentityCenterConfiguration",
71 "rpc.service" = "Glue",
72 "rpc.method" = "CreateGlueIdentityCenterConfiguration",
73 "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
74 "rpc.system" = "aws-api",
75 ))
76 .await
77 }
78
79 pub(crate) fn operation_runtime_plugins(
80 client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
81 client_config: &crate::config::Config,
82 config_override: ::std::option::Option<crate::config::Builder>,
83 ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
84 let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
85
86 if let ::std::option::Option::Some(config_override) = config_override {
87 for plugin in config_override.runtime_plugins.iter().cloned() {
88 runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
89 }
90 runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
91 config_override,
92 client_config.config.clone(),
93 &client_config.runtime_components,
94 ));
95 }
96 runtime_plugins
97 }
98}
99pub(crate) mod error_registry {
108 pub(crate) static REGISTRY: ::std::sync::LazyLock<::aws_smithy_schema::registry::TypeRegistry> = ::std::sync::LazyLock::new(|| {
109 ::aws_smithy_schema::registry::TypeRegistry::builder()
110 .insert_error_shape(
111 crate::types::error::AccessDeniedException::SCHEMA,
112 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
113 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::AccessDeniedException::deserialize(d)?))
114 },
115 |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> {
116 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::AccessDeniedException::deserialize(d)?))
117 },
118 )
119.insert_error_shape(
120 crate::types::error::AlreadyExistsException::SCHEMA,
121 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
122 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::AlreadyExistsException::deserialize(d)?))
123 },
124 |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> {
125 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::AlreadyExistsException::deserialize(d)?))
126 },
127 )
128.insert_error_shape(
129 crate::types::error::ConcurrentModificationException::SCHEMA,
130 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
131 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::ConcurrentModificationException::deserialize(d)?))
132 },
133 |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> {
134 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::ConcurrentModificationException::deserialize(d)?))
135 },
136 )
137.insert_error_shape(
138 crate::types::error::InternalServiceException::SCHEMA,
139 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
140 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InternalServiceException::deserialize(d)?))
141 },
142 |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> {
143 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InternalServiceException::deserialize(d)?))
144 },
145 )
146.insert_error_shape(
147 crate::types::error::InvalidInputException::SCHEMA,
148 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
149 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InvalidInputException::deserialize(d)?))
150 },
151 |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> {
152 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InvalidInputException::deserialize(d)?))
153 },
154 )
155.insert_error_shape(
156 crate::types::error::OperationTimeoutException::SCHEMA,
157 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
158 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::OperationTimeoutException::deserialize(d)?))
159 },
160 |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> {
161 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::OperationTimeoutException::deserialize(d)?))
162 },
163 )
164 .build()
165 });
166}
167impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for CreateGlueIdentityCenterConfiguration {
168 fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
169 let mut cfg = ::aws_smithy_types::config_bag::Layer::new("CreateGlueIdentityCenterConfiguration");
170
171 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
172 CreateGlueIdentityCenterConfigurationRequestSerializer,
173 ));
174 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
175 CreateGlueIdentityCenterConfigurationResponseDeserializer,
176 ));
177
178 cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
179 crate::config::auth::Params::builder()
180 .operation_name("CreateGlueIdentityCenterConfiguration")
181 .build()
182 .expect("required fields set"),
183 ));
184
185 cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
186 "CreateGlueIdentityCenterConfiguration",
187 "Glue",
188 ));
189 let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
190 signing_options.double_uri_encode = true;
191 signing_options.content_sha256_header = false;
192 signing_options.normalize_uri_path = true;
193 signing_options.payload_override = None;
194
195 cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
196 signing_options,
197 ..::std::default::Default::default()
198 });
199
200 ::std::option::Option::Some(cfg.freeze())
201 }
202
203 fn runtime_components(
204 &self,
205 _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
206 ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
207 #[allow(unused_mut)]
208 let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("CreateGlueIdentityCenterConfiguration")
209 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
210 CreateGlueIdentityCenterConfigurationTelemetryInputCaptureInterceptor,
211 ))
212 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
213 ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
214 ))
215 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
216 CreateGlueIdentityCenterConfigurationEndpointParamsInterceptor,
217 ))
218 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
219 crate::operation::create_glue_identity_center_configuration::CreateGlueIdentityCenterConfigurationError,
220 >::new())
221 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
222 crate::operation::create_glue_identity_center_configuration::CreateGlueIdentityCenterConfigurationError,
223 >::new())
224 .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
225 crate::operation::create_glue_identity_center_configuration::CreateGlueIdentityCenterConfigurationError,
226 >::new())
227 .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
228 crate::operation::create_glue_identity_center_configuration::CreateGlueIdentityCenterConfigurationError,
229 >::new());
230
231 ::std::borrow::Cow::Owned(rcb)
232 }
233}
234
235#[derive(Debug)]
236struct CreateGlueIdentityCenterConfigurationTelemetryInputCaptureInterceptor;
237
238#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
239impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateGlueIdentityCenterConfigurationTelemetryInputCaptureInterceptor {
240 fn name(&self) -> &'static str {
241 "CreateGlueIdentityCenterConfigurationTelemetryInputCaptureInterceptor"
242 }
243
244 fn read_before_execution(
245 &self,
246 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
247 '_,
248 ::aws_smithy_runtime_api::client::interceptors::context::Input,
249 ::aws_smithy_runtime_api::client::interceptors::context::Output,
250 ::aws_smithy_runtime_api::client::interceptors::context::Error,
251 >,
252 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
253 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
254 let ::std::option::Option::Some(requested) = cfg
256 .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
257 .filter(|r| !r.is_empty())
258 else {
259 return ::std::result::Result::Ok(());
260 };
261
262 let ::std::option::Option::Some(input) = context.input().downcast_ref::<CreateGlueIdentityCenterConfigurationInput>() else {
263 return ::std::result::Result::Ok(());
265 };
266
267 let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
268 if requested.should_capture("InstanceArn") {
269 if let ::std::option::Option::Some(value) = input.instance_arn.as_deref() {
270 captured.insert("InstanceArn", value);
271 }
272 }
273
274 cfg.interceptor_state().store_put(captured);
275 ::std::result::Result::Ok(())
276 }
277}
278#[derive(Debug)]
279struct CreateGlueIdentityCenterConfigurationResponseDeserializer;
280impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateGlueIdentityCenterConfigurationResponseDeserializer {
281 fn deserialize_nonstreaming_with_config(
282 &self,
283 response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
284 _cfg: &::aws_smithy_types::config_bag::ConfigBag,
285 ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
286 let (success, status) = (response.status().is_success(), response.status().as_u16());
287 #[allow(unused_variables)]
292 let body = response.body().bytes().expect("body loaded");
293 let headers = response.headers();
294 #[allow(unused_mut)]
295 let mut force_error = false;
296 ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
297 if !success && status != 200 || force_error {
298 let protocol = _cfg
299 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
300 .expect("a SharedClientProtocol is required");
301 #[allow(unused_mut)]
302 let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
303 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
304 })?;
305 generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
306 let generic = generic_builder.build();
307 let error_code = match generic.code() {
308 ::std::option::Option::Some(code) => code,
309 ::std::option::Option::None => {
310 return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
311 ::aws_smithy_runtime_api::box_error::BoxError::from(
312 crate::operation::create_glue_identity_center_configuration::CreateGlueIdentityCenterConfigurationError::unhandled(
313 generic,
314 ),
315 ),
316 ))
317 }
318 };
319 let _error_message = generic.message().map(|msg| msg.to_owned());
320 let err = match error_code {
321"AccessDeniedException" => crate::operation::create_glue_identity_center_configuration::CreateGlueIdentityCenterConfigurationError::AccessDeniedException({
322let mut deser = protocol.deserialize_error_response(response, _cfg)
323 .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
324 let mut tmp = <crate::types::error::builders::AccessDeniedExceptionBuilder>::default();
325 tmp.deserialize_members(&mut *deser)
326 .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
327if tmp.message.is_none() {
328 tmp.message = _error_message;
329 }
330let tmp = tmp.meta(generic);
331tmp.build()
332}),
333"AlreadyExistsException" => crate::operation::create_glue_identity_center_configuration::CreateGlueIdentityCenterConfigurationError::AlreadyExistsException({
334let mut deser = protocol.deserialize_error_response(response, _cfg)
335 .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
336 let mut tmp = <crate::types::error::builders::AlreadyExistsExceptionBuilder>::default();
337 tmp.deserialize_members(&mut *deser)
338 .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
339if tmp.message.is_none() {
340 tmp.message = _error_message;
341 }
342let tmp = tmp.meta(generic);
343tmp.build()
344}),
345"ConcurrentModificationException" => crate::operation::create_glue_identity_center_configuration::CreateGlueIdentityCenterConfigurationError::ConcurrentModificationException({
346let mut deser = protocol.deserialize_error_response(response, _cfg)
347 .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
348 let mut tmp = <crate::types::error::builders::ConcurrentModificationExceptionBuilder>::default();
349 tmp.deserialize_members(&mut *deser)
350 .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
351if tmp.message.is_none() {
352 tmp.message = _error_message;
353 }
354let tmp = tmp.meta(generic);
355tmp.build()
356}),
357"InternalServiceException" => crate::operation::create_glue_identity_center_configuration::CreateGlueIdentityCenterConfigurationError::InternalServiceException({
358let mut deser = protocol.deserialize_error_response(response, _cfg)
359 .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
360 let mut tmp = <crate::types::error::builders::InternalServiceExceptionBuilder>::default();
361 tmp.deserialize_members(&mut *deser)
362 .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
363if tmp.message.is_none() {
364 tmp.message = _error_message;
365 }
366let tmp = tmp.meta(generic);
367tmp.build()
368}),
369"InvalidInputException" => crate::operation::create_glue_identity_center_configuration::CreateGlueIdentityCenterConfigurationError::InvalidInputException({
370let mut deser = protocol.deserialize_error_response(response, _cfg)
371 .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
372 let mut tmp = <crate::types::error::builders::InvalidInputExceptionBuilder>::default();
373 tmp.deserialize_members(&mut *deser)
374 .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
375if tmp.message.is_none() {
376 tmp.message = _error_message;
377 }
378let tmp = tmp.meta(generic);
379tmp.build()
380}),
381"OperationTimeoutException" => crate::operation::create_glue_identity_center_configuration::CreateGlueIdentityCenterConfigurationError::OperationTimeoutException({
382let mut deser = protocol.deserialize_error_response(response, _cfg)
383 .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
384 let mut tmp = <crate::types::error::builders::OperationTimeoutExceptionBuilder>::default();
385 tmp.deserialize_members(&mut *deser)
386 .map_err(|e| ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e)))?;
387if tmp.message.is_none() {
388 tmp.message = _error_message;
389 }
390let tmp = tmp.meta(generic);
391tmp.build()
392}),
393_ => {
394 match protocol
402 .deserialize_error_response(response, _cfg)
403 .ok()
404 .and_then(|mut deser| {
405 ::aws_smithy_schema::registry::reify_error(
406 crate::operation::create_glue_identity_center_configuration::error_registry::REGISTRY
407 .or(&crate::error_type_registry::REGISTRY),
408 error_code,
409 &mut *deser,
410 )
411 }) {
412 ::std::option::Option::Some(source) => <crate::operation::create_glue_identity_center_configuration::CreateGlueIdentityCenterConfigurationError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
413 ::std::option::Option::None => crate::operation::create_glue_identity_center_configuration::CreateGlueIdentityCenterConfigurationError::generic(generic),
414 }
415 }
416};
417 ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
418 ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
419 ))
420 } else {
421 let protocol = _cfg
422 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
423 .expect("a SharedClientProtocol is required");
424 let mut deser = protocol
425 .deserialize_response(response, CreateGlueIdentityCenterConfiguration::OUTPUT_SCHEMA, _cfg)
426 .map_err(|e| {
427 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
428 })?;
429 let _response_headers = headers;
433 #[allow(unused_mut)]
437 let mut output =
438 <crate::operation::create_glue_identity_center_configuration::builders::CreateGlueIdentityCenterConfigurationOutputBuilder>::default(
439 );
440 output.deserialize_members(&mut *deser).map_err(|e| {
441 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
442 })?;
443 output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
444 let output = output.build();
445 ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
446 }
447 }
448}
449#[derive(Debug)]
450struct CreateGlueIdentityCenterConfigurationRequestSerializer;
451impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateGlueIdentityCenterConfigurationRequestSerializer {
452 #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
453 fn serialize_input(
454 &self,
455 input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
456 _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
457 ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
458 let input = input
459 .downcast::<crate::operation::create_glue_identity_center_configuration::CreateGlueIdentityCenterConfigurationInput>()
460 .expect("correct type");
461
462 let protocol = _cfg
463 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
464 .expect("a SharedClientProtocol is required");
465 let mut request = protocol
466 .serialize_request(&input, CreateGlueIdentityCenterConfiguration::INPUT_SCHEMA, "/", _cfg)
467 .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
468
469 return ::std::result::Result::Ok(request);
470 }
471}
472#[derive(Debug)]
473struct CreateGlueIdentityCenterConfigurationEndpointParamsInterceptor;
474
475#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
476impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateGlueIdentityCenterConfigurationEndpointParamsInterceptor {
477 fn name(&self) -> &'static str {
478 "CreateGlueIdentityCenterConfigurationEndpointParamsInterceptor"
479 }
480
481 fn read_before_execution(
482 &self,
483 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
484 '_,
485 ::aws_smithy_runtime_api::client::interceptors::context::Input,
486 ::aws_smithy_runtime_api::client::interceptors::context::Output,
487 ::aws_smithy_runtime_api::client::interceptors::context::Error,
488 >,
489 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
490 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
491 let _input = context
492 .input()
493 .downcast_ref::<CreateGlueIdentityCenterConfigurationInput>()
494 .ok_or("failed to downcast to CreateGlueIdentityCenterConfigurationInput")?;
495
496 let params = crate::config::endpoint::Params::builder()
497 .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
498 .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
499 .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
500 .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
501 .build()
502 .map_err(|err| {
503 ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
504 })?;
505 cfg.interceptor_state()
506 .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
507 ::std::result::Result::Ok(())
508 }
509}
510
511#[non_exhaustive]
516#[derive(::std::fmt::Debug)]
517pub enum CreateGlueIdentityCenterConfigurationError {
518 AccessDeniedException(crate::types::error::AccessDeniedException),
520 AlreadyExistsException(crate::types::error::AlreadyExistsException),
522 ConcurrentModificationException(crate::types::error::ConcurrentModificationException),
524 InternalServiceException(crate::types::error::InternalServiceException),
526 InvalidInputException(crate::types::error::InvalidInputException),
528 OperationTimeoutException(crate::types::error::OperationTimeoutException),
530 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
532 variable wildcard pattern and check `.code()`:
533 \
534 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
535 \
536 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-CreateGlueIdentityCenterConfigurationError) for what information is available for the error.")]
537 Unhandled(crate::error::sealed_unhandled::Unhandled),
538}
539impl CreateGlueIdentityCenterConfigurationError {
540 pub fn unhandled(
542 err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
543 ) -> Self {
544 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
545 source: err.into(),
546 meta: ::std::default::Default::default(),
547 })
548 }
549
550 pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
552 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
553 source: err.clone().into(),
554 meta: err,
555 })
556 }
557 pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
562 match self {
563 Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
564 Self::AlreadyExistsException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
565 Self::ConcurrentModificationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
566 Self::InternalServiceException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
567 Self::InvalidInputException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
568 Self::OperationTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
569 Self::Unhandled(e) => &e.meta,
570 }
571 }
572 pub fn is_access_denied_exception(&self) -> bool {
574 matches!(self, Self::AccessDeniedException(_))
575 }
576 pub fn is_already_exists_exception(&self) -> bool {
578 matches!(self, Self::AlreadyExistsException(_))
579 }
580 pub fn is_concurrent_modification_exception(&self) -> bool {
582 matches!(self, Self::ConcurrentModificationException(_))
583 }
584 pub fn is_internal_service_exception(&self) -> bool {
586 matches!(self, Self::InternalServiceException(_))
587 }
588 pub fn is_invalid_input_exception(&self) -> bool {
590 matches!(self, Self::InvalidInputException(_))
591 }
592 pub fn is_operation_timeout_exception(&self) -> bool {
594 matches!(self, Self::OperationTimeoutException(_))
595 }
596}
597impl ::std::error::Error for CreateGlueIdentityCenterConfigurationError {
598 fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
599 match self {
600 Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner),
601 Self::AlreadyExistsException(_inner) => ::std::option::Option::Some(_inner),
602 Self::ConcurrentModificationException(_inner) => ::std::option::Option::Some(_inner),
603 Self::InternalServiceException(_inner) => ::std::option::Option::Some(_inner),
604 Self::InvalidInputException(_inner) => ::std::option::Option::Some(_inner),
605 Self::OperationTimeoutException(_inner) => ::std::option::Option::Some(_inner),
606 Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
607 }
608 }
609}
610impl ::std::fmt::Display for CreateGlueIdentityCenterConfigurationError {
611 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
612 match self {
613 Self::AccessDeniedException(_inner) => _inner.fmt(f),
614 Self::AlreadyExistsException(_inner) => _inner.fmt(f),
615 Self::ConcurrentModificationException(_inner) => _inner.fmt(f),
616 Self::InternalServiceException(_inner) => _inner.fmt(f),
617 Self::InvalidInputException(_inner) => _inner.fmt(f),
618 Self::OperationTimeoutException(_inner) => _inner.fmt(f),
619 Self::Unhandled(_inner) => {
620 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
621 write!(f, "unhandled error ({code})")
622 } else {
623 f.write_str("unhandled error")
624 }
625 }
626 }
627 }
628}
629impl ::aws_smithy_types::retry::ProvideErrorKind for CreateGlueIdentityCenterConfigurationError {
630 fn code(&self) -> ::std::option::Option<&str> {
631 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
632 }
633 fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
634 ::std::option::Option::None
635 }
636}
637impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for CreateGlueIdentityCenterConfigurationError {
638 fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
639 match self {
640 Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
641 Self::AlreadyExistsException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
642 Self::ConcurrentModificationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
643 Self::InternalServiceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
644 Self::InvalidInputException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
645 Self::OperationTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
646 Self::Unhandled(_inner) => &_inner.meta,
647 }
648 }
649}
650impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for CreateGlueIdentityCenterConfigurationError {
651 fn create_unhandled_error(
652 source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
653 meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
654 ) -> Self {
655 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
656 source,
657 meta: meta.unwrap_or_default(),
658 })
659 }
660}
661impl ::aws_types::request_id::RequestId for crate::operation::create_glue_identity_center_configuration::CreateGlueIdentityCenterConfigurationError {
662 fn request_id(&self) -> Option<&str> {
663 self.meta().request_id()
664 }
665}
666
667pub use crate::operation::create_glue_identity_center_configuration::_create_glue_identity_center_configuration_input::CreateGlueIdentityCenterConfigurationInput;
668
669pub use crate::operation::create_glue_identity_center_configuration::_create_glue_identity_center_configuration_output::CreateGlueIdentityCenterConfigurationOutput;
670
671mod _create_glue_identity_center_configuration_input;
672
673mod _create_glue_identity_center_configuration_output;
674
675pub mod builders;