1#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct DeleteResource;
6impl DeleteResource {
7 pub fn new() -> Self {
9 Self
10 }
11 pub(crate) async fn orchestrate(
12 runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
13 input: crate::operation::delete_resource::DeleteResourceInput,
14 ) -> ::std::result::Result<
15 crate::operation::delete_resource::DeleteResourceOutput,
16 ::aws_smithy_runtime_api::client::result::SdkError<
17 crate::operation::delete_resource::DeleteResourceError,
18 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
19 >,
20 > {
21 let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError<
22 ::aws_smithy_runtime_api::client::interceptors::context::Error,
23 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
24 >| {
25 err.map_service_error(|err| {
26 err.downcast::<crate::operation::delete_resource::DeleteResourceError>()
27 .expect("correct error type")
28 })
29 };
30 let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
31 .await
32 .map_err(map_err)?;
33 let output = context.finalize().map_err(map_err)?;
34 ::std::result::Result::Ok(
35 output
36 .downcast::<crate::operation::delete_resource::DeleteResourceOutput>()
37 .expect("correct output type"),
38 )
39 }
40
41 pub(crate) async fn orchestrate_with_stop_point(
42 runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
43 input: crate::operation::delete_resource::DeleteResourceInput,
44 stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
45 ) -> ::std::result::Result<
46 ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
47 ::aws_smithy_runtime_api::client::result::SdkError<
48 ::aws_smithy_runtime_api::client::interceptors::context::Error,
49 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
50 >,
51 > {
52 let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
53 use ::tracing::Instrument;
54 ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("CloudControl", "DeleteResource", input, runtime_plugins, stop_point)
55 .instrument(::tracing::debug_span!(
58 "CloudControl.DeleteResource",
59 "rpc.service" = "CloudControl",
60 "rpc.method" = "DeleteResource",
61 "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
62 "rpc.system" = "aws-api",
63 ))
64 .await
65 }
66
67 pub(crate) fn operation_runtime_plugins(
68 client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
69 client_config: &crate::config::Config,
70 config_override: ::std::option::Option<crate::config::Builder>,
71 ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
72 let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
73 runtime_plugins = runtime_plugins
74 .with_operation_plugin(crate::client_idempotency_token::IdempotencyTokenRuntimePlugin::new(
75 |token_provider, input| {
76 let input: &mut crate::operation::delete_resource::DeleteResourceInput = input.downcast_mut().expect("correct type");
77 if input.client_token.is_none() {
78 input.client_token = ::std::option::Option::Some(token_provider.make_idempotency_token());
79 }
80 },
81 ))
82 .with_client_plugin(crate::auth_plugin::DefaultAuthOptionsPlugin::new(vec![
83 ::aws_runtime::auth::sigv4::SCHEME_ID,
84 ]));
85 if let ::std::option::Option::Some(config_override) = config_override {
86 for plugin in config_override.runtime_plugins.iter().cloned() {
87 runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
88 }
89 runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
90 config_override,
91 client_config.config.clone(),
92 &client_config.runtime_components,
93 ));
94 }
95 runtime_plugins
96 }
97}
98impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for DeleteResource {
99 fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
100 let mut cfg = ::aws_smithy_types::config_bag::Layer::new("DeleteResource");
101
102 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
103 DeleteResourceRequestSerializer,
104 ));
105 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
106 DeleteResourceResponseDeserializer,
107 ));
108
109 cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
110 ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
111 ));
112
113 cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::SensitiveOutput);
114 cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
115 "DeleteResource",
116 "CloudControl",
117 ));
118 let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
119 signing_options.double_uri_encode = true;
120 signing_options.content_sha256_header = false;
121 signing_options.normalize_uri_path = true;
122 signing_options.payload_override = None;
123
124 cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
125 signing_options,
126 ..::std::default::Default::default()
127 });
128
129 ::std::option::Option::Some(cfg.freeze())
130 }
131
132 fn runtime_components(
133 &self,
134 _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
135 ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
136 #[allow(unused_mut)]
137 let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("DeleteResource")
138 .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
139 .with_interceptor(DeleteResourceEndpointParamsInterceptor)
140 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
141 crate::operation::delete_resource::DeleteResourceError,
142 >::new())
143 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
144 crate::operation::delete_resource::DeleteResourceError,
145 >::new())
146 .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
147 crate::operation::delete_resource::DeleteResourceError,
148 >::new());
149
150 ::std::borrow::Cow::Owned(rcb)
151 }
152}
153
154#[derive(Debug)]
155struct DeleteResourceResponseDeserializer;
156impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DeleteResourceResponseDeserializer {
157 fn deserialize_nonstreaming(
158 &self,
159 response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
160 ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
161 let (success, status) = (response.status().is_success(), response.status().as_u16());
162 let headers = response.headers();
163 let body = response.body().bytes().expect("body loaded");
164 #[allow(unused_mut)]
165 let mut force_error = false;
166 ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
167 let parse_result = if !success && status != 200 || force_error {
168 crate::protocol_serde::shape_delete_resource::de_delete_resource_http_error(status, headers, body)
169 } else {
170 crate::protocol_serde::shape_delete_resource::de_delete_resource_http_response(status, headers, body)
171 };
172 crate::protocol_serde::type_erase_result(parse_result)
173 }
174}
175#[derive(Debug)]
176struct DeleteResourceRequestSerializer;
177impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DeleteResourceRequestSerializer {
178 #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
179 fn serialize_input(
180 &self,
181 input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
182 _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
183 ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
184 let input = input
185 .downcast::<crate::operation::delete_resource::DeleteResourceInput>()
186 .expect("correct type");
187 let _header_serialization_settings = _cfg
188 .load::<crate::serialization_settings::HeaderSerializationSettings>()
189 .cloned()
190 .unwrap_or_default();
191 let mut request_builder = {
192 fn uri_base(
193 _input: &crate::operation::delete_resource::DeleteResourceInput,
194 output: &mut ::std::string::String,
195 ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
196 use ::std::fmt::Write as _;
197 ::std::write!(output, "/").expect("formatting should succeed");
198 ::std::result::Result::Ok(())
199 }
200 #[allow(clippy::unnecessary_wraps)]
201 fn update_http_builder(
202 input: &crate::operation::delete_resource::DeleteResourceInput,
203 builder: ::http::request::Builder,
204 ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
205 let mut uri = ::std::string::String::new();
206 uri_base(input, &mut uri)?;
207 ::std::result::Result::Ok(builder.method("POST").uri(uri))
208 }
209 let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
210 builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.0");
211 builder = _header_serialization_settings.set_default_header(
212 builder,
213 ::http::header::HeaderName::from_static("x-amz-target"),
214 "CloudApiService.DeleteResource",
215 );
216 builder
217 };
218 let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_delete_resource::ser_delete_resource_input(&input)?);
219 if let Some(content_length) = body.content_length() {
220 let content_length = content_length.to_string();
221 request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
222 }
223 ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
224 }
225}
226#[derive(Debug)]
227struct DeleteResourceEndpointParamsInterceptor;
228
229impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DeleteResourceEndpointParamsInterceptor {
230 fn name(&self) -> &'static str {
231 "DeleteResourceEndpointParamsInterceptor"
232 }
233
234 fn read_before_execution(
235 &self,
236 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
237 '_,
238 ::aws_smithy_runtime_api::client::interceptors::context::Input,
239 ::aws_smithy_runtime_api::client::interceptors::context::Output,
240 ::aws_smithy_runtime_api::client::interceptors::context::Error,
241 >,
242 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
243 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
244 let _input = context
245 .input()
246 .downcast_ref::<DeleteResourceInput>()
247 .ok_or("failed to downcast to DeleteResourceInput")?;
248
249 let params = crate::config::endpoint::Params::builder()
250 .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
251 .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
252 .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
253 .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
254 .build()
255 .map_err(|err| {
256 ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
257 })?;
258 cfg.interceptor_state()
259 .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
260 ::std::result::Result::Ok(())
261 }
262}
263
264#[non_exhaustive]
269#[derive(::std::fmt::Debug)]
270pub enum DeleteResourceError {
271 AlreadyExistsException(crate::types::error::AlreadyExistsException),
273 ClientTokenConflictException(crate::types::error::ClientTokenConflictException),
276 ConcurrentOperationException(crate::types::error::ConcurrentOperationException),
278 GeneralServiceException(crate::types::error::GeneralServiceException),
280 HandlerFailureException(crate::types::error::HandlerFailureException),
282 HandlerInternalFailureException(crate::types::error::HandlerInternalFailureException),
284 InvalidCredentialsException(crate::types::error::InvalidCredentialsException),
286 InvalidRequestException(crate::types::error::InvalidRequestException),
288 NetworkFailureException(crate::types::error::NetworkFailureException),
290 NotStabilizedException(crate::types::error::NotStabilizedException),
292 NotUpdatableException(crate::types::error::NotUpdatableException),
294 PrivateTypeException(crate::types::error::PrivateTypeException),
296 ResourceConflictException(crate::types::error::ResourceConflictException),
298 ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
300 ServiceInternalErrorException(crate::types::error::ServiceInternalErrorException),
302 ServiceLimitExceededException(crate::types::error::ServiceLimitExceededException),
304 ThrottlingException(crate::types::error::ThrottlingException),
306 TypeNotFoundException(crate::types::error::TypeNotFoundException),
308 UnsupportedActionException(crate::types::error::UnsupportedActionException),
310 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
312 variable wildcard pattern and check `.code()`:
313 \
314 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
315 \
316 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-DeleteResourceError) for what information is available for the error.")]
317 Unhandled(crate::error::sealed_unhandled::Unhandled),
318}
319impl DeleteResourceError {
320 pub fn unhandled(
322 err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
323 ) -> Self {
324 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
325 source: err.into(),
326 meta: ::std::default::Default::default(),
327 })
328 }
329
330 pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
332 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
333 source: err.clone().into(),
334 meta: err,
335 })
336 }
337 pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
342 match self {
343 Self::AlreadyExistsException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
344 Self::ClientTokenConflictException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
345 Self::ConcurrentOperationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
346 Self::GeneralServiceException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
347 Self::HandlerFailureException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
348 Self::HandlerInternalFailureException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
349 Self::InvalidCredentialsException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
350 Self::InvalidRequestException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
351 Self::NetworkFailureException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
352 Self::NotStabilizedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
353 Self::NotUpdatableException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
354 Self::PrivateTypeException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
355 Self::ResourceConflictException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
356 Self::ResourceNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
357 Self::ServiceInternalErrorException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
358 Self::ServiceLimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
359 Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
360 Self::TypeNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
361 Self::UnsupportedActionException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
362 Self::Unhandled(e) => &e.meta,
363 }
364 }
365 pub fn is_already_exists_exception(&self) -> bool {
367 matches!(self, Self::AlreadyExistsException(_))
368 }
369 pub fn is_client_token_conflict_exception(&self) -> bool {
371 matches!(self, Self::ClientTokenConflictException(_))
372 }
373 pub fn is_concurrent_operation_exception(&self) -> bool {
375 matches!(self, Self::ConcurrentOperationException(_))
376 }
377 pub fn is_general_service_exception(&self) -> bool {
379 matches!(self, Self::GeneralServiceException(_))
380 }
381 pub fn is_handler_failure_exception(&self) -> bool {
383 matches!(self, Self::HandlerFailureException(_))
384 }
385 pub fn is_handler_internal_failure_exception(&self) -> bool {
387 matches!(self, Self::HandlerInternalFailureException(_))
388 }
389 pub fn is_invalid_credentials_exception(&self) -> bool {
391 matches!(self, Self::InvalidCredentialsException(_))
392 }
393 pub fn is_invalid_request_exception(&self) -> bool {
395 matches!(self, Self::InvalidRequestException(_))
396 }
397 pub fn is_network_failure_exception(&self) -> bool {
399 matches!(self, Self::NetworkFailureException(_))
400 }
401 pub fn is_not_stabilized_exception(&self) -> bool {
403 matches!(self, Self::NotStabilizedException(_))
404 }
405 pub fn is_not_updatable_exception(&self) -> bool {
407 matches!(self, Self::NotUpdatableException(_))
408 }
409 pub fn is_private_type_exception(&self) -> bool {
411 matches!(self, Self::PrivateTypeException(_))
412 }
413 pub fn is_resource_conflict_exception(&self) -> bool {
415 matches!(self, Self::ResourceConflictException(_))
416 }
417 pub fn is_resource_not_found_exception(&self) -> bool {
419 matches!(self, Self::ResourceNotFoundException(_))
420 }
421 pub fn is_service_internal_error_exception(&self) -> bool {
423 matches!(self, Self::ServiceInternalErrorException(_))
424 }
425 pub fn is_service_limit_exceeded_exception(&self) -> bool {
427 matches!(self, Self::ServiceLimitExceededException(_))
428 }
429 pub fn is_throttling_exception(&self) -> bool {
431 matches!(self, Self::ThrottlingException(_))
432 }
433 pub fn is_type_not_found_exception(&self) -> bool {
435 matches!(self, Self::TypeNotFoundException(_))
436 }
437 pub fn is_unsupported_action_exception(&self) -> bool {
439 matches!(self, Self::UnsupportedActionException(_))
440 }
441}
442impl ::std::error::Error for DeleteResourceError {
443 fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
444 match self {
445 Self::AlreadyExistsException(_inner) => ::std::option::Option::Some(_inner),
446 Self::ClientTokenConflictException(_inner) => ::std::option::Option::Some(_inner),
447 Self::ConcurrentOperationException(_inner) => ::std::option::Option::Some(_inner),
448 Self::GeneralServiceException(_inner) => ::std::option::Option::Some(_inner),
449 Self::HandlerFailureException(_inner) => ::std::option::Option::Some(_inner),
450 Self::HandlerInternalFailureException(_inner) => ::std::option::Option::Some(_inner),
451 Self::InvalidCredentialsException(_inner) => ::std::option::Option::Some(_inner),
452 Self::InvalidRequestException(_inner) => ::std::option::Option::Some(_inner),
453 Self::NetworkFailureException(_inner) => ::std::option::Option::Some(_inner),
454 Self::NotStabilizedException(_inner) => ::std::option::Option::Some(_inner),
455 Self::NotUpdatableException(_inner) => ::std::option::Option::Some(_inner),
456 Self::PrivateTypeException(_inner) => ::std::option::Option::Some(_inner),
457 Self::ResourceConflictException(_inner) => ::std::option::Option::Some(_inner),
458 Self::ResourceNotFoundException(_inner) => ::std::option::Option::Some(_inner),
459 Self::ServiceInternalErrorException(_inner) => ::std::option::Option::Some(_inner),
460 Self::ServiceLimitExceededException(_inner) => ::std::option::Option::Some(_inner),
461 Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner),
462 Self::TypeNotFoundException(_inner) => ::std::option::Option::Some(_inner),
463 Self::UnsupportedActionException(_inner) => ::std::option::Option::Some(_inner),
464 Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
465 }
466 }
467}
468impl ::std::fmt::Display for DeleteResourceError {
469 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
470 match self {
471 Self::AlreadyExistsException(_inner) => _inner.fmt(f),
472 Self::ClientTokenConflictException(_inner) => _inner.fmt(f),
473 Self::ConcurrentOperationException(_inner) => _inner.fmt(f),
474 Self::GeneralServiceException(_inner) => _inner.fmt(f),
475 Self::HandlerFailureException(_inner) => _inner.fmt(f),
476 Self::HandlerInternalFailureException(_inner) => _inner.fmt(f),
477 Self::InvalidCredentialsException(_inner) => _inner.fmt(f),
478 Self::InvalidRequestException(_inner) => _inner.fmt(f),
479 Self::NetworkFailureException(_inner) => _inner.fmt(f),
480 Self::NotStabilizedException(_inner) => _inner.fmt(f),
481 Self::NotUpdatableException(_inner) => _inner.fmt(f),
482 Self::PrivateTypeException(_inner) => _inner.fmt(f),
483 Self::ResourceConflictException(_inner) => _inner.fmt(f),
484 Self::ResourceNotFoundException(_inner) => _inner.fmt(f),
485 Self::ServiceInternalErrorException(_inner) => _inner.fmt(f),
486 Self::ServiceLimitExceededException(_inner) => _inner.fmt(f),
487 Self::ThrottlingException(_inner) => _inner.fmt(f),
488 Self::TypeNotFoundException(_inner) => _inner.fmt(f),
489 Self::UnsupportedActionException(_inner) => _inner.fmt(f),
490 Self::Unhandled(_inner) => {
491 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
492 write!(f, "unhandled error ({code})")
493 } else {
494 f.write_str("unhandled error")
495 }
496 }
497 }
498 }
499}
500impl ::aws_smithy_types::retry::ProvideErrorKind for DeleteResourceError {
501 fn code(&self) -> ::std::option::Option<&str> {
502 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
503 }
504 fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
505 ::std::option::Option::None
506 }
507}
508impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for DeleteResourceError {
509 fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
510 match self {
511 Self::AlreadyExistsException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
512 Self::ClientTokenConflictException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
513 Self::ConcurrentOperationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
514 Self::GeneralServiceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
515 Self::HandlerFailureException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
516 Self::HandlerInternalFailureException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
517 Self::InvalidCredentialsException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
518 Self::InvalidRequestException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
519 Self::NetworkFailureException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
520 Self::NotStabilizedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
521 Self::NotUpdatableException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
522 Self::PrivateTypeException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
523 Self::ResourceConflictException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
524 Self::ResourceNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
525 Self::ServiceInternalErrorException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
526 Self::ServiceLimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
527 Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
528 Self::TypeNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
529 Self::UnsupportedActionException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
530 Self::Unhandled(_inner) => &_inner.meta,
531 }
532 }
533}
534impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for DeleteResourceError {
535 fn create_unhandled_error(
536 source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
537 meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
538 ) -> Self {
539 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
540 source,
541 meta: meta.unwrap_or_default(),
542 })
543 }
544}
545impl ::aws_types::request_id::RequestId for crate::operation::delete_resource::DeleteResourceError {
546 fn request_id(&self) -> Option<&str> {
547 self.meta().request_id()
548 }
549}
550
551pub use crate::operation::delete_resource::_delete_resource_output::DeleteResourceOutput;
552
553pub use crate::operation::delete_resource::_delete_resource_input::DeleteResourceInput;
554
555mod _delete_resource_input;
556
557mod _delete_resource_output;
558
559pub mod builders;