Skip to content

restore_db_instance_from_s3

restore_db_instance_from_s3(
    *,
    config_overrides: Optional[RDSClientConfig] = None,
    db_name: Optional[String] = None,
    db_instance_identifier: Optional[String] = None,
    allocated_storage: Optional[IntegerOptional] = None,
    db_instance_class: Optional[String] = None,
    engine: Optional[String] = None,
    master_username: Optional[String] = None,
    master_user_password: Optional[SensitiveString] = None,
    db_security_groups: Optional[DBSecurityGroupNameList] = None,
    vpc_security_group_ids: Optional[VpcSecurityGroupIdList] = None,
    availability_zone: Optional[String] = None,
    db_subnet_group_name: Optional[String] = None,
    preferred_maintenance_window: Optional[String] = None,
    db_parameter_group_name: Optional[String] = None,
    backup_retention_period: Optional[IntegerOptional] = None,
    preferred_backup_window: Optional[String] = None,
    port: Optional[IntegerOptional] = None,
    multi_az: Optional[BooleanOptional] = None,
    engine_version: Optional[String] = None,
    auto_minor_version_upgrade: Optional[BooleanOptional] = None,
    license_model: Optional[String] = None,
    iops: Optional[IntegerOptional] = None,
    storage_throughput: Optional[IntegerOptional] = None,
    option_group_name: Optional[String] = None,
    publicly_accessible: Optional[BooleanOptional] = None,
    tags: Optional[TagList] = None,
    storage_type: Optional[String] = None,
    storage_encrypted: Optional[BooleanOptional] = None,
    kms_key_id: Optional[String] = None,
    copy_tags_to_snapshot: Optional[BooleanOptional] = None,
    monitoring_interval: Optional[IntegerOptional] = None,
    monitoring_role_arn: Optional[String] = None,
    enable_iam_database_authentication: Optional[BooleanOptional] = None,
    source_engine: Optional[String] = None,
    source_engine_version: Optional[String] = None,
    s3_bucket_name: Optional[String] = None,
    s3_prefix: Optional[String] = None,
    s3_ingestion_role_arn: Optional[String] = None,
    database_insights_mode: Optional[DatabaseInsightsMode] = None,
    enable_performance_insights: Optional[BooleanOptional] = None,
    performance_insights_kms_key_id: Optional[String] = None,
    performance_insights_retention_period: Optional[IntegerOptional] = None,
    enable_cloudwatch_logs_exports: Optional[LogTypeList] = None,
    processor_features: Optional[ProcessorFeatureList] = None,
    use_default_processor_features: Optional[BooleanOptional] = None,
    deletion_protection: Optional[BooleanOptional] = None,
    max_allocated_storage: Optional[IntegerOptional] = None,
    network_type: Optional[String] = None,
    manage_master_user_password: Optional[BooleanOptional] = None,
    master_user_secret_kms_key_id: Optional[String] = None,
    db_capacity_reservation_identifier: Optional[
        DBCapacityReservationIdentifier
    ] = None,
    dedicated_log_volume: Optional[BooleanOptional] = None,
    ca_certificate_identifier: Optional[String] = None,
    engine_lifecycle_support: Optional[String] = None,
    additional_storage_volumes: Optional[AdditionalStorageVolumesList] = None,
    tag_specifications: Optional[TagSpecificationList] = None,
) -> RestoreDBInstanceFromS3Result

Amazon Relational Database Service (Amazon RDS) supports importing MySQL databases by using backup files. You can create a backup of your on-premises database, store it on Amazon Simple Storage Service (Amazon S3), and then restore the backup file onto a new Amazon RDS DB instance running MySQL. For more information, see Restoring a backup into an Amazon RDS for MySQL DB instance in the Amazon RDS User Guide.

This operation doesn't apply to RDS Custom.

