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
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041
14042
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
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