Skip to content

restore_db_cluster_from_snapshot async

restore_db_cluster_from_snapshot(
    *,
    config_overrides: Optional[AsyncRDSClientConfig] = None,
    availability_zones: Optional[AvailabilityZones] = None,
    db_cluster_identifier: Optional[String] = None,
    snapshot_identifier: Optional[String] = None,
    engine: Optional[String] = None,
    engine_version: Optional[String] = None,
    port: Optional[IntegerOptional] = None,
    db_subnet_group_name: Optional[String] = None,
    database_name: Optional[String] = None,
    option_group_name: Optional[String] = None,
    vpc_security_group_ids: Optional[VpcSecurityGroupIdList] = None,
    tags: Optional[TagList] = None,
    kms_key_id: Optional[String] = None,
    enable_iam_database_authentication: Optional[BooleanOptional] = None,
    backtrack_window: Optional[LongOptional] = None,
    enable_cloudwatch_logs_exports: Optional[LogTypeList] = None,
    engine_mode: Optional[String] = None,
    scaling_configuration: Optional[ScalingConfiguration] = None,
    db_cluster_parameter_group_name: Optional[String] = None,
    deletion_protection: Optional[BooleanOptional] = None,
    copy_tags_to_snapshot: Optional[BooleanOptional] = None,
    domain: Optional[String] = None,
    domain_iam_role_name: Optional[String] = None,
    db_cluster_instance_class: Optional[String] = None,
    storage_type: Optional[String] = None,
    iops: Optional[IntegerOptional] = None,
    publicly_accessible: Optional[BooleanOptional] = None,
    network_type: Optional[String] = None,
    serverless_v2_scaling_configuration: Optional[
        ServerlessV2ScalingConfiguration
    ] = None,
    rds_custom_cluster_configuration: Optional[RdsCustomClusterConfiguration] = None,
    monitoring_interval: Optional[IntegerOptional] = None,
    monitoring_role_arn: Optional[String] = None,
    enable_performance_insights: Optional[BooleanOptional] = None,
    performance_insights_kms_key_id: Optional[String] = None,
    performance_insights_retention_period: Optional[IntegerOptional] = None,
    backup_retention_period: Optional[IntegerOptional] = None,
    preferred_backup_window: Optional[String] = None,
    engine_lifecycle_support: Optional[String] = None,
    tag_specifications: Optional[TagSpecificationList] = None,
    enable_vpc_networking: Optional[BooleanOptional] = None,
    enable_internet_access_gateway: Optional[BooleanOptional] = None,
    associated_roles: Optional[DBClusterAssociatedRoles] = None,
) -> RestoreDBClusterFromSnapshotResult

Creates a new DB cluster from a DB snapshot or DB cluster snapshot.

The target DB cluster is created from the source snapshot with a default configuration. If you don't specify a security group, the new DB cluster is associated with the default security group.

You can use the EnableVPCNetworking and EnableInternetAccessGateway parameters together to restore an Aurora PostgreSQL cluster without VPC networking and with internet-based connectivity. These two parameters must always be specified together. Set EnableVPCNetworking to false to disable the VPC network interface (ENI) for the cluster. EnableInternetAccessGateway enables internet-based connectivity through an internet access gateway. IAM database authentication is required and must be enabled using EnableIAMDatabaseAuthentication. Once the cluster is restored, you need to modify the DB cluster to update MasterUserAuthenticationType to iam-db-auth.

You can use the AssociatedRoles parameter to associate one or more Amazon Web Services Identity and Access Management (IAM) roles with an Aurora DB cluster when you restore it from a snapshot.

This operation only restores the DB cluster, not the DB instances for that DB cluster. You must invoke the CreateDBInstance operation to create DB instances for the restored DB cluster, specifying the identifier of the restored DB cluster in DBClusterIdentifier. You can create DB instances only after the RestoreDBClusterFromSnapshot operation has completed and the DB cluster is available.

For more information on Amazon Aurora DB clusters, see What is Amazon Aurora? in the Amazon Aurora User Guide.

For more information on Multi-AZ DB clusters, see Multi-AZ DB cluster deployments in the Amazon RDS User Guide.

Parameters:

  • availability_zones (Optional[AvailabilityZones], default: None ) –

    Provides the list of Availability Zones (AZs) where instances in the restored DB cluster can be created.

    Valid for: Aurora DB clusters only

  • db_cluster_identifier (Optional[String], default: None ) –

    The name of the DB cluster to create from the DB snapshot or DB cluster snapshot. This parameter isn't case-sensitive.

    Constraints:

    • Must contain from 1 to 63 letters, numbers, or hyphens

    • First character must be a letter

    • Can't end with a hyphen or contain two consecutive hyphens

    Example: my-snapshot-id

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

  • snapshot_identifier (Optional[String], default: None ) –

    The identifier for the DB snapshot or DB cluster snapshot to restore from.

    You can use either the name or the Amazon Resource Name (ARN) to specify a DB cluster snapshot. However, you can use only the ARN to specify a DB snapshot.

    Constraints:

    • Must match the identifier of an existing Snapshot.

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

  • engine (Optional[String], default: None ) –

    The database engine to use for the new DB cluster.

    Default: The same as source

    Constraint: Must be compatible with the engine of the source

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

  • engine_version (Optional[String], default: None ) –

    The version of the database engine to use for the new DB cluster. If you don't specify an engine version, the default version for the database engine in the Amazon Web Services Region is used.

    To list all of the available engine versions for Aurora MySQL, use the following command:

    aws rds describe-db-engine-versions --engine aurora-mysql --query "DBEngineVersions[].EngineVersion"

    To list all of the available engine versions for Aurora PostgreSQL, use the following command:

    aws rds describe-db-engine-versions --engine aurora-postgresql --query "DBEngineVersions[].EngineVersion"

    To list all of the available engine versions for RDS for MySQL, use the following command:

    aws rds describe-db-engine-versions --engine mysql --query "DBEngineVersions[].EngineVersion"

    To list all of the available engine versions for RDS for PostgreSQL, use the following command:

    aws rds describe-db-engine-versions --engine postgres --query "DBEngineVersions[].EngineVersion"

    Aurora MySQL

    See Database engine updates for Amazon Aurora MySQL in the Amazon Aurora User Guide.

    Aurora PostgreSQL

    See Amazon Aurora PostgreSQL releases and engine versions in the Amazon Aurora User Guide.

    MySQL

    See Amazon RDS for MySQL in the Amazon RDS User Guide.

    PostgreSQL

    See Amazon RDS for PostgreSQL versions and extensions in the Amazon RDS User Guide.

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

  • port (Optional[IntegerOptional], default: None ) –

    The port number on which the new DB cluster accepts connections.

    Constraints: This value must be 1150-65535

    Default: The same port as the original DB cluster.

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

  • db_subnet_group_name (Optional[String], default: None ) –

    The name of the DB subnet group to use for the new DB cluster.

    Constraints: If supplied, must match the name of an existing DB subnet group.

    Example: mydbsubnetgroup

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

  • database_name (Optional[String], default: None ) –

    The database name for the restored DB cluster.

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

  • option_group_name (Optional[String], default: None ) –

    The name of the option group to use for the restored DB cluster.

    DB clusters are associated with a default option group that can't be modified.

  • vpc_security_group_ids (Optional[VpcSecurityGroupIdList], default: None ) –

    A list of VPC security groups that the new DB cluster will belong to.

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

  • tags (Optional[TagList], default: None ) –

    The tags to be assigned to the restored DB cluster.

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

  • kms_key_id (Optional[String], default: None ) –

    The Amazon Web Services KMS key identifier to use when restoring an encrypted DB cluster from a DB snapshot or DB cluster snapshot.

    The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. To use a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN.

    When you don't specify a value for the KmsKeyId parameter, then the following occurs:

    • If the DB snapshot or DB cluster snapshot in SnapshotIdentifier is encrypted, then the restored DB cluster is encrypted using the KMS key that was used to encrypt the DB snapshot or DB cluster snapshot.

    • If the DB snapshot or DB cluster snapshot in SnapshotIdentifier isn't encrypted, then the restored DB cluster isn't encrypted.

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

  • enable_iam_database_authentication (Optional[BooleanOptional], default: None ) –

    Specifies whether to enable mapping of Amazon Web Services Identity and Access Management (IAM) accounts to database accounts. By default, mapping isn't enabled.

    For more information, see IAM Database Authentication in the Amazon Aurora User Guide or IAM database authentication for MariaDB, MySQL, and PostgreSQL in the Amazon RDS User Guide.

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

  • backtrack_window (Optional[LongOptional], default: None ) –

    The target backtrack window, in seconds. To disable backtracking, set this value to 0.

    Currently, Backtrack is only supported for Aurora MySQL DB clusters.

    Default: 0

    Constraints:

    • If specified, this value must be set to a number from 0 to 259,200 (72 hours).

    Valid for: Aurora DB clusters only

  • enable_cloudwatch_logs_exports (Optional[LogTypeList], default: None ) –

    The list of logs that the restored DB cluster is to export to Amazon CloudWatch Logs. The values in the list depend on the DB engine being used.

    RDS for MySQL

    Possible values are error, general, slowquery, and iam-db-auth-error.

    RDS for PostgreSQL

    Possible values are postgresql, upgrade, and iam-db-auth-error.

    Aurora MySQL

    Possible values are audit, error, general, instance, slowquery, and iam-db-auth-error.

    Aurora PostgreSQL

    Possible value are instance, postgresql, and iam-db-auth-error.

    For more information about exporting CloudWatch Logs for Amazon RDS, see Publishing Database Logs to Amazon CloudWatch Logs in the Amazon RDS User Guide.

    For more information about exporting CloudWatch Logs for Amazon Aurora, see Publishing Database Logs to Amazon CloudWatch Logs in the Amazon Aurora User Guide.

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

  • engine_mode (Optional[String], default: None ) –

    The DB engine mode of the DB cluster, either provisioned or serverless.

    For more information, see CreateDBCluster.

    Valid for: Aurora DB clusters only

  • scaling_configuration (Optional[ScalingConfiguration], default: None ) –

    For DB clusters in serverless DB engine mode, the scaling properties of the DB cluster.

    Valid for: Aurora DB clusters only

  • db_cluster_parameter_group_name (Optional[String], default: None ) –

    The name of the DB cluster parameter group to associate with this DB cluster. If this argument is omitted, the default DB cluster parameter group for the specified engine is used.

    Constraints:

    • If supplied, must match the name of an existing default DB cluster parameter group.

    • Must be 1 to 255 letters, numbers, or hyphens.

    • First character must be a letter.

    • Can't end with a hyphen or contain two consecutive hyphens.

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

  • deletion_protection (Optional[BooleanOptional], default: None ) –

    Specifies whether to enable deletion protection for the DB cluster. The database can't be deleted when deletion protection is enabled. By default, deletion protection isn't enabled.

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

  • copy_tags_to_snapshot (Optional[BooleanOptional], default: None ) –

    Specifies whether to copy all tags from the restored DB cluster to snapshots of the restored DB cluster. The default is not to copy them.

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

  • domain (Optional[String], default: None ) –

    The Active Directory directory ID to restore the DB cluster in. The domain must be created prior to this operation. Currently, only MySQL, Microsoft SQL Server, Oracle, and PostgreSQL DB instances can be created in an Active Directory Domain.

    For more information, see Kerberos Authentication in the Amazon RDS User Guide.

    Valid for: Aurora DB clusters only

  • domain_iam_role_name (Optional[String], default: None ) –

    The name of the IAM role to be used when making API calls to the Directory Service.

    Valid for: Aurora DB clusters only

  • db_cluster_instance_class (Optional[String], default: None ) –

    The compute and memory capacity of the each DB instance in the Multi-AZ DB cluster, for example db.m6gd.xlarge. Not all DB instance classes are available in all Amazon Web Services Regions, or for all database engines.

    For the full list of DB instance classes, and availability for your engine, see DB Instance Class in the Amazon RDS User Guide.

    Valid for: Multi-AZ DB clusters only

  • storage_type (Optional[String], default: None ) –

    Specifies the storage type to be associated with the DB cluster.

    When specified for a Multi-AZ DB cluster, a value for the Iops parameter is required.

    Valid Values: aurora, aurora-iopt1 (Aurora DB clusters); io1 (Multi-AZ DB clusters)

    Default: aurora (Aurora DB clusters); io1 (Multi-AZ DB clusters)

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

  • iops (Optional[IntegerOptional], default: None ) –

    The amount of Provisioned IOPS (input/output operations per second) to be initially allocated for each DB instance in the Multi-AZ DB cluster.

    For information about valid IOPS values, see Amazon RDS Provisioned IOPS storage in the Amazon RDS User Guide.

    Constraints: Must be a multiple between .5 and 50 of the storage amount for the DB instance.

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

  • publicly_accessible (Optional[BooleanOptional], default: None ) –

    Specifies whether the DB cluster is publicly accessible.

    When the DB cluster is publicly accessible, its Domain Name System (DNS) endpoint resolves to the private IP address from within the DB cluster's virtual private cloud (VPC). It resolves to the public IP address from outside of the DB cluster's VPC. Access to the DB cluster is ultimately controlled by the security group it uses. That public access is not permitted if the security group assigned to the DB cluster doesn't permit it.

    When the DB cluster isn't publicly accessible, it is an internal DB cluster with a DNS name that resolves to a private IP address.

    Default: The default behavior varies depending on whether DBSubnetGroupName is specified.

    If DBSubnetGroupName isn't specified, and PubliclyAccessible isn't specified, the following applies:

    • If the default VPC in the target Region doesn’t have an internet gateway attached to it, the DB cluster is private.

    • If the default VPC in the target Region has an internet gateway attached to it, the DB cluster is public.

    If DBSubnetGroupName is specified, and PubliclyAccessible isn't specified, the following applies:

    • If the subnets are part of a VPC that doesn’t have an internet gateway attached to it, the DB cluster is private.

    • If the subnets are part of a VPC that has an internet gateway attached to it, the DB cluster is public.

    Valid for: Aurora DB clusters and Multi-AZ DB clusters

  • network_type (Optional[String], default: None ) –

    The network type of the DB cluster.

    Valid Values:

    • IPV4

    • DUAL

    The network type is determined by the DBSubnetGroup specified for the DB cluster. A DBSubnetGroup can support only the IPv4 protocol or the IPv4 and the IPv6 protocols (DUAL).

    For more information, see Working with a DB instance in a VPC in the Amazon Aurora User Guide.

    Valid for: Aurora DB clusters only

  • rds_custom_cluster_configuration (Optional[RdsCustomClusterConfiguration], default: None ) –

    Reserved for future use.

  • monitoring_interval (Optional[IntegerOptional], default: None ) –

    The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB cluster. To turn off collecting Enhanced Monitoring metrics, specify 0.

    If MonitoringRoleArn is specified, also set MonitoringInterval to a value other than 0.

    Valid Values: 0 | 1 | 5 | 10 | 15 | 30 | 60

    Default: 0

  • monitoring_role_arn (Optional[String], default: None ) –

    The Amazon Resource Name (ARN) for the IAM role that permits RDS to send Enhanced Monitoring metrics to Amazon CloudWatch Logs. An example is arn:aws:iam:123456789012:role/emaccess.

    If MonitoringInterval is set to a value other than 0, supply a MonitoringRoleArn value.

  • enable_performance_insights (Optional[BooleanOptional], default: None ) –

    Specifies whether to turn on Performance Insights for the DB cluster.

  • performance_insights_kms_key_id (Optional[String], default: None ) –

    The Amazon Web Services KMS key identifier for encryption of Performance Insights data.

    The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.

    If you don't specify a value for PerformanceInsightsKMSKeyId, then Amazon RDS uses your default KMS key. There is a default KMS key for your Amazon Web Services account. Your Amazon Web Services account has a different default KMS key for each Amazon Web Services Region.

  • performance_insights_retention_period (Optional[IntegerOptional], default: None ) –

    The number of days to retain Performance Insights data.

    Valid Values:

    • 7

    • month * 31, where month is a number of months from 1-23. Examples: 93 (3 months * 31), 341 (11 months * 31), 589 (19 months * 31)

    • 731

    Default: 7 days

    If you specify a retention period that isn't valid, such as 94, Amazon RDS issues an error.

  • backup_retention_period (Optional[IntegerOptional], default: None ) –

    The number of days for which automated backups are retained. Specify a minimum value of 1.

    Valid for Cluster Type: Aurora DB clusters and Multi-AZ DB clusters

    Default: Uses existing setting

    Constraints:

    • Must be a value from 1 to 35.

  • preferred_backup_window (Optional[String], default: None ) –

    The daily time range during which automated backups are created if automated backups are enabled, using the BackupRetentionPeriod parameter.

    The default is a 30-minute window selected at random from an 8-hour block of time for each Amazon Web Services Region. To view the time blocks available, see Backup window in the Amazon Aurora User Guide.

    Valid for Cluster Type: Aurora DB clusters and Multi-AZ DB clusters

    Constraints:

    • Must be in the format hh24:mi-hh24:mi.

    • Must be in Universal Coordinated Time (UTC).

    • Must not conflict with the preferred maintenance window.

    • Must be at least 30 minutes.

  • engine_lifecycle_support (Optional[String], default: None ) –

    The lifecycle type for this DB cluster.

    By default, this value is set to open-source-rds-extended-support, which enrolls your DB cluster into Amazon RDS Extended Support. At the end of standard support, you can avoid charges for Extended Support by setting the value to open-source-rds-extended-support-disabled. In this case, RDS automatically upgrades your restored DB cluster to a higher engine version, if the major engine version is past its end of standard support date.

    You can use this setting to enroll your DB cluster into Amazon RDS Extended Support. With RDS Extended Support, you can run the selected major engine version on your DB cluster past the end of standard support for that engine version. For more information, see the following sections:

    Valid for Cluster Type: Aurora DB clusters and Multi-AZ DB clusters

    Valid Values: open-source-rds-extended-support | open-source-rds-extended-support-disabled

    Default: open-source-rds-extended-support

  • tag_specifications (Optional[TagSpecificationList], default: None ) –

    Tags to assign to resources associated with the DB cluster.

    Valid Values:

    • cluster-auto-backup - The DB cluster's automated backup.

  • enable_vpc_networking (Optional[BooleanOptional], default: None ) –

    Specifies whether to enable VPC networking for the restored DB cluster. Set this parameter to false to create a cluster without the VPC network interface (ENI).

    This parameter must be used together with EnableInternetAccessGateway. When both parameters are specified, IAM database authentication is required. You must also specify EnableIAMDatabaseAuthentication.

    Valid for Cluster Type: Aurora PostgreSQL clusters

  • enable_internet_access_gateway (Optional[BooleanOptional], default: None ) –

    Specifies that the restored DB cluster should use internet-based connectivity through an internet access gateway. This allows clients to connect to the cluster over the internet without requiring a VPC.

    This parameter must be used together with EnableVPCNetworking set to false. When both parameters are specified, IAM database authentication is required. You must also specify EnableIAMDatabaseAuthentication.

    Valid for Cluster Type: Aurora PostgreSQL clusters

  • associated_roles (Optional[DBClusterAssociatedRoles], default: None ) –

    A list of Amazon Web Services Identity and Access Management (IAM) roles to associate with the DB cluster when it's restored from a snapshot. Each role grants the DB cluster permission to access other Amazon Web Services on your behalf. For each role, specify a role ARN and, optionally, the feature name (such as s3Import, s3Export, or Lambda).

    Valid for Cluster Type: Aurora DB clusters only