Parameters:

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

    The name of the database to create when the DB instance is created. Follow the naming rules specified in CreateDBInstance.

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

    The DB instance identifier. This parameter is stored as a lowercase string.

    Constraints:

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

    • First character must be a letter.

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

    Example: mydbinstance

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

    The amount of storage (in gibibytes) to allocate initially for the DB instance. Follow the allocation rules specified in CreateDBInstance.

    This setting isn't valid for RDS for SQL Server.

    Be sure to allocate enough storage for your new DB instance so that the restore operation can succeed. You can also allocate additional storage for future growth.

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

    The compute and memory capacity of the DB instance, for example db.m4.large. 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.

    Importing from Amazon S3 isn't supported on the db.t2.micro DB instance class.

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

    The name of the database engine to be used for this instance.

    Valid Values: mysql

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

    The name for the master user.

    Constraints:

    • Must be 1 to 16 letters or numbers.

    • First character must be a letter.

    • Can't be a reserved word for the chosen database engine.

  • master_user_password (Optional[SensitiveString], default: None ) –

    The password for the master user.

    Constraints:

    • Can't be specified if ManageMasterUserPassword is turned on.

    • Can include any printable ASCII character except "/", """, or "@". For RDS for Oracle, can't include the "&" (ampersand) or the "'" (single quotes) character.

    Length Constraints:

    • RDS for Db2 - Must contain from 8 to 128 characters.

    • RDS for MariaDB - Must contain from 8 to 41 characters.

    • RDS for Microsoft SQL Server - Must contain from 8 to 128 characters.

    • RDS for MySQL - Must contain from 8 to 41 characters.

    • RDS for Oracle - Must contain from 8 to 30 characters.

    • RDS for PostgreSQL - Must contain from 8 to 128 characters.

  • db_security_groups (Optional[DBSecurityGroupNameList], default: None ) –

    A list of DB security groups to associate with this DB instance.

    Default: The default DB security group for the database engine.

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

    A list of VPC security groups to associate with this DB instance.

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

    The Availability Zone that the DB instance is created in. For information about Amazon Web Services Regions and Availability Zones, see Regions and Availability Zones in the Amazon RDS User Guide.

    Default: A random, system-chosen Availability Zone in the endpoint's Amazon Web Services Region.

    Example: us-east-1d

    Constraint: The AvailabilityZone parameter can't be specified if the DB instance is a Multi-AZ deployment. The specified Availability Zone must be in the same Amazon Web Services Region as the current endpoint.

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

    A DB subnet group to associate with this DB instance.

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

    Example: mydbsubnetgroup

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

    The time range each week during which system maintenance can occur, in Universal Coordinated Time (UTC). For more information, see Amazon RDS Maintenance Window in the Amazon RDS User Guide.

    Constraints:

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

    • Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun.

    • Must be in Universal Coordinated Time (UTC).

    • Must not conflict with the preferred backup window.

    • Must be at least 30 minutes.

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

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

    If you do not specify a value for DBParameterGroupName, then the default DBParameterGroup for the specified DB engine is used.

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

    The number of days for which automated backups are retained. Setting this parameter to a positive number enables backups. For more information, see CreateDBInstance.

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

    The time range each day during which automated backups are created if automated backups are enabled. For more information, see Backup window in the Amazon RDS User Guide.

    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.

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

    The port number on which the database accepts connections.

    Type: Integer

    Valid Values: 1150-65535

    Default: 3306

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

    Specifies whether the DB instance is a Multi-AZ deployment. If the DB instance is a Multi-AZ deployment, you can't set the AvailabilityZone parameter.

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

    The version number of the database engine to use. Choose the latest minor version of your database engine. For information about engine versions, see CreateDBInstance, or call DescribeDBEngineVersions.

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

    Specifies whether to automatically apply minor engine upgrades to the DB instance during the maintenance window. By default, minor engine upgrades are not applied automatically.

    For more information about automatic minor version upgrades, see Automatically upgrading the minor engine version.

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

    The license model for this DB instance. Use general-public-license.

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

    The amount of Provisioned IOPS (input/output operations per second) to allocate initially for the DB instance. For information about valid IOPS values, see Amazon RDS Provisioned IOPS storage in the Amazon RDS User Guide.

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

    Specifies the storage throughput value for the DB instance.

    This setting doesn't apply to RDS Custom or Amazon Aurora.

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

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

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

    Specifies whether the DB instance is publicly accessible.

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

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

    For more information, see CreateDBInstance.

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

    A list of tags to associate with this DB instance. For more information, see Tagging Amazon RDS Resources in the Amazon RDS User Guide.

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

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

    Valid Values: gp2 | gp3 | io1 | io2 | standard

    If you specify io1, io2, or gp3, you must also include a value for the Iops parameter.

    Default: io1 if the Iops parameter is specified; otherwise gp2

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

    Specifies whether the new DB instance is encrypted or not.

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

    The Amazon Web Services KMS key identifier for an encrypted DB instance.

    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.

    If the StorageEncrypted parameter is enabled, and you do not specify a value for the KmsKeyId parameter, then Amazon RDS will use 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.

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

    Specifies whether to copy all tags from the DB instance to snapshots of the DB instance. By default, tags are not copied.

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

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

    If MonitoringRoleArn is specified, then you must 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 ARN for the IAM role that permits RDS to send enhanced monitoring metrics to Amazon CloudWatch Logs. For example, arn:aws:iam:123456789012:role/emaccess. For information on creating a monitoring role, see Setting Up and Enabling Enhanced Monitoring in the Amazon RDS User Guide.

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

  • 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 about IAM database authentication, see IAM Database Authentication for MySQL and PostgreSQL in the Amazon RDS User Guide.

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

    The name of the engine of your source database.

    Valid Values: mysql

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

    The version of the database that the backup files were created from.

    MySQL versions 5.6 and 5.7 are supported.

    Example: 5.6.40

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

    The name of your Amazon S3 bucket that contains your database backup file.

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

    The prefix of your Amazon S3 bucket.

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

    An Amazon Web Services Identity and Access Management (IAM) role with a trust policy and a permissions policy that allows Amazon RDS to access your Amazon S3 bucket. For information about this role, see Creating an IAM role manually in the Amazon RDS User Guide.

  • database_insights_mode (Optional[DatabaseInsightsMode], default: None ) –

    Specifies the mode of Database Insights to enable for the DB instance.

    Aurora DB instances inherit this value from the DB cluster, so you can't change this value.

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

    Specifies whether to enable Performance Insights for the DB instance.

    For more information, see Using Amazon Performance Insights in the Amazon RDS User Guide.

  • 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 do not 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. The default is 7 days. The following values are valid:

    • 7

    • month * 31, where month is a number of months from 1-23

    • 731

    For example, the following values are valid:

    • 93 (3 months * 31)

    • 341 (11 months * 31)

    • 589 (19 months * 31)

    • 731

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

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

    The list of logs that the restored DB instance is to export to CloudWatch Logs. The values in the list depend on the DB engine being used. For more information, see Publishing Database Logs to Amazon CloudWatch Logs in the Amazon RDS User Guide.

  • processor_features (Optional[ProcessorFeatureList], default: None ) –

    The number of CPU cores and the number of threads per core for the DB instance class of the DB instance.

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

    Specifies whether the DB instance class of the DB instance uses its default processor features.

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

    Specifies whether to enable deletion protection for the DB instance. The database can't be deleted when deletion protection is enabled. By default, deletion protection isn't enabled. For more information, see Deleting a DB Instance.

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

    The upper limit in gibibytes (GiB) to which Amazon RDS can automatically scale the storage of the DB instance.

    For more information about this setting, including limitations that apply to it, see Managing capacity automatically with Amazon RDS storage autoscaling in the Amazon RDS User Guide.

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

    The network type of the DB instance.

    Valid Values:

    • IPV4

    • DUAL

    The network type is determined by the DBSubnetGroup specified for the DB instance. 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 RDS User Guide.

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

    Specifies whether to manage the master user password with Amazon Web Services Secrets Manager.

    For more information, see Password management with Amazon Web Services Secrets Manager in the Amazon RDS User Guide.

    Constraints:

    • Can't manage the master user password with Amazon Web Services Secrets Manager if MasterUserPassword is specified.

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

    The Amazon Web Services KMS key identifier to encrypt a secret that is automatically generated and managed in Amazon Web Services Secrets Manager.

    This setting is valid only if the master user password is managed by RDS in Amazon Web Services Secrets Manager for the DB instance.

    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.

    If you don't specify MasterUserSecretKmsKeyId, then the aws/secretsmanager KMS key is used to encrypt the secret. If the secret is in a different Amazon Web Services account, then you can't use the aws/secretsmanager KMS key to encrypt the secret, and you must use a customer managed 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.

  • db_capacity_reservation_identifier (Optional[DBCapacityReservationIdentifier], default: None ) –

    The identifier or the name of the DB capacity reservation to associate with this DB instance. You can specify the identifier, which has the prefix dbcr-, or the reservation name. When you specify this parameter, the DB instance uses reserved capacity from the specified reservation.

    If you specify AvailabilityZone, Amazon RDS places the DB instance in that Availability Zone, and the reservation must cover it.

    Constraints:

    • The reservation must reserve capacity for the DB instance class and the database engine of the DB instance.

    • If the reservation reserves capacity for a specific license model, the license model of the DB instance must match it.

    • The reservation must be in the active state, and it must not be past its end date.

    • If you specify AvailabilityZone, it must be one of the Availability Zones of the reservation.

    • For a Multi-AZ DB instance, the reservation must cover two or more Availability Zones. A Multi-AZ DB instance uses one unit of reserved capacity in each of two Availability Zones. If the reservation covers more than two Availability Zones, Amazon RDS chooses the two that the DB instance uses.

    • The reservation must have available capacity in each Availability Zone that the DB instance uses.

    • The DB subnet group must be in a VPC with default tenancy.

    • The DB subnet group must cover each Availability Zone that the DB instance uses.

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

    Specifies whether to enable a dedicated log volume (DLV) for the DB instance.

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

    The CA certificate identifier to use for the DB instance's server certificate.

    This setting doesn't apply to RDS Custom DB instances.

    For more information, see Using SSL/TLS to encrypt a connection to a DB instance in the Amazon RDS User Guide and Using SSL/TLS to encrypt a connection to a DB cluster in the Amazon Aurora User Guide.

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

    The lifecycle type for this DB instance.

    By default, this value is set to open-source-rds-extended-support, which enrolls your DB instance 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 instance 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 instance into Amazon RDS Extended Support. With RDS Extended Support, you can run the selected major engine version on your DB instance past the end of standard support for that engine version. For more information, see Amazon RDS Extended Support Amazon RDS in the Amazon RDS User Guide.

    This setting applies only to RDS for MySQL and RDS for PostgreSQL. For Amazon Aurora DB instances, the engine lifecycle support is managed by the DB cluster.

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

    Default: open-source-rds-extended-support

  • additional_storage_volumes (Optional[AdditionalStorageVolumesList], default: None ) –

    A list of additional storage volumes to modify or delete for the DB instance. You can modify or delete up to three additional storage volumes using the names rdsdbdata2, rdsdbdata3, and rdsdbdata4. Additional storage volumes are supported for RDS for Oracle and RDS for SQL Server DB instances only.

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

    Tags to assign to resources associated with the DB instance.

    Valid Values:

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

Raises:

Source code in docs_src/capo_rds/_services/rds.py
14820
14821
14822
14823
14824
14825
14826
14827
14828
14829
14830
14831
14832
14833
14834
14835
14836
14837
14838
14839
14840
14841
14842
14843
14844
14845
14846
14847
14848
14849
14850
14851
14852
14853
14854
14855
14856
14857
14858
14859
14860
14861
14862
14863
14864
14865
14866
14867
14868
14869
14870
14871
14872
14873
14874
14875
14876
14877
14878
14879
14880
14881
14882
14883
14884
14885
14886
14887
14888
14889
14890
14891
14892
14893
14894
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915
14916
14917
14918
14919
14920
14921
14922
14923
14924
14925
14926
14927
14928
14929
14930
14931
14932
14933
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995
14996
14997
14998
14999
15000
15001
15002
15003
15004
15005
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030
15031
15032
15033
15034
15035
15036
15037
15038
15039
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
15058
15059
15060
15061
15062
15063
15064
15065
15066
15067
15068
15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102
15103
15104
15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
15128
15129
15130
15131
15132
15133
15134
15135
15136
15137
15138
15139
15140
15141
15142
15143
15144
15145
15146
15147
15148
15149
15150
15151
15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
def restore_db_instance_from_s3(
    self,
    *,
    config_overrides: Optional[RDSClientConfig] = None,
    db_name: Optional["capo_rds.types.string.String"] = None,
    db_instance_identifier: Optional["capo_rds.types.string.String"] = None,
    allocated_storage: Optional[
        "capo_rds.types.integer_optional.IntegerOptional"
    ] = None,
    db_instance_class: Optional["capo_rds.types.string.String"] = None,
    engine: Optional["capo_rds.types.string.String"] = None,
    master_username: Optional["capo_rds.types.string.String"] = None,
    master_user_password: Optional[
        "capo_rds.types.sensitive_string.SensitiveString"
    ] = None,
    db_security_groups: Optional[
        "capo_rds.types.db_security_group_name_list.DBSecurityGroupNameList"
    ] = None,
    vpc_security_group_ids: Optional[
        "capo_rds.types.vpc_security_group_id_list.VpcSecurityGroupIdList"
    ] = None,
    availability_zone: Optional["capo_rds.types.string.String"] = None,
    db_subnet_group_name: Optional["capo_rds.types.string.String"] = None,
    preferred_maintenance_window: Optional["capo_rds.types.string.String"] = None,
    db_parameter_group_name: Optional["capo_rds.types.string.String"] = None,
    backup_retention_period: Optional[
        "capo_rds.types.integer_optional.IntegerOptional"
    ] = None,
    preferred_backup_window: Optional["capo_rds.types.string.String"] = None,
    port: Optional["capo_rds.types.integer_optional.IntegerOptional"] = None,
    multi_az: Optional["capo_rds.types.boolean_optional.BooleanOptional"] = None,
    engine_version: Optional["capo_rds.types.string.String"] = None,
    auto_minor_version_upgrade: Optional[
        "capo_rds.types.boolean_optional.BooleanOptional"
    ] = None,
    license_model: Optional["capo_rds.types.string.String"] = None,
    iops: Optional["capo_rds.types.integer_optional.IntegerOptional"] = None,
    storage_throughput: Optional[
        "capo_rds.types.integer_optional.IntegerOptional"
    ] = None,
    option_group_name: Optional["capo_rds.types.string.String"] = None,
    publicly_accessible: Optional[
        "capo_rds.types.boolean_optional.BooleanOptional"
    ] = None,
    tags: Optional["capo_rds.types.tag_list.TagList"] = None,
    storage_type: Optional["capo_rds.types.string.String"] = None,
    storage_encrypted: Optional[
        "capo_rds.types.boolean_optional.BooleanOptional"
    ] = None,
    kms_key_id: Optional["capo_rds.types.string.String"] = None,
    copy_tags_to_snapshot: Optional[
        "capo_rds.types.boolean_optional.BooleanOptional"
    ] = None,
    monitoring_interval: Optional[
        "capo_rds.types.integer_optional.IntegerOptional"
    ] = None,
    monitoring_role_arn: Optional["capo_rds.types.string.String"] = None,
    enable_iam_database_authentication: Optional[
        "capo_rds.types.boolean_optional.BooleanOptional"
    ] = None,
    source_engine: Optional["capo_rds.types.string.String"] = None,
    source_engine_version: Optional["capo_rds.types.string.String"] = None,
    s3_bucket_name: Optional["capo_rds.types.string.String"] = None,
    s3_prefix: Optional["capo_rds.types.string.String"] = None,
    s3_ingestion_role_arn: Optional["capo_rds.types.string.String"] = None,
    database_insights_mode: Optional[
        "capo_rds.types.database_insights_mode.DatabaseInsightsMode"
    ] = 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,
    enable_cloudwatch_logs_exports: Optional[
        "capo_rds.types.log_type_list.LogTypeList"
    ] = None,
    processor_features: Optional[
        "capo_rds.types.processor_feature_list.ProcessorFeatureList"
    ] = None,
    use_default_processor_features: Optional[
        "capo_rds.types.boolean_optional.BooleanOptional"
    ] = None,
    deletion_protection: Optional[
        "capo_rds.types.boolean_optional.BooleanOptional"
    ] = None,
    max_allocated_storage: Optional[
        "capo_rds.types.integer_optional.IntegerOptional"
    ] = None,
    network_type: Optional["capo_rds.types.string.String"] = None,
    manage_master_user_password: Optional[
        "capo_rds.types.boolean_optional.BooleanOptional"
    ] = None,
    master_user_secret_kms_key_id: Optional["capo_rds.types.string.String"] = None,
    db_capacity_reservation_identifier: Optional[
        "capo_rds.types.db_capacity_reservation_identifier.DBCapacityReservationIdentifier"
    ] = None,
    dedicated_log_volume: Optional[
        "capo_rds.types.boolean_optional.BooleanOptional"
    ] = None,
    ca_certificate_identifier: Optional["capo_rds.types.string.String"] = None,
    engine_lifecycle_support: Optional["capo_rds.types.string.String"] = None,
    additional_storage_volumes: Optional[
        "capo_rds.types.additional_storage_volumes_list.AdditionalStorageVolumesList"
    ] = None,
    tag_specifications: Optional[
        "capo_rds.types.tag_specification_list.TagSpecificationList"
    ] = None,
) -> "capo_rds.types.restore_db_instance_from_s3_result.RestoreDBInstanceFromS3Result":
    """<p>Amazon Relational Database Service (Amazon RDS) supports importing MySQL databases by using backup files. You can create a backup of your on-premises database, store it on Amazon Simple Storage Service (Amazon S3), and then restore the backup file onto a new Amazon RDS DB instance running MySQL. For more information, see <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MySQL.Procedural.Importing.html\">Restoring a backup into an Amazon RDS for MySQL DB instance</a> in the <i>Amazon RDS User Guide.</i> </p> <p>This operation doesn't apply to RDS Custom.</p>

    Args:
        db_name: <p>The name of the database to create when the DB instance is created. Follow the naming rules specified in <code>CreateDBInstance</code>.</p>
        db_instance_identifier: <p>The DB instance identifier. This parameter is stored as a lowercase string.</p> <p>Constraints:</p> <ul> <li> <p>Must contain from 1 to 63 letters, numbers, or hyphens.</p> </li> <li> <p>First character must be a letter.</p> </li> <li> <p>Can't end with a hyphen or contain two consecutive hyphens.</p> </li> </ul> <p>Example: <code>mydbinstance</code> </p>
        allocated_storage: <p>The amount of storage (in gibibytes) to allocate initially for the DB instance. Follow the allocation rules specified in <code>CreateDBInstance</code>.</p> <p>This setting isn't valid for RDS for SQL Server.</p> <note> <p>Be sure to allocate enough storage for your new DB instance so that the restore operation can succeed. You can also allocate additional storage for future growth.</p> </note>
        db_instance_class: <p>The compute and memory capacity of the DB instance, for example db.m4.large. 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 <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>Importing from Amazon S3 isn't supported on the db.t2.micro DB instance class.</p>
        engine: <p>The name of the database engine to be used for this instance.</p> <p>Valid Values: <code>mysql</code> </p>
        master_username: <p>The name for the master user.</p> <p>Constraints:</p> <ul> <li> <p>Must be 1 to 16 letters or numbers.</p> </li> <li> <p>First character must be a letter.</p> </li> <li> <p>Can't be a reserved word for the chosen database engine.</p> </li> </ul>
        master_user_password: <p>The password for the master user.</p> <p>Constraints:</p> <ul> <li> <p>Can't be specified if <code>ManageMasterUserPassword</code> is turned on.</p> </li> <li> <p>Can include any printable ASCII character except \"/\", \"\"\", or \"@\". For RDS for Oracle, can't include the \"&amp;\" (ampersand) or the \"'\" (single quotes) character.</p> </li> </ul> <p>Length Constraints:</p> <ul> <li> <p>RDS for Db2 - Must contain from 8 to 128 characters.</p> </li> <li> <p>RDS for MariaDB - Must contain from 8 to 41 characters.</p> </li> <li> <p>RDS for Microsoft SQL Server - Must contain from 8 to 128 characters.</p> </li> <li> <p>RDS for MySQL - Must contain from 8 to 41 characters.</p> </li> <li> <p>RDS for Oracle - Must contain from 8 to 30 characters.</p> </li> <li> <p>RDS for PostgreSQL - Must contain from 8 to 128 characters.</p> </li> </ul>
        db_security_groups: <p>A list of DB security groups to associate with this DB instance.</p> <p>Default: The default DB security group for the database engine.</p>
        vpc_security_group_ids: <p>A list of VPC security groups to associate with this DB instance.</p>
        availability_zone: <p>The Availability Zone that the DB instance is created in. For information about Amazon Web Services Regions and Availability Zones, see <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html\">Regions and Availability Zones</a> in the <i>Amazon RDS User Guide.</i> </p> <p>Default: A random, system-chosen Availability Zone in the endpoint's Amazon Web Services Region.</p> <p>Example: <code>us-east-1d</code> </p> <p>Constraint: The <code>AvailabilityZone</code> parameter can't be specified if the DB instance is a Multi-AZ deployment. The specified Availability Zone must be in the same Amazon Web Services Region as the current endpoint.</p>
        db_subnet_group_name: <p>A DB subnet group to associate with this DB instance.</p> <p>Constraints: If supplied, must match the name of an existing DBSubnetGroup.</p> <p>Example: <code>mydbsubnetgroup</code> </p>
        preferred_maintenance_window: <p>The time range each week during which system maintenance can occur, in Universal Coordinated Time (UTC). For more information, see <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#Concepts.DBMaintenance\">Amazon RDS Maintenance Window</a> in the <i>Amazon RDS User Guide.</i> </p> <p>Constraints:</p> <ul> <li> <p>Must be in the format <code>ddd:hh24:mi-ddd:hh24:mi</code>.</p> </li> <li> <p>Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun.</p> </li> <li> <p>Must be in Universal Coordinated Time (UTC).</p> </li> <li> <p>Must not conflict with the preferred backup window.</p> </li> <li> <p>Must be at least 30 minutes.</p> </li> </ul>
        db_parameter_group_name: <p>The name of the DB parameter group to associate with this DB instance.</p> <p>If you do not specify a value for <code>DBParameterGroupName</code>, then the default <code>DBParameterGroup</code> for the specified DB engine is used.</p>
        backup_retention_period: <p>The number of days for which automated backups are retained. Setting this parameter to a positive number enables backups. For more information, see <code>CreateDBInstance</code>.</p>
        preferred_backup_window: <p>The time range each day during which automated backups are created if automated backups are enabled. For more information, see <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html#USER_WorkingWithAutomatedBackups.BackupWindow\">Backup window</a> in the <i>Amazon RDS User Guide.</i> </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>
        port: <p>The port number on which the database accepts connections.</p> <p>Type: Integer</p> <p>Valid Values: <code>1150</code>-<code>65535</code> </p> <p>Default: <code>3306</code> </p>
        multi_az: <p>Specifies whether the DB instance is a Multi-AZ deployment. If the DB instance is a Multi-AZ deployment, you can't set the <code>AvailabilityZone</code> parameter.</p>
        engine_version: <p>The version number of the database engine to use. Choose the latest minor version of your database engine. For information about engine versions, see <code>CreateDBInstance</code>, or call <code>DescribeDBEngineVersions</code>.</p>
        auto_minor_version_upgrade: <p>Specifies whether to automatically apply minor engine upgrades to the DB instance during the maintenance window. By default, minor engine upgrades are not applied automatically.</p> <p>For more information about automatic minor version upgrades, see <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Upgrading.html#USER_UpgradeDBInstance.Upgrading.AutoMinorVersionUpgrades\">Automatically upgrading the minor engine version</a>.</p>
        license_model: <p>The license model for this DB instance. Use <code>general-public-license</code>.</p>
        iops: <p>The amount of Provisioned IOPS (input/output operations per second) to allocate initially for the DB instance. 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>
        storage_throughput: <p>Specifies the storage throughput value for the DB instance.</p> <p>This setting doesn't apply to RDS Custom or Amazon Aurora.</p>
        option_group_name: <p>The name of the option group to associate with this DB instance. If this argument is omitted, the default option group for the specified engine is used.</p>
        publicly_accessible: <p>Specifies whether the DB instance is publicly accessible.</p> <p>When the DB instance is publicly accessible, its Domain Name System (DNS) endpoint resolves to the private IP address from within the DB instance's virtual private cloud (VPC). It resolves to the public IP address from outside of the DB instance's VPC. Access to the DB instance is ultimately controlled by the security group it uses. That public access is not permitted if the security group assigned to the DB instance doesn't permit it.</p> <p>When the DB instance isn't publicly accessible, it is an internal DB instance with a DNS name that resolves to a private IP address.</p> <p>For more information, see <a>CreateDBInstance</a>.</p>
        tags: <p>A list of tags to associate with this DB instance. For more information, see <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html\">Tagging Amazon RDS Resources</a> in the <i>Amazon RDS User Guide.</i> </p>
        storage_type: <p>Specifies the storage type to be associated with the DB instance.</p> <p>Valid Values: <code>gp2 | gp3 | io1 | io2 | standard</code> </p> <p>If you specify <code>io1</code>, <code>io2</code>, or <code>gp3</code>, you must also include a value for the <code>Iops</code> parameter.</p> <p>Default: <code>io1</code> if the <code>Iops</code> parameter is specified; otherwise <code>gp2</code> </p>
        storage_encrypted: <p>Specifies whether the new DB instance is encrypted or not.</p>
        kms_key_id: <p>The Amazon Web Services KMS key identifier for an encrypted DB instance.</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>If the <code>StorageEncrypted</code> parameter is enabled, and you do not specify a value for the <code>KmsKeyId</code> parameter, then Amazon RDS will use 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>
        copy_tags_to_snapshot: <p>Specifies whether to copy all tags from the DB instance to snapshots of the DB instance. By default, tags are not copied.</p>
        monitoring_interval: <p>The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance. To disable collecting Enhanced Monitoring metrics, specify 0.</p> <p>If <code>MonitoringRoleArn</code> is specified, then you must also set <code>MonitoringInterval</code> to a value other than 0.</p> <p>Valid Values: 0, 1, 5, 10, 15, 30, 60</p> <p>Default: <code>0</code> </p>
        monitoring_role_arn: <p>The ARN for the IAM role that permits RDS to send enhanced monitoring metrics to Amazon CloudWatch Logs. For example, <code>arn:aws:iam:123456789012:role/emaccess</code>. For information on creating a monitoring role, see <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.OS.html#USER_Monitoring.OS.Enabling\">Setting Up and Enabling Enhanced Monitoring</a> in the <i>Amazon RDS User Guide.</i> </p> <p>If <code>MonitoringInterval</code> is set to a value other than 0, then you must supply a <code>MonitoringRoleArn</code> value.</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 about IAM database authentication, see <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.html\"> IAM Database Authentication for MySQL and PostgreSQL</a> in the <i>Amazon RDS User Guide.</i> </p>
        source_engine: <p>The name of the engine of your source database.</p> <p>Valid Values: <code>mysql</code> </p>
        source_engine_version: <p>The version of the database that the backup files were created from.</p> <p>MySQL versions 5.6 and 5.7 are supported.</p> <p>Example: <code>5.6.40</code> </p>
        s3_bucket_name: <p>The name of your Amazon S3 bucket that contains your database backup file.</p>
        s3_prefix: <p>The prefix of your Amazon S3 bucket.</p>
        s3_ingestion_role_arn: <p>An Amazon Web Services Identity and Access Management (IAM) role with a trust policy and a permissions policy that allows Amazon RDS to access your Amazon S3 bucket. For information about this role, see <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MySQL.Procedural.Importing.html#MySQL.Procedural.Importing.Enabling.IAM\"> Creating an IAM role manually</a> in the <i>Amazon RDS User Guide.</i> </p>
        database_insights_mode: <p>Specifies the mode of Database Insights to enable for the DB instance.</p> <note> <p>Aurora DB instances inherit this value from the DB cluster, so you can't change this value.</p> </note>
        enable_performance_insights: <p>Specifies whether to enable Performance Insights for the DB instance.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html\">Using Amazon Performance Insights</a> in the <i>Amazon RDS User Guide</i>.</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 do not 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. The default is 7 days. The following values are valid:</p> <ul> <li> <p>7</p> </li> <li> <p> <i>month</i> * 31, where <i>month</i> is a number of months from 1-23</p> </li> <li> <p>731</p> </li> </ul> <p>For example, the following values are valid:</p> <ul> <li> <p>93 (3 months * 31)</p> </li> <li> <p>341 (11 months * 31)</p> </li> <li> <p>589 (19 months * 31)</p> </li> <li> <p>731</p> </li> </ul> <p>If you specify a retention period such as 94, which isn't a valid value, RDS issues an error.</p>
        enable_cloudwatch_logs_exports: <p>The list of logs that the restored DB instance is to export to CloudWatch Logs. The values in the list depend on the DB engine being used. For more information, 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>
        processor_features: <p>The number of CPU cores and the number of threads per core for the DB instance class of the DB instance.</p>
        use_default_processor_features: <p>Specifies whether the DB instance class of the DB instance uses its default processor features.</p>
        deletion_protection: <p>Specifies whether to enable deletion protection for the DB instance. The database can't be deleted when deletion protection is enabled. By default, deletion protection isn't enabled. For more information, see <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html\"> Deleting a DB Instance</a>.</p>
        max_allocated_storage: <p>The upper limit in gibibytes (GiB) to which Amazon RDS can automatically scale the storage of the DB instance.</p> <p>For more information about this setting, including limitations that apply to it, see <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PIOPS.StorageTypes.html#USER_PIOPS.Autoscaling\"> Managing capacity automatically with Amazon RDS storage autoscaling</a> in the <i>Amazon RDS User Guide</i>.</p>
        network_type: <p>The network type of the DB instance.</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 instance. 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/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html\"> Working with a DB instance in a VPC</a> in the <i>Amazon RDS User Guide.</i> </p>
        manage_master_user_password: <p>Specifies whether to manage the master user password with Amazon Web Services Secrets Manager.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-secrets-manager.html\">Password management with Amazon Web Services Secrets Manager</a> in the <i>Amazon RDS User Guide.</i> </p> <p>Constraints:</p> <ul> <li> <p>Can't manage the master user password with Amazon Web Services Secrets Manager if <code>MasterUserPassword</code> is specified.</p> </li> </ul>
        master_user_secret_kms_key_id: <p>The Amazon Web Services KMS key identifier to encrypt a secret that is automatically generated and managed in Amazon Web Services Secrets Manager.</p> <p>This setting is valid only if the master user password is managed by RDS in Amazon Web Services Secrets Manager for the DB instance.</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>If you don't specify <code>MasterUserSecretKmsKeyId</code>, then the <code>aws/secretsmanager</code> KMS key is used to encrypt the secret. If the secret is in a different Amazon Web Services account, then you can't use the <code>aws/secretsmanager</code> KMS key to encrypt the secret, and you must use a customer managed KMS key.</p> <p>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>
        db_capacity_reservation_identifier: <p>The identifier or the name of the DB capacity reservation to associate with this DB instance. You can specify the identifier, which has the prefix <code>dbcr-</code>, or the reservation name. When you specify this parameter, the DB instance uses reserved capacity from the specified reservation.</p> <p>If you specify <code>AvailabilityZone</code>, Amazon RDS places the DB instance in that Availability Zone, and the reservation must cover it.</p> <p>Constraints:</p> <ul> <li> <p>The reservation must reserve capacity for the DB instance class and the database engine of the DB instance.</p> </li> <li> <p>If the reservation reserves capacity for a specific license model, the license model of the DB instance must match it.</p> </li> <li> <p>The reservation must be in the <code>active</code> state, and it must not be past its end date.</p> </li> <li> <p>If you specify <code>AvailabilityZone</code>, it must be one of the Availability Zones of the reservation.</p> </li> <li> <p>For a Multi-AZ DB instance, the reservation must cover two or more Availability Zones. A Multi-AZ DB instance uses one unit of reserved capacity in each of two Availability Zones. If the reservation covers more than two Availability Zones, Amazon RDS chooses the two that the DB instance uses.</p> </li> <li> <p>The reservation must have available capacity in each Availability Zone that the DB instance uses.</p> </li> <li> <p>The DB subnet group must be in a VPC with default tenancy.</p> </li> <li> <p>The DB subnet group must cover each Availability Zone that the DB instance uses.</p> </li> </ul>
        dedicated_log_volume: <p>Specifies whether to enable a dedicated log volume (DLV) for the DB instance.</p>
        ca_certificate_identifier: <p>The CA certificate identifier to use for the DB instance's server certificate.</p> <p>This setting doesn't apply to RDS Custom DB instances.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html\">Using SSL/TLS to encrypt a connection to a DB instance</a> in the <i>Amazon RDS User Guide</i> and <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.SSL.html\"> Using SSL/TLS to encrypt a connection to a DB cluster</a> in the <i>Amazon Aurora User Guide</i>.</p>
        engine_lifecycle_support: <p>The lifecycle type for this DB instance.</p> <note> <p>By default, this value is set to <code>open-source-rds-extended-support</code>, which enrolls your DB instance 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 instance 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 instance into Amazon RDS Extended Support. With RDS Extended Support, you can run the selected major engine version on your DB instance past the end of standard support for that engine version. For more information, see <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/extended-support.html\">Amazon RDS Extended Support Amazon RDS</a> in the <i>Amazon RDS User Guide</i>.</p> <p>This setting applies only to RDS for MySQL and RDS for PostgreSQL. For Amazon Aurora DB instances, the engine lifecycle support is managed by the DB cluster.</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>
        additional_storage_volumes: <p>A list of additional storage volumes to modify or delete for the DB instance. You can modify or delete up to three additional storage volumes using the names <code>rdsdbdata2</code>, <code>rdsdbdata3</code>, and <code>rdsdbdata4</code>. Additional storage volumes are supported for RDS for Oracle and RDS for SQL Server DB instances only.</p>
        tag_specifications: <p>Tags to assign to resources associated with the DB instance.</p> <p>Valid Values: </p> <ul> <li> <p> <code>auto-backup</code> - The DB instance's automated backup.</p> </li> </ul>

    Raises:
        capo_rds.errors.authorization_not_found_fault.AuthorizationNotFoundFault: <p>The specified CIDR IP range or Amazon EC2 security group might not be authorized for the specified DB security group.</p> <p>Or, RDS might not be authorized to perform necessary actions using IAM on your behalf.</p>
        capo_rds.errors.backup_policy_not_found_fault.BackupPolicyNotFoundFault: <p/>
        capo_rds.errors.certificate_not_found_fault.CertificateNotFoundFault: <p> <code>CertificateIdentifier</code> doesn't refer to an existing certificate.</p>
        capo_rds.errors.db_capacity_reservation_not_found_fault.DBCapacityReservationNotFoundFault: <p> <code>DBCapacityReservationIdentifier</code> doesn't refer to an existing DB capacity reservation.</p>
        capo_rds.errors.db_instance_already_exists_fault.DBInstanceAlreadyExistsFault: <p>The user already has a DB instance with the given identifier.</p>
        capo_rds.errors.db_parameter_group_not_found_fault.DBParameterGroupNotFoundFault: <p> <code>DBParameterGroupName</code> doesn't refer to an existing DB parameter group.</p>
        capo_rds.errors.db_security_group_not_found_fault.DBSecurityGroupNotFoundFault: <p> <code>DBSecurityGroupName</code> doesn't refer to an existing DB security group.</p>
        capo_rds.errors.db_subnet_group_does_not_cover_enough_a_zs.DBSubnetGroupDoesNotCoverEnoughAZs: <p>Subnets in the DB subnet group should cover at least two Availability Zones unless there is only one Availability Zone.</p>
        capo_rds.errors.db_subnet_group_not_found_fault.DBSubnetGroupNotFoundFault: <p> <code>DBSubnetGroupName</code> doesn't refer to an existing DB subnet group.</p>
        capo_rds.errors.instance_quota_exceeded_fault.InstanceQuotaExceededFault: <p>The request would result in the user exceeding the allowed number of DB instances.</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.invalid_db_capacity_reservation_state_fault.InvalidDBCapacityReservationStateFault: <p>The DB capacity reservation isn't in a valid state.</p>
        capo_rds.errors.invalid_s3_bucket_fault.InvalidS3BucketFault: <p>The specified Amazon S3 bucket name can't be found or Amazon RDS isn't authorized to access the specified Amazon S3 bucket. Verify the <b>SourceS3BucketName</b> and <b>S3IngestionRoleArn</b> values and try again.</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.provisioned_iops_not_available_in_az_fault.ProvisionedIopsNotAvailableInAZFault: <p>Provisioned IOPS not available in the specified Availability Zone.</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.
    """

    def _handler(
        req: "OperationRequest[capo_rds.types.restore_db_instance_from_s3_message.RestoreDBInstanceFromS3Message]",
    ) -> OperationResponse[
        "capo_rds.types.restore_db_instance_from_s3_result.RestoreDBInstanceFromS3Result"
    ]:
        import capo_rds._operations.amazon_rd_sv19.restore_db_instance_from_s3

        output, http_response = (
            capo_rds._operations.amazon_rd_sv19.restore_db_instance_from_s3.restore_db_instance_from_s3(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_rds.types.restore_db_instance_from_s3_message.RestoreDBInstanceFromS3Message",
    ) -> dict[str, Any]:
        import capo_rds.types.restore_db_instance_from_s3_message

        return capo_rds.types.restore_db_instance_from_s3_message.redact_sensitive(
            input_
        )

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

        return capo_rds.types.restore_db_instance_from_s3_result.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "RestoreDBInstanceFromS3",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_rds.types.restore_db_instance_from_s3_message.RestoreDBInstanceFromS3Message = {}
    if db_name is not None:
        input_["db_name"] = db_name
    if db_instance_identifier is not None:
        input_["db_instance_identifier"] = db_instance_identifier
    if allocated_storage is not None:
        input_["allocated_storage"] = allocated_storage
    if db_instance_class is not None:
        input_["db_instance_class"] = db_instance_class
    if engine is not None:
        input_["engine"] = engine
    if master_username is not None:
        input_["master_username"] = master_username
    if master_user_password is not None:
        input_["master_user_password"] = master_user_password
    if db_security_groups is not None:
        input_["db_security_groups"] = db_security_groups
    if vpc_security_group_ids is not None:
        input_["vpc_security_group_ids"] = vpc_security_group_ids
    if availability_zone is not None:
        input_["availability_zone"] = availability_zone
    if db_subnet_group_name is not None:
        input_["db_subnet_group_name"] = db_subnet_group_name
    if preferred_maintenance_window is not None:
        input_["preferred_maintenance_window"] = preferred_maintenance_window
    if db_parameter_group_name is not None:
        input_["db_parameter_group_name"] = db_parameter_group_name
    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 port is not None:
        input_["port"] = port
    if multi_az is not None:
        input_["multi_az"] = multi_az
    if engine_version is not None:
        input_["engine_version"] = engine_version
    if auto_minor_version_upgrade is not None:
        input_["auto_minor_version_upgrade"] = auto_minor_version_upgrade
    if license_model is not None:
        input_["license_model"] = license_model
    if iops is not None:
        input_["iops"] = iops
    if storage_throughput is not None:
        input_["storage_throughput"] = storage_throughput
    if option_group_name is not None:
        input_["option_group_name"] = option_group_name
    if publicly_accessible is not None:
        input_["publicly_accessible"] = publicly_accessible
    if tags is not None:
        input_["tags"] = tags
    if storage_type is not None:
        input_["storage_type"] = storage_type
    if storage_encrypted is not None:
        input_["storage_encrypted"] = storage_encrypted
    if kms_key_id is not None:
        input_["kms_key_id"] = kms_key_id
    if copy_tags_to_snapshot is not None:
        input_["copy_tags_to_snapshot"] = copy_tags_to_snapshot
    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_iam_database_authentication is not None:
        input_["enable_iam_database_authentication"] = (
            enable_iam_database_authentication
        )
    if source_engine is not None:
        input_["source_engine"] = source_engine
    if source_engine_version is not None:
        input_["source_engine_version"] = source_engine_version
    if s3_bucket_name is not None:
        input_["s3_bucket_name"] = s3_bucket_name
    if s3_prefix is not None:
        input_["s3_prefix"] = s3_prefix
    if s3_ingestion_role_arn is not None:
        input_["s3_ingestion_role_arn"] = s3_ingestion_role_arn
    if database_insights_mode is not None:
        input_["database_insights_mode"] = database_insights_mode
    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 enable_cloudwatch_logs_exports is not None:
        input_["enable_cloudwatch_logs_exports"] = enable_cloudwatch_logs_exports
    if processor_features is not None:
        input_["processor_features"] = processor_features
    if use_default_processor_features is not None:
        input_["use_default_processor_features"] = use_default_processor_features
    if deletion_protection is not None:
        input_["deletion_protection"] = deletion_protection
    if max_allocated_storage is not None:
        input_["max_allocated_storage"] = max_allocated_storage
    if network_type is not None:
        input_["network_type"] = network_type
    if manage_master_user_password is not None:
        input_["manage_master_user_password"] = manage_master_user_password
    if master_user_secret_kms_key_id is not None:
        input_["master_user_secret_kms_key_id"] = master_user_secret_kms_key_id
    if db_capacity_reservation_identifier is not None:
        input_["db_capacity_reservation_identifier"] = (
            db_capacity_reservation_identifier
        )
    if dedicated_log_volume is not None:
        input_["dedicated_log_volume"] = dedicated_log_volume
    if ca_certificate_identifier is not None:
        input_["ca_certificate_identifier"] = ca_certificate_identifier
    if engine_lifecycle_support is not None:
        input_["engine_lifecycle_support"] = engine_lifecycle_support
    if additional_storage_volumes is not None:
        input_["additional_storage_volumes"] = additional_storage_volumes
    if tag_specifications is not None:
        input_["tag_specifications"] = tag_specifications

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output