# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from .. import _utilities, _tables
from . import outputs
from ._enums import *
from ._inputs import *

__all__ = ['Instance']


class Instance(pulumi.CustomResource):
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 allocated_storage: Optional[pulumi.Input[int]] = None,
                 allow_major_version_upgrade: Optional[pulumi.Input[bool]] = None,
                 apply_immediately: Optional[pulumi.Input[bool]] = None,
                 auto_minor_version_upgrade: Optional[pulumi.Input[bool]] = None,
                 availability_zone: Optional[pulumi.Input[str]] = None,
                 backup_retention_period: Optional[pulumi.Input[int]] = None,
                 backup_window: Optional[pulumi.Input[str]] = None,
                 ca_cert_identifier: Optional[pulumi.Input[str]] = None,
                 character_set_name: Optional[pulumi.Input[str]] = None,
                 copy_tags_to_snapshot: Optional[pulumi.Input[bool]] = None,
                 db_subnet_group_name: Optional[pulumi.Input[str]] = None,
                 delete_automated_backups: Optional[pulumi.Input[bool]] = None,
                 deletion_protection: Optional[pulumi.Input[bool]] = None,
                 domain: Optional[pulumi.Input[str]] = None,
                 domain_iam_role_name: Optional[pulumi.Input[str]] = None,
                 enabled_cloudwatch_logs_exports: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 engine: Optional[pulumi.Input[str]] = None,
                 engine_version: Optional[pulumi.Input[str]] = None,
                 final_snapshot_identifier: Optional[pulumi.Input[str]] = None,
                 iam_database_authentication_enabled: Optional[pulumi.Input[bool]] = None,
                 identifier: Optional[pulumi.Input[str]] = None,
                 identifier_prefix: Optional[pulumi.Input[str]] = None,
                 instance_class: Optional[pulumi.Input[Union[str, 'InstanceType']]] = None,
                 iops: Optional[pulumi.Input[int]] = None,
                 kms_key_id: Optional[pulumi.Input[str]] = None,
                 license_model: Optional[pulumi.Input[str]] = None,
                 maintenance_window: Optional[pulumi.Input[str]] = None,
                 max_allocated_storage: Optional[pulumi.Input[int]] = None,
                 monitoring_interval: Optional[pulumi.Input[int]] = None,
                 monitoring_role_arn: Optional[pulumi.Input[str]] = None,
                 multi_az: Optional[pulumi.Input[bool]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 option_group_name: Optional[pulumi.Input[str]] = None,
                 parameter_group_name: Optional[pulumi.Input[str]] = None,
                 password: Optional[pulumi.Input[str]] = None,
                 performance_insights_enabled: Optional[pulumi.Input[bool]] = None,
                 performance_insights_kms_key_id: Optional[pulumi.Input[str]] = None,
                 performance_insights_retention_period: Optional[pulumi.Input[int]] = None,
                 port: Optional[pulumi.Input[int]] = None,
                 publicly_accessible: Optional[pulumi.Input[bool]] = None,
                 replicate_source_db: Optional[pulumi.Input[str]] = None,
                 restore_to_point_in_time: Optional[pulumi.Input[pulumi.InputType['InstanceRestoreToPointInTimeArgs']]] = None,
                 s3_import: Optional[pulumi.Input[pulumi.InputType['InstanceS3ImportArgs']]] = None,
                 security_group_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 skip_final_snapshot: Optional[pulumi.Input[bool]] = None,
                 snapshot_identifier: Optional[pulumi.Input[str]] = None,
                 storage_encrypted: Optional[pulumi.Input[bool]] = None,
                 storage_type: Optional[pulumi.Input[Union[str, 'StorageType']]] = None,
                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 timezone: Optional[pulumi.Input[str]] = None,
                 username: Optional[pulumi.Input[str]] = None,
                 vpc_security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 __props__=None,
                 __name__=None,
                 __opts__=None):
        """
        Provides an RDS instance resource.  A DB instance is an isolated database
        environment in the cloud.  A DB instance can contain multiple user-created
        databases.

        Changes to a DB instance can occur when you manually change a parameter, such as
        `allocated_storage`, and are reflected in the next maintenance window. Because
        of this, this provider may report a difference in its planning phase because a
        modification has not yet taken place. You can use the `apply_immediately` flag
        to instruct the service to apply the change immediately (see documentation
        below).

        When upgrading the major version of an engine, `allow_major_version_upgrade`
        must be set to `true`.

        > **Note:** using `apply_immediately` can result in a brief downtime as the
        server reboots. See the AWS Docs on [RDS Maintenance][2] for more information.

        > **Note:** All arguments including the username and password will be stored in
        the raw state as plain-text.

        ## RDS Instance Class Types

        Amazon RDS supports three types of instance classes: Standard, Memory Optimized,
        and Burstable Performance. For more information please read the AWS RDS documentation
        about [DB Instance Class Types](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html)

        ## Example Usage
        ### Basic Usage

        ```python
        import pulumi
        import pulumi_aws as aws

        default = aws.rds.Instance("default",
            allocated_storage=20,
            engine="mysql",
            engine_version="5.7",
            instance_class="db.t2.micro",
            name="mydb",
            parameter_group_name="default.mysql5.7",
            password="foobarbaz",
            storage_type="gp2",
            username="foo")
        ```
        ### Storage Autoscaling

        To enable Storage Autoscaling with instances that support the feature, define the `max_allocated_storage` argument higher than the `allocated_storage` argument. This provider will automatically hide differences with the `allocated_storage` argument value if autoscaling occurs.

        ```python
        import pulumi
        import pulumi_aws as aws

        example = aws.rds.Instance("example",
            allocated_storage=50,
            max_allocated_storage=100)
        ```

        ## Import

        DB Instances can be imported using the `identifier`, e.g.

        ```sh
         $ pulumi import aws:rds/instance:Instance default mydb-rds-instance
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[int] allocated_storage: The allocated storage in gibibytes. If `max_allocated_storage` is configured, this argument represents the initial storage allocation and differences from the configuration will be ignored automatically when Storage Autoscaling occurs.
        :param pulumi.Input[bool] allow_major_version_upgrade: Indicates that major version
               upgrades are allowed. Changing this parameter does not result in an outage and
               the change is asynchronously applied as soon as possible.
        :param pulumi.Input[bool] apply_immediately: Specifies whether any database modifications
               are applied immediately, or during the next maintenance window. Default is
               `false`. See [Amazon RDS Documentation for more
               information.](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.Modifying.html)
        :param pulumi.Input[bool] auto_minor_version_upgrade: Indicates that minor engine upgrades
               will be applied automatically to the DB instance during the maintenance window.
               Defaults to true.
        :param pulumi.Input[str] availability_zone: The AZ for the RDS instance.
        :param pulumi.Input[int] backup_retention_period: The days to retain backups for. Must be
               between `0` and `35`. Must be greater than `0` if the database is used as a source for a Read Replica. [See Read Replica][1].
        :param pulumi.Input[str] backup_window: The daily time range (in UTC) during which
               automated backups are created if they are enabled. Example: "09:46-10:16". Must
               not overlap with `maintenance_window`.
        :param pulumi.Input[str] ca_cert_identifier: The identifier of the CA certificate for the DB instance.
        :param pulumi.Input[str] character_set_name: The character set name to use for DB
               encoding in Oracle and Microsoft SQL instances (collation). This can't be changed. See [Oracle Character Sets
               Supported in Amazon RDS](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.OracleCharacterSets.html)
               or [Server-Level Collation for Microsoft SQL Server](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.SQLServer.CommonDBATasks.Collation.html) for more information.
        :param pulumi.Input[bool] copy_tags_to_snapshot: Copy all Instance `tags` to snapshots. Default is `false`.
        :param pulumi.Input[str] db_subnet_group_name: Name of `DB subnet group`. DB instance will
               be created in the VPC associated with the DB subnet group. If unspecified, will
               be created in the `default` VPC, or in EC2 Classic, if available. When working
               with read replicas, it should be specified only if the source database
               specifies an instance in another AWS Region. See [DBSubnetGroupName in API
               action CreateDBInstanceReadReplica](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstanceReadReplica.html)
               for additional read replica contraints.
        :param pulumi.Input[bool] delete_automated_backups: Specifies whether to remove automated backups immediately after the DB instance is deleted. Default is `true`.
        :param pulumi.Input[bool] deletion_protection: If the DB instance should have deletion protection enabled. The database can't be deleted when this value is set to `true`. The default is `false`.
        :param pulumi.Input[str] domain: The ID of the Directory Service Active Directory domain to create the instance in.
        :param pulumi.Input[str] domain_iam_role_name: The name of the IAM role to be used when making API calls to the Directory Service.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] enabled_cloudwatch_logs_exports: Set of log types to enable for exporting to CloudWatch logs. If omitted, no logs will be exported. Valid values (depending on `engine`). MySQL and MariaDB: `audit`, `error`, `general`, `slowquery`. PostgreSQL: `postgresql`, `upgrade`. MSSQL: `agent` , `error`. Oracle: `alert`, `audit`, `listener`, `trace`.
        :param pulumi.Input[str] engine: (Required unless a `snapshot_identifier` or `replicate_source_db`
               is provided) The database engine to use.  For supported values, see the Engine parameter in [API action CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html).
               Note that for Amazon Aurora instances the engine must match the `DB cluster`'s engine'.
               For information on the difference between the available Aurora MySQL engines
               see [Comparison between Aurora MySQL 1 and Aurora MySQL 2](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AuroraMySQL.Updates.20180206.html)
               in the Amazon RDS User Guide.
        :param pulumi.Input[str] engine_version: The engine version to use. If `auto_minor_version_upgrade`
               is enabled, you can provide a prefix of the version such as `5.7` (for `5.7.10`) and
               this attribute will ignore differences in the patch version automatically (e.g. `5.7.17`).
               For supported values, see the EngineVersion parameter in [API action CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html).
               Note that for Amazon Aurora instances the engine version must match the `DB cluster`'s engine version'.
        :param pulumi.Input[str] final_snapshot_identifier: The name of your final DB snapshot
               when this DB instance is deleted. Must be provided if `skip_final_snapshot` is
               set to `false`.
        :param pulumi.Input[bool] iam_database_authentication_enabled: Specifies whether or
               mappings of AWS Identity and Access Management (IAM) accounts to database
               accounts is enabled.
        :param pulumi.Input[str] identifier: The name of the RDS instance,
               if omitted, this provider will assign a random, unique identifier.
        :param pulumi.Input[str] identifier_prefix: Creates a unique
               identifier beginning with the specified prefix. Conflicts with `identifier`.
        :param pulumi.Input[Union[str, 'InstanceType']] instance_class: The instance type of the RDS instance.
        :param pulumi.Input[int] iops: The amount of provisioned IOPS. Setting this implies a
               storage_type of "io1".
        :param pulumi.Input[str] kms_key_id: The ARN for the KMS encryption key. If creating an
               encrypted replica, set this to the destination KMS ARN.
        :param pulumi.Input[str] license_model: (Optional, but required for some DB engines, i.e. Oracle
               SE1) License model information for this DB instance.
        :param pulumi.Input[str] maintenance_window: The window to perform maintenance in.
               Syntax: "ddd:hh24:mi-ddd:hh24:mi". Eg: "Mon:00:00-Mon:03:00". See [RDS
               Maintenance Window
               docs](http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#AdjustingTheMaintenanceWindow)
               for more information.
        :param pulumi.Input[int] max_allocated_storage: When configured, the upper limit to which Amazon RDS can automatically scale the storage of the DB instance. Configuring this will automatically ignore differences to `allocated_storage`. Must be greater than or equal to `allocated_storage` or `0` to disable Storage Autoscaling.
        :param pulumi.Input[int] monitoring_interval: The interval, in seconds, between points
               when Enhanced Monitoring metrics are collected for the DB instance. To disable
               collecting Enhanced Monitoring metrics, specify 0. The default is 0. Valid
               Values: 0, 1, 5, 10, 15, 30, 60.
        :param pulumi.Input[str] monitoring_role_arn: The ARN for the IAM role that permits RDS
               to send enhanced monitoring metrics to CloudWatch Logs. You can find more
               information on the [AWS
               Documentation](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.html)
               what IAM permissions are needed to allow Enhanced Monitoring for RDS Instances.
        :param pulumi.Input[bool] multi_az: Specifies if the RDS instance is multi-AZ
        :param pulumi.Input[str] name: The name of the database to create when the DB instance is created. If this parameter is not specified, no database is created in the DB instance. Note that this does not apply for Oracle or SQL Server engines. See the [AWS documentation](http://docs.aws.amazon.com/cli/latest/reference/rds/create-db-instance.html) for more details on what applies for those engines.
        :param pulumi.Input[str] option_group_name: Name of the DB option group to associate.
        :param pulumi.Input[str] parameter_group_name: Name of the DB parameter group to
               associate.
        :param pulumi.Input[str] password: (Required unless a `snapshot_identifier` or `replicate_source_db`
               is provided) Password for the master DB user. Note that this may show up in
               logs, and it will be stored in the state file.
        :param pulumi.Input[bool] performance_insights_enabled: Specifies whether Performance Insights are enabled. Defaults to false.
        :param pulumi.Input[str] performance_insights_kms_key_id: The ARN for the KMS key to encrypt Performance Insights data. When specifying `performance_insights_kms_key_id`, `performance_insights_enabled` needs to be set to true. Once KMS key is set, it can never be changed.
        :param pulumi.Input[int] performance_insights_retention_period: The amount of time in days to retain Performance Insights data. Either 7 (7 days) or 731 (2 years). When specifying `performance_insights_retention_period`, `performance_insights_enabled` needs to be set to true. Defaults to '7'.
        :param pulumi.Input[int] port: The port on which the DB accepts connections.
        :param pulumi.Input[bool] publicly_accessible: Bool to control if instance is publicly
               accessible. Default is `false`.
        :param pulumi.Input[str] replicate_source_db: Specifies that this resource is a Replicate
               database, and to use this value as the source database. This correlates to the
               `identifier` of another Amazon RDS Database to replicate (if replicating within
               a single region) or ARN of the Amazon RDS Database to replicate (if replicating
               cross-region). Note that if you are
               creating a cross-region replica of an encrypted database you will also need to
               specify a `kms_key_id`. See [DB Instance Replication][1] and [Working with
               PostgreSQL and MySQL Read Replicas](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html)
               for more information on using Replication.
        :param pulumi.Input[pulumi.InputType['InstanceRestoreToPointInTimeArgs']] restore_to_point_in_time: A configuration block for restoring a DB instance to an arbitrary point in time. Requires the `identifier` argument to be set with the name of the new DB instance to be created. See Restore To Point In Time below for details.
        :param pulumi.Input[pulumi.InputType['InstanceS3ImportArgs']] s3_import: Restore from a Percona Xtrabackup in S3.  See [Importing Data into an Amazon RDS MySQL DB Instance](http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MySQL.Procedural.Importing.html)
        :param pulumi.Input[Sequence[pulumi.Input[str]]] security_group_names: List of DB Security Groups to
               associate. Only used for [DB Instances on the _EC2-Classic_
               Platform](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.html#USER_VPC.FindDefaultVPC).
        :param pulumi.Input[bool] skip_final_snapshot: Determines whether a final DB snapshot is
               created before the DB instance is deleted. If true is specified, no DBSnapshot
               is created. If false is specified, a DB snapshot is created before the DB
               instance is deleted, using the value from `final_snapshot_identifier`. Default
               is `false`.
        :param pulumi.Input[str] snapshot_identifier: Specifies whether or not to create this
               database from a snapshot. This correlates to the snapshot ID you'd find in the
               RDS console, e.g: rds:production-2015-06-26-06-05.
        :param pulumi.Input[bool] storage_encrypted: Specifies whether the DB instance is
               encrypted. Note that if you are creating a cross-region read replica this field
               is ignored and you should instead declare `kms_key_id` with a valid ARN. The
               default is `false` if not specified.
        :param pulumi.Input[Union[str, 'StorageType']] storage_type: One of "standard" (magnetic), "gp2" (general
               purpose SSD), or "io1" (provisioned IOPS SSD). The default is "io1" if `iops` is
               specified, "gp2" if not.
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A map of tags to assign to the resource.
        :param pulumi.Input[str] timezone: Time zone of the DB instance. `timezone` is currently
               only supported by Microsoft SQL Server. The `timezone` can only be set on
               creation. See [MSSQL User
               Guide](http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SQLServer.html#SQLServer.Concepts.General.TimeZone)
               for more information.
        :param pulumi.Input[str] username: (Required unless a `snapshot_identifier` or `replicate_source_db`
               is provided) Username for the master DB user.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] vpc_security_group_ids: List of VPC security groups to
               associate.
        """
        if __name__ is not None:
            warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning)
            resource_name = __name__
        if __opts__ is not None:
            warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning)
            opts = __opts__
        if opts is None:
            opts = pulumi.ResourceOptions()
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.version is None:
            opts.version = _utilities.get_version()
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = dict()

            __props__['allocated_storage'] = allocated_storage
            __props__['allow_major_version_upgrade'] = allow_major_version_upgrade
            __props__['apply_immediately'] = apply_immediately
            __props__['auto_minor_version_upgrade'] = auto_minor_version_upgrade
            __props__['availability_zone'] = availability_zone
            __props__['backup_retention_period'] = backup_retention_period
            __props__['backup_window'] = backup_window
            __props__['ca_cert_identifier'] = ca_cert_identifier
            __props__['character_set_name'] = character_set_name
            __props__['copy_tags_to_snapshot'] = copy_tags_to_snapshot
            __props__['db_subnet_group_name'] = db_subnet_group_name
            __props__['delete_automated_backups'] = delete_automated_backups
            __props__['deletion_protection'] = deletion_protection
            __props__['domain'] = domain
            __props__['domain_iam_role_name'] = domain_iam_role_name
            __props__['enabled_cloudwatch_logs_exports'] = enabled_cloudwatch_logs_exports
            __props__['engine'] = engine
            __props__['engine_version'] = engine_version
            __props__['final_snapshot_identifier'] = final_snapshot_identifier
            __props__['iam_database_authentication_enabled'] = iam_database_authentication_enabled
            __props__['identifier'] = identifier
            __props__['identifier_prefix'] = identifier_prefix
            if instance_class is None and not opts.urn:
                raise TypeError("Missing required property 'instance_class'")
            __props__['instance_class'] = instance_class
            __props__['iops'] = iops
            __props__['kms_key_id'] = kms_key_id
            __props__['license_model'] = license_model
            __props__['maintenance_window'] = maintenance_window
            __props__['max_allocated_storage'] = max_allocated_storage
            __props__['monitoring_interval'] = monitoring_interval
            __props__['monitoring_role_arn'] = monitoring_role_arn
            __props__['multi_az'] = multi_az
            __props__['name'] = name
            __props__['option_group_name'] = option_group_name
            __props__['parameter_group_name'] = parameter_group_name
            __props__['password'] = password
            __props__['performance_insights_enabled'] = performance_insights_enabled
            __props__['performance_insights_kms_key_id'] = performance_insights_kms_key_id
            __props__['performance_insights_retention_period'] = performance_insights_retention_period
            __props__['port'] = port
            __props__['publicly_accessible'] = publicly_accessible
            __props__['replicate_source_db'] = replicate_source_db
            __props__['restore_to_point_in_time'] = restore_to_point_in_time
            __props__['s3_import'] = s3_import
            __props__['security_group_names'] = security_group_names
            __props__['skip_final_snapshot'] = skip_final_snapshot
            __props__['snapshot_identifier'] = snapshot_identifier
            __props__['storage_encrypted'] = storage_encrypted
            __props__['storage_type'] = storage_type
            __props__['tags'] = tags
            __props__['timezone'] = timezone
            __props__['username'] = username
            __props__['vpc_security_group_ids'] = vpc_security_group_ids
            __props__['address'] = None
            __props__['arn'] = None
            __props__['endpoint'] = None
            __props__['hosted_zone_id'] = None
            __props__['latest_restorable_time'] = None
            __props__['replicas'] = None
            __props__['resource_id'] = None
            __props__['status'] = None
        super(Instance, __self__).__init__(
            'aws:rds/instance:Instance',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            address: Optional[pulumi.Input[str]] = None,
            allocated_storage: Optional[pulumi.Input[int]] = None,
            allow_major_version_upgrade: Optional[pulumi.Input[bool]] = None,
            apply_immediately: Optional[pulumi.Input[bool]] = None,
            arn: Optional[pulumi.Input[str]] = None,
            auto_minor_version_upgrade: Optional[pulumi.Input[bool]] = None,
            availability_zone: Optional[pulumi.Input[str]] = None,
            backup_retention_period: Optional[pulumi.Input[int]] = None,
            backup_window: Optional[pulumi.Input[str]] = None,
            ca_cert_identifier: Optional[pulumi.Input[str]] = None,
            character_set_name: Optional[pulumi.Input[str]] = None,
            copy_tags_to_snapshot: Optional[pulumi.Input[bool]] = None,
            db_subnet_group_name: Optional[pulumi.Input[str]] = None,
            delete_automated_backups: Optional[pulumi.Input[bool]] = None,
            deletion_protection: Optional[pulumi.Input[bool]] = None,
            domain: Optional[pulumi.Input[str]] = None,
            domain_iam_role_name: Optional[pulumi.Input[str]] = None,
            enabled_cloudwatch_logs_exports: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            endpoint: Optional[pulumi.Input[str]] = None,
            engine: Optional[pulumi.Input[str]] = None,
            engine_version: Optional[pulumi.Input[str]] = None,
            final_snapshot_identifier: Optional[pulumi.Input[str]] = None,
            hosted_zone_id: Optional[pulumi.Input[str]] = None,
            iam_database_authentication_enabled: Optional[pulumi.Input[bool]] = None,
            identifier: Optional[pulumi.Input[str]] = None,
            identifier_prefix: Optional[pulumi.Input[str]] = None,
            instance_class: Optional[pulumi.Input[Union[str, 'InstanceType']]] = None,
            iops: Optional[pulumi.Input[int]] = None,
            kms_key_id: Optional[pulumi.Input[str]] = None,
            latest_restorable_time: Optional[pulumi.Input[str]] = None,
            license_model: Optional[pulumi.Input[str]] = None,
            maintenance_window: Optional[pulumi.Input[str]] = None,
            max_allocated_storage: Optional[pulumi.Input[int]] = None,
            monitoring_interval: Optional[pulumi.Input[int]] = None,
            monitoring_role_arn: Optional[pulumi.Input[str]] = None,
            multi_az: Optional[pulumi.Input[bool]] = None,
            name: Optional[pulumi.Input[str]] = None,
            option_group_name: Optional[pulumi.Input[str]] = None,
            parameter_group_name: Optional[pulumi.Input[str]] = None,
            password: Optional[pulumi.Input[str]] = None,
            performance_insights_enabled: Optional[pulumi.Input[bool]] = None,
            performance_insights_kms_key_id: Optional[pulumi.Input[str]] = None,
            performance_insights_retention_period: Optional[pulumi.Input[int]] = None,
            port: Optional[pulumi.Input[int]] = None,
            publicly_accessible: Optional[pulumi.Input[bool]] = None,
            replicas: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            replicate_source_db: Optional[pulumi.Input[str]] = None,
            resource_id: Optional[pulumi.Input[str]] = None,
            restore_to_point_in_time: Optional[pulumi.Input[pulumi.InputType['InstanceRestoreToPointInTimeArgs']]] = None,
            s3_import: Optional[pulumi.Input[pulumi.InputType['InstanceS3ImportArgs']]] = None,
            security_group_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
            skip_final_snapshot: Optional[pulumi.Input[bool]] = None,
            snapshot_identifier: Optional[pulumi.Input[str]] = None,
            status: Optional[pulumi.Input[str]] = None,
            storage_encrypted: Optional[pulumi.Input[bool]] = None,
            storage_type: Optional[pulumi.Input[Union[str, 'StorageType']]] = None,
            tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
            timezone: Optional[pulumi.Input[str]] = None,
            username: Optional[pulumi.Input[str]] = None,
            vpc_security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None) -> 'Instance':
        """
        Get an existing Instance resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] address: The hostname of the RDS instance. See also `endpoint` and `port`.
        :param pulumi.Input[int] allocated_storage: The allocated storage in gibibytes. If `max_allocated_storage` is configured, this argument represents the initial storage allocation and differences from the configuration will be ignored automatically when Storage Autoscaling occurs.
        :param pulumi.Input[bool] allow_major_version_upgrade: Indicates that major version
               upgrades are allowed. Changing this parameter does not result in an outage and
               the change is asynchronously applied as soon as possible.
        :param pulumi.Input[bool] apply_immediately: Specifies whether any database modifications
               are applied immediately, or during the next maintenance window. Default is
               `false`. See [Amazon RDS Documentation for more
               information.](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.Modifying.html)
        :param pulumi.Input[str] arn: The ARN of the RDS instance.
        :param pulumi.Input[bool] auto_minor_version_upgrade: Indicates that minor engine upgrades
               will be applied automatically to the DB instance during the maintenance window.
               Defaults to true.
        :param pulumi.Input[str] availability_zone: The AZ for the RDS instance.
        :param pulumi.Input[int] backup_retention_period: The days to retain backups for. Must be
               between `0` and `35`. Must be greater than `0` if the database is used as a source for a Read Replica. [See Read Replica][1].
        :param pulumi.Input[str] backup_window: The daily time range (in UTC) during which
               automated backups are created if they are enabled. Example: "09:46-10:16". Must
               not overlap with `maintenance_window`.
        :param pulumi.Input[str] ca_cert_identifier: The identifier of the CA certificate for the DB instance.
        :param pulumi.Input[str] character_set_name: The character set name to use for DB
               encoding in Oracle and Microsoft SQL instances (collation). This can't be changed. See [Oracle Character Sets
               Supported in Amazon RDS](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.OracleCharacterSets.html)
               or [Server-Level Collation for Microsoft SQL Server](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.SQLServer.CommonDBATasks.Collation.html) for more information.
        :param pulumi.Input[bool] copy_tags_to_snapshot: Copy all Instance `tags` to snapshots. Default is `false`.
        :param pulumi.Input[str] db_subnet_group_name: Name of `DB subnet group`. DB instance will
               be created in the VPC associated with the DB subnet group. If unspecified, will
               be created in the `default` VPC, or in EC2 Classic, if available. When working
               with read replicas, it should be specified only if the source database
               specifies an instance in another AWS Region. See [DBSubnetGroupName in API
               action CreateDBInstanceReadReplica](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstanceReadReplica.html)
               for additional read replica contraints.
        :param pulumi.Input[bool] delete_automated_backups: Specifies whether to remove automated backups immediately after the DB instance is deleted. Default is `true`.
        :param pulumi.Input[bool] deletion_protection: If the DB instance should have deletion protection enabled. The database can't be deleted when this value is set to `true`. The default is `false`.
        :param pulumi.Input[str] domain: The ID of the Directory Service Active Directory domain to create the instance in.
        :param pulumi.Input[str] domain_iam_role_name: The name of the IAM role to be used when making API calls to the Directory Service.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] enabled_cloudwatch_logs_exports: Set of log types to enable for exporting to CloudWatch logs. If omitted, no logs will be exported. Valid values (depending on `engine`). MySQL and MariaDB: `audit`, `error`, `general`, `slowquery`. PostgreSQL: `postgresql`, `upgrade`. MSSQL: `agent` , `error`. Oracle: `alert`, `audit`, `listener`, `trace`.
        :param pulumi.Input[str] endpoint: The connection endpoint in `address:port` format.
        :param pulumi.Input[str] engine: (Required unless a `snapshot_identifier` or `replicate_source_db`
               is provided) The database engine to use.  For supported values, see the Engine parameter in [API action CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html).
               Note that for Amazon Aurora instances the engine must match the `DB cluster`'s engine'.
               For information on the difference between the available Aurora MySQL engines
               see [Comparison between Aurora MySQL 1 and Aurora MySQL 2](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AuroraMySQL.Updates.20180206.html)
               in the Amazon RDS User Guide.
        :param pulumi.Input[str] engine_version: The engine version to use. If `auto_minor_version_upgrade`
               is enabled, you can provide a prefix of the version such as `5.7` (for `5.7.10`) and
               this attribute will ignore differences in the patch version automatically (e.g. `5.7.17`).
               For supported values, see the EngineVersion parameter in [API action CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html).
               Note that for Amazon Aurora instances the engine version must match the `DB cluster`'s engine version'.
        :param pulumi.Input[str] final_snapshot_identifier: The name of your final DB snapshot
               when this DB instance is deleted. Must be provided if `skip_final_snapshot` is
               set to `false`.
        :param pulumi.Input[str] hosted_zone_id: The canonical hosted zone ID of the DB instance (to be used
               in a Route 53 Alias record).
        :param pulumi.Input[bool] iam_database_authentication_enabled: Specifies whether or
               mappings of AWS Identity and Access Management (IAM) accounts to database
               accounts is enabled.
        :param pulumi.Input[str] identifier: The name of the RDS instance,
               if omitted, this provider will assign a random, unique identifier.
        :param pulumi.Input[str] identifier_prefix: Creates a unique
               identifier beginning with the specified prefix. Conflicts with `identifier`.
        :param pulumi.Input[Union[str, 'InstanceType']] instance_class: The instance type of the RDS instance.
        :param pulumi.Input[int] iops: The amount of provisioned IOPS. Setting this implies a
               storage_type of "io1".
        :param pulumi.Input[str] kms_key_id: The ARN for the KMS encryption key. If creating an
               encrypted replica, set this to the destination KMS ARN.
        :param pulumi.Input[str] latest_restorable_time: The latest time, in UTC [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8), to which a database can be restored with point-in-time restore.
        :param pulumi.Input[str] license_model: (Optional, but required for some DB engines, i.e. Oracle
               SE1) License model information for this DB instance.
        :param pulumi.Input[str] maintenance_window: The window to perform maintenance in.
               Syntax: "ddd:hh24:mi-ddd:hh24:mi". Eg: "Mon:00:00-Mon:03:00". See [RDS
               Maintenance Window
               docs](http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#AdjustingTheMaintenanceWindow)
               for more information.
        :param pulumi.Input[int] max_allocated_storage: When configured, the upper limit to which Amazon RDS can automatically scale the storage of the DB instance. Configuring this will automatically ignore differences to `allocated_storage`. Must be greater than or equal to `allocated_storage` or `0` to disable Storage Autoscaling.
        :param pulumi.Input[int] monitoring_interval: The interval, in seconds, between points
               when Enhanced Monitoring metrics are collected for the DB instance. To disable
               collecting Enhanced Monitoring metrics, specify 0. The default is 0. Valid
               Values: 0, 1, 5, 10, 15, 30, 60.
        :param pulumi.Input[str] monitoring_role_arn: The ARN for the IAM role that permits RDS
               to send enhanced monitoring metrics to CloudWatch Logs. You can find more
               information on the [AWS
               Documentation](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.html)
               what IAM permissions are needed to allow Enhanced Monitoring for RDS Instances.
        :param pulumi.Input[bool] multi_az: Specifies if the RDS instance is multi-AZ
        :param pulumi.Input[str] name: The name of the database to create when the DB instance is created. If this parameter is not specified, no database is created in the DB instance. Note that this does not apply for Oracle or SQL Server engines. See the [AWS documentation](http://docs.aws.amazon.com/cli/latest/reference/rds/create-db-instance.html) for more details on what applies for those engines.
        :param pulumi.Input[str] option_group_name: Name of the DB option group to associate.
        :param pulumi.Input[str] parameter_group_name: Name of the DB parameter group to
               associate.
        :param pulumi.Input[str] password: (Required unless a `snapshot_identifier` or `replicate_source_db`
               is provided) Password for the master DB user. Note that this may show up in
               logs, and it will be stored in the state file.
        :param pulumi.Input[bool] performance_insights_enabled: Specifies whether Performance Insights are enabled. Defaults to false.
        :param pulumi.Input[str] performance_insights_kms_key_id: The ARN for the KMS key to encrypt Performance Insights data. When specifying `performance_insights_kms_key_id`, `performance_insights_enabled` needs to be set to true. Once KMS key is set, it can never be changed.
        :param pulumi.Input[int] performance_insights_retention_period: The amount of time in days to retain Performance Insights data. Either 7 (7 days) or 731 (2 years). When specifying `performance_insights_retention_period`, `performance_insights_enabled` needs to be set to true. Defaults to '7'.
        :param pulumi.Input[int] port: The port on which the DB accepts connections.
        :param pulumi.Input[bool] publicly_accessible: Bool to control if instance is publicly
               accessible. Default is `false`.
        :param pulumi.Input[str] replicate_source_db: Specifies that this resource is a Replicate
               database, and to use this value as the source database. This correlates to the
               `identifier` of another Amazon RDS Database to replicate (if replicating within
               a single region) or ARN of the Amazon RDS Database to replicate (if replicating
               cross-region). Note that if you are
               creating a cross-region replica of an encrypted database you will also need to
               specify a `kms_key_id`. See [DB Instance Replication][1] and [Working with
               PostgreSQL and MySQL Read Replicas](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html)
               for more information on using Replication.
        :param pulumi.Input[str] resource_id: The RDS Resource ID of this instance.
        :param pulumi.Input[pulumi.InputType['InstanceRestoreToPointInTimeArgs']] restore_to_point_in_time: A configuration block for restoring a DB instance to an arbitrary point in time. Requires the `identifier` argument to be set with the name of the new DB instance to be created. See Restore To Point In Time below for details.
        :param pulumi.Input[pulumi.InputType['InstanceS3ImportArgs']] s3_import: Restore from a Percona Xtrabackup in S3.  See [Importing Data into an Amazon RDS MySQL DB Instance](http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MySQL.Procedural.Importing.html)
        :param pulumi.Input[Sequence[pulumi.Input[str]]] security_group_names: List of DB Security Groups to
               associate. Only used for [DB Instances on the _EC2-Classic_
               Platform](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.html#USER_VPC.FindDefaultVPC).
        :param pulumi.Input[bool] skip_final_snapshot: Determines whether a final DB snapshot is
               created before the DB instance is deleted. If true is specified, no DBSnapshot
               is created. If false is specified, a DB snapshot is created before the DB
               instance is deleted, using the value from `final_snapshot_identifier`. Default
               is `false`.
        :param pulumi.Input[str] snapshot_identifier: Specifies whether or not to create this
               database from a snapshot. This correlates to the snapshot ID you'd find in the
               RDS console, e.g: rds:production-2015-06-26-06-05.
        :param pulumi.Input[str] status: The RDS instance status.
        :param pulumi.Input[bool] storage_encrypted: Specifies whether the DB instance is
               encrypted. Note that if you are creating a cross-region read replica this field
               is ignored and you should instead declare `kms_key_id` with a valid ARN. The
               default is `false` if not specified.
        :param pulumi.Input[Union[str, 'StorageType']] storage_type: One of "standard" (magnetic), "gp2" (general
               purpose SSD), or "io1" (provisioned IOPS SSD). The default is "io1" if `iops` is
               specified, "gp2" if not.
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A map of tags to assign to the resource.
        :param pulumi.Input[str] timezone: Time zone of the DB instance. `timezone` is currently
               only supported by Microsoft SQL Server. The `timezone` can only be set on
               creation. See [MSSQL User
               Guide](http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SQLServer.html#SQLServer.Concepts.General.TimeZone)
               for more information.
        :param pulumi.Input[str] username: (Required unless a `snapshot_identifier` or `replicate_source_db`
               is provided) Username for the master DB user.
        :param pulumi.Input[Sequence[pulumi.Input[str]]] vpc_security_group_ids: List of VPC security groups to
               associate.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = dict()

        __props__["address"] = address
        __props__["allocated_storage"] = allocated_storage
        __props__["allow_major_version_upgrade"] = allow_major_version_upgrade
        __props__["apply_immediately"] = apply_immediately
        __props__["arn"] = arn
        __props__["auto_minor_version_upgrade"] = auto_minor_version_upgrade
        __props__["availability_zone"] = availability_zone
        __props__["backup_retention_period"] = backup_retention_period
        __props__["backup_window"] = backup_window
        __props__["ca_cert_identifier"] = ca_cert_identifier
        __props__["character_set_name"] = character_set_name
        __props__["copy_tags_to_snapshot"] = copy_tags_to_snapshot
        __props__["db_subnet_group_name"] = db_subnet_group_name
        __props__["delete_automated_backups"] = delete_automated_backups
        __props__["deletion_protection"] = deletion_protection
        __props__["domain"] = domain
        __props__["domain_iam_role_name"] = domain_iam_role_name
        __props__["enabled_cloudwatch_logs_exports"] = enabled_cloudwatch_logs_exports
        __props__["endpoint"] = endpoint
        __props__["engine"] = engine
        __props__["engine_version"] = engine_version
        __props__["final_snapshot_identifier"] = final_snapshot_identifier
        __props__["hosted_zone_id"] = hosted_zone_id
        __props__["iam_database_authentication_enabled"] = iam_database_authentication_enabled
        __props__["identifier"] = identifier
        __props__["identifier_prefix"] = identifier_prefix
        __props__["instance_class"] = instance_class
        __props__["iops"] = iops
        __props__["kms_key_id"] = kms_key_id
        __props__["latest_restorable_time"] = latest_restorable_time
        __props__["license_model"] = license_model
        __props__["maintenance_window"] = maintenance_window
        __props__["max_allocated_storage"] = max_allocated_storage
        __props__["monitoring_interval"] = monitoring_interval
        __props__["monitoring_role_arn"] = monitoring_role_arn
        __props__["multi_az"] = multi_az
        __props__["name"] = name
        __props__["option_group_name"] = option_group_name
        __props__["parameter_group_name"] = parameter_group_name
        __props__["password"] = password
        __props__["performance_insights_enabled"] = performance_insights_enabled
        __props__["performance_insights_kms_key_id"] = performance_insights_kms_key_id
        __props__["performance_insights_retention_period"] = performance_insights_retention_period
        __props__["port"] = port
        __props__["publicly_accessible"] = publicly_accessible
        __props__["replicas"] = replicas
        __props__["replicate_source_db"] = replicate_source_db
        __props__["resource_id"] = resource_id
        __props__["restore_to_point_in_time"] = restore_to_point_in_time
        __props__["s3_import"] = s3_import
        __props__["security_group_names"] = security_group_names
        __props__["skip_final_snapshot"] = skip_final_snapshot
        __props__["snapshot_identifier"] = snapshot_identifier
        __props__["status"] = status
        __props__["storage_encrypted"] = storage_encrypted
        __props__["storage_type"] = storage_type
        __props__["tags"] = tags
        __props__["timezone"] = timezone
        __props__["username"] = username
        __props__["vpc_security_group_ids"] = vpc_security_group_ids
        return Instance(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter
    def address(self) -> pulumi.Output[str]:
        """
        The hostname of the RDS instance. See also `endpoint` and `port`.
        """
        return pulumi.get(self, "address")

    @property
    @pulumi.getter(name="allocatedStorage")
    def allocated_storage(self) -> pulumi.Output[int]:
        """
        The allocated storage in gibibytes. If `max_allocated_storage` is configured, this argument represents the initial storage allocation and differences from the configuration will be ignored automatically when Storage Autoscaling occurs.
        """
        return pulumi.get(self, "allocated_storage")

    @property
    @pulumi.getter(name="allowMajorVersionUpgrade")
    def allow_major_version_upgrade(self) -> pulumi.Output[Optional[bool]]:
        """
        Indicates that major version
        upgrades are allowed. Changing this parameter does not result in an outage and
        the change is asynchronously applied as soon as possible.
        """
        return pulumi.get(self, "allow_major_version_upgrade")

    @property
    @pulumi.getter(name="applyImmediately")
    def apply_immediately(self) -> pulumi.Output[bool]:
        """
        Specifies whether any database modifications
        are applied immediately, or during the next maintenance window. Default is
        `false`. See [Amazon RDS Documentation for more
        information.](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.Modifying.html)
        """
        return pulumi.get(self, "apply_immediately")

    @property
    @pulumi.getter
    def arn(self) -> pulumi.Output[str]:
        """
        The ARN of the RDS instance.
        """
        return pulumi.get(self, "arn")

    @property
    @pulumi.getter(name="autoMinorVersionUpgrade")
    def auto_minor_version_upgrade(self) -> pulumi.Output[Optional[bool]]:
        """
        Indicates that minor engine upgrades
        will be applied automatically to the DB instance during the maintenance window.
        Defaults to true.
        """
        return pulumi.get(self, "auto_minor_version_upgrade")

    @property
    @pulumi.getter(name="availabilityZone")
    def availability_zone(self) -> pulumi.Output[str]:
        """
        The AZ for the RDS instance.
        """
        return pulumi.get(self, "availability_zone")

    @property
    @pulumi.getter(name="backupRetentionPeriod")
    def backup_retention_period(self) -> pulumi.Output[int]:
        """
        The days to retain backups for. Must be
        between `0` and `35`. Must be greater than `0` if the database is used as a source for a Read Replica. [See Read Replica][1].
        """
        return pulumi.get(self, "backup_retention_period")

    @property
    @pulumi.getter(name="backupWindow")
    def backup_window(self) -> pulumi.Output[str]:
        """
        The daily time range (in UTC) during which
        automated backups are created if they are enabled. Example: "09:46-10:16". Must
        not overlap with `maintenance_window`.
        """
        return pulumi.get(self, "backup_window")

    @property
    @pulumi.getter(name="caCertIdentifier")
    def ca_cert_identifier(self) -> pulumi.Output[str]:
        """
        The identifier of the CA certificate for the DB instance.
        """
        return pulumi.get(self, "ca_cert_identifier")

    @property
    @pulumi.getter(name="characterSetName")
    def character_set_name(self) -> pulumi.Output[str]:
        """
        The character set name to use for DB
        encoding in Oracle and Microsoft SQL instances (collation). This can't be changed. See [Oracle Character Sets
        Supported in Amazon RDS](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.OracleCharacterSets.html)
        or [Server-Level Collation for Microsoft SQL Server](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.SQLServer.CommonDBATasks.Collation.html) for more information.
        """
        return pulumi.get(self, "character_set_name")

    @property
    @pulumi.getter(name="copyTagsToSnapshot")
    def copy_tags_to_snapshot(self) -> pulumi.Output[Optional[bool]]:
        """
        Copy all Instance `tags` to snapshots. Default is `false`.
        """
        return pulumi.get(self, "copy_tags_to_snapshot")

    @property
    @pulumi.getter(name="dbSubnetGroupName")
    def db_subnet_group_name(self) -> pulumi.Output[str]:
        """
        Name of `DB subnet group`. DB instance will
        be created in the VPC associated with the DB subnet group. If unspecified, will
        be created in the `default` VPC, or in EC2 Classic, if available. When working
        with read replicas, it should be specified only if the source database
        specifies an instance in another AWS Region. See [DBSubnetGroupName in API
        action CreateDBInstanceReadReplica](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstanceReadReplica.html)
        for additional read replica contraints.
        """
        return pulumi.get(self, "db_subnet_group_name")

    @property
    @pulumi.getter(name="deleteAutomatedBackups")
    def delete_automated_backups(self) -> pulumi.Output[Optional[bool]]:
        """
        Specifies whether to remove automated backups immediately after the DB instance is deleted. Default is `true`.
        """
        return pulumi.get(self, "delete_automated_backups")

    @property
    @pulumi.getter(name="deletionProtection")
    def deletion_protection(self) -> pulumi.Output[Optional[bool]]:
        """
        If the DB instance should have deletion protection enabled. The database can't be deleted when this value is set to `true`. The default is `false`.
        """
        return pulumi.get(self, "deletion_protection")

    @property
    @pulumi.getter
    def domain(self) -> pulumi.Output[Optional[str]]:
        """
        The ID of the Directory Service Active Directory domain to create the instance in.
        """
        return pulumi.get(self, "domain")

    @property
    @pulumi.getter(name="domainIamRoleName")
    def domain_iam_role_name(self) -> pulumi.Output[Optional[str]]:
        """
        The name of the IAM role to be used when making API calls to the Directory Service.
        """
        return pulumi.get(self, "domain_iam_role_name")

    @property
    @pulumi.getter(name="enabledCloudwatchLogsExports")
    def enabled_cloudwatch_logs_exports(self) -> pulumi.Output[Optional[Sequence[str]]]:
        """
        Set of log types to enable for exporting to CloudWatch logs. If omitted, no logs will be exported. Valid values (depending on `engine`). MySQL and MariaDB: `audit`, `error`, `general`, `slowquery`. PostgreSQL: `postgresql`, `upgrade`. MSSQL: `agent` , `error`. Oracle: `alert`, `audit`, `listener`, `trace`.
        """
        return pulumi.get(self, "enabled_cloudwatch_logs_exports")

    @property
    @pulumi.getter
    def endpoint(self) -> pulumi.Output[str]:
        """
        The connection endpoint in `address:port` format.
        """
        return pulumi.get(self, "endpoint")

    @property
    @pulumi.getter
    def engine(self) -> pulumi.Output[str]:
        """
        (Required unless a `snapshot_identifier` or `replicate_source_db`
        is provided) The database engine to use.  For supported values, see the Engine parameter in [API action CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html).
        Note that for Amazon Aurora instances the engine must match the `DB cluster`'s engine'.
        For information on the difference between the available Aurora MySQL engines
        see [Comparison between Aurora MySQL 1 and Aurora MySQL 2](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AuroraMySQL.Updates.20180206.html)
        in the Amazon RDS User Guide.
        """
        return pulumi.get(self, "engine")

    @property
    @pulumi.getter(name="engineVersion")
    def engine_version(self) -> pulumi.Output[str]:
        """
        The engine version to use. If `auto_minor_version_upgrade`
        is enabled, you can provide a prefix of the version such as `5.7` (for `5.7.10`) and
        this attribute will ignore differences in the patch version automatically (e.g. `5.7.17`).
        For supported values, see the EngineVersion parameter in [API action CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html).
        Note that for Amazon Aurora instances the engine version must match the `DB cluster`'s engine version'.
        """
        return pulumi.get(self, "engine_version")

    @property
    @pulumi.getter(name="finalSnapshotIdentifier")
    def final_snapshot_identifier(self) -> pulumi.Output[Optional[str]]:
        """
        The name of your final DB snapshot
        when this DB instance is deleted. Must be provided if `skip_final_snapshot` is
        set to `false`.
        """
        return pulumi.get(self, "final_snapshot_identifier")

    @property
    @pulumi.getter(name="hostedZoneId")
    def hosted_zone_id(self) -> pulumi.Output[str]:
        """
        The canonical hosted zone ID of the DB instance (to be used
        in a Route 53 Alias record).
        """
        return pulumi.get(self, "hosted_zone_id")

    @property
    @pulumi.getter(name="iamDatabaseAuthenticationEnabled")
    def iam_database_authentication_enabled(self) -> pulumi.Output[Optional[bool]]:
        """
        Specifies whether or
        mappings of AWS Identity and Access Management (IAM) accounts to database
        accounts is enabled.
        """
        return pulumi.get(self, "iam_database_authentication_enabled")

    @property
    @pulumi.getter
    def identifier(self) -> pulumi.Output[str]:
        """
        The name of the RDS instance,
        if omitted, this provider will assign a random, unique identifier.
        """
        return pulumi.get(self, "identifier")

    @property
    @pulumi.getter(name="identifierPrefix")
    def identifier_prefix(self) -> pulumi.Output[str]:
        """
        Creates a unique
        identifier beginning with the specified prefix. Conflicts with `identifier`.
        """
        return pulumi.get(self, "identifier_prefix")

    @property
    @pulumi.getter(name="instanceClass")
    def instance_class(self) -> pulumi.Output[str]:
        """
        The instance type of the RDS instance.
        """
        return pulumi.get(self, "instance_class")

    @property
    @pulumi.getter
    def iops(self) -> pulumi.Output[Optional[int]]:
        """
        The amount of provisioned IOPS. Setting this implies a
        storage_type of "io1".
        """
        return pulumi.get(self, "iops")

    @property
    @pulumi.getter(name="kmsKeyId")
    def kms_key_id(self) -> pulumi.Output[str]:
        """
        The ARN for the KMS encryption key. If creating an
        encrypted replica, set this to the destination KMS ARN.
        """
        return pulumi.get(self, "kms_key_id")

    @property
    @pulumi.getter(name="latestRestorableTime")
    def latest_restorable_time(self) -> pulumi.Output[str]:
        """
        The latest time, in UTC [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8), to which a database can be restored with point-in-time restore.
        """
        return pulumi.get(self, "latest_restorable_time")

    @property
    @pulumi.getter(name="licenseModel")
    def license_model(self) -> pulumi.Output[str]:
        """
        (Optional, but required for some DB engines, i.e. Oracle
        SE1) License model information for this DB instance.
        """
        return pulumi.get(self, "license_model")

    @property
    @pulumi.getter(name="maintenanceWindow")
    def maintenance_window(self) -> pulumi.Output[str]:
        """
        The window to perform maintenance in.
        Syntax: "ddd:hh24:mi-ddd:hh24:mi". Eg: "Mon:00:00-Mon:03:00". See [RDS
        Maintenance Window
        docs](http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#AdjustingTheMaintenanceWindow)
        for more information.
        """
        return pulumi.get(self, "maintenance_window")

    @property
    @pulumi.getter(name="maxAllocatedStorage")
    def max_allocated_storage(self) -> pulumi.Output[Optional[int]]:
        """
        When configured, the upper limit to which Amazon RDS can automatically scale the storage of the DB instance. Configuring this will automatically ignore differences to `allocated_storage`. Must be greater than or equal to `allocated_storage` or `0` to disable Storage Autoscaling.
        """
        return pulumi.get(self, "max_allocated_storage")

    @property
    @pulumi.getter(name="monitoringInterval")
    def monitoring_interval(self) -> pulumi.Output[Optional[int]]:
        """
        The interval, in seconds, between points
        when Enhanced Monitoring metrics are collected for the DB instance. To disable
        collecting Enhanced Monitoring metrics, specify 0. The default is 0. Valid
        Values: 0, 1, 5, 10, 15, 30, 60.
        """
        return pulumi.get(self, "monitoring_interval")

    @property
    @pulumi.getter(name="monitoringRoleArn")
    def monitoring_role_arn(self) -> pulumi.Output[str]:
        """
        The ARN for the IAM role that permits RDS
        to send enhanced monitoring metrics to CloudWatch Logs. You can find more
        information on the [AWS
        Documentation](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.html)
        what IAM permissions are needed to allow Enhanced Monitoring for RDS Instances.
        """
        return pulumi.get(self, "monitoring_role_arn")

    @property
    @pulumi.getter(name="multiAz")
    def multi_az(self) -> pulumi.Output[bool]:
        """
        Specifies if the RDS instance is multi-AZ
        """
        return pulumi.get(self, "multi_az")

    @property
    @pulumi.getter
    def name(self) -> pulumi.Output[str]:
        """
        The name of the database to create when the DB instance is created. If this parameter is not specified, no database is created in the DB instance. Note that this does not apply for Oracle or SQL Server engines. See the [AWS documentation](http://docs.aws.amazon.com/cli/latest/reference/rds/create-db-instance.html) for more details on what applies for those engines.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="optionGroupName")
    def option_group_name(self) -> pulumi.Output[str]:
        """
        Name of the DB option group to associate.
        """
        return pulumi.get(self, "option_group_name")

    @property
    @pulumi.getter(name="parameterGroupName")
    def parameter_group_name(self) -> pulumi.Output[str]:
        """
        Name of the DB parameter group to
        associate.
        """
        return pulumi.get(self, "parameter_group_name")

    @property
    @pulumi.getter
    def password(self) -> pulumi.Output[Optional[str]]:
        """
        (Required unless a `snapshot_identifier` or `replicate_source_db`
        is provided) Password for the master DB user. Note that this may show up in
        logs, and it will be stored in the state file.
        """
        return pulumi.get(self, "password")

    @property
    @pulumi.getter(name="performanceInsightsEnabled")
    def performance_insights_enabled(self) -> pulumi.Output[Optional[bool]]:
        """
        Specifies whether Performance Insights are enabled. Defaults to false.
        """
        return pulumi.get(self, "performance_insights_enabled")

    @property
    @pulumi.getter(name="performanceInsightsKmsKeyId")
    def performance_insights_kms_key_id(self) -> pulumi.Output[str]:
        """
        The ARN for the KMS key to encrypt Performance Insights data. When specifying `performance_insights_kms_key_id`, `performance_insights_enabled` needs to be set to true. Once KMS key is set, it can never be changed.
        """
        return pulumi.get(self, "performance_insights_kms_key_id")

    @property
    @pulumi.getter(name="performanceInsightsRetentionPeriod")
    def performance_insights_retention_period(self) -> pulumi.Output[int]:
        """
        The amount of time in days to retain Performance Insights data. Either 7 (7 days) or 731 (2 years). When specifying `performance_insights_retention_period`, `performance_insights_enabled` needs to be set to true. Defaults to '7'.
        """
        return pulumi.get(self, "performance_insights_retention_period")

    @property
    @pulumi.getter
    def port(self) -> pulumi.Output[int]:
        """
        The port on which the DB accepts connections.
        """
        return pulumi.get(self, "port")

    @property
    @pulumi.getter(name="publiclyAccessible")
    def publicly_accessible(self) -> pulumi.Output[Optional[bool]]:
        """
        Bool to control if instance is publicly
        accessible. Default is `false`.
        """
        return pulumi.get(self, "publicly_accessible")

    @property
    @pulumi.getter
    def replicas(self) -> pulumi.Output[Sequence[str]]:
        return pulumi.get(self, "replicas")

    @property
    @pulumi.getter(name="replicateSourceDb")
    def replicate_source_db(self) -> pulumi.Output[Optional[str]]:
        """
        Specifies that this resource is a Replicate
        database, and to use this value as the source database. This correlates to the
        `identifier` of another Amazon RDS Database to replicate (if replicating within
        a single region) or ARN of the Amazon RDS Database to replicate (if replicating
        cross-region). Note that if you are
        creating a cross-region replica of an encrypted database you will also need to
        specify a `kms_key_id`. See [DB Instance Replication][1] and [Working with
        PostgreSQL and MySQL Read Replicas](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html)
        for more information on using Replication.
        """
        return pulumi.get(self, "replicate_source_db")

    @property
    @pulumi.getter(name="resourceId")
    def resource_id(self) -> pulumi.Output[str]:
        """
        The RDS Resource ID of this instance.
        """
        return pulumi.get(self, "resource_id")

    @property
    @pulumi.getter(name="restoreToPointInTime")
    def restore_to_point_in_time(self) -> pulumi.Output[Optional['outputs.InstanceRestoreToPointInTime']]:
        """
        A configuration block for restoring a DB instance to an arbitrary point in time. Requires the `identifier` argument to be set with the name of the new DB instance to be created. See Restore To Point In Time below for details.
        """
        return pulumi.get(self, "restore_to_point_in_time")

    @property
    @pulumi.getter(name="s3Import")
    def s3_import(self) -> pulumi.Output[Optional['outputs.InstanceS3Import']]:
        """
        Restore from a Percona Xtrabackup in S3.  See [Importing Data into an Amazon RDS MySQL DB Instance](http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MySQL.Procedural.Importing.html)
        """
        return pulumi.get(self, "s3_import")

    @property
    @pulumi.getter(name="securityGroupNames")
    def security_group_names(self) -> pulumi.Output[Optional[Sequence[str]]]:
        """
        List of DB Security Groups to
        associate. Only used for [DB Instances on the _EC2-Classic_
        Platform](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.html#USER_VPC.FindDefaultVPC).
        """
        return pulumi.get(self, "security_group_names")

    @property
    @pulumi.getter(name="skipFinalSnapshot")
    def skip_final_snapshot(self) -> pulumi.Output[Optional[bool]]:
        """
        Determines whether a final DB snapshot is
        created before the DB instance is deleted. If true is specified, no DBSnapshot
        is created. If false is specified, a DB snapshot is created before the DB
        instance is deleted, using the value from `final_snapshot_identifier`. Default
        is `false`.
        """
        return pulumi.get(self, "skip_final_snapshot")

    @property
    @pulumi.getter(name="snapshotIdentifier")
    def snapshot_identifier(self) -> pulumi.Output[Optional[str]]:
        """
        Specifies whether or not to create this
        database from a snapshot. This correlates to the snapshot ID you'd find in the
        RDS console, e.g: rds:production-2015-06-26-06-05.
        """
        return pulumi.get(self, "snapshot_identifier")

    @property
    @pulumi.getter
    def status(self) -> pulumi.Output[str]:
        """
        The RDS instance status.
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter(name="storageEncrypted")
    def storage_encrypted(self) -> pulumi.Output[Optional[bool]]:
        """
        Specifies whether the DB instance is
        encrypted. Note that if you are creating a cross-region read replica this field
        is ignored and you should instead declare `kms_key_id` with a valid ARN. The
        default is `false` if not specified.
        """
        return pulumi.get(self, "storage_encrypted")

    @property
    @pulumi.getter(name="storageType")
    def storage_type(self) -> pulumi.Output[str]:
        """
        One of "standard" (magnetic), "gp2" (general
        purpose SSD), or "io1" (provisioned IOPS SSD). The default is "io1" if `iops` is
        specified, "gp2" if not.
        """
        return pulumi.get(self, "storage_type")

    @property
    @pulumi.getter
    def tags(self) -> pulumi.Output[Optional[Mapping[str, str]]]:
        """
        A map of tags to assign to the resource.
        """
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter
    def timezone(self) -> pulumi.Output[str]:
        """
        Time zone of the DB instance. `timezone` is currently
        only supported by Microsoft SQL Server. The `timezone` can only be set on
        creation. See [MSSQL User
        Guide](http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SQLServer.html#SQLServer.Concepts.General.TimeZone)
        for more information.
        """
        return pulumi.get(self, "timezone")

    @property
    @pulumi.getter
    def username(self) -> pulumi.Output[str]:
        """
        (Required unless a `snapshot_identifier` or `replicate_source_db`
        is provided) Username for the master DB user.
        """
        return pulumi.get(self, "username")

    @property
    @pulumi.getter(name="vpcSecurityGroupIds")
    def vpc_security_group_ids(self) -> pulumi.Output[Sequence[str]]:
        """
        List of VPC security groups to
        associate.
        """
        return pulumi.get(self, "vpc_security_group_ids")

    def translate_output_property(self, prop):
        return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop

    def translate_input_property(self, prop):
        return _tables.SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop

