Skip to main content

aws_sdk_rds/operation/
restore_db_instance_from_db_snapshot.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Orchestration and serialization glue logic for `RestoreDBInstanceFromDBSnapshot`.
3#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct RestoreDBInstanceFromDBSnapshot;
6impl RestoreDBInstanceFromDBSnapshot {
7    /// Creates a new `RestoreDBInstanceFromDBSnapshot`
8    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::restore_db_instance_from_db_snapshot::RestoreDbInstanceFromDbSnapshotInput,
14    ) -> ::std::result::Result<
15        crate::operation::restore_db_instance_from_db_snapshot::RestoreDbInstanceFromDbSnapshotOutput,
16        ::aws_smithy_runtime_api::client::result::SdkError<
17            crate::operation::restore_db_instance_from_db_snapshot::RestoreDBInstanceFromDBSnapshotError,
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::restore_db_instance_from_db_snapshot::RestoreDBInstanceFromDBSnapshotError>()
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::restore_db_instance_from_db_snapshot::RestoreDbInstanceFromDbSnapshotOutput>()
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::restore_db_instance_from_db_snapshot::RestoreDbInstanceFromDbSnapshotInput,
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(
55            "RDS",
56            "RestoreDBInstanceFromDBSnapshot",
57            input,
58            runtime_plugins,
59            stop_point,
60        )
61        // Create a parent span for the entire operation. Includes a random, internal-only,
62        // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
63        .instrument(::tracing::debug_span!(
64            "RDS.RestoreDBInstanceFromDBSnapshot",
65            "rpc.service" = "RDS",
66            "rpc.method" = "RestoreDBInstanceFromDBSnapshot",
67            "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
68            "rpc.system" = "aws-api",
69        ))
70        .await
71    }
72
73    pub(crate) fn operation_runtime_plugins(
74        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
75        client_config: &crate::config::Config,
76        config_override: ::std::option::Option<crate::config::Builder>,
77    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
78        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
79
80        if let ::std::option::Option::Some(config_override) = config_override {
81            for plugin in config_override.runtime_plugins.iter().cloned() {
82                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
83            }
84            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
85                config_override,
86                client_config.config.clone(),
87                &client_config.runtime_components,
88            ));
89        }
90        runtime_plugins
91    }
92}
93impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for RestoreDBInstanceFromDBSnapshot {
94    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
95        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("RestoreDBInstanceFromDBSnapshot");
96
97        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
98            RestoreDBInstanceFromDBSnapshotRequestSerializer,
99        ));
100        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
101            RestoreDBInstanceFromDBSnapshotResponseDeserializer,
102        ));
103
104        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
105            crate::config::auth::Params::builder()
106                .operation_name("RestoreDBInstanceFromDBSnapshot")
107                .build()
108                .expect("required fields set"),
109        ));
110
111        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::SensitiveOutput);
112        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
113            "RestoreDBInstanceFromDBSnapshot",
114            "RDS",
115        ));
116        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
117        signing_options.double_uri_encode = true;
118        signing_options.content_sha256_header = false;
119        signing_options.normalize_uri_path = true;
120        signing_options.payload_override = None;
121
122        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
123            signing_options,
124            ..::std::default::Default::default()
125        });
126
127        ::std::option::Option::Some(cfg.freeze())
128    }
129
130    fn runtime_components(
131        &self,
132        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
133    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
134        #[allow(unused_mut)]
135        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("RestoreDBInstanceFromDBSnapshot")
136            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
137                RestoreDBInstanceFromDBSnapshotTelemetryInputCaptureInterceptor,
138            ))
139            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
140                ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
141            ))
142            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
143                RestoreDBInstanceFromDBSnapshotEndpointParamsInterceptor,
144            ))
145            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
146                crate::operation::restore_db_instance_from_db_snapshot::RestoreDBInstanceFromDBSnapshotError,
147            >::new())
148            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
149                crate::operation::restore_db_instance_from_db_snapshot::RestoreDBInstanceFromDBSnapshotError,
150            >::new())
151            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
152                crate::operation::restore_db_instance_from_db_snapshot::RestoreDBInstanceFromDBSnapshotError,
153            >::new());
154
155        ::std::borrow::Cow::Owned(rcb)
156    }
157}
158
159#[derive(Debug)]
160struct RestoreDBInstanceFromDBSnapshotTelemetryInputCaptureInterceptor;
161
162#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
163impl ::aws_smithy_runtime_api::client::interceptors::Intercept for RestoreDBInstanceFromDBSnapshotTelemetryInputCaptureInterceptor {
164    fn name(&self) -> &'static str {
165        "RestoreDBInstanceFromDBSnapshotTelemetryInputCaptureInterceptor"
166    }
167
168    fn read_before_execution(
169        &self,
170        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
171            '_,
172            ::aws_smithy_runtime_api::client::interceptors::context::Input,
173            ::aws_smithy_runtime_api::client::interceptors::context::Output,
174            ::aws_smithy_runtime_api::client::interceptors::context::Error,
175        >,
176        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
177    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
178        // Nothing to do unless the customer opted in by naming members to record.
179        let ::std::option::Option::Some(requested) = cfg
180            .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
181            .filter(|r| !r.is_empty())
182        else {
183            return ::std::result::Result::Ok(());
184        };
185
186        let ::std::option::Option::Some(input) = context.input().downcast_ref::<RestoreDbInstanceFromDbSnapshotInput>() else {
187            // A mismatched input is not this interceptor's concern; skip quietly.
188            return ::std::result::Result::Ok(());
189        };
190
191        let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
192        if requested.should_capture("DBInstanceIdentifier") {
193            if let ::std::option::Option::Some(value) = input.db_instance_identifier.as_deref() {
194                captured.insert("DBInstanceIdentifier", value);
195            }
196        }
197        if requested.should_capture("DBSnapshotIdentifier") {
198            if let ::std::option::Option::Some(value) = input.db_snapshot_identifier.as_deref() {
199                captured.insert("DBSnapshotIdentifier", value);
200            }
201        }
202        if requested.should_capture("DBInstanceClass") {
203            if let ::std::option::Option::Some(value) = input.db_instance_class.as_deref() {
204                captured.insert("DBInstanceClass", value);
205            }
206        }
207        if requested.should_capture("AvailabilityZone") {
208            if let ::std::option::Option::Some(value) = input.availability_zone.as_deref() {
209                captured.insert("AvailabilityZone", value);
210            }
211        }
212        if requested.should_capture("DBSubnetGroupName") {
213            if let ::std::option::Option::Some(value) = input.db_subnet_group_name.as_deref() {
214                captured.insert("DBSubnetGroupName", value);
215            }
216        }
217        if requested.should_capture("LicenseModel") {
218            if let ::std::option::Option::Some(value) = input.license_model.as_deref() {
219                captured.insert("LicenseModel", value);
220            }
221        }
222        if requested.should_capture("DBName") {
223            if let ::std::option::Option::Some(value) = input.db_name.as_deref() {
224                captured.insert("DBName", value);
225            }
226        }
227        if requested.should_capture("Engine") {
228            if let ::std::option::Option::Some(value) = input.engine.as_deref() {
229                captured.insert("Engine", value);
230            }
231        }
232        if requested.should_capture("OptionGroupName") {
233            if let ::std::option::Option::Some(value) = input.option_group_name.as_deref() {
234                captured.insert("OptionGroupName", value);
235            }
236        }
237        if requested.should_capture("StorageType") {
238            if let ::std::option::Option::Some(value) = input.storage_type.as_deref() {
239                captured.insert("StorageType", value);
240            }
241        }
242        if requested.should_capture("TdeCredentialArn") {
243            if let ::std::option::Option::Some(value) = input.tde_credential_arn.as_deref() {
244                captured.insert("TdeCredentialArn", value);
245            }
246        }
247        if requested.should_capture("Domain") {
248            if let ::std::option::Option::Some(value) = input.domain.as_deref() {
249                captured.insert("Domain", value);
250            }
251        }
252        if requested.should_capture("DomainFqdn") {
253            if let ::std::option::Option::Some(value) = input.domain_fqdn.as_deref() {
254                captured.insert("DomainFqdn", value);
255            }
256        }
257        if requested.should_capture("DomainOu") {
258            if let ::std::option::Option::Some(value) = input.domain_ou.as_deref() {
259                captured.insert("DomainOu", value);
260            }
261        }
262        if requested.should_capture("DomainAuthSecretArn") {
263            if let ::std::option::Option::Some(value) = input.domain_auth_secret_arn.as_deref() {
264                captured.insert("DomainAuthSecretArn", value);
265            }
266        }
267        if requested.should_capture("DomainIAMRoleName") {
268            if let ::std::option::Option::Some(value) = input.domain_iam_role_name.as_deref() {
269                captured.insert("DomainIAMRoleName", value);
270            }
271        }
272        if requested.should_capture("DBParameterGroupName") {
273            if let ::std::option::Option::Some(value) = input.db_parameter_group_name.as_deref() {
274                captured.insert("DBParameterGroupName", value);
275            }
276        }
277        if requested.should_capture("NetworkType") {
278            if let ::std::option::Option::Some(value) = input.network_type.as_deref() {
279                captured.insert("NetworkType", value);
280            }
281        }
282        if requested.should_capture("BackupTarget") {
283            if let ::std::option::Option::Some(value) = input.backup_target.as_deref() {
284                captured.insert("BackupTarget", value);
285            }
286        }
287        if requested.should_capture("CustomIamInstanceProfile") {
288            if let ::std::option::Option::Some(value) = input.custom_iam_instance_profile.as_deref() {
289                captured.insert("CustomIamInstanceProfile", value);
290            }
291        }
292        if requested.should_capture("DBClusterSnapshotIdentifier") {
293            if let ::std::option::Option::Some(value) = input.db_cluster_snapshot_identifier.as_deref() {
294                captured.insert("DBClusterSnapshotIdentifier", value);
295            }
296        }
297        if requested.should_capture("PreferredBackupWindow") {
298            if let ::std::option::Option::Some(value) = input.preferred_backup_window.as_deref() {
299                captured.insert("PreferredBackupWindow", value);
300            }
301        }
302        if requested.should_capture("CACertificateIdentifier") {
303            if let ::std::option::Option::Some(value) = input.ca_certificate_identifier.as_deref() {
304                captured.insert("CACertificateIdentifier", value);
305            }
306        }
307        if requested.should_capture("EngineLifecycleSupport") {
308            if let ::std::option::Option::Some(value) = input.engine_lifecycle_support.as_deref() {
309                captured.insert("EngineLifecycleSupport", value);
310            }
311        }
312        if requested.should_capture("MasterUserSecretKmsKeyId") {
313            if let ::std::option::Option::Some(value) = input.master_user_secret_kms_key_id.as_deref() {
314                captured.insert("MasterUserSecretKmsKeyId", value);
315            }
316        }
317
318        cfg.interceptor_state().store_put(captured);
319        ::std::result::Result::Ok(())
320    }
321}
322#[derive(Debug)]
323struct RestoreDBInstanceFromDBSnapshotResponseDeserializer;
324impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for RestoreDBInstanceFromDBSnapshotResponseDeserializer {
325    fn deserialize_nonstreaming_with_config(
326        &self,
327        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
328        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
329    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
330        let (success, status) = (response.status().is_success(), response.status().as_u16());
331        let headers = response.headers();
332        let body = response.body().bytes().expect("body loaded");
333        #[allow(unused_mut)]
334        let mut force_error = false;
335        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
336        let parse_result = if !success && status != 200 || force_error {
337            crate::protocol_serde::shape_restore_db_instance_from_db_snapshot::de_restore_db_instance_from_db_snapshot_http_error(
338                status, headers, body,
339            )
340        } else {
341            crate::protocol_serde::shape_restore_db_instance_from_db_snapshot::de_restore_db_instance_from_db_snapshot_http_response(
342                status, headers, body,
343            )
344        };
345        crate::protocol_serde::type_erase_result(parse_result)
346    }
347}
348#[derive(Debug)]
349struct RestoreDBInstanceFromDBSnapshotRequestSerializer;
350impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for RestoreDBInstanceFromDBSnapshotRequestSerializer {
351    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
352    fn serialize_input(
353        &self,
354        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
355        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
356    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
357        let input = input
358            .downcast::<crate::operation::restore_db_instance_from_db_snapshot::RestoreDbInstanceFromDbSnapshotInput>()
359            .expect("correct type");
360        let _header_serialization_settings = _cfg
361            .load::<crate::serialization_settings::HeaderSerializationSettings>()
362            .cloned()
363            .unwrap_or_default();
364        let mut request_builder = {
365            #[allow(clippy::uninlined_format_args)]
366            fn uri_base(
367                _input: &crate::operation::restore_db_instance_from_db_snapshot::RestoreDbInstanceFromDbSnapshotInput,
368                output: &mut ::std::string::String,
369            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
370                use ::std::fmt::Write as _;
371                ::std::write!(output, "/").expect("formatting should succeed");
372                ::std::result::Result::Ok(())
373            }
374            #[allow(clippy::unnecessary_wraps)]
375            fn update_http_builder(
376                input: &crate::operation::restore_db_instance_from_db_snapshot::RestoreDbInstanceFromDbSnapshotInput,
377                builder: ::http_1x::request::Builder,
378            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
379                let mut uri = ::std::string::String::new();
380                uri_base(input, &mut uri)?;
381                ::std::result::Result::Ok(builder.method("POST").uri(uri))
382            }
383            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
384            builder =
385                _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
386            builder
387        };
388        let body = ::aws_smithy_types::body::SdkBody::from(
389            crate::protocol_serde::shape_restore_db_instance_from_db_snapshot_input::ser_restore_db_instance_from_db_snapshot_input_input_input(
390                &input,
391            )?,
392        );
393        if let Some(content_length) = body.content_length() {
394            let content_length = content_length.to_string();
395            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
396        }
397        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
398    }
399}
400#[derive(Debug)]
401struct RestoreDBInstanceFromDBSnapshotEndpointParamsInterceptor;
402
403#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
404impl ::aws_smithy_runtime_api::client::interceptors::Intercept for RestoreDBInstanceFromDBSnapshotEndpointParamsInterceptor {
405    fn name(&self) -> &'static str {
406        "RestoreDBInstanceFromDBSnapshotEndpointParamsInterceptor"
407    }
408
409    fn read_before_execution(
410        &self,
411        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
412            '_,
413            ::aws_smithy_runtime_api::client::interceptors::context::Input,
414            ::aws_smithy_runtime_api::client::interceptors::context::Output,
415            ::aws_smithy_runtime_api::client::interceptors::context::Error,
416        >,
417        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
418    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
419        let _input = context
420            .input()
421            .downcast_ref::<RestoreDbInstanceFromDbSnapshotInput>()
422            .ok_or("failed to downcast to RestoreDbInstanceFromDbSnapshotInput")?;
423
424        let params = crate::config::endpoint::Params::builder()
425            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
426            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
427            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
428            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
429            .build()
430            .map_err(|err| {
431                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
432            })?;
433        cfg.interceptor_state()
434            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
435        ::std::result::Result::Ok(())
436    }
437}
438
439// The get_* functions below are generated from JMESPath expressions in the
440// operationContextParams trait. They target the operation's input shape.
441
442/// Error type for the `RestoreDBInstanceFromDBSnapshotError` operation.
443#[non_exhaustive]
444#[derive(::std::fmt::Debug)]
445pub enum RestoreDBInstanceFromDBSnapshotError {
446    /// <p>The specified CIDR IP range or Amazon EC2 security group might not be authorized for the specified DB security group.</p>
447    /// <p>Or, RDS might not be authorized to perform necessary actions using IAM on your behalf.</p>
448    AuthorizationNotFoundFault(crate::types::error::AuthorizationNotFoundFault),
449    /// <p></p>
450    #[deprecated(note = "Please avoid using this fault")]
451    BackupPolicyNotFoundFault(crate::types::error::BackupPolicyNotFoundFault),
452    /// <p><code>CertificateIdentifier</code> doesn't refer to an existing certificate.</p>
453    CertificateNotFoundFault(crate::types::error::CertificateNotFoundFault),
454    /// <p><code>DBClusterSnapshotIdentifier</code> doesn't refer to an existing DB cluster snapshot.</p>
455    DbClusterSnapshotNotFoundFault(crate::types::error::DbClusterSnapshotNotFoundFault),
456    /// <p>The user already has a DB instance with the given identifier.</p>
457    DbInstanceAlreadyExistsFault(crate::types::error::DbInstanceAlreadyExistsFault),
458    /// <p><code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.</p>
459    DbParameterGroupNotFoundFault(crate::types::error::DbParameterGroupNotFoundFault),
460    /// <p><code>DBSecurityGroupName</code> doesn't refer to an existing DB security group.</p>
461    DbSecurityGroupNotFoundFault(crate::types::error::DbSecurityGroupNotFoundFault),
462    /// <p><code>DBSnapshotIdentifier</code> doesn't refer to an existing DB snapshot.</p>
463    DbSnapshotNotFoundFault(crate::types::error::DbSnapshotNotFoundFault),
464    /// <p>Subnets in the DB subnet group should cover at least two Availability Zones unless there is only one Availability Zone.</p>
465    DbSubnetGroupDoesNotCoverEnoughAZs(crate::types::error::DbSubnetGroupDoesNotCoverEnoughAZs),
466    /// <p><code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.</p>
467    DbSubnetGroupNotFoundFault(crate::types::error::DbSubnetGroupNotFoundFault),
468    /// <p><code>Domain</code> doesn't refer to an existing Active Directory domain.</p>
469    DomainNotFoundFault(crate::types::error::DomainNotFoundFault),
470    /// <p>The request would result in the user exceeding the allowed number of DB instances.</p>
471    InstanceQuotaExceededFault(crate::types::error::InstanceQuotaExceededFault),
472    /// <p>The specified DB instance class isn't available in the specified Availability Zone.</p>
473    InsufficientDbInstanceCapacityFault(crate::types::error::InsufficientDbInstanceCapacityFault),
474    /// <p>The state of the DB snapshot doesn't allow deletion.</p>
475    InvalidDbSnapshotStateFault(crate::types::error::InvalidDbSnapshotStateFault),
476    /// <p>Cannot restore from VPC backup to non-VPC DB instance.</p>
477    InvalidRestoreFault(crate::types::error::InvalidRestoreFault),
478    /// <p>The requested subnet is invalid, or multiple subnets were requested that are not all in a common VPC.</p>
479    InvalidSubnet(crate::types::error::InvalidSubnet),
480    /// <p>The DB subnet group doesn't cover all Availability Zones after it's created because of users' change.</p>
481    InvalidVpcNetworkStateFault(crate::types::error::InvalidVpcNetworkStateFault),
482    /// <p>An error occurred accessing an Amazon Web Services KMS key.</p>
483    KmsKeyNotAccessibleFault(crate::types::error::KmsKeyNotAccessibleFault),
484    /// <p>The network type is invalid for the DB instance. Valid nework type values are <code>IPV4</code> and <code>DUAL</code>.</p>
485    NetworkTypeNotSupported(crate::types::error::NetworkTypeNotSupported),
486    /// <p>The specified option group could not be found.</p>
487    OptionGroupNotFoundFault(crate::types::error::OptionGroupNotFoundFault),
488    /// <p>Provisioned IOPS not available in the specified Availability Zone.</p>
489    ProvisionedIopsNotAvailableInAzFault(crate::types::error::ProvisionedIopsNotAvailableInAzFault),
490    /// <p>The request would result in the user exceeding the allowed amount of storage available across all DB instances.</p>
491    StorageQuotaExceededFault(crate::types::error::StorageQuotaExceededFault),
492    /// <p>The specified <code>StorageType</code> can't be associated with the DB instance.</p>
493    StorageTypeNotSupportedFault(crate::types::error::StorageTypeNotSupportedFault),
494    /// <p>You attempted to create more tenant databases than are permitted in your Amazon Web Services account.</p>
495    TenantDatabaseQuotaExceededFault(crate::types::error::TenantDatabaseQuotaExceededFault),
496    /// <p>The operation violates VPC encryption control settings. Make sure that your DB instance type supports the Nitro encryption-in-transit capability, or modify your VPC's encryption controls to not enforce encryption-in-transit.</p>
497    VpcEncryptionControlViolationException(crate::types::error::VpcEncryptionControlViolationException),
498    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
499    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
500    variable wildcard pattern and check `.code()`:
501     \
502    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
503     \
504    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-RestoreDBInstanceFromDBSnapshotError) for what information is available for the error.")]
505    Unhandled(crate::error::sealed_unhandled::Unhandled),
506}
507impl RestoreDBInstanceFromDBSnapshotError {
508    /// Creates the `RestoreDBInstanceFromDBSnapshotError::Unhandled` variant from any error type.
509    pub fn unhandled(
510        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
511    ) -> Self {
512        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
513            source: err.into(),
514            meta: ::std::default::Default::default(),
515        })
516    }
517
518    /// Creates the `RestoreDBInstanceFromDBSnapshotError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
519    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
520        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
521            source: err.clone().into(),
522            meta: err,
523        })
524    }
525    ///
526    /// Returns error metadata, which includes the error code, message,
527    /// request ID, and potentially additional information.
528    ///
529    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
530        match self {
531            Self::AuthorizationNotFoundFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
532            Self::BackupPolicyNotFoundFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
533            Self::CertificateNotFoundFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
534            Self::DbClusterSnapshotNotFoundFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
535            Self::DbInstanceAlreadyExistsFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
536            Self::DbParameterGroupNotFoundFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
537            Self::DbSecurityGroupNotFoundFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
538            Self::DbSnapshotNotFoundFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
539            Self::DbSubnetGroupDoesNotCoverEnoughAZs(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
540            Self::DbSubnetGroupNotFoundFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
541            Self::DomainNotFoundFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
542            Self::InstanceQuotaExceededFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
543            Self::InsufficientDbInstanceCapacityFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
544            Self::InvalidDbSnapshotStateFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
545            Self::InvalidRestoreFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
546            Self::InvalidSubnet(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
547            Self::InvalidVpcNetworkStateFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
548            Self::KmsKeyNotAccessibleFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
549            Self::NetworkTypeNotSupported(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
550            Self::OptionGroupNotFoundFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
551            Self::ProvisionedIopsNotAvailableInAzFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
552            Self::StorageQuotaExceededFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
553            Self::StorageTypeNotSupportedFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
554            Self::TenantDatabaseQuotaExceededFault(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
555            Self::VpcEncryptionControlViolationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
556            Self::Unhandled(e) => &e.meta,
557        }
558    }
559    /// Returns `true` if the error kind is `RestoreDBInstanceFromDBSnapshotError::AuthorizationNotFoundFault`.
560    pub fn is_authorization_not_found_fault(&self) -> bool {
561        matches!(self, Self::AuthorizationNotFoundFault(_))
562    }
563    /// Returns `true` if the error kind is `RestoreDBInstanceFromDBSnapshotError::BackupPolicyNotFoundFault`.
564    pub fn is_backup_policy_not_found_fault(&self) -> bool {
565        matches!(self, Self::BackupPolicyNotFoundFault(_))
566    }
567    /// Returns `true` if the error kind is `RestoreDBInstanceFromDBSnapshotError::CertificateNotFoundFault`.
568    pub fn is_certificate_not_found_fault(&self) -> bool {
569        matches!(self, Self::CertificateNotFoundFault(_))
570    }
571    /// Returns `true` if the error kind is `RestoreDBInstanceFromDBSnapshotError::DbClusterSnapshotNotFoundFault`.
572    pub fn is_db_cluster_snapshot_not_found_fault(&self) -> bool {
573        matches!(self, Self::DbClusterSnapshotNotFoundFault(_))
574    }
575    /// Returns `true` if the error kind is `RestoreDBInstanceFromDBSnapshotError::DbInstanceAlreadyExistsFault`.
576    pub fn is_db_instance_already_exists_fault(&self) -> bool {
577        matches!(self, Self::DbInstanceAlreadyExistsFault(_))
578    }
579    /// Returns `true` if the error kind is `RestoreDBInstanceFromDBSnapshotError::DbParameterGroupNotFoundFault`.
580    pub fn is_db_parameter_group_not_found_fault(&self) -> bool {
581        matches!(self, Self::DbParameterGroupNotFoundFault(_))
582    }
583    /// Returns `true` if the error kind is `RestoreDBInstanceFromDBSnapshotError::DbSecurityGroupNotFoundFault`.
584    pub fn is_db_security_group_not_found_fault(&self) -> bool {
585        matches!(self, Self::DbSecurityGroupNotFoundFault(_))
586    }
587    /// Returns `true` if the error kind is `RestoreDBInstanceFromDBSnapshotError::DbSnapshotNotFoundFault`.
588    pub fn is_db_snapshot_not_found_fault(&self) -> bool {
589        matches!(self, Self::DbSnapshotNotFoundFault(_))
590    }
591    /// Returns `true` if the error kind is `RestoreDBInstanceFromDBSnapshotError::DbSubnetGroupDoesNotCoverEnoughAZs`.
592    pub fn is_db_subnet_group_does_not_cover_enough_azs(&self) -> bool {
593        matches!(self, Self::DbSubnetGroupDoesNotCoverEnoughAZs(_))
594    }
595    /// Returns `true` if the error kind is `RestoreDBInstanceFromDBSnapshotError::DbSubnetGroupNotFoundFault`.
596    pub fn is_db_subnet_group_not_found_fault(&self) -> bool {
597        matches!(self, Self::DbSubnetGroupNotFoundFault(_))
598    }
599    /// Returns `true` if the error kind is `RestoreDBInstanceFromDBSnapshotError::DomainNotFoundFault`.
600    pub fn is_domain_not_found_fault(&self) -> bool {
601        matches!(self, Self::DomainNotFoundFault(_))
602    }
603    /// Returns `true` if the error kind is `RestoreDBInstanceFromDBSnapshotError::InstanceQuotaExceededFault`.
604    pub fn is_instance_quota_exceeded_fault(&self) -> bool {
605        matches!(self, Self::InstanceQuotaExceededFault(_))
606    }
607    /// Returns `true` if the error kind is `RestoreDBInstanceFromDBSnapshotError::InsufficientDbInstanceCapacityFault`.
608    pub fn is_insufficient_db_instance_capacity_fault(&self) -> bool {
609        matches!(self, Self::InsufficientDbInstanceCapacityFault(_))
610    }
611    /// Returns `true` if the error kind is `RestoreDBInstanceFromDBSnapshotError::InvalidDbSnapshotStateFault`.
612    pub fn is_invalid_db_snapshot_state_fault(&self) -> bool {
613        matches!(self, Self::InvalidDbSnapshotStateFault(_))
614    }
615    /// Returns `true` if the error kind is `RestoreDBInstanceFromDBSnapshotError::InvalidRestoreFault`.
616    pub fn is_invalid_restore_fault(&self) -> bool {
617        matches!(self, Self::InvalidRestoreFault(_))
618    }
619    /// Returns `true` if the error kind is `RestoreDBInstanceFromDBSnapshotError::InvalidSubnet`.
620    pub fn is_invalid_subnet(&self) -> bool {
621        matches!(self, Self::InvalidSubnet(_))
622    }
623    /// Returns `true` if the error kind is `RestoreDBInstanceFromDBSnapshotError::InvalidVpcNetworkStateFault`.
624    pub fn is_invalid_vpc_network_state_fault(&self) -> bool {
625        matches!(self, Self::InvalidVpcNetworkStateFault(_))
626    }
627    /// Returns `true` if the error kind is `RestoreDBInstanceFromDBSnapshotError::KmsKeyNotAccessibleFault`.
628    pub fn is_kms_key_not_accessible_fault(&self) -> bool {
629        matches!(self, Self::KmsKeyNotAccessibleFault(_))
630    }
631    /// Returns `true` if the error kind is `RestoreDBInstanceFromDBSnapshotError::NetworkTypeNotSupported`.
632    pub fn is_network_type_not_supported(&self) -> bool {
633        matches!(self, Self::NetworkTypeNotSupported(_))
634    }
635    /// Returns `true` if the error kind is `RestoreDBInstanceFromDBSnapshotError::OptionGroupNotFoundFault`.
636    pub fn is_option_group_not_found_fault(&self) -> bool {
637        matches!(self, Self::OptionGroupNotFoundFault(_))
638    }
639    /// Returns `true` if the error kind is `RestoreDBInstanceFromDBSnapshotError::ProvisionedIopsNotAvailableInAzFault`.
640    pub fn is_provisioned_iops_not_available_in_az_fault(&self) -> bool {
641        matches!(self, Self::ProvisionedIopsNotAvailableInAzFault(_))
642    }
643    /// Returns `true` if the error kind is `RestoreDBInstanceFromDBSnapshotError::StorageQuotaExceededFault`.
644    pub fn is_storage_quota_exceeded_fault(&self) -> bool {
645        matches!(self, Self::StorageQuotaExceededFault(_))
646    }
647    /// Returns `true` if the error kind is `RestoreDBInstanceFromDBSnapshotError::StorageTypeNotSupportedFault`.
648    pub fn is_storage_type_not_supported_fault(&self) -> bool {
649        matches!(self, Self::StorageTypeNotSupportedFault(_))
650    }
651    /// Returns `true` if the error kind is `RestoreDBInstanceFromDBSnapshotError::TenantDatabaseQuotaExceededFault`.
652    pub fn is_tenant_database_quota_exceeded_fault(&self) -> bool {
653        matches!(self, Self::TenantDatabaseQuotaExceededFault(_))
654    }
655    /// Returns `true` if the error kind is `RestoreDBInstanceFromDBSnapshotError::VpcEncryptionControlViolationException`.
656    pub fn is_vpc_encryption_control_violation_exception(&self) -> bool {
657        matches!(self, Self::VpcEncryptionControlViolationException(_))
658    }
659}
660impl ::std::error::Error for RestoreDBInstanceFromDBSnapshotError {
661    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
662        match self {
663            Self::AuthorizationNotFoundFault(_inner) => ::std::option::Option::Some(_inner),
664            Self::BackupPolicyNotFoundFault(_inner) => ::std::option::Option::Some(_inner),
665            Self::CertificateNotFoundFault(_inner) => ::std::option::Option::Some(_inner),
666            Self::DbClusterSnapshotNotFoundFault(_inner) => ::std::option::Option::Some(_inner),
667            Self::DbInstanceAlreadyExistsFault(_inner) => ::std::option::Option::Some(_inner),
668            Self::DbParameterGroupNotFoundFault(_inner) => ::std::option::Option::Some(_inner),
669            Self::DbSecurityGroupNotFoundFault(_inner) => ::std::option::Option::Some(_inner),
670            Self::DbSnapshotNotFoundFault(_inner) => ::std::option::Option::Some(_inner),
671            Self::DbSubnetGroupDoesNotCoverEnoughAZs(_inner) => ::std::option::Option::Some(_inner),
672            Self::DbSubnetGroupNotFoundFault(_inner) => ::std::option::Option::Some(_inner),
673            Self::DomainNotFoundFault(_inner) => ::std::option::Option::Some(_inner),
674            Self::InstanceQuotaExceededFault(_inner) => ::std::option::Option::Some(_inner),
675            Self::InsufficientDbInstanceCapacityFault(_inner) => ::std::option::Option::Some(_inner),
676            Self::InvalidDbSnapshotStateFault(_inner) => ::std::option::Option::Some(_inner),
677            Self::InvalidRestoreFault(_inner) => ::std::option::Option::Some(_inner),
678            Self::InvalidSubnet(_inner) => ::std::option::Option::Some(_inner),
679            Self::InvalidVpcNetworkStateFault(_inner) => ::std::option::Option::Some(_inner),
680            Self::KmsKeyNotAccessibleFault(_inner) => ::std::option::Option::Some(_inner),
681            Self::NetworkTypeNotSupported(_inner) => ::std::option::Option::Some(_inner),
682            Self::OptionGroupNotFoundFault(_inner) => ::std::option::Option::Some(_inner),
683            Self::ProvisionedIopsNotAvailableInAzFault(_inner) => ::std::option::Option::Some(_inner),
684            Self::StorageQuotaExceededFault(_inner) => ::std::option::Option::Some(_inner),
685            Self::StorageTypeNotSupportedFault(_inner) => ::std::option::Option::Some(_inner),
686            Self::TenantDatabaseQuotaExceededFault(_inner) => ::std::option::Option::Some(_inner),
687            Self::VpcEncryptionControlViolationException(_inner) => ::std::option::Option::Some(_inner),
688            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
689        }
690    }
691}
692impl ::std::fmt::Display for RestoreDBInstanceFromDBSnapshotError {
693    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
694        match self {
695            Self::AuthorizationNotFoundFault(_inner) => _inner.fmt(f),
696            Self::BackupPolicyNotFoundFault(_inner) => _inner.fmt(f),
697            Self::CertificateNotFoundFault(_inner) => _inner.fmt(f),
698            Self::DbClusterSnapshotNotFoundFault(_inner) => _inner.fmt(f),
699            Self::DbInstanceAlreadyExistsFault(_inner) => _inner.fmt(f),
700            Self::DbParameterGroupNotFoundFault(_inner) => _inner.fmt(f),
701            Self::DbSecurityGroupNotFoundFault(_inner) => _inner.fmt(f),
702            Self::DbSnapshotNotFoundFault(_inner) => _inner.fmt(f),
703            Self::DbSubnetGroupDoesNotCoverEnoughAZs(_inner) => _inner.fmt(f),
704            Self::DbSubnetGroupNotFoundFault(_inner) => _inner.fmt(f),
705            Self::DomainNotFoundFault(_inner) => _inner.fmt(f),
706            Self::InstanceQuotaExceededFault(_inner) => _inner.fmt(f),
707            Self::InsufficientDbInstanceCapacityFault(_inner) => _inner.fmt(f),
708            Self::InvalidDbSnapshotStateFault(_inner) => _inner.fmt(f),
709            Self::InvalidRestoreFault(_inner) => _inner.fmt(f),
710            Self::InvalidSubnet(_inner) => _inner.fmt(f),
711            Self::InvalidVpcNetworkStateFault(_inner) => _inner.fmt(f),
712            Self::KmsKeyNotAccessibleFault(_inner) => _inner.fmt(f),
713            Self::NetworkTypeNotSupported(_inner) => _inner.fmt(f),
714            Self::OptionGroupNotFoundFault(_inner) => _inner.fmt(f),
715            Self::ProvisionedIopsNotAvailableInAzFault(_inner) => _inner.fmt(f),
716            Self::StorageQuotaExceededFault(_inner) => _inner.fmt(f),
717            Self::StorageTypeNotSupportedFault(_inner) => _inner.fmt(f),
718            Self::TenantDatabaseQuotaExceededFault(_inner) => _inner.fmt(f),
719            Self::VpcEncryptionControlViolationException(_inner) => _inner.fmt(f),
720            Self::Unhandled(_inner) => {
721                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
722                    write!(f, "unhandled error ({code})")
723                } else {
724                    f.write_str("unhandled error")
725                }
726            }
727        }
728    }
729}
730impl ::aws_smithy_types::retry::ProvideErrorKind for RestoreDBInstanceFromDBSnapshotError {
731    fn code(&self) -> ::std::option::Option<&str> {
732        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
733    }
734    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
735        ::std::option::Option::None
736    }
737}
738impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for RestoreDBInstanceFromDBSnapshotError {
739    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
740        match self {
741            Self::AuthorizationNotFoundFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
742            Self::BackupPolicyNotFoundFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
743            Self::CertificateNotFoundFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
744            Self::DbClusterSnapshotNotFoundFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
745            Self::DbInstanceAlreadyExistsFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
746            Self::DbParameterGroupNotFoundFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
747            Self::DbSecurityGroupNotFoundFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
748            Self::DbSnapshotNotFoundFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
749            Self::DbSubnetGroupDoesNotCoverEnoughAZs(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
750            Self::DbSubnetGroupNotFoundFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
751            Self::DomainNotFoundFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
752            Self::InstanceQuotaExceededFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
753            Self::InsufficientDbInstanceCapacityFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
754            Self::InvalidDbSnapshotStateFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
755            Self::InvalidRestoreFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
756            Self::InvalidSubnet(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
757            Self::InvalidVpcNetworkStateFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
758            Self::KmsKeyNotAccessibleFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
759            Self::NetworkTypeNotSupported(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
760            Self::OptionGroupNotFoundFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
761            Self::ProvisionedIopsNotAvailableInAzFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
762            Self::StorageQuotaExceededFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
763            Self::StorageTypeNotSupportedFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
764            Self::TenantDatabaseQuotaExceededFault(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
765            Self::VpcEncryptionControlViolationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
766            Self::Unhandled(_inner) => &_inner.meta,
767        }
768    }
769}
770impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for RestoreDBInstanceFromDBSnapshotError {
771    fn create_unhandled_error(
772        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
773        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
774    ) -> Self {
775        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
776            source,
777            meta: meta.unwrap_or_default(),
778        })
779    }
780}
781impl ::aws_types::request_id::RequestId for crate::operation::restore_db_instance_from_db_snapshot::RestoreDBInstanceFromDBSnapshotError {
782    fn request_id(&self) -> Option<&str> {
783        self.meta().request_id()
784    }
785}
786
787pub use crate::operation::restore_db_instance_from_db_snapshot::_restore_db_instance_from_db_snapshot_input::RestoreDbInstanceFromDbSnapshotInput;
788
789pub use crate::operation::restore_db_instance_from_db_snapshot::_restore_db_instance_from_db_snapshot_output::RestoreDbInstanceFromDbSnapshotOutput;
790
791mod _restore_db_instance_from_db_snapshot_input;
792
793mod _restore_db_instance_from_db_snapshot_output;
794
795/// Builders
796pub mod builders;