Skip to content

restore_db_cluster_to_point_in_time async

restore_db_cluster_to_point_in_time(
    *,
    config_overrides: Optional[AsyncRDSClientConfig] = None,
    db_cluster_identifier: Optional[String] = None,
    restore_type: Optional[String] = None,
    source_db_cluster_identifier: Optional[String] = None,
    restore_to_time: Optional[TStamp] = None,
    use_latest_restorable_time: Optional[Boolean] = None,
    port: Optional[IntegerOptional] = None,
    db_subnet_group_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,
    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,
    publicly_accessible: Optional[BooleanOptional] = None,
    iops: Optional[IntegerOptional] = None,
    network_type: Optional[String] = None,
    source_db_cluster_resource_id: Optional[String] = None,
    serverless_v2_scaling_configuration: Optional[
        ServerlessV2ScalingConfiguration
    ] = None,
    scaling_configuration: Optional[ScalingConfiguration] = None,
    engine_mode: Optional[String] = 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,
) -> RestoreDBClusterToPointInTimeResult

Restores a DB cluster to an arbitrary point in time. Users can restore to any point in time before LatestRestorableTime for up to BackupRetentionPeriod days. The target DB cluster is created from the source DB cluster with the same configuration as the original DB cluster, except that the new DB cluster is created with the default DB security group. Unless the RestoreType is set to copy-on-write, the restore may occur in a different Availability Zone (AZ) from the original DB cluster. The AZ where RDS restores the DB cluster depends on the AZs in the specified subnet 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 to a point in time.

For Aurora, 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 RestoreDBClusterToPointInTime 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:

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

    The name of the new DB cluster to be created.

    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

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

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

    The type of restore to be performed. You can specify one of the following values:

    • full-copy - The new DB cluster is restored as a full copy of the source DB cluster.

    • copy-on-write - The new DB cluster is restored as a clone of the source DB cluster.

    If you don't specify a RestoreType value, then the new DB cluster is restored as a full copy of the source DB cluster.

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

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

    The identifier of the source DB cluster from which to restore.

    Constraints:

    • Must match the identifier of an existing DBCluster.

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

  • restore_to_time (Optional[TStamp], default: None ) –

    The date and time to restore the DB cluster to.

    Valid Values: Value must be a time in Universal Coordinated Time (UTC) format

    Constraints:

    • Must be before the latest restorable time for the DB instance

    • Must be specified if UseLatestRestorableTime parameter isn't provided

    • Can't be specified if the UseLatestRestorableTime parameter is enabled

    • Can't be specified if the RestoreType parameter is copy-on-write

    Example: 2015-03-07T23:45:00Z

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

  • use_latest_restorable_time (Optional[Boolean], default: None ) –

    Specifies whether to restore the DB cluster to the latest restorable backup time. By default, the DB cluster isn't restored to the latest restorable backup time.

    Constraints: Can't be specified if RestoreToTime parameter is provided.

    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: A value from 1150-65535.

    Default: The default port for the engine.

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

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

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

    Constraints: If supplied, must match the name of an existing DBSubnetGroup.

    Example: mydbsubnetgroup

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

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

    The name of the option group for the new 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 belongs to.

    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 an encrypted DB cluster.

    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.

    You can restore to a new DB cluster and encrypt the new DB cluster with a KMS key that is different from the KMS key used to encrypt the source DB cluster. The new DB cluster is encrypted with the KMS key identified by the KmsKeyId parameter.

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

    • If the DB cluster is encrypted, then the restored DB cluster is encrypted using the KMS key that was used to encrypt the source DB cluster.

    • If the DB cluster isn't encrypted, then the restored DB cluster isn't encrypted.

    If DBClusterIdentifier refers to a DB cluster that isn't encrypted, then the restore request is rejected.

    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.

    Default: 0

    Constraints:

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

    Valid for: Aurora MySQL DB clusters only

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

    The list of logs that the restored DB cluster is to export to 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

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

    The name of the custom DB cluster parameter group to associate with this DB cluster.

    If the DBClusterParameterGroupName parameter is omitted, the default DB cluster parameter group for the specified engine is used.

    Constraints:

    • If supplied, must match the name of an existing 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.

    For Amazon Aurora DB clusters, Amazon RDS can use Kerberos Authentication to authenticate users that connect to the DB cluster. For more information, see Kerberos Authentication in the Amazon Aurora 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

  • 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: Multi-AZ DB clusters only

  • 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: Multi-AZ DB clusters only

  • 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

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

    The resource ID of the source DB cluster from which to restore.

  • 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

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

    The engine mode of the new cluster. Specify provisioned or serverless, depending on the type of the cluster you are creating. You can create an Aurora Serverless v1 clone from a provisioned cluster, or a provisioned clone from an Aurora Serverless v1 cluster. To create a clone that is an Aurora Serverless v1 cluster, the original cluster must be an Aurora Serverless v1 cluster or an encrypted provisioned cluster. To create a full copy that is an Aurora Serverless v1 cluster, specify the engine mode serverless.

    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 to a point in time. 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 to a specified time The following example restores the DB cluster named database-4 to the latest possible time. Using copy-on-write as the restore type restores the new DB cluster as a clone of the source DB cluster.

