1#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct ModifyDBCluster;
6impl ModifyDBCluster {
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::modify_db_cluster::ModifyDbClusterInput,
14 ) -> ::std::result::Result<
15 crate::operation::modify_db_cluster::ModifyDbClusterOutput,
16 ::aws_smithy_runtime_api::client::result::SdkError<
17 crate::operation::modify_db_cluster::ModifyDBClusterError,
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::modify_db_cluster::ModifyDBClusterError>()
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::modify_db_cluster::ModifyDbClusterOutput>()
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::modify_db_cluster::ModifyDbClusterInput,
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("RDS", "ModifyDBCluster", input, runtime_plugins, stop_point)
55 .instrument(::tracing::debug_span!(
58 "RDS.ModifyDBCluster",
59 "rpc.service" = "RDS",
60 "rpc.method" = "ModifyDBCluster",
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
74 if let ::std::option::Option::Some(config_override) = config_override {
75 for plugin in config_override.runtime_plugins.iter().cloned() {
76 runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
77 }
78 runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
79 config_override,
80 client_config.config.clone(),
81 &client_config.runtime_components,
82 ));
83 }
84 runtime_plugins
85 }
86}
87impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ModifyDBCluster {
88 fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
89 let mut cfg = ::aws_smithy_types::config_bag::Layer::new("ModifyDBCluster");
90
91 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
92 ModifyDBClusterRequestSerializer,
93 ));
94 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
95 ModifyDBClusterResponseDeserializer,
96 ));
97
98 cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
99 crate::config::auth::Params::builder()
100 .operation_name("ModifyDBCluster")
101 .build()
102 .expect("required fields set"),
103 ));
104
105 cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::SensitiveOutput);
106 cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("ModifyDBCluster", "RDS"));
107 let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
108 signing_options.double_uri_encode = true;
109 signing_options.content_sha256_header = false;
110 signing_options.normalize_uri_path = true;
111 signing_options.payload_override = None;
112
113 cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
114 signing_options,
115 ..::std::default::Default::default()
116 });
117
118 ::std::option::Option::Some(cfg.freeze())
119 }
120
121 fn runtime_components(
122 &self,
123 _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
124 ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
125 #[allow(unused_mut)]
126 let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("ModifyDBCluster")
127 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
128 ModifyDBClusterTelemetryInputCaptureInterceptor,
129 ))
130 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
131 ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
132 ))
133 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
134 ModifyDBClusterEndpointParamsInterceptor,
135 ))
136 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
137 crate::operation::modify_db_cluster::ModifyDBClusterError,
138 >::new())
139 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
140 crate::operation::modify_db_cluster::ModifyDBClusterError,
141 >::new())
142 .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
143 crate::operation::modify_db_cluster::ModifyDBClusterError,
144 >::new());
145
146 ::std::borrow::Cow::Owned(rcb)
147 }
148}
149
150#[derive(Debug)]
151struct ModifyDBClusterTelemetryInputCaptureInterceptor;
152
153#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
154impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ModifyDBClusterTelemetryInputCaptureInterceptor {
155 fn name(&self) -> &'static str {
156 "ModifyDBClusterTelemetryInputCaptureInterceptor"
157 }
158
159 fn read_before_execution(
160 &self,
161 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
162 '_,
163 ::aws_smithy_runtime_api::client::interceptors::context::Input,
164 ::aws_smithy_runtime_api::client::interceptors::context::Output,
165 ::aws_smithy_runtime_api::client::interceptors::context::Error,
166 >,
167 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
168 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
169 let ::std::option::Option::Some(requested) = cfg
171 .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
172 .filter(|r| !r.is_empty())
173 else {
174 return ::std::result::Result::Ok(());
175 };
176
177 let ::std::option::Option::Some(input) = context.input().downcast_ref::<ModifyDbClusterInput>() else {
178 return ::std::result::Result::Ok(());
180 };
181
182 let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
183 if requested.should_capture("DBClusterIdentifier") {
184 if let ::std::option::Option::Some(value) = input.db_cluster_identifier.as_deref() {
185 captured.insert("DBClusterIdentifier", value);
186 }
187 }
188 if requested.should_capture("NewDBClusterIdentifier") {
189 if let ::std::option::Option::Some(value) = input.new_db_cluster_identifier.as_deref() {
190 captured.insert("NewDBClusterIdentifier", value);
191 }
192 }
193 if requested.should_capture("DBClusterParameterGroupName") {
194 if let ::std::option::Option::Some(value) = input.db_cluster_parameter_group_name.as_deref() {
195 captured.insert("DBClusterParameterGroupName", value);
196 }
197 }
198 if requested.should_capture("OptionGroupName") {
199 if let ::std::option::Option::Some(value) = input.option_group_name.as_deref() {
200 captured.insert("OptionGroupName", value);
201 }
202 }
203 if requested.should_capture("PreferredBackupWindow") {
204 if let ::std::option::Option::Some(value) = input.preferred_backup_window.as_deref() {
205 captured.insert("PreferredBackupWindow", value);
206 }
207 }
208 if requested.should_capture("PreferredMaintenanceWindow") {
209 if let ::std::option::Option::Some(value) = input.preferred_maintenance_window.as_deref() {
210 captured.insert("PreferredMaintenanceWindow", value);
211 }
212 }
213 if requested.should_capture("EngineVersion") {
214 if let ::std::option::Option::Some(value) = input.engine_version.as_deref() {
215 captured.insert("EngineVersion", value);
216 }
217 }
218 if requested.should_capture("DBInstanceParameterGroupName") {
219 if let ::std::option::Option::Some(value) = input.db_instance_parameter_group_name.as_deref() {
220 captured.insert("DBInstanceParameterGroupName", value);
221 }
222 }
223 if requested.should_capture("Domain") {
224 if let ::std::option::Option::Some(value) = input.domain.as_deref() {
225 captured.insert("Domain", value);
226 }
227 }
228 if requested.should_capture("DomainIAMRoleName") {
229 if let ::std::option::Option::Some(value) = input.domain_iam_role_name.as_deref() {
230 captured.insert("DomainIAMRoleName", value);
231 }
232 }
233 if requested.should_capture("DBClusterInstanceClass") {
234 if let ::std::option::Option::Some(value) = input.db_cluster_instance_class.as_deref() {
235 captured.insert("DBClusterInstanceClass", value);
236 }
237 }
238 if requested.should_capture("StorageType") {
239 if let ::std::option::Option::Some(value) = input.storage_type.as_deref() {
240 captured.insert("StorageType", value);
241 }
242 }
243 if requested.should_capture("NetworkType") {
244 if let ::std::option::Option::Some(value) = input.network_type.as_deref() {
245 captured.insert("NetworkType", value);
246 }
247 }
248 if requested.should_capture("MonitoringRoleArn") {
249 if let ::std::option::Option::Some(value) = input.monitoring_role_arn.as_deref() {
250 captured.insert("MonitoringRoleArn", value);
251 }
252 }
253 if requested.should_capture("PerformanceInsightsKMSKeyId") {
254 if let ::std::option::Option::Some(value) = input.performance_insights_kms_key_id.as_deref() {
255 captured.insert("PerformanceInsightsKMSKeyId", value);
256 }
257 }
258 if requested.should_capture("MasterUserSecretKmsKeyId") {
259 if let ::std::option::Option::Some(value) = input.master_user_secret_kms_key_id.as_deref() {
260 captured.insert("MasterUserSecretKmsKeyId", value);
261 }
262 }
263 if requested.should_capture("EngineMode") {
264 if let ::std::option::Option::Some(value) = input.engine_mode.as_deref() {
265 captured.insert("EngineMode", value);
266 }
267 }
268 if requested.should_capture("AwsBackupRecoveryPointArn") {
269 if let ::std::option::Option::Some(value) = input.aws_backup_recovery_point_arn.as_deref() {
270 captured.insert("AwsBackupRecoveryPointArn", value);
271 }
272 }
273 if requested.should_capture("CACertificateIdentifier") {
274 if let ::std::option::Option::Some(value) = input.ca_certificate_identifier.as_deref() {
275 captured.insert("CACertificateIdentifier", value);
276 }
277 }
278 if requested.should_capture("EngineLifecycleSupport") {
279 if let ::std::option::Option::Some(value) = input.engine_lifecycle_support.as_deref() {
280 captured.insert("EngineLifecycleSupport", value);
281 }
282 }
283
284 cfg.interceptor_state().store_put(captured);
285 ::std::result::Result::Ok(())
286 }
287}
288#[derive(Debug)]
289struct ModifyDBClusterResponseDeserializer;
290impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ModifyDBClusterResponseDeserializer {
291 fn deserialize_nonstreaming_with_config(
292 &self,
293 response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
294 _cfg: &::aws_smithy_types::config_bag::ConfigBag,
295 ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
296 let (success, status) = (response.status().is_success(), response.status().as_u16());
297 let headers = response.headers();
298 let body = response.body().bytes().expect("body loaded");
299 #[allow(unused_mut)]
300 let mut force_error = false;
301 ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
302 let parse_result = if !success && status != 200 || force_error {
303 crate::protocol_serde::shape_modify_db_cluster::de_modify_db_cluster_http_error(status, headers, body)
304 } else {
305 crate::protocol_serde::shape_modify_db_cluster::de_modify_db_cluster_http_response(status, headers, body)
306 };
307 crate::protocol_serde::type_erase_result(parse_result)
308 }
309}
310#[derive(Debug)]
311struct ModifyDBClusterRequestSerializer;
312impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ModifyDBClusterRequestSerializer {
313 #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
314 fn serialize_input(
315 &self,
316 input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
317 _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
318 ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
319 let input = input
320 .downcast::<crate::operation::modify_db_cluster::ModifyDbClusterInput>()
321 .expect("correct type");
322 let _header_serialization_settings = _cfg
323 .load::<crate::serialization_settings::HeaderSerializationSettings>()
324 .cloned()
325 .unwrap_or_default();
326 let mut request_builder = {
327 #[allow(clippy::uninlined_format_args)]
328 fn uri_base(
329 _input: &crate::operation::modify_db_cluster::ModifyDbClusterInput,
330 output: &mut ::std::string::String,
331 ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
332 use ::std::fmt::Write as _;
333 ::std::write!(output, "/").expect("formatting should succeed");
334 ::std::result::Result::Ok(())
335 }
336 #[allow(clippy::unnecessary_wraps)]
337 fn update_http_builder(
338 input: &crate::operation::modify_db_cluster::ModifyDbClusterInput,
339 builder: ::http_1x::request::Builder,
340 ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
341 let mut uri = ::std::string::String::new();
342 uri_base(input, &mut uri)?;
343 ::std::result::Result::Ok(builder.method("POST").uri(uri))
344 }
345 let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
346 builder =
347 _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
348 builder
349 };
350 let body = ::aws_smithy_types::body::SdkBody::from(
351 crate::protocol_serde::shape_modify_db_cluster_input::ser_modify_db_cluster_input_input_input(&input)?,
352 );
353 if let Some(content_length) = body.content_length() {
354 let content_length = content_length.to_string();
355 request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
356 }
357 ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
358 }
359}
360#[derive(Debug)]
361struct ModifyDBClusterEndpointParamsInterceptor;
362
363#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
364impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ModifyDBClusterEndpointParamsInterceptor {
365 fn name(&self) -> &'static str {
366 "ModifyDBClusterEndpointParamsInterceptor"
367 }
368
369 fn read_before_execution(
370 &self,
371 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
372 '_,
373 ::aws_smithy_runtime_api::client::interceptors::context::Input,
374 ::aws_smithy_runtime_api::client::interceptors::context::Output,
375 ::aws_smithy_runtime_api::client::interceptors::context::Error,
376 >,
377 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
378 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
379 let _input = context
380 .input()
381 .downcast_ref::<ModifyDbClusterInput>()
382 .ok_or("failed to downcast to ModifyDbClusterInput")?;
383
384 let params = crate::config::endpoint::Params::builder()
385 .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
386 .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
387 .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
388 .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
389 .build()
390 .map_err(|err| {
391 ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
392 })?;
393 cfg.interceptor_state()
394 .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
395 ::std::result::Result::Ok(())
396 }
397}
398
399#[non_exhaustive]
404#[derive(::std::fmt::Debug)]
405pub enum ModifyDBClusterError {
406 DbClusterAlreadyExistsFault(crate::types::error::DbClusterAlreadyExistsFault),
408 DbClusterNotFoundFault(crate::types::error::DbClusterNotFoundFault),
410 DbClusterParameterGroupNotFoundFault(crate::types::error::DbClusterParameterGroupNotFoundFault),
412 DbInstanceAlreadyExistsFault(crate::types::error::DbInstanceAlreadyExistsFault),
414 DbParameterGroupNotFoundFault(crate::types::error::DbParameterGroupNotFoundFault),
416 DbSubnetGroupNotFoundFault(crate::types::error::DbSubnetGroupNotFoundFault),
418 DomainNotFoundFault(crate::types::error::DomainNotFoundFault),
420 InvalidDbClusterStateFault(crate::types::error::InvalidDbClusterStateFault),
422 InvalidDbInstanceStateFault(crate::types::error::InvalidDbInstanceStateFault),
424 InvalidDbSecurityGroupStateFault(crate::types::error::InvalidDbSecurityGroupStateFault),
426 InvalidDbSubnetGroupStateFault(crate::types::error::InvalidDbSubnetGroupStateFault),
428 InvalidGlobalClusterStateFault(crate::types::error::InvalidGlobalClusterStateFault),
430 InvalidSubnet(crate::types::error::InvalidSubnet),
432 InvalidVpcNetworkStateFault(crate::types::error::InvalidVpcNetworkStateFault),
434 KmsKeyNotAccessibleFault(crate::types::error::KmsKeyNotAccessibleFault),
436 NetworkTypeNotSupported(crate::types::error::NetworkTypeNotSupported),
438 OptionGroupNotFoundFault(crate::types::error::OptionGroupNotFoundFault),
440 StorageQuotaExceededFault(crate::types::error::StorageQuotaExceededFault),
442 StorageTypeNotAvailableFault(crate::types::error::StorageTypeNotAvailableFault),
444 StorageTypeNotSupportedFault(crate::types::error::StorageTypeNotSupportedFault),
446 VpcEncryptionControlViolationException(crate::types::error::VpcEncryptionControlViolationException),
448 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
450 variable wildcard pattern and check `.code()`:
451 \
452 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
453 \
454 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-ModifyDBClusterError) for what information is available for the error.")]
455 Unhandled(crate::error::sealed_unhandled::Unhandled),
456}
457impl ModifyDBClusterError {
458 pub fn unhandled(
460 err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
461 ) -> Self {
462 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
463 source: err.into(),
464 meta: ::std::default::Default::default(),
465 })
466 }
467
468 pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
470 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
471 source: err.clone().into(),
472 meta: err,
473 })
474 }
475 pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
480 match self {
481 Self::DbClusterAlreadyExistsFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
482 Self::DbClusterNotFoundFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
483 Self::DbClusterParameterGroupNotFoundFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
484 Self::DbInstanceAlreadyExistsFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
485 Self::DbParameterGroupNotFoundFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
486 Self::DbSubnetGroupNotFoundFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
487 Self::DomainNotFoundFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
488 Self::InvalidDbClusterStateFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
489 Self::InvalidDbInstanceStateFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
490 Self::InvalidDbSecurityGroupStateFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
491 Self::InvalidDbSubnetGroupStateFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
492 Self::InvalidGlobalClusterStateFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
493 Self::InvalidSubnet(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
494 Self::InvalidVpcNetworkStateFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
495 Self::KmsKeyNotAccessibleFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
496 Self::NetworkTypeNotSupported(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
497 Self::OptionGroupNotFoundFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
498 Self::StorageQuotaExceededFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
499 Self::StorageTypeNotAvailableFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
500 Self::StorageTypeNotSupportedFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
501 Self::VpcEncryptionControlViolationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
502 Self::Unhandled(e) => &e.meta,
503 }
504 }
505 pub fn is_db_cluster_already_exists_fault(&self) -> bool {
507 matches!(self, Self::DbClusterAlreadyExistsFault(_))
508 }
509 pub fn is_db_cluster_not_found_fault(&self) -> bool {
511 matches!(self, Self::DbClusterNotFoundFault(_))
512 }
513 pub fn is_db_cluster_parameter_group_not_found_fault(&self) -> bool {
515 matches!(self, Self::DbClusterParameterGroupNotFoundFault(_))
516 }
517 pub fn is_db_instance_already_exists_fault(&self) -> bool {
519 matches!(self, Self::DbInstanceAlreadyExistsFault(_))
520 }
521 pub fn is_db_parameter_group_not_found_fault(&self) -> bool {
523 matches!(self, Self::DbParameterGroupNotFoundFault(_))
524 }
525 pub fn is_db_subnet_group_not_found_fault(&self) -> bool {
527 matches!(self, Self::DbSubnetGroupNotFoundFault(_))
528 }
529 pub fn is_domain_not_found_fault(&self) -> bool {
531 matches!(self, Self::DomainNotFoundFault(_))
532 }
533 pub fn is_invalid_db_cluster_state_fault(&self) -> bool {
535 matches!(self, Self::InvalidDbClusterStateFault(_))
536 }
537 pub fn is_invalid_db_instance_state_fault(&self) -> bool {
539 matches!(self, Self::InvalidDbInstanceStateFault(_))
540 }
541 pub fn is_invalid_db_security_group_state_fault(&self) -> bool {
543 matches!(self, Self::InvalidDbSecurityGroupStateFault(_))
544 }
545 pub fn is_invalid_db_subnet_group_state_fault(&self) -> bool {
547 matches!(self, Self::InvalidDbSubnetGroupStateFault(_))
548 }
549 pub fn is_invalid_global_cluster_state_fault(&self) -> bool {
551 matches!(self, Self::InvalidGlobalClusterStateFault(_))
552 }
553 pub fn is_invalid_subnet(&self) -> bool {
555 matches!(self, Self::InvalidSubnet(_))
556 }
557 pub fn is_invalid_vpc_network_state_fault(&self) -> bool {
559 matches!(self, Self::InvalidVpcNetworkStateFault(_))
560 }
561 pub fn is_kms_key_not_accessible_fault(&self) -> bool {
563 matches!(self, Self::KmsKeyNotAccessibleFault(_))
564 }
565 pub fn is_network_type_not_supported(&self) -> bool {
567 matches!(self, Self::NetworkTypeNotSupported(_))
568 }
569 pub fn is_option_group_not_found_fault(&self) -> bool {
571 matches!(self, Self::OptionGroupNotFoundFault(_))
572 }
573 pub fn is_storage_quota_exceeded_fault(&self) -> bool {
575 matches!(self, Self::StorageQuotaExceededFault(_))
576 }
577 pub fn is_storage_type_not_available_fault(&self) -> bool {
579 matches!(self, Self::StorageTypeNotAvailableFault(_))
580 }
581 pub fn is_storage_type_not_supported_fault(&self) -> bool {
583 matches!(self, Self::StorageTypeNotSupportedFault(_))
584 }
585 pub fn is_vpc_encryption_control_violation_exception(&self) -> bool {
587 matches!(self, Self::VpcEncryptionControlViolationException(_))
588 }
589}
590impl ::std::error::Error for ModifyDBClusterError {
591 fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
592 match self {
593 Self::DbClusterAlreadyExistsFault(_inner) => ::std::option::Option::Some(_inner),
594 Self::DbClusterNotFoundFault(_inner) => ::std::option::Option::Some(_inner),
595 Self::DbClusterParameterGroupNotFoundFault(_inner) => ::std::option::Option::Some(_inner),
596 Self::DbInstanceAlreadyExistsFault(_inner) => ::std::option::Option::Some(_inner),
597 Self::DbParameterGroupNotFoundFault(_inner) => ::std::option::Option::Some(_inner),
598 Self::DbSubnetGroupNotFoundFault(_inner) => ::std::option::Option::Some(_inner),
599 Self::DomainNotFoundFault(_inner) => ::std::option::Option::Some(_inner),
600 Self::InvalidDbClusterStateFault(_inner) => ::std::option::Option::Some(_inner),
601 Self::InvalidDbInstanceStateFault(_inner) => ::std::option::Option::Some(_inner),
602 Self::InvalidDbSecurityGroupStateFault(_inner) => ::std::option::Option::Some(_inner),
603 Self::InvalidDbSubnetGroupStateFault(_inner) => ::std::option::Option::Some(_inner),
604 Self::InvalidGlobalClusterStateFault(_inner) => ::std::option::Option::Some(_inner),
605 Self::InvalidSubnet(_inner) => ::std::option::Option::Some(_inner),
606 Self::InvalidVpcNetworkStateFault(_inner) => ::std::option::Option::Some(_inner),
607 Self::KmsKeyNotAccessibleFault(_inner) => ::std::option::Option::Some(_inner),
608 Self::NetworkTypeNotSupported(_inner) => ::std::option::Option::Some(_inner),
609 Self::OptionGroupNotFoundFault(_inner) => ::std::option::Option::Some(_inner),
610 Self::StorageQuotaExceededFault(_inner) => ::std::option::Option::Some(_inner),
611 Self::StorageTypeNotAvailableFault(_inner) => ::std::option::Option::Some(_inner),
612 Self::StorageTypeNotSupportedFault(_inner) => ::std::option::Option::Some(_inner),
613 Self::VpcEncryptionControlViolationException(_inner) => ::std::option::Option::Some(_inner),
614 Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
615 }
616 }
617}
618impl ::std::fmt::Display for ModifyDBClusterError {
619 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
620 match self {
621 Self::DbClusterAlreadyExistsFault(_inner) => _inner.fmt(f),
622 Self::DbClusterNotFoundFault(_inner) => _inner.fmt(f),
623 Self::DbClusterParameterGroupNotFoundFault(_inner) => _inner.fmt(f),
624 Self::DbInstanceAlreadyExistsFault(_inner) => _inner.fmt(f),
625 Self::DbParameterGroupNotFoundFault(_inner) => _inner.fmt(f),
626 Self::DbSubnetGroupNotFoundFault(_inner) => _inner.fmt(f),
627 Self::DomainNotFoundFault(_inner) => _inner.fmt(f),
628 Self::InvalidDbClusterStateFault(_inner) => _inner.fmt(f),
629 Self::InvalidDbInstanceStateFault(_inner) => _inner.fmt(f),
630 Self::InvalidDbSecurityGroupStateFault(_inner) => _inner.fmt(f),
631 Self::InvalidDbSubnetGroupStateFault(_inner) => _inner.fmt(f),
632 Self::InvalidGlobalClusterStateFault(_inner) => _inner.fmt(f),
633 Self::InvalidSubnet(_inner) => _inner.fmt(f),
634 Self::InvalidVpcNetworkStateFault(_inner) => _inner.fmt(f),
635 Self::KmsKeyNotAccessibleFault(_inner) => _inner.fmt(f),
636 Self::NetworkTypeNotSupported(_inner) => _inner.fmt(f),
637 Self::OptionGroupNotFoundFault(_inner) => _inner.fmt(f),
638 Self::StorageQuotaExceededFault(_inner) => _inner.fmt(f),
639 Self::StorageTypeNotAvailableFault(_inner) => _inner.fmt(f),
640 Self::StorageTypeNotSupportedFault(_inner) => _inner.fmt(f),
641 Self::VpcEncryptionControlViolationException(_inner) => _inner.fmt(f),
642 Self::Unhandled(_inner) => {
643 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
644 write!(f, "unhandled error ({code})")
645 } else {
646 f.write_str("unhandled error")
647 }
648 }
649 }
650 }
651}
652impl ::aws_smithy_types::retry::ProvideErrorKind for ModifyDBClusterError {
653 fn code(&self) -> ::std::option::Option<&str> {
654 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
655 }
656 fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
657 ::std::option::Option::None
658 }
659}
660impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ModifyDBClusterError {
661 fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
662 match self {
663 Self::DbClusterAlreadyExistsFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
664 Self::DbClusterNotFoundFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
665 Self::DbClusterParameterGroupNotFoundFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
666 Self::DbInstanceAlreadyExistsFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
667 Self::DbParameterGroupNotFoundFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
668 Self::DbSubnetGroupNotFoundFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
669 Self::DomainNotFoundFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
670 Self::InvalidDbClusterStateFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
671 Self::InvalidDbInstanceStateFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
672 Self::InvalidDbSecurityGroupStateFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
673 Self::InvalidDbSubnetGroupStateFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
674 Self::InvalidGlobalClusterStateFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
675 Self::InvalidSubnet(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
676 Self::InvalidVpcNetworkStateFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
677 Self::KmsKeyNotAccessibleFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
678 Self::NetworkTypeNotSupported(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
679 Self::OptionGroupNotFoundFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
680 Self::StorageQuotaExceededFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
681 Self::StorageTypeNotAvailableFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
682 Self::StorageTypeNotSupportedFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
683 Self::VpcEncryptionControlViolationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
684 Self::Unhandled(_inner) => &_inner.meta,
685 }
686 }
687}
688impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for ModifyDBClusterError {
689 fn create_unhandled_error(
690 source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
691 meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
692 ) -> Self {
693 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
694 source,
695 meta: meta.unwrap_or_default(),
696 })
697 }
698}
699impl ::aws_types::request_id::RequestId for crate::operation::modify_db_cluster::ModifyDBClusterError {
700 fn request_id(&self) -> Option<&str> {
701 self.meta().request_id()
702 }
703}
704
705pub use crate::operation::modify_db_cluster::_modify_db_cluster_input::ModifyDbClusterInput;
706
707pub use crate::operation::modify_db_cluster::_modify_db_cluster_output::ModifyDbClusterOutput;
708
709mod _modify_db_cluster_input;
710
711mod _modify_db_cluster_output;
712
713pub mod builders;