Raises:

Examples:

To restore a DB cluster from a snapshot The following example restores an Aurora PostgreSQL DB cluster compatible with PostgreSQL version 10.7 from a DB cluster snapshot named test-instance-snapshot.

>>> await client.restore_db_cluster_from_snapshot(db_cluster_identifier='newdbcluster', snapshot_identifier='test-instance-snapshot', engine='aurora-postgresql', engine_version='10.7')
To restore a DB cluster from a snapshot without VPC networking
The following example restores an Aurora DB cluster from a DB cluster snapshot named sample-cluster-snapshot without VPC networking and with internet-based connectivity enabled through an internet access gateway. The EnableVPCNetworking and EnableInternetAccessGateway parameters must always be specified together. IAM database authentication is required when both parameters are specified.
>>> await client.restore_db_cluster_from_snapshot(db_cluster_identifier='restored-cluster', snapshot_identifier='sample-cluster-snapshot', engine='aurora-postgresql', enable_vpc_networking=False, enable_internet_access_gateway=True, enable_iam_database_authentication=True)
To restore a DB cluster from a snapshot with an associated IAM role
The following example restores an Aurora PostgreSQL DB cluster from a snapshot and associates an IAM role for Amazon S3 import in a single call.
>>> await client.restore_db_cluster_from_snapshot(db_cluster_identifier='restored-cluster', snapshot_identifier='test-instance-snapshot', engine='aurora-postgresql', associated_roles=[{'RoleArn': 'arn:aws:iam::123456789012:role/RDSLoadFromS3', 'FeatureName': 's3Import'}])
Source code in docs_src/capo_rds/_services/async_rds.py
13594
13595
13596
13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611
13612
13613
13614
13615
13616
13617
13618
13619
13620
13621
13622
13623
13624
13625
13626
13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697
13698
13699
13700
13701
13702
13703
13704
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
async def restore_db_cluster_from_snapshot(
    self,
    *,
    config_overrides: Optional[AsyncRDSClientConfig] = None,
    availability_zones: Optional[
        "capo_rds.types.availability_zones.AvailabilityZones"
    ] = None,
    db_cluster_identifier: Optional["capo_rds.types.string.String"] = None,
    snapshot_identifier: Optional["capo_rds.types.string.String"] = None,
    engine: Optional["capo_rds.types.string.String"] = None,
    engine_version: Optional["capo_rds.types.string.String"] = None,
    port: Optional["capo_rds.types.integer_optional.IntegerOptional"] = None,
    db_subnet_group_name: Optional["capo_rds.types.string.String"] = None,
    database_name: Optional["capo_rds.types.string.String"] = None,
    option_group_name: Optional["capo_rds.types.string.String"] = None,
    vpc_security_group_ids: Optional[
        "capo_rds.types.vpc_security_group_id_list.VpcSecurityGroupIdList"
    ] = None,
    tags: Optional["capo_rds.types.tag_list.TagList"] = None,
    kms_key_id: Optional["capo_rds.types.string.String"] = None,
    enable_iam_database_authentication: Optional[
        "capo_rds.types.boolean_optional.BooleanOptional"
    ] = None,
    backtrack_window: Optional["capo_rds.types.long_optional.LongOptional"] = None,
    enable_cloudwatch_logs_exports: Optional[
        "capo_rds.types.log_type_list.LogTypeList"
    ] = None,
    engine_mode: Optional["capo_rds.types.string.String"] = None,
    scaling_configuration: Optional[
        "capo_rds.types.scaling_configuration.ScalingConfiguration"
    ] = None,
    db_cluster_parameter_group_name: Optional[
        "capo_rds.types.string.String"
    ] = None,
    deletion_protection: Optional[
        "capo_rds.types.boolean_optional.BooleanOptional"
    ] = None,
    copy_tags_to_snapshot: Optional[
        "capo_rds.types.boolean_optional.BooleanOptional"
    ] = None,
    domain: Optional["capo_rds.types.string.String"] = None,
    domain_iam_role_name: Optional["capo_rds.types.string.String"] = None,
    db_cluster_instance_class: Optional["capo_rds.types.string.String"] = None,
    storage_type: Optional["capo_rds.types.string.String"] = None,
    iops: Optional["capo_rds.types.integer_optional.IntegerOptional"] = None,
    publicly_accessible: Optional[
        "capo_rds.types.boolean_optional.BooleanOptional"
    ] = None,
    network_type: Optional["capo_rds.types.string.String"] = None,
    serverless_v2_scaling_configuration: Optional[
        "capo_rds.types.serverless_v2_scaling_configuration.ServerlessV2ScalingConfiguration"
    ] = None,
    rds_custom_cluster_configuration: Optional[
        "capo_rds.types.rds_custom_cluster_configuration.RdsCustomClusterConfiguration"
    ] = None,
    monitoring_interval: Optional[
        "capo_rds.types.integer_optional.IntegerOptional"
    ] = None,
    monitoring_role_arn: Optional["capo_rds.types.string.String"] = None,
    enable_performance_insights: Optional[
        "capo_rds.types.boolean_optional.BooleanOptional"
    ] = None,
    performance_insights_kms_key_id: Optional[
        "capo_rds.types.string.String"
    ] = None,
    performance_insights_retention_period: Optional[
        "capo_rds.types.integer_optional.IntegerOptional"
    ] = None,
    backup_retention_period: Optional[
        "capo_rds.types.integer_optional.IntegerOptional"
    ] = None,
    preferred_backup_window: Optional["capo_rds.types.string.String"] = None,
    engine_lifecycle_support: Optional["capo_rds.types.string.String"] = None,
    tag_specifications: Optional[
        "capo_rds.types.tag_specification_list.TagSpecificationList"
    ] = None,
    enable_vpc_networking: Optional[
        "capo_rds.types.boolean_optional.BooleanOptional"
    ] = None,
    enable_internet_access_gateway: Optional[
        "capo_rds.types.boolean_optional.BooleanOptional"
    ] = None,
    associated_roles: Optional[
        "capo_rds.types.db_cluster_associated_roles.DBClusterAssociatedRoles"
    ] = None,
) -> "capo_rds.types.restore_db_cluster_from_snapshot_result.RestoreDBClusterFromSnapshotResult":
    """<p>Creates a new DB cluster from a DB snapshot or DB cluster snapshot.</p> <p>The target DB cluster is created from the source snapshot with a default configuration. If you don't specify a security group, the new DB cluster is associated with the default security group.</p> <p>You can use the <code>EnableVPCNetworking</code> and <code>EnableInternetAccessGateway</code> parameters together to restore an Aurora PostgreSQL cluster without VPC networking and with internet-based connectivity. These two parameters must always be specified together. Set <code>EnableVPCNetworking</code> to <code>false</code> to disable the VPC network interface (ENI) for the cluster. <code>EnableInternetAccessGateway</code> enables internet-based connectivity through an internet access gateway. IAM database authentication is required and must be enabled using <code>EnableIAMDatabaseAuthentication</code>. Once the cluster is restored, you need to modify the DB cluster to update <code>MasterUserAuthenticationType</code> to <code>iam-db-auth</code>. </p> <p>You can use the <code>AssociatedRoles</code> parameter to associate one or more Amazon Web Services Identity and Access Management (IAM) roles with an Aurora DB cluster when you restore it from a snapshot.</p> <note> <p>This operation only restores the DB cluster, not the DB instances for that DB cluster. You must invoke the <code>CreateDBInstance</code> operation to create DB instances for the restored DB cluster, specifying the identifier of the restored DB cluster in <code>DBClusterIdentifier</code>. You can create DB instances only after the <code>RestoreDBClusterFromSnapshot</code> operation has completed and the DB cluster is available.</p> </note> <p>For more information on Amazon Aurora DB clusters, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html"> What is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide</i>.</p> <p>For more information on Multi-AZ DB clusters, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html"> Multi-AZ DB cluster deployments</a> in the <i>Amazon RDS User Guide.</i> </p>

    Args:
        availability_zones: <p>Provides the list of Availability Zones (AZs) where instances in the restored DB cluster can be created.</p> <p>Valid for: Aurora DB clusters only</p>
        db_cluster_identifier: <p>The name of the DB cluster to create from the DB snapshot or DB cluster snapshot. This parameter isn't case-sensitive.</p> <p>Constraints:</p> <ul> <li> <p>Must contain from 1 to 63 letters, numbers, or hyphens</p> </li> <li> <p>First character must be a letter</p> </li> <li> <p>Can't end with a hyphen or contain two consecutive hyphens</p> </li> </ul> <p>Example: <code>my-snapshot-id</code> </p> <p>Valid for: Aurora DB clusters and Multi-AZ DB clusters</p>
        snapshot_identifier: <p>The identifier for the DB snapshot or DB cluster snapshot to restore from.</p> <p>You can use either the name or the Amazon Resource Name (ARN) to specify a DB cluster snapshot. However, you can use only the ARN to specify a DB snapshot.</p> <p>Constraints:</p> <ul> <li> <p>Must match the identifier of an existing Snapshot.</p> </li> </ul> <p>Valid for: Aurora DB clusters and Multi-AZ DB clusters</p>
        engine: <p>The database engine to use for the new DB cluster.</p> <p>Default: The same as source</p> <p>Constraint: Must be compatible with the engine of the source</p> <p>Valid for: Aurora DB clusters and Multi-AZ DB clusters</p>
        engine_version: <p>The version of the database engine to use for the new DB cluster. If you don't specify an engine version, the default version for the database engine in the Amazon Web Services Region is used.</p> <p>To list all of the available engine versions for Aurora MySQL, use the following command:</p> <p> <code>aws rds describe-db-engine-versions --engine aurora-mysql --query "DBEngineVersions[].EngineVersion"</code> </p> <p>To list all of the available engine versions for Aurora PostgreSQL, use the following command:</p> <p> <code>aws rds describe-db-engine-versions --engine aurora-postgresql --query "DBEngineVersions[].EngineVersion"</code> </p> <p>To list all of the available engine versions for RDS for MySQL, use the following command:</p> <p> <code>aws rds describe-db-engine-versions --engine mysql --query "DBEngineVersions[].EngineVersion"</code> </p> <p>To list all of the available engine versions for RDS for PostgreSQL, use the following command:</p> <p> <code>aws rds describe-db-engine-versions --engine postgres --query "DBEngineVersions[].EngineVersion"</code> </p> <p> <b>Aurora MySQL</b> </p> <p>See <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Updates.html">Database engine updates for Amazon Aurora MySQL</a> in the <i>Amazon Aurora User Guide</i>.</p> <p> <b>Aurora PostgreSQL</b> </p> <p>See <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Updates.20180305.html">Amazon Aurora PostgreSQL releases and engine versions</a> in the <i>Amazon Aurora User Guide</i>.</p> <p> <b>MySQL</b> </p> <p>See <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MySQL.html#MySQL.Concepts.VersionMgmt">Amazon RDS for MySQL</a> in the <i>Amazon RDS User Guide.</i> </p> <p> <b>PostgreSQL</b> </p> <p>See <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts">Amazon RDS for PostgreSQL versions and extensions</a> in the <i>Amazon RDS User Guide.</i> </p> <p>Valid for: Aurora DB clusters and Multi-AZ DB clusters</p>
        port: <p>The port number on which the new DB cluster accepts connections.</p> <p>Constraints: This value must be <code>1150-65535</code> </p> <p>Default: The same port as the original DB cluster.</p> <p>Valid for: Aurora DB clusters and Multi-AZ DB clusters</p>
        db_subnet_group_name: <p>The name of the DB subnet group to use for the new DB cluster.</p> <p>Constraints: If supplied, must match the name of an existing DB subnet group.</p> <p>Example: <code>mydbsubnetgroup</code> </p> <p>Valid for: Aurora DB clusters and Multi-AZ DB clusters</p>
        database_name: <p>The database name for the restored DB cluster.</p> <p>Valid for: Aurora DB clusters and Multi-AZ DB clusters</p>
        option_group_name: <p>The name of the option group to use for the restored DB cluster.</p> <p>DB clusters are associated with a default option group that can't be modified.</p>
        vpc_security_group_ids: <p>A list of VPC security groups that the new DB cluster will belong to.</p> <p>Valid for: Aurora DB clusters and Multi-AZ DB clusters</p>
        tags: <p>The tags to be assigned to the restored DB cluster.</p> <p>Valid for: Aurora DB clusters and Multi-AZ DB clusters</p>
        kms_key_id: <p>The Amazon Web Services KMS key identifier to use when restoring an encrypted DB cluster from a DB snapshot or DB cluster snapshot.</p> <p>The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. To use a KMS key in a different Amazon Web Services account, specify the key ARN or alias ARN.</p> <p>When you don't specify a value for the <code>KmsKeyId</code> parameter, then the following occurs:</p> <ul> <li> <p>If the DB snapshot or DB cluster snapshot in <code>SnapshotIdentifier</code> is encrypted, then the restored DB cluster is encrypted using the KMS key that was used to encrypt the DB snapshot or DB cluster snapshot.</p> </li> <li> <p>If the DB snapshot or DB cluster snapshot in <code>SnapshotIdentifier</code> isn't encrypted, then the restored DB cluster isn't encrypted.</p> </li> </ul> <p>Valid for: Aurora DB clusters and Multi-AZ DB clusters</p>
        enable_iam_database_authentication: <p>Specifies whether to enable mapping of Amazon Web Services Identity and Access Management (IAM) accounts to database accounts. By default, mapping isn't enabled.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.IAMDBAuth.html"> IAM Database Authentication</a> in the <i>Amazon Aurora User Guide</i> or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.html"> IAM database authentication for MariaDB, MySQL, and PostgreSQL</a> in the <i>Amazon RDS User Guide</i>.</p> <p>Valid for: Aurora DB clusters and Multi-AZ DB clusters</p>
        backtrack_window: <p>The target backtrack window, in seconds. To disable backtracking, set this value to 0.</p> <note> <p>Currently, Backtrack is only supported for Aurora MySQL DB clusters.</p> </note> <p>Default: 0</p> <p>Constraints:</p> <ul> <li> <p>If specified, this value must be set to a number from 0 to 259,200 (72 hours).</p> </li> </ul> <p>Valid for: Aurora DB clusters only</p>
        enable_cloudwatch_logs_exports: <p>The list of logs that the restored DB cluster is to export to Amazon CloudWatch Logs. The values in the list depend on the DB engine being used.</p> <p> <b>RDS for MySQL</b> </p> <p>Possible values are <code>error</code>, <code>general</code>, <code>slowquery</code>, and <code>iam-db-auth-error</code>.</p> <p> <b>RDS for PostgreSQL</b> </p> <p>Possible values are <code>postgresql</code>, <code>upgrade</code>, and <code>iam-db-auth-error</code>.</p> <p> <b>Aurora MySQL</b> </p> <p>Possible values are <code>audit</code>, <code>error</code>, <code>general</code>, <code>instance</code>, <code>slowquery</code>, and <code>iam-db-auth-error</code>.</p> <p> <b>Aurora PostgreSQL</b> </p> <p>Possible value are <code>instance</code>, <code>postgresql</code>, and <code>iam-db-auth-error</code>.</p> <p>For more information about exporting CloudWatch Logs for Amazon RDS, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch">Publishing Database Logs to Amazon CloudWatch Logs</a> in the <i>Amazon RDS User Guide</i>.</p> <p>For more information about exporting CloudWatch Logs for Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch">Publishing Database Logs to Amazon CloudWatch Logs</a> in the <i>Amazon Aurora User Guide</i>.</p> <p>Valid for: Aurora DB clusters and Multi-AZ DB clusters</p>
        engine_mode: <p>The DB engine mode of the DB cluster, either <code>provisioned</code> or <code>serverless</code>.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBCluster.html"> CreateDBCluster</a>.</p> <p>Valid for: Aurora DB clusters only</p>
        scaling_configuration: <p>For DB clusters in <code>serverless</code> DB engine mode, the scaling properties of the DB cluster.</p> <p>Valid for: Aurora DB clusters only</p>
        db_cluster_parameter_group_name: <p>The name of the DB cluster parameter group to associate with this DB cluster. If this argument is omitted, the default DB cluster parameter group for the specified engine is used.</p> <p>Constraints:</p> <ul> <li> <p>If supplied, must match the name of an existing default DB cluster parameter group.</p> </li> <li> <p>Must be 1 to 255 letters, numbers, or hyphens.</p> </li> <li> <p>First character must be a letter.</p> </li> <li> <p>Can't end with a hyphen or contain two consecutive hyphens.</p> </li> </ul> <p>Valid for: Aurora DB clusters and Multi-AZ DB clusters</p>
        deletion_protection: <p>Specifies whether to enable deletion protection for the DB cluster. The database can't be deleted when deletion protection is enabled. By default, deletion protection isn't enabled.</p> <p>Valid for: Aurora DB clusters and Multi-AZ DB clusters</p>
        copy_tags_to_snapshot: <p>Specifies whether to copy all tags from the restored DB cluster to snapshots of the restored DB cluster. The default is not to copy them.</p> <p>Valid for: Aurora DB clusters and Multi-AZ DB clusters</p>
        domain: <p>The Active Directory directory ID to restore the DB cluster in. The domain must be created prior to this operation. Currently, only MySQL, Microsoft SQL Server, Oracle, and PostgreSQL DB instances can be created in an Active Directory Domain.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/kerberos-authentication.html"> Kerberos Authentication</a> in the <i>Amazon RDS User Guide</i>.</p> <p>Valid for: Aurora DB clusters only</p>
        domain_iam_role_name: <p>The name of the IAM role to be used when making API calls to the Directory Service.</p> <p>Valid for: Aurora DB clusters only</p>
        db_cluster_instance_class: <p>The compute and memory capacity of the each DB instance in the Multi-AZ DB cluster, for example db.m6gd.xlarge. Not all DB instance classes are available in all Amazon Web Services Regions, or for all database engines.</p> <p>For the full list of DB instance classes, and availability for your engine, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html">DB Instance Class</a> in the <i>Amazon RDS User Guide.</i> </p> <p>Valid for: Multi-AZ DB clusters only</p>
        storage_type: <p>Specifies the storage type to be associated with the DB cluster.</p> <p>When specified for a Multi-AZ DB cluster, a value for the <code>Iops</code> parameter is required.</p> <p>Valid Values: <code>aurora</code>, <code>aurora-iopt1</code> (Aurora DB clusters); <code>io1</code> (Multi-AZ DB clusters)</p> <p>Default: <code>aurora</code> (Aurora DB clusters); <code>io1</code> (Multi-AZ DB clusters)</p> <p>Valid for: Aurora DB clusters and Multi-AZ DB clusters</p>
        iops: <p>The amount of Provisioned IOPS (input/output operations per second) to be initially allocated for each DB instance in the Multi-AZ DB cluster.</p> <p>For information about valid IOPS values, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#USER_PIOPS">Amazon RDS Provisioned IOPS storage</a> in the <i>Amazon RDS User Guide</i>.</p> <p>Constraints: Must be a multiple between .5 and 50 of the storage amount for the DB instance.</p> <p>Valid for: Aurora DB clusters and Multi-AZ DB clusters</p>
        publicly_accessible: <p>Specifies whether the DB cluster is publicly accessible.</p> <p>When the DB cluster is publicly accessible, its Domain Name System (DNS) endpoint resolves to the private IP address from within the DB cluster's virtual private cloud (VPC). It resolves to the public IP address from outside of the DB cluster's VPC. Access to the DB cluster is ultimately controlled by the security group it uses. That public access is not permitted if the security group assigned to the DB cluster doesn't permit it.</p> <p>When the DB cluster isn't publicly accessible, it is an internal DB cluster with a DNS name that resolves to a private IP address.</p> <p>Default: The default behavior varies depending on whether <code>DBSubnetGroupName</code> is specified.</p> <p>If <code>DBSubnetGroupName</code> isn't specified, and <code>PubliclyAccessible</code> isn't specified, the following applies:</p> <ul> <li> <p>If the default VPC in the target Region doesn’t have an internet gateway attached to it, the DB cluster is private.</p> </li> <li> <p>If the default VPC in the target Region has an internet gateway attached to it, the DB cluster is public.</p> </li> </ul> <p>If <code>DBSubnetGroupName</code> is specified, and <code>PubliclyAccessible</code> isn't specified, the following applies:</p> <ul> <li> <p>If the subnets are part of a VPC that doesn’t have an internet gateway attached to it, the DB cluster is private.</p> </li> <li> <p>If the subnets are part of a VPC that has an internet gateway attached to it, the DB cluster is public.</p> </li> </ul> <p>Valid for: Aurora DB clusters and Multi-AZ DB clusters</p>
        network_type: <p>The network type of the DB cluster.</p> <p>Valid Values:</p> <ul> <li> <p> <code>IPV4</code> </p> </li> <li> <p> <code>DUAL</code> </p> </li> </ul> <p>The network type is determined by the <code>DBSubnetGroup</code> specified for the DB cluster. A <code>DBSubnetGroup</code> can support only the IPv4 protocol or the IPv4 and the IPv6 protocols (<code>DUAL</code>).</p> <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html"> Working with a DB instance in a VPC</a> in the <i>Amazon Aurora User Guide.</i> </p> <p>Valid for: Aurora DB clusters only</p>
        rds_custom_cluster_configuration: <p>Reserved for future use.</p>
        monitoring_interval: <p>The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB cluster. To turn off collecting Enhanced Monitoring metrics, specify <code>0</code>.</p> <p>If <code>MonitoringRoleArn</code> is specified, also set <code>MonitoringInterval</code> to a value other than <code>0</code>.</p> <p>Valid Values: <code>0 | 1 | 5 | 10 | 15 | 30 | 60</code> </p> <p>Default: <code>0</code> </p>
        monitoring_role_arn: <p>The Amazon Resource Name (ARN) for the IAM role that permits RDS to send Enhanced Monitoring metrics to Amazon CloudWatch Logs. An example is <code>arn:aws:iam:123456789012:role/emaccess</code>.</p> <p>If <code>MonitoringInterval</code> is set to a value other than <code>0</code>, supply a <code>MonitoringRoleArn</code> value.</p>
        enable_performance_insights: <p>Specifies whether to turn on Performance Insights for the DB cluster.</p>
        performance_insights_kms_key_id: <p>The Amazon Web Services KMS key identifier for encryption of Performance Insights data.</p> <p>The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.</p> <p>If you don't specify a value for <code>PerformanceInsightsKMSKeyId</code>, then Amazon RDS uses your default KMS key. There is a default KMS key for your Amazon Web Services account. Your Amazon Web Services account has a different default KMS key for each Amazon Web Services Region.</p>
        performance_insights_retention_period: <p>The number of days to retain Performance Insights data.</p> <p>Valid Values:</p> <ul> <li> <p> <code>7</code> </p> </li> <li> <p> <i>month</i> * 31, where <i>month</i> is a number of months from 1-23. Examples: <code>93</code> (3 months * 31), <code>341</code> (11 months * 31), <code>589</code> (19 months * 31)</p> </li> <li> <p> <code>731</code> </p> </li> </ul> <p>Default: <code>7</code> days</p> <p>If you specify a retention period that isn't valid, such as <code>94</code>, Amazon RDS issues an error.</p>
        backup_retention_period: <p>The number of days for which automated backups are retained. Specify a minimum value of <code>1</code>.</p> <p>Valid for Cluster Type: Aurora DB clusters and Multi-AZ DB clusters</p> <p>Default: Uses existing setting</p> <p>Constraints:</p> <ul> <li> <p>Must be a value from 1 to 35.</p> </li> </ul>
        preferred_backup_window: <p>The daily time range during which automated backups are created if automated backups are enabled, using the <code>BackupRetentionPeriod</code> parameter.</p> <p>The default is a 30-minute window selected at random from an 8-hour block of time for each Amazon Web Services Region. To view the time blocks available, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Managing.Backups.html#Aurora.Managing.Backups.BackupWindow"> Backup window</a> in the <i>Amazon Aurora User Guide</i>.</p> <p>Valid for Cluster Type: Aurora DB clusters and Multi-AZ DB clusters</p> <p>Constraints:</p> <ul> <li> <p>Must be in the format <code>hh24:mi-hh24:mi</code>.</p> </li> <li> <p>Must be in Universal Coordinated Time (UTC).</p> </li> <li> <p>Must not conflict with the preferred maintenance window.</p> </li> <li> <p>Must be at least 30 minutes.</p> </li> </ul>
        engine_lifecycle_support: <p>The lifecycle type for this DB cluster.</p> <note> <p>By default, this value is set to <code>open-source-rds-extended-support</code>, which enrolls your DB cluster into Amazon RDS Extended Support. At the end of standard support, you can avoid charges for Extended Support by setting the value to <code>open-source-rds-extended-support-disabled</code>. In this case, RDS automatically upgrades your restored DB cluster to a higher engine version, if the major engine version is past its end of standard support date.</p> </note> <p>You can use this setting to enroll your DB cluster into Amazon RDS Extended Support. With RDS Extended Support, you can run the selected major engine version on your DB cluster past the end of standard support for that engine version. For more information, see the following sections:</p> <ul> <li> <p>Amazon Aurora - <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/extended-support.html">Amazon RDS Extended Support with Amazon Aurora</a> in the <i>Amazon Aurora User Guide</i> </p> </li> <li> <p>Amazon RDS - <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/extended-support.html">Amazon RDS Extended Support with Amazon RDS</a> in the <i>Amazon RDS User Guide</i> </p> </li> </ul> <p>Valid for Cluster Type: Aurora DB clusters and Multi-AZ DB clusters</p> <p>Valid Values: <code>open-source-rds-extended-support | open-source-rds-extended-support-disabled</code> </p> <p>Default: <code>open-source-rds-extended-support</code> </p>
        tag_specifications: <p>Tags to assign to resources associated with the DB cluster.</p> <p>Valid Values: </p> <ul> <li> <p> <code>cluster-auto-backup</code> - The DB cluster's automated backup.</p> </li> </ul>
        enable_vpc_networking: <p>Specifies whether to enable VPC networking for the restored DB cluster. Set this parameter to <code>false</code> to create a cluster without the VPC network interface (ENI).</p> <p>This parameter must be used together with <code>EnableInternetAccessGateway</code>. When both parameters are specified, IAM database authentication is required. You must also specify <code>EnableIAMDatabaseAuthentication</code>.</p> <p>Valid for Cluster Type: Aurora PostgreSQL clusters</p>
        enable_internet_access_gateway: <p>Specifies that the restored DB cluster should use internet-based connectivity through an internet access gateway. This allows clients to connect to the cluster over the internet without requiring a VPC.</p> <p>This parameter must be used together with <code>EnableVPCNetworking</code> set to <code>false</code>. When both parameters are specified, IAM database authentication is required. You must also specify <code>EnableIAMDatabaseAuthentication</code>.</p> <p>Valid for Cluster Type: Aurora PostgreSQL clusters</p>
        associated_roles: <p>A list of Amazon Web Services Identity and Access Management (IAM) roles to associate with the DB cluster when it's restored from a snapshot. Each role grants the DB cluster permission to access other Amazon Web Services on your behalf. For each role, specify a role ARN and, optionally, the feature name (such as <code>s3Import</code>, <code>s3Export</code>, or <code>Lambda</code>).</p> <p>Valid for Cluster Type: Aurora DB clusters only</p>

    Raises:
        capo_rds.errors.db_cluster_already_exists_fault.DBClusterAlreadyExistsFault: <p>The user already has a DB cluster with the given identifier.</p>
        capo_rds.errors.db_cluster_parameter_group_not_found_fault.DBClusterParameterGroupNotFoundFault: <p> <code>DBClusterParameterGroupName</code> doesn't refer to an existing DB cluster parameter group.</p>
        capo_rds.errors.db_cluster_quota_exceeded_fault.DBClusterQuotaExceededFault: <p>The user attempted to create a new DB cluster and the user has already reached the maximum allowed DB cluster quota.</p>
        capo_rds.errors.db_cluster_role_quota_exceeded_fault.DBClusterRoleQuotaExceededFault: <p>You have exceeded the maximum number of IAM roles that can be associated with the specified DB cluster.</p>
        capo_rds.errors.db_cluster_snapshot_not_found_fault.DBClusterSnapshotNotFoundFault: <p> <code>DBClusterSnapshotIdentifier</code> doesn't refer to an existing DB cluster snapshot.</p>
        capo_rds.errors.db_snapshot_not_found_fault.DBSnapshotNotFoundFault: <p> <code>DBSnapshotIdentifier</code> doesn't refer to an existing DB snapshot.</p>
        capo_rds.errors.db_subnet_group_does_not_cover_enough_a_zs.DBSubnetGroupDoesNotCoverEnoughAZs: <p>Subnets in the DB subnet group should cover at least two Availability Zones unless there is only one Availability Zone.</p>
        capo_rds.errors.db_subnet_group_not_found_fault.DBSubnetGroupNotFoundFault: <p> <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.</p>
        capo_rds.errors.domain_not_found_fault.DomainNotFoundFault: <p> <code>Domain</code> doesn't refer to an existing Active Directory domain.</p>
        capo_rds.errors.insufficient_db_cluster_capacity_fault.InsufficientDBClusterCapacityFault: <p>The DB cluster doesn't have enough capacity for the current operation.</p>
        capo_rds.errors.insufficient_db_instance_capacity_fault.InsufficientDBInstanceCapacityFault: <p>The specified DB instance class isn't available in the specified Availability Zone.</p>
        capo_rds.errors.insufficient_storage_cluster_capacity_fault.InsufficientStorageClusterCapacityFault: <p>There is insufficient storage available for the current action. You might be able to resolve this error by updating your subnet group to use different Availability Zones that have more storage available.</p>
        capo_rds.errors.invalid_db_cluster_snapshot_state_fault.InvalidDBClusterSnapshotStateFault: <p>The supplied value isn't a valid DB cluster snapshot state.</p>
        capo_rds.errors.invalid_db_instance_state_fault.InvalidDBInstanceStateFault: <p>The DB instance isn't in a valid state.</p>
        capo_rds.errors.invalid_db_snapshot_state_fault.InvalidDBSnapshotStateFault: <p>The state of the DB snapshot doesn't allow deletion.</p>
        capo_rds.errors.invalid_restore_fault.InvalidRestoreFault: <p>Cannot restore from VPC backup to non-VPC DB instance.</p>
        capo_rds.errors.invalid_subnet.InvalidSubnet: <p>The requested subnet is invalid, or multiple subnets were requested that are not all in a common VPC.</p>
        capo_rds.errors.invalid_vpc_network_state_fault.InvalidVPCNetworkStateFault: <p>The DB subnet group doesn't cover all Availability Zones after it's created because of users' change.</p>
        capo_rds.errors.kms_key_not_accessible_fault.KMSKeyNotAccessibleFault: <p>An error occurred accessing an Amazon Web Services KMS key.</p>
        capo_rds.errors.network_type_not_supported.NetworkTypeNotSupported: <p>The network type is invalid for the DB instance. Valid nework type values are <code>IPV4</code> and <code>DUAL</code>.</p>
        capo_rds.errors.option_group_not_found_fault.OptionGroupNotFoundFault: <p>The specified option group could not be found.</p>
        capo_rds.errors.storage_quota_exceeded_fault.StorageQuotaExceededFault: <p>The request would result in the user exceeding the allowed amount of storage available across all DB instances.</p>
        capo_rds.errors.storage_type_not_supported_fault.StorageTypeNotSupportedFault: <p>The specified <code>StorageType</code> can't be associated with the DB instance.</p>
        capo_rds.errors.vpc_encryption_control_violation_exception.VpcEncryptionControlViolationException: <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>
        capo_rds.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To restore a DB cluster from a snapshot
        The following example restores an Aurora PostgreSQL DB cluster compatible with PostgreSQL version 10.7 from a DB cluster snapshot named test-instance-snapshot.

        >>> await client.restore_db_cluster_from_snapshot(db_cluster_identifier='newdbcluster', snapshot_identifier='test-instance-snapshot', engine='aurora-postgresql', engine_version='10.7')
        To restore a DB cluster from a snapshot without VPC networking
        The following example restores an Aurora DB cluster from a DB cluster snapshot named sample-cluster-snapshot without VPC networking and with internet-based connectivity enabled through an internet access gateway. The EnableVPCNetworking and EnableInternetAccessGateway parameters must always be specified together. IAM database authentication is required when both parameters are specified.

        >>> await client.restore_db_cluster_from_snapshot(db_cluster_identifier='restored-cluster', snapshot_identifier='sample-cluster-snapshot', engine='aurora-postgresql', enable_vpc_networking=False, enable_internet_access_gateway=True, enable_iam_database_authentication=True)
        To restore a DB cluster from a snapshot with an associated IAM role
        The following example restores an Aurora PostgreSQL DB cluster from a snapshot and associates an IAM role for Amazon S3 import in a single call.

        >>> await client.restore_db_cluster_from_snapshot(db_cluster_identifier='restored-cluster', snapshot_identifier='test-instance-snapshot', engine='aurora-postgresql', associated_roles=[{'RoleArn': 'arn:aws:iam::123456789012:role/RDSLoadFromS3', 'FeatureName': 's3Import'}])
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_rds.types.restore_db_cluster_from_snapshot_message.RestoreDBClusterFromSnapshotMessage]",
    ) -> AsyncOperationResponse[
        "capo_rds.types.restore_db_cluster_from_snapshot_result.RestoreDBClusterFromSnapshotResult"
    ]:
        import capo_rds._operations.amazon_rd_sv19.restore_db_cluster_from_snapshot

        (
            output,
            http_response,
        ) = await capo_rds._operations.amazon_rd_sv19.restore_db_cluster_from_snapshot.async_restore_db_cluster_from_snapshot(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_rds.types.restore_db_cluster_from_snapshot_result.RestoreDBClusterFromSnapshotResult",
    ) -> dict[str, Any]:
        import capo_rds.types.restore_db_cluster_from_snapshot_result

        return (
            capo_rds.types.restore_db_cluster_from_snapshot_result.redact_sensitive(
                output
            )
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "RestoreDBClusterFromSnapshot", redact_output=_redact_output
        ),
    )
    input_: capo_rds.types.restore_db_cluster_from_snapshot_message.RestoreDBClusterFromSnapshotMessage = {}
    if availability_zones is not None:
        input_["availability_zones"] = availability_zones
    if db_cluster_identifier is not None:
        input_["db_cluster_identifier"] = db_cluster_identifier
    if snapshot_identifier is not None:
        input_["snapshot_identifier"] = snapshot_identifier
    if engine is not None:
        input_["engine"] = engine
    if engine_version is not None:
        input_["engine_version"] = engine_version
    if port is not None:
        input_["port"] = port
    if db_subnet_group_name is not None:
        input_["db_subnet_group_name"] = db_subnet_group_name
    if database_name is not None:
        input_["database_name"] = database_name
    if option_group_name is not None:
        input_["option_group_name"] = option_group_name
    if vpc_security_group_ids is not None:
        input_["vpc_security_group_ids"] = vpc_security_group_ids
    if tags is not None:
        input_["tags"] = tags
    if kms_key_id is not None:
        input_["kms_key_id"] = kms_key_id
    if enable_iam_database_authentication is not None:
        input_["enable_iam_database_authentication"] = (
            enable_iam_database_authentication
        )
    if backtrack_window is not None:
        input_["backtrack_window"] = backtrack_window
    if enable_cloudwatch_logs_exports is not None:
        input_["enable_cloudwatch_logs_exports"] = enable_cloudwatch_logs_exports
    if engine_mode is not None:
        input_["engine_mode"] = engine_mode
    if scaling_configuration is not None:
        input_["scaling_configuration"] = scaling_configuration
    if db_cluster_parameter_group_name is not None:
        input_["db_cluster_parameter_group_name"] = db_cluster_parameter_group_name
    if deletion_protection is not None:
        input_["deletion_protection"] = deletion_protection
    if copy_tags_to_snapshot is not None:
        input_["copy_tags_to_snapshot"] = copy_tags_to_snapshot
    if domain is not None:
        input_["domain"] = domain
    if domain_iam_role_name is not None:
        input_["domain_iam_role_name"] = domain_iam_role_name
    if db_cluster_instance_class is not None:
        input_["db_cluster_instance_class"] = db_cluster_instance_class
    if storage_type is not None:
        input_["storage_type"] = storage_type
    if iops is not None:
        input_["iops"] = iops
    if publicly_accessible is not None:
        input_["publicly_accessible"] = publicly_accessible
    if network_type is not None:
        input_["network_type"] = network_type
    if serverless_v2_scaling_configuration is not None:
        input_["serverless_v2_scaling_configuration"] = (
            serverless_v2_scaling_configuration
        )
    if rds_custom_cluster_configuration is not None:
        input_["rds_custom_cluster_configuration"] = (
            rds_custom_cluster_configuration
        )
    if monitoring_interval is not None:
        input_["monitoring_interval"] = monitoring_interval
    if monitoring_role_arn is not None:
        input_["monitoring_role_arn"] = monitoring_role_arn
    if enable_performance_insights is not None:
        input_["enable_performance_insights"] = enable_performance_insights
    if performance_insights_kms_key_id is not None:
        input_["performance_insights_kms_key_id"] = performance_insights_kms_key_id
    if performance_insights_retention_period is not None:
        input_["performance_insights_retention_period"] = (
            performance_insights_retention_period
        )
    if backup_retention_period is not None:
        input_["backup_retention_period"] = backup_retention_period
    if preferred_backup_window is not None:
        input_["preferred_backup_window"] = preferred_backup_window
    if engine_lifecycle_support is not None:
        input_["engine_lifecycle_support"] = engine_lifecycle_support
    if tag_specifications is not None:
        input_["tag_specifications"] = tag_specifications
    if enable_vpc_networking is not None:
        input_["enable_vpc_networking"] = enable_vpc_networking
    if enable_internet_access_gateway is not None:
        input_["enable_internet_access_gateway"] = enable_internet_access_gateway
    if associated_roles is not None:
        input_["associated_roles"] = associated_roles

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output