>>> await client.restore_db_cluster_to_point_in_time(db_cluster_identifier='sample-cluster-clone', restore_type='copy-on-write', source_db_cluster_identifier='database-4', use_latest_restorable_time=True)
To restore an Aurora DB cluster to a point in time without VPC networking
The following example restores an Aurora DB cluster to the latest possible time 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_to_point_in_time(db_cluster_identifier='sample-cluster-restored', restore_type='copy-on-write', source_db_cluster_identifier='sample-cluster', use_latest_restorable_time=True, enable_vpc_networking=False, enable_internet_access_gateway=True, enable_iam_database_authentication=True)
Source code in docs_src/capo_rds/_services/async_rds.py
14354
14355
14356
14357
14358
14359
14360
14361
14362
14363
14364
14365
14366
14367
14368
14369
14370
14371
14372
14373
14374
14375
14376
14377
14378
14379
14380
14381
14382
14383
14384
14385
14386
14387
14388
14389
14390
14391
14392
14393
14394
14395
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408
14409
14410
14411
14412
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493
14494
14495
14496
14497
14498
14499
14500
14501
14502
14503
14504
14505
14506
14507
14508
14509
14510
14511
14512
14513
14514
14515
14516
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
14555
14556
14557
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588
14589
14590
14591
14592
14593
14594
14595
14596
14597
14598
14599
14600
14601
14602
14603
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613
14614
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627
14628
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639
14640
14641
14642
14643
14644
14645
14646
14647
async def restore_db_cluster_to_point_in_time(
    self,
    *,
    config_overrides: Optional[AsyncRDSClientConfig] = None,
    db_cluster_identifier: Optional["capo_rds.types.string.String"] = None,
    restore_type: Optional["capo_rds.types.string.String"] = None,
    source_db_cluster_identifier: Optional["capo_rds.types.string.String"] = None,
    restore_to_time: Optional["capo_rds.types.t_stamp.TStamp"] = None,
    use_latest_restorable_time: Optional["capo_rds.types.boolean.Boolean"] = None,
    port: Optional["capo_rds.types.integer_optional.IntegerOptional"] = None,
    db_subnet_group_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,
    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,
    publicly_accessible: Optional[
        "capo_rds.types.boolean_optional.BooleanOptional"
    ] = None,
    iops: Optional["capo_rds.types.integer_optional.IntegerOptional"] = None,
    network_type: Optional["capo_rds.types.string.String"] = None,
    source_db_cluster_resource_id: Optional["capo_rds.types.string.String"] = None,
    serverless_v2_scaling_configuration: Optional[
        "capo_rds.types.serverless_v2_scaling_configuration.ServerlessV2ScalingConfiguration"
    ] = None,
    scaling_configuration: Optional[
        "capo_rds.types.scaling_configuration.ScalingConfiguration"
    ] = None,
    engine_mode: Optional["capo_rds.types.string.String"] = 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_to_point_in_time_result.RestoreDBClusterToPointInTimeResult":
    """<p>Restores a DB cluster to an arbitrary point in time. Users can restore to any point in time before <code>LatestRestorableTime</code> for up to <code>BackupRetentionPeriod</code> days. The target DB cluster is created from the source DB cluster with the same configuration as the original DB cluster, except that the new DB cluster is created with the default DB security group. Unless the <code>RestoreType</code> is set to <code>copy-on-write</code>, the restore may occur in a different Availability Zone (AZ) from the original DB cluster. The AZ where RDS restores the DB cluster depends on the AZs in the specified subnet 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 to a point in time.</p> <note> <p>For Aurora, 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>RestoreDBClusterToPointInTime</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:
        db_cluster_identifier: <p>The name of the new DB cluster to be created.</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>Valid for: Aurora DB clusters and Multi-AZ DB clusters</p>
        restore_type: <p>The type of restore to be performed. You can specify one of the following values:</p> <ul> <li> <p> <code>full-copy</code> - The new DB cluster is restored as a full copy of the source DB cluster.</p> </li> <li> <p> <code>copy-on-write</code> - The new DB cluster is restored as a clone of the source DB cluster.</p> </li> </ul> <p>If you don't specify a <code>RestoreType</code> value, then the new DB cluster is restored as a full copy of the source DB cluster.</p> <p>Valid for: Aurora DB clusters and Multi-AZ DB clusters</p>
        source_db_cluster_identifier: <p>The identifier of the source DB cluster from which to restore.</p> <p>Constraints:</p> <ul> <li> <p>Must match the identifier of an existing DBCluster.</p> </li> </ul> <p>Valid for: Aurora DB clusters and Multi-AZ DB clusters</p>
        restore_to_time: <p>The date and time to restore the DB cluster to.</p> <p>Valid Values: Value must be a time in Universal Coordinated Time (UTC) format</p> <p>Constraints:</p> <ul> <li> <p>Must be before the latest restorable time for the DB instance</p> </li> <li> <p>Must be specified if <code>UseLatestRestorableTime</code> parameter isn't provided</p> </li> <li> <p>Can't be specified if the <code>UseLatestRestorableTime</code> parameter is enabled</p> </li> <li> <p>Can't be specified if the <code>RestoreType</code> parameter is <code>copy-on-write</code> </p> </li> </ul> <p>Example: <code>2015-03-07T23:45:00Z</code> </p> <p>Valid for: Aurora DB clusters and Multi-AZ DB clusters</p>
        use_latest_restorable_time: <p>Specifies whether to restore the DB cluster to the latest restorable backup time. By default, the DB cluster isn't restored to the latest restorable backup time.</p> <p>Constraints: Can't be specified if <code>RestoreToTime</code> parameter is provided.</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: A value from <code>1150-65535</code>.</p> <p>Default: The default port for the engine.</p> <p>Valid for: Aurora DB clusters and Multi-AZ DB clusters</p>
        db_subnet_group_name: <p>The DB subnet group name to use for the new DB cluster.</p> <p>Constraints: If supplied, must match the name of an existing DBSubnetGroup.</p> <p>Example: <code>mydbsubnetgroup</code> </p> <p>Valid for: Aurora DB clusters and Multi-AZ DB clusters</p>
        option_group_name: <p>The name of the option group for the new 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 belongs to.</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 an encrypted DB cluster.</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>You can restore to a new DB cluster and encrypt the new DB cluster with a KMS key that is different from the KMS key used to encrypt the source DB cluster. The new DB cluster is encrypted with the KMS key identified by the <code>KmsKeyId</code> parameter.</p> <p>If you don't specify a value for the <code>KmsKeyId</code> parameter, then the following occurs:</p> <ul> <li> <p>If the DB cluster is encrypted, then the restored DB cluster is encrypted using the KMS key that was used to encrypt the source DB cluster.</p> </li> <li> <p>If the DB cluster isn't encrypted, then the restored DB cluster isn't encrypted.</p> </li> </ul> <p>If <code>DBClusterIdentifier</code> refers to a DB cluster that isn't encrypted, then the restore request is rejected.</p> <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> <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 MySQL DB clusters only</p>
        enable_cloudwatch_logs_exports: <p>The list of logs that the restored DB cluster is to export to 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>
        db_cluster_parameter_group_name: <p>The name of the custom DB cluster parameter group to associate with this DB cluster.</p> <p>If the <code>DBClusterParameterGroupName</code> parameter 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 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.</p> <p>For Amazon Aurora DB clusters, Amazon RDS can use Kerberos Authentication to authenticate users that connect to the DB cluster. For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/kerberos-authentication.html">Kerberos Authentication</a> in the <i>Amazon Aurora 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>
        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: Multi-AZ DB clusters only</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: Multi-AZ DB clusters only</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>
        source_db_cluster_resource_id: <p>The resource ID of the source DB cluster from which to restore.</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>
        engine_mode: <p>The engine mode of the new cluster. Specify <code>provisioned</code> or <code>serverless</code>, depending on the type of the cluster you are creating. You can create an Aurora Serverless v1 clone from a provisioned cluster, or a provisioned clone from an Aurora Serverless v1 cluster. To create a clone that is an Aurora Serverless v1 cluster, the original cluster must be an Aurora Serverless v1 cluster or an encrypted provisioned cluster. To create a full copy that is an Aurora Serverless v1 cluster, specify the engine mode <code>serverless</code>.</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 to a point in time. 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_automated_backup_not_found_fault.DBClusterAutomatedBackupNotFoundFault: <p>No automated backup for this DB cluster was found.</p>
        capo_rds.errors.db_cluster_not_found_fault.DBClusterNotFoundFault: <p> <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.</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_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_cluster_state_fault.InvalidDBClusterStateFault: <p>The requested operation can't be performed while the cluster is in this 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 to a specified time
        The following example restores the DB cluster named database-4 to the latest possible time. Using copy-on-write as the restore type restores the new DB cluster as a clone of the source DB cluster.

        >>> await client.restore_db_cluster_to_point_in_time(db_cluster_identifier='sample-cluster-clone', restore_type='copy-on-write', source_db_cluster_identifier='database-4', use_latest_restorable_time=True)
        To restore an Aurora DB cluster to a point in time without VPC networking
        The following example restores an Aurora DB cluster to the latest possible time 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_to_point_in_time(db_cluster_identifier='sample-cluster-restored', restore_type='copy-on-write', source_db_cluster_identifier='sample-cluster', use_latest_restorable_time=True, enable_vpc_networking=False, enable_internet_access_gateway=True, enable_iam_database_authentication=True)
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_rds.types.restore_db_cluster_to_point_in_time_message.RestoreDBClusterToPointInTimeMessage]",
    ) -> AsyncOperationResponse[
        "capo_rds.types.restore_db_cluster_to_point_in_time_result.RestoreDBClusterToPointInTimeResult"
    ]:
        import capo_rds._operations.amazon_rd_sv19.restore_db_cluster_to_point_in_time

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

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

        return capo_rds.types.restore_db_cluster_to_point_in_time_result.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "RestoreDBClusterToPointInTime", redact_output=_redact_output
        ),
    )
    input_: capo_rds.types.restore_db_cluster_to_point_in_time_message.RestoreDBClusterToPointInTimeMessage = {}
    if db_cluster_identifier is not None:
        input_["db_cluster_identifier"] = db_cluster_identifier
    if restore_type is not None:
        input_["restore_type"] = restore_type
    if source_db_cluster_identifier is not None:
        input_["source_db_cluster_identifier"] = source_db_cluster_identifier
    if restore_to_time is not None:
        input_["restore_to_time"] = restore_to_time
    if use_latest_restorable_time is not None:
        input_["use_latest_restorable_time"] = use_latest_restorable_time
    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 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 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 publicly_accessible is not None:
        input_["publicly_accessible"] = publicly_accessible
    if iops is not None:
        input_["iops"] = iops
    if network_type is not None:
        input_["network_type"] = network_type
    if source_db_cluster_resource_id is not None:
        input_["source_db_cluster_resource_id"] = source_db_cluster_resource_id
    if serverless_v2_scaling_configuration is not None:
        input_["serverless_v2_scaling_configuration"] = (
            serverless_v2_scaling_configuration
        )
    if scaling_configuration is not None:
        input_["scaling_configuration"] = scaling_configuration
    if engine_mode is not None:
        input_["engine_mode"] = engine_mode
    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