// *** 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! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.AliCloud.Rds
{
    /// <summary>
    /// ## Import
    /// 
    /// RDS instance can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:rds/instance:Instance example rm-abc12345678
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:rds/instance:Instance")]
    public partial class Instance : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The method that is used to verify the identities of clients. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
        /// - cert
        /// - perfer
        /// - verify-ca
        /// - verify-full (supported only when the instance runs PostgreSQL 12 or later)
        /// </summary>
        [Output("acl")]
        public Output<string> Acl { get; private set; } = null!;

        /// <summary>
        /// Whether to renewal a DB instance automatically or not. It is valid when instance_charge_type is `PrePaid`. Default to `false`.
        /// </summary>
        [Output("autoRenew")]
        public Output<bool?> AutoRenew { get; private set; } = null!;

        /// <summary>
        /// Auto-renewal period of an instance, in the unit of the month. It is valid when instance_charge_type is `PrePaid`. Valid value:[1~12], Default to 1.
        /// </summary>
        [Output("autoRenewPeriod")]
        public Output<int?> AutoRenewPeriod { get; private set; } = null!;

        /// <summary>
        /// The upgrade method to use. Valid values:
        /// - Auto: Instances are automatically upgraded to a higher minor version.
        /// - Manual: Instances are forcibly upgraded to a higher minor version when the current version is unpublished.
        /// </summary>
        [Output("autoUpgradeMinorVersion")]
        public Output<string> AutoUpgradeMinorVersion { get; private set; } = null!;

        /// <summary>
        /// The configuration of an ApsaraDB RDS for PostgreSQL instance for which Babelfish is enabled. (documented below).
        /// </summary>
        [Output("babelfishConfigs")]
        public Output<ImmutableArray<Outputs.InstanceBabelfishConfig>> BabelfishConfigs { get; private set; } = null!;

        /// <summary>
        /// The TDS port of the instance for which Babelfish is enabled.
        /// </summary>
        [Output("babelfishPort")]
        public Output<string> BabelfishPort { get; private set; } = null!;

        /// <summary>
        /// The type of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the SSLEnabled parameter to 1, the default value of this parameter is aliyun. Value range:
        /// - aliyun: a cloud certificate
        /// - custom: a custom certificate
        /// </summary>
        [Output("caType")]
        public Output<string> CaType { get; private set; } = null!;

        /// <summary>
        /// The RDS edition of the instance. If you want to create a serverless instance, you must use this value. Valid values:
        /// * **Basic**: Basic Edition.
        /// * **HighAvailability**: High-availability Edition.
        /// * **AlwaysOn**: Cluster Edition.
        /// * **Finance**: Enterprise Edition.
        /// * **cluster**: MySQL Cluster Edition. (Available in 1.202.0+)
        /// * **serverless_basic**: RDS Serverless Basic Edition. This edition is available only for instances that run MySQL and PostgreSQL. (Available in 1.200.0+)
        /// * **serverless_standard**: RDS Serverless Basic Edition. This edition is available only for instances that run MySQL and PostgreSQL. (Available in 1.204.0+)
        /// * **serverless_ha**: RDS Serverless High-availability Edition for SQL Server. (Available in 1.204.0+)
        /// </summary>
        [Output("category")]
        public Output<string> Category { get; private set; } = null!;

        /// <summary>
        /// The public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCAEbabled parameter to 1, you must also specify this parameter.
        /// </summary>
        [Output("clientCaCert")]
        public Output<string?> ClientCaCert { get; private set; } = null!;

        /// <summary>
        /// Specifies whether to enable the public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. Valid values:
        /// - 1: enables the public key
        /// - 0: disables the public key
        /// </summary>
        [Output("clientCaEnabled")]
        public Output<int?> ClientCaEnabled { get; private set; } = null!;

        /// <summary>
        /// The CRL that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCrlEnabled parameter to 1, you must also specify this parameter.
        /// </summary>
        [Output("clientCertRevocationList")]
        public Output<string?> ClientCertRevocationList { get; private set; } = null!;

        /// <summary>
        /// Specifies whether to enable a certificate revocation list (CRL) that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
        /// - 1: enables the CRL
        /// - 0: disables the CRL
        /// </summary>
        [Output("clientCrlEnabled")]
        public Output<int?> ClientCrlEnabled { get; private set; } = null!;

        /// <summary>
        /// RDS database connection string.
        /// </summary>
        [Output("connectionString")]
        public Output<string> ConnectionString { get; private set; } = null!;

        [Output("connectionStringPrefix")]
        public Output<string> ConnectionStringPrefix { get; private set; } = null!;

        /// <summary>
        /// The attribute of the IP address whitelist. By default, this parameter is empty.
        /// </summary>
        [Output("dbInstanceIpArrayAttribute")]
        public Output<string?> DbInstanceIpArrayAttribute { get; private set; } = null!;

        /// <summary>
        /// The name of the IP address whitelist. Default value: Default.
        /// </summary>
        [Output("dbInstanceIpArrayName")]
        public Output<string?> DbInstanceIpArrayName { get; private set; } = null!;

        /// <summary>
        /// The storage type of the instance. Serverless instance, only `cloud_essd` can be selected. Valid values:
        /// - local_ssd: specifies to use local SSDs. This value is recommended.
        /// - cloud_ssd: specifies to use standard SSDs.
        /// - cloud_essd: specifies to use enhanced SSDs (ESSDs).
        /// - cloud_essd2: specifies to use enhanced SSDs (ESSDs).
        /// - cloud_essd3: specifies to use enhanced SSDs (ESSDs).
        /// </summary>
        [Output("dbInstanceStorageType")]
        public Output<string> DbInstanceStorageType { get; private set; } = null!;

        /// <summary>
        /// (Available in 1.197.0+) The type of db instance.
        /// </summary>
        [Output("dbInstanceType")]
        public Output<string> DbInstanceType { get; private set; } = null!;

        /// <summary>
        /// Specifies whether table names on the instance are case-sensitive. Valid values: `true`, `false`.
        /// </summary>
        [Output("dbIsIgnoreCase")]
        public Output<bool> DbIsIgnoreCase { get; private set; } = null!;

        /// <summary>
        /// The time zone of the instance. This parameter takes effect only when you set the `Engine` parameter to MySQL or PostgreSQL.
        /// - If you set the `Engine` parameter to MySQL.
        /// - This time zone of the instance is in UTC. Valid values: -12:59 to +13:00.
        /// - You can specify this parameter when the instance is equipped with local SSDs. For example, you can specify the time zone to Asia/Hong_Kong. For more information about time zones, see [Time zones](https://www.alibabacloud.com/help/doc-detail/297356.htm).
        /// - If you set the `Engine` parameter to PostgreSQL.
        /// - This time zone of the instance is not in UTC. For more information about time zones, see [Time zones](https://www.alibabacloud.com/help/doc-detail/297356.htm).
        /// - You can specify this parameter only when the instance is equipped with standard SSDs or ESSDs.
        /// </summary>
        [Output("dbTimeZone")]
        public Output<string> DbTimeZone { get; private set; } = null!;

        /// <summary>
        /// The switch of delete protection. Valid values: 
        /// - true: delete protect.
        /// - false: no delete protect.
        /// </summary>
        [Output("deletionProtection")]
        public Output<bool?> DeletionProtection { get; private set; } = null!;

        /// <summary>
        /// The method to update the engine version.  Default value: Immediate. Valid values:
        /// - Immediate: The change immediately takes effect.
        /// - MaintainTime: The change takes effect during the specified maintenance window. For more information, see ModifyDBInstanceMaintainTime.
        /// </summary>
        [Output("effectiveTime")]
        public Output<string?> EffectiveTime { get; private set; } = null!;

        /// <summary>
        /// The key id of the KMS. Used for encrypting a disk if not null. Only for PostgreSQL, MySQL and SQLServer.
        /// </summary>
        [Output("encryptionKey")]
        public Output<string?> EncryptionKey { get; private set; } = null!;

        /// <summary>
        /// Database type. Value options: MySQL, SQLServer, PostgreSQL, MariaDB. Create a serverless instance, you must set this parameter to MySQL.
        /// </summary>
        [Output("engine")]
        public Output<string> Engine { get; private set; } = null!;

        /// <summary>
        /// Database version. Value options can refer to the latest docs [CreateDBInstance](https://www.alibabacloud.com/help/doc-detail/26228.htm) `EngineVersion`.
        /// </summary>
        [Output("engineVersion")]
        public Output<string> EngineVersion { get; private set; } = null!;

        /// <summary>
        /// Set it to true to make some parameter efficient when modifying them. Default to false.
        /// </summary>
        [Output("forceRestart")]
        public Output<bool?> ForceRestart { get; private set; } = null!;

        /// <summary>
        /// The read-only instances to which you want to synchronize the IP address whitelist.
        /// * If the instance is attached with a read-only instance, you can use this parameter to synchronize the IP address whitelist to the read-only instance. If the instance is attached with multiple read-only instances, the read-only instances must be separated by commas (,).
        /// * If the instance is not attached with a read-only instance, this parameter is empty.
        /// </summary>
        [Output("freshWhiteListReadins")]
        public Output<string?> FreshWhiteListReadins { get; private set; } = null!;

        /// <summary>
        /// The primary/secondary switchover mode of the instance. Default value: Auto. Valid values:
        /// - Auto: The system automatically switches over services from the primary to secondary instances in the event of a fault.
        /// - Manual: You must manually switch over services from the primary to secondary instances in the event of a fault.
        /// </summary>
        [Output("haConfig")]
        public Output<string> HaConfig { get; private set; } = null!;

        /// <summary>
        /// Valid values are `Prepaid`, `Postpaid`, `Serverless`, Default to `Postpaid`. Currently, the resource only supports PostPaid to PrePaid. `Serverless` This value is supported only for instances that run MySQL. For more information, see [Overview](https://www.alibabacloud.com/help/en/apsaradb-for-rds/latest/what-is-serverless?spm=a2c63.p38356.0.0.772a28cfTAGqIv).
        /// </summary>
        [Output("instanceChargeType")]
        public Output<string?> InstanceChargeType { get; private set; } = null!;

        /// <summary>
        /// The name of DB instance. It a string of 2 to 256 characters.
        /// </summary>
        [Output("instanceName")]
        public Output<string?> InstanceName { get; private set; } = null!;

        /// <summary>
        /// User-defined DB instance storage space. Value range:
        /// - [5, 2000] for MySQL/PostgreSQL HA dual node edition;
        /// - [20,1000] for MySQL 5.7 basic single node edition;
        /// - [10, 2000] for SQL Server 2008R2;
        /// - [20,2000] for SQL Server 2012 basic single node edition
        /// Increase progressively at a rate of 5 GB. For details, see [Instance type table](https://www.alibabacloud.com/help/doc-detail/26312.htm).
        /// Note: There is extra 5 GB storage for SQL Server Instance and it is not in specified `instance_storage`.
        /// </summary>
        [Output("instanceStorage")]
        public Output<int> InstanceStorage { get; private set; } = null!;

        /// <summary>
        /// DB Instance type. Create a serverless instance, you must set this parameter to mysql.n2.serverless.1c. For details, see [Instance type table](https://www.alibabacloud.com/help/doc-detail/26312.htm).
        /// </summary>
        [Output("instanceType")]
        public Output<string> InstanceType { get; private set; } = null!;

        /// <summary>
        /// Maintainable time period format of the instance: HH:MMZ-HH:MMZ (UTC time)
        /// </summary>
        [Output("maintainTime")]
        public Output<string> MaintainTime { get; private set; } = null!;

        /// <summary>
        /// The time after when you want to enable automatic primary/secondary switchover. At most, you can set this parameter to 23:59:59 seven days later. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
        /// </summary>
        [Output("manualHaTime")]
        public Output<string?> ManualHaTime { get; private set; } = null!;

        /// <summary>
        /// The method that is used to modify the IP address whitelist. Default value: Cover. Valid values:
        /// - Cover: Use the value of the SecurityIps parameter to overwrite the existing entries in the IP address whitelist.
        /// - Append: Add the IP addresses and CIDR blocks that are specified in the SecurityIps parameter to the IP address whitelist.
        /// - Delete: Delete IP addresses and CIDR blocks that are specified in the SecurityIps parameter from the IP address whitelist. You must retain at least one IP address or CIDR block.
        /// </summary>
        [Output("modifyMode")]
        public Output<string?> ModifyMode { get; private set; } = null!;

        /// <summary>
        /// The monitoring frequency in seconds. Valid values are 5, 10, 60, 300. Defaults to 300.
        /// </summary>
        [Output("monitoringPeriod")]
        public Output<int> MonitoringPeriod { get; private set; } = null!;

        /// <summary>
        /// Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs [View database parameter templates](https://www.alibabacloud.com/help/doc-detail/26284.htm) .
        /// </summary>
        [Output("parameters")]
        public Output<ImmutableArray<Outputs.InstanceParameter>> Parameters { get; private set; } = null!;

        [Output("period")]
        public Output<int?> Period { get; private set; } = null!;

        /// <summary>
        /// The configuration of [AD domain](https://www.alibabacloud.com/help/en/doc-detail/349288.htm) (documented below).
        /// </summary>
        [Output("pgHbaConfs")]
        public Output<ImmutableArray<Outputs.InstancePgHbaConf>> PgHbaConfs { get; private set; } = null!;

        [Output("port")]
        public Output<string> Port { get; private set; } = null!;

        /// <summary>
        /// The private IP address of the instance. The private IP address must be within the Classless Inter-Domain Routing (CIDR) block of the vSwitch that is specified by the VSwitchId parameter.
        /// </summary>
        [Output("privateIpAddress")]
        public Output<string> PrivateIpAddress { get; private set; } = null!;

        /// <summary>
        /// The policy based on which ApsaraDB RDS retains archived backup files after the instance is released. Valid values:
        /// - None: No archived backup files are retained.
        /// - Lastest: Only the last archived backup file is retained.
        /// - All: All the archived backup files are retained.
        /// </summary>
        [Output("releasedKeepPolicy")]
        public Output<string?> ReleasedKeepPolicy { get; private set; } = null!;

        /// <summary>
        /// The method that is used to verify the replication permission. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
        /// - cert
        /// - perfer
        /// - verify-ca
        /// - verify-full (supported only when the instance runs PostgreSQL 12 or later)
        /// </summary>
        [Output("replicationAcl")]
        public Output<string> ReplicationAcl { get; private set; } = null!;

        /// <summary>
        /// The ID of resource group which the DB instance belongs.
        /// </summary>
        [Output("resourceGroupId")]
        public Output<string> ResourceGroupId { get; private set; } = null!;

        /// <summary>
        /// It has been deprecated from 1.69.0 and use `security_group_ids` instead.
        /// </summary>
        [Output("securityGroupId")]
        public Output<string> SecurityGroupId { get; private set; } = null!;

        /// <summary>
        /// , Available in 1.69.0+) The list IDs to join ECS Security Group. At most supports three security groups.
        /// </summary>
        [Output("securityGroupIds")]
        public Output<ImmutableArray<string>> SecurityGroupIds { get; private set; } = null!;

        /// <summary>
        /// Valid values are `normal`, `safety`, Default to `normal`. support `safety` switch to high security access mode.
        /// </summary>
        [Output("securityIpMode")]
        public Output<string?> SecurityIpMode { get; private set; } = null!;

        /// <summary>
        /// The type of IP address in the IP address whitelist.
        /// </summary>
        [Output("securityIpType")]
        public Output<string?> SecurityIpType { get; private set; } = null!;

        /// <summary>
        /// List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
        /// </summary>
        [Output("securityIps")]
        public Output<ImmutableArray<string>> SecurityIps { get; private set; } = null!;

        /// <summary>
        /// The content of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter.
        /// </summary>
        [Output("serverCert")]
        public Output<string> ServerCert { get; private set; } = null!;

        /// <summary>
        /// The private key of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter.
        /// </summary>
        [Output("serverKey")]
        public Output<string> ServerKey { get; private set; } = null!;

        /// <summary>
        /// The settings of the serverless instance. This parameter is required when you create a serverless instance. This parameter takes effect only when you create an ApsaraDB RDS for MySQL instance.
        /// </summary>
        [Output("serverlessConfigs")]
        public Output<ImmutableArray<Outputs.InstanceServerlessConfig>> ServerlessConfigs { get; private set; } = null!;

        /// <summary>
        /// The sql collector keep time of the instance. Valid values are `30`, `180`, `365`, `1095`, `1825`, Default to `30`.
        /// </summary>
        [Output("sqlCollectorConfigValue")]
        public Output<int?> SqlCollectorConfigValue { get; private set; } = null!;

        /// <summary>
        /// The sql collector status of the instance. Valid values are `Enabled`, `Disabled`, Default to `Disabled`.
        /// </summary>
        [Output("sqlCollectorStatus")]
        public Output<string> SqlCollectorStatus { get; private set; } = null!;

        /// <summary>
        /// Actions performed on SSL functions, Valid values: `Open`: turn on SSL encryption; `Close`: turn off SSL encryption; `Update`: update SSL certificate. See more [engine and engineVersion limitation](https://www.alibabacloud.com/help/zh/doc-detail/26254.htm).
        /// </summary>
        [Output("sslAction")]
        public Output<string> SslAction { get; private set; } = null!;

        /// <summary>
        /// The internal or public endpoint for which the server certificate needs to be created or updated.
        /// </summary>
        [Output("sslConnectionString")]
        public Output<string> SslConnectionString { get; private set; } = null!;

        /// <summary>
        /// Status of the SSL feature. `Yes`: SSL is turned on; `No`: SSL is turned off.
        /// </summary>
        [Output("sslStatus")]
        public Output<string> SslStatus { get; private set; } = null!;

        /// <summary>
        /// Automatic storage space expansion switch. Valid values:
        /// - Enable
        /// - Disable
        /// </summary>
        [Output("storageAutoScale")]
        public Output<string?> StorageAutoScale { get; private set; } = null!;

        /// <summary>
        /// The trigger threshold (percentage) for automatic storage space expansion. Valid values:
        /// - 10
        /// - 20
        /// - 30
        /// - 40
        /// - 50
        /// </summary>
        [Output("storageThreshold")]
        public Output<int?> StorageThreshold { get; private set; } = null!;

        /// <summary>
        /// The upper limit of the total storage space for automatic expansion of the storage space, that is, automatic expansion will not cause the total storage space of the instance to exceed this value. Unit: GB. The value must be ≥0.
        /// </summary>
        [Output("storageUpperBound")]
        public Output<int?> StorageUpperBound { get; private set; } = null!;

        /// <summary>
        /// The specific point in time when you want to perform the update. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. It is valid only when `target_minor_version` is changed. The time must be in UTC.
        /// </summary>
        [Output("switchTime")]
        public Output<string?> SwitchTime { get; private set; } = null!;

        /// <summary>
        /// A mapping of tags to assign to the resource.
        /// - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
        /// - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
        /// </summary>
        [Output("tags")]
        public Output<ImmutableDictionary<string, object>?> Tags { get; private set; } = null!;

        /// <summary>
        /// The minor engine version to which you want to update the instance. If you do not specify this parameter, the instance is updated to the latest minor engine version. You must specify the minor engine version in one of the following formats:
        /// - PostgreSQL: rds_postgres_&lt;Major engine version&gt;00_&lt;Minor engine version&gt;. Example: rds_postgres_1200_20200830.
        /// - MySQL: &lt;RDS edition&gt;_&lt;Minor engine version&gt;. Examples: rds_20200229, xcluster_20200229, and xcluster80_20200229. The following RDS editions are supported:
        /// - rds: The instance runs RDS Basic or High-availability Edition.
        /// - xcluster: The instance runs MySQL 5.7 on RDS Enterprise Edition.
        /// - xcluster80: The instance runs MySQL 8.0 on RDS Enterprise Edition.
        /// - SQLServer: &lt;Minor engine version&gt;. Example: 15.0.4073.23.
        /// </summary>
        [Output("targetMinorVersion")]
        public Output<string> TargetMinorVersion { get; private set; } = null!;

        /// <summary>
        /// The availability check method of the instance. Valid values:
        /// - **SHORT**: Alibaba Cloud uses short-lived connections to check the availability of the instance.
        /// - **LONG**: Alibaba Cloud uses persistent connections to check the availability of the instance.
        /// </summary>
        [Output("tcpConnectionType")]
        public Output<string> TcpConnectionType { get; private set; } = null!;

        /// <summary>
        /// The TDE(Transparent Data Encryption) status. See more [engine and engineVersion limitation](https://www.alibabacloud.com/help/zh/doc-detail/26256.htm).
        /// </summary>
        [Output("tdeStatus")]
        public Output<string?> TdeStatus { get; private set; } = null!;

        /// <summary>
        /// Whether to upgrade a minor version of the kernel. Valid values:
        /// - true: upgrade
        /// - false: not to upgrade
        /// </summary>
        [Output("upgradeDbInstanceKernelVersion")]
        public Output<bool?> UpgradeDbInstanceKernelVersion { get; private set; } = null!;

        /// <summary>
        /// The method to update the minor engine version. Default value: Immediate. It is valid only when `target_minor_version` is changed. Valid values:
        /// - Immediate: The minor engine version is immediately updated.
        /// - MaintainTime: The minor engine version is updated during the maintenance window. For more information about how to change the maintenance window, see ModifyDBInstanceMaintainTime.
        /// - SpecifyTime: The minor engine version is updated at the point in time you specify.
        /// </summary>
        [Output("upgradeTime")]
        public Output<string?> UpgradeTime { get; private set; } = null!;

        /// <summary>
        /// The VPC ID of the instance.
        /// </summary>
        [Output("vpcId")]
        public Output<string> VpcId { get; private set; } = null!;

        /// <summary>
        /// The virtual switch ID to launch DB instances in one VPC. If there are multiple vswitches, separate them with commas.
        /// </summary>
        [Output("vswitchId")]
        public Output<string?> VswitchId { get; private set; } = null!;

        /// <summary>
        /// The network type of the IP address whitelist. Default value: MIX. Valid values:
        /// - Classic: classic network in enhanced whitelist mode
        /// - VPC: virtual private cloud (VPC) in enhanced whitelist mode
        /// - MIX: standard whitelist mode
        /// </summary>
        [Output("whitelistNetworkType")]
        public Output<string?> WhitelistNetworkType { get; private set; } = null!;

        /// <summary>
        /// The Zone to launch the DB instance. From version 1.8.1, it supports multiple zone.
        /// If it is a multi-zone and `vswitch_id` is specified, the vswitch must in the one of them.
        /// The multiple zone ID can be retrieved by setting `multi` to "true" in the data source `alicloud.getZones`.
        /// </summary>
        [Output("zoneId")]
        public Output<string> ZoneId { get; private set; } = null!;

        /// <summary>
        /// The region ID of the secondary instance if you create a secondary instance. If you set this parameter to the same value as the ZoneId parameter, the instance is deployed in a single zone. Otherwise, the instance is deployed in multiple zones.
        /// </summary>
        [Output("zoneIdSlaveA")]
        public Output<string> ZoneIdSlaveA { get; private set; } = null!;

        /// <summary>
        /// The region ID of the log instance if you create a log instance. If you set this parameter to the same value as the ZoneId parameter, the instance is deployed in a single zone. Otherwise, the instance is deployed in multiple zones.
        /// </summary>
        [Output("zoneIdSlaveB")]
        public Output<string> ZoneIdSlaveB { get; private set; } = null!;


        /// <summary>
        /// Create a Instance resource with the given unique name, arguments, and options.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resource</param>
        /// <param name="args">The arguments used to populate this resource's properties</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public Instance(string name, InstanceArgs args, CustomResourceOptions? options = null)
            : base("alicloud:rds/instance:Instance", name, args ?? new InstanceArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Instance(string name, Input<string> id, InstanceState? state = null, CustomResourceOptions? options = null)
            : base("alicloud:rds/instance:Instance", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "github://api.github.com/rhysmdnz/pulumi-alicloud",
            };
            var merged = CustomResourceOptions.Merge(defaultOptions, options);
            // Override the ID if one was specified for consistency with other language SDKs.
            merged.Id = id ?? merged.Id;
            return merged;
        }
        /// <summary>
        /// Get an existing Instance resource's state with the given name, ID, and optional extra
        /// properties used to qualify the lookup.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resulting resource.</param>
        /// <param name="id">The unique provider ID of the resource to lookup.</param>
        /// <param name="state">Any extra arguments used during the lookup.</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public static Instance Get(string name, Input<string> id, InstanceState? state = null, CustomResourceOptions? options = null)
        {
            return new Instance(name, id, state, options);
        }
    }

    public sealed class InstanceArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The method that is used to verify the identities of clients. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
        /// - cert
        /// - perfer
        /// - verify-ca
        /// - verify-full (supported only when the instance runs PostgreSQL 12 or later)
        /// </summary>
        [Input("acl")]
        public Input<string>? Acl { get; set; }

        /// <summary>
        /// Whether to renewal a DB instance automatically or not. It is valid when instance_charge_type is `PrePaid`. Default to `false`.
        /// </summary>
        [Input("autoRenew")]
        public Input<bool>? AutoRenew { get; set; }

        /// <summary>
        /// Auto-renewal period of an instance, in the unit of the month. It is valid when instance_charge_type is `PrePaid`. Valid value:[1~12], Default to 1.
        /// </summary>
        [Input("autoRenewPeriod")]
        public Input<int>? AutoRenewPeriod { get; set; }

        /// <summary>
        /// The upgrade method to use. Valid values:
        /// - Auto: Instances are automatically upgraded to a higher minor version.
        /// - Manual: Instances are forcibly upgraded to a higher minor version when the current version is unpublished.
        /// </summary>
        [Input("autoUpgradeMinorVersion")]
        public Input<string>? AutoUpgradeMinorVersion { get; set; }

        [Input("babelfishConfigs")]
        private InputList<Inputs.InstanceBabelfishConfigArgs>? _babelfishConfigs;

        /// <summary>
        /// The configuration of an ApsaraDB RDS for PostgreSQL instance for which Babelfish is enabled. (documented below).
        /// </summary>
        public InputList<Inputs.InstanceBabelfishConfigArgs> BabelfishConfigs
        {
            get => _babelfishConfigs ?? (_babelfishConfigs = new InputList<Inputs.InstanceBabelfishConfigArgs>());
            set => _babelfishConfigs = value;
        }

        /// <summary>
        /// The TDS port of the instance for which Babelfish is enabled.
        /// </summary>
        [Input("babelfishPort")]
        public Input<string>? BabelfishPort { get; set; }

        /// <summary>
        /// The type of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the SSLEnabled parameter to 1, the default value of this parameter is aliyun. Value range:
        /// - aliyun: a cloud certificate
        /// - custom: a custom certificate
        /// </summary>
        [Input("caType")]
        public Input<string>? CaType { get; set; }

        /// <summary>
        /// The RDS edition of the instance. If you want to create a serverless instance, you must use this value. Valid values:
        /// * **Basic**: Basic Edition.
        /// * **HighAvailability**: High-availability Edition.
        /// * **AlwaysOn**: Cluster Edition.
        /// * **Finance**: Enterprise Edition.
        /// * **cluster**: MySQL Cluster Edition. (Available in 1.202.0+)
        /// * **serverless_basic**: RDS Serverless Basic Edition. This edition is available only for instances that run MySQL and PostgreSQL. (Available in 1.200.0+)
        /// * **serverless_standard**: RDS Serverless Basic Edition. This edition is available only for instances that run MySQL and PostgreSQL. (Available in 1.204.0+)
        /// * **serverless_ha**: RDS Serverless High-availability Edition for SQL Server. (Available in 1.204.0+)
        /// </summary>
        [Input("category")]
        public Input<string>? Category { get; set; }

        /// <summary>
        /// The public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCAEbabled parameter to 1, you must also specify this parameter.
        /// </summary>
        [Input("clientCaCert")]
        public Input<string>? ClientCaCert { get; set; }

        /// <summary>
        /// Specifies whether to enable the public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. Valid values:
        /// - 1: enables the public key
        /// - 0: disables the public key
        /// </summary>
        [Input("clientCaEnabled")]
        public Input<int>? ClientCaEnabled { get; set; }

        /// <summary>
        /// The CRL that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCrlEnabled parameter to 1, you must also specify this parameter.
        /// </summary>
        [Input("clientCertRevocationList")]
        public Input<string>? ClientCertRevocationList { get; set; }

        /// <summary>
        /// Specifies whether to enable a certificate revocation list (CRL) that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
        /// - 1: enables the CRL
        /// - 0: disables the CRL
        /// </summary>
        [Input("clientCrlEnabled")]
        public Input<int>? ClientCrlEnabled { get; set; }

        [Input("connectionStringPrefix")]
        public Input<string>? ConnectionStringPrefix { get; set; }

        /// <summary>
        /// The attribute of the IP address whitelist. By default, this parameter is empty.
        /// </summary>
        [Input("dbInstanceIpArrayAttribute")]
        public Input<string>? DbInstanceIpArrayAttribute { get; set; }

        /// <summary>
        /// The name of the IP address whitelist. Default value: Default.
        /// </summary>
        [Input("dbInstanceIpArrayName")]
        public Input<string>? DbInstanceIpArrayName { get; set; }

        /// <summary>
        /// The storage type of the instance. Serverless instance, only `cloud_essd` can be selected. Valid values:
        /// - local_ssd: specifies to use local SSDs. This value is recommended.
        /// - cloud_ssd: specifies to use standard SSDs.
        /// - cloud_essd: specifies to use enhanced SSDs (ESSDs).
        /// - cloud_essd2: specifies to use enhanced SSDs (ESSDs).
        /// - cloud_essd3: specifies to use enhanced SSDs (ESSDs).
        /// </summary>
        [Input("dbInstanceStorageType")]
        public Input<string>? DbInstanceStorageType { get; set; }

        /// <summary>
        /// Specifies whether table names on the instance are case-sensitive. Valid values: `true`, `false`.
        /// </summary>
        [Input("dbIsIgnoreCase")]
        public Input<bool>? DbIsIgnoreCase { get; set; }

        /// <summary>
        /// The time zone of the instance. This parameter takes effect only when you set the `Engine` parameter to MySQL or PostgreSQL.
        /// - If you set the `Engine` parameter to MySQL.
        /// - This time zone of the instance is in UTC. Valid values: -12:59 to +13:00.
        /// - You can specify this parameter when the instance is equipped with local SSDs. For example, you can specify the time zone to Asia/Hong_Kong. For more information about time zones, see [Time zones](https://www.alibabacloud.com/help/doc-detail/297356.htm).
        /// - If you set the `Engine` parameter to PostgreSQL.
        /// - This time zone of the instance is not in UTC. For more information about time zones, see [Time zones](https://www.alibabacloud.com/help/doc-detail/297356.htm).
        /// - You can specify this parameter only when the instance is equipped with standard SSDs or ESSDs.
        /// </summary>
        [Input("dbTimeZone")]
        public Input<string>? DbTimeZone { get; set; }

        /// <summary>
        /// The switch of delete protection. Valid values: 
        /// - true: delete protect.
        /// - false: no delete protect.
        /// </summary>
        [Input("deletionProtection")]
        public Input<bool>? DeletionProtection { get; set; }

        /// <summary>
        /// The method to update the engine version.  Default value: Immediate. Valid values:
        /// - Immediate: The change immediately takes effect.
        /// - MaintainTime: The change takes effect during the specified maintenance window. For more information, see ModifyDBInstanceMaintainTime.
        /// </summary>
        [Input("effectiveTime")]
        public Input<string>? EffectiveTime { get; set; }

        /// <summary>
        /// The key id of the KMS. Used for encrypting a disk if not null. Only for PostgreSQL, MySQL and SQLServer.
        /// </summary>
        [Input("encryptionKey")]
        public Input<string>? EncryptionKey { get; set; }

        /// <summary>
        /// Database type. Value options: MySQL, SQLServer, PostgreSQL, MariaDB. Create a serverless instance, you must set this parameter to MySQL.
        /// </summary>
        [Input("engine", required: true)]
        public Input<string> Engine { get; set; } = null!;

        /// <summary>
        /// Database version. Value options can refer to the latest docs [CreateDBInstance](https://www.alibabacloud.com/help/doc-detail/26228.htm) `EngineVersion`.
        /// </summary>
        [Input("engineVersion", required: true)]
        public Input<string> EngineVersion { get; set; } = null!;

        /// <summary>
        /// Set it to true to make some parameter efficient when modifying them. Default to false.
        /// </summary>
        [Input("forceRestart")]
        public Input<bool>? ForceRestart { get; set; }

        /// <summary>
        /// The read-only instances to which you want to synchronize the IP address whitelist.
        /// * If the instance is attached with a read-only instance, you can use this parameter to synchronize the IP address whitelist to the read-only instance. If the instance is attached with multiple read-only instances, the read-only instances must be separated by commas (,).
        /// * If the instance is not attached with a read-only instance, this parameter is empty.
        /// </summary>
        [Input("freshWhiteListReadins")]
        public Input<string>? FreshWhiteListReadins { get; set; }

        /// <summary>
        /// The primary/secondary switchover mode of the instance. Default value: Auto. Valid values:
        /// - Auto: The system automatically switches over services from the primary to secondary instances in the event of a fault.
        /// - Manual: You must manually switch over services from the primary to secondary instances in the event of a fault.
        /// </summary>
        [Input("haConfig")]
        public Input<string>? HaConfig { get; set; }

        /// <summary>
        /// Valid values are `Prepaid`, `Postpaid`, `Serverless`, Default to `Postpaid`. Currently, the resource only supports PostPaid to PrePaid. `Serverless` This value is supported only for instances that run MySQL. For more information, see [Overview](https://www.alibabacloud.com/help/en/apsaradb-for-rds/latest/what-is-serverless?spm=a2c63.p38356.0.0.772a28cfTAGqIv).
        /// </summary>
        [Input("instanceChargeType")]
        public Input<string>? InstanceChargeType { get; set; }

        /// <summary>
        /// The name of DB instance. It a string of 2 to 256 characters.
        /// </summary>
        [Input("instanceName")]
        public Input<string>? InstanceName { get; set; }

        /// <summary>
        /// User-defined DB instance storage space. Value range:
        /// - [5, 2000] for MySQL/PostgreSQL HA dual node edition;
        /// - [20,1000] for MySQL 5.7 basic single node edition;
        /// - [10, 2000] for SQL Server 2008R2;
        /// - [20,2000] for SQL Server 2012 basic single node edition
        /// Increase progressively at a rate of 5 GB. For details, see [Instance type table](https://www.alibabacloud.com/help/doc-detail/26312.htm).
        /// Note: There is extra 5 GB storage for SQL Server Instance and it is not in specified `instance_storage`.
        /// </summary>
        [Input("instanceStorage", required: true)]
        public Input<int> InstanceStorage { get; set; } = null!;

        /// <summary>
        /// DB Instance type. Create a serverless instance, you must set this parameter to mysql.n2.serverless.1c. For details, see [Instance type table](https://www.alibabacloud.com/help/doc-detail/26312.htm).
        /// </summary>
        [Input("instanceType", required: true)]
        public Input<string> InstanceType { get; set; } = null!;

        /// <summary>
        /// Maintainable time period format of the instance: HH:MMZ-HH:MMZ (UTC time)
        /// </summary>
        [Input("maintainTime")]
        public Input<string>? MaintainTime { get; set; }

        /// <summary>
        /// The time after when you want to enable automatic primary/secondary switchover. At most, you can set this parameter to 23:59:59 seven days later. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
        /// </summary>
        [Input("manualHaTime")]
        public Input<string>? ManualHaTime { get; set; }

        /// <summary>
        /// The method that is used to modify the IP address whitelist. Default value: Cover. Valid values:
        /// - Cover: Use the value of the SecurityIps parameter to overwrite the existing entries in the IP address whitelist.
        /// - Append: Add the IP addresses and CIDR blocks that are specified in the SecurityIps parameter to the IP address whitelist.
        /// - Delete: Delete IP addresses and CIDR blocks that are specified in the SecurityIps parameter from the IP address whitelist. You must retain at least one IP address or CIDR block.
        /// </summary>
        [Input("modifyMode")]
        public Input<string>? ModifyMode { get; set; }

        /// <summary>
        /// The monitoring frequency in seconds. Valid values are 5, 10, 60, 300. Defaults to 300.
        /// </summary>
        [Input("monitoringPeriod")]
        public Input<int>? MonitoringPeriod { get; set; }

        [Input("parameters")]
        private InputList<Inputs.InstanceParameterArgs>? _parameters;

        /// <summary>
        /// Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs [View database parameter templates](https://www.alibabacloud.com/help/doc-detail/26284.htm) .
        /// </summary>
        public InputList<Inputs.InstanceParameterArgs> Parameters
        {
            get => _parameters ?? (_parameters = new InputList<Inputs.InstanceParameterArgs>());
            set => _parameters = value;
        }

        [Input("period")]
        public Input<int>? Period { get; set; }

        [Input("pgHbaConfs")]
        private InputList<Inputs.InstancePgHbaConfArgs>? _pgHbaConfs;

        /// <summary>
        /// The configuration of [AD domain](https://www.alibabacloud.com/help/en/doc-detail/349288.htm) (documented below).
        /// </summary>
        public InputList<Inputs.InstancePgHbaConfArgs> PgHbaConfs
        {
            get => _pgHbaConfs ?? (_pgHbaConfs = new InputList<Inputs.InstancePgHbaConfArgs>());
            set => _pgHbaConfs = value;
        }

        [Input("port")]
        public Input<string>? Port { get; set; }

        /// <summary>
        /// The private IP address of the instance. The private IP address must be within the Classless Inter-Domain Routing (CIDR) block of the vSwitch that is specified by the VSwitchId parameter.
        /// </summary>
        [Input("privateIpAddress")]
        public Input<string>? PrivateIpAddress { get; set; }

        /// <summary>
        /// The policy based on which ApsaraDB RDS retains archived backup files after the instance is released. Valid values:
        /// - None: No archived backup files are retained.
        /// - Lastest: Only the last archived backup file is retained.
        /// - All: All the archived backup files are retained.
        /// </summary>
        [Input("releasedKeepPolicy")]
        public Input<string>? ReleasedKeepPolicy { get; set; }

        /// <summary>
        /// The method that is used to verify the replication permission. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
        /// - cert
        /// - perfer
        /// - verify-ca
        /// - verify-full (supported only when the instance runs PostgreSQL 12 or later)
        /// </summary>
        [Input("replicationAcl")]
        public Input<string>? ReplicationAcl { get; set; }

        /// <summary>
        /// The ID of resource group which the DB instance belongs.
        /// </summary>
        [Input("resourceGroupId")]
        public Input<string>? ResourceGroupId { get; set; }

        /// <summary>
        /// It has been deprecated from 1.69.0 and use `security_group_ids` instead.
        /// </summary>
        [Input("securityGroupId")]
        public Input<string>? SecurityGroupId { get; set; }

        [Input("securityGroupIds")]
        private InputList<string>? _securityGroupIds;

        /// <summary>
        /// , Available in 1.69.0+) The list IDs to join ECS Security Group. At most supports three security groups.
        /// </summary>
        public InputList<string> SecurityGroupIds
        {
            get => _securityGroupIds ?? (_securityGroupIds = new InputList<string>());
            set => _securityGroupIds = value;
        }

        /// <summary>
        /// Valid values are `normal`, `safety`, Default to `normal`. support `safety` switch to high security access mode.
        /// </summary>
        [Input("securityIpMode")]
        public Input<string>? SecurityIpMode { get; set; }

        /// <summary>
        /// The type of IP address in the IP address whitelist.
        /// </summary>
        [Input("securityIpType")]
        public Input<string>? SecurityIpType { get; set; }

        [Input("securityIps")]
        private InputList<string>? _securityIps;

        /// <summary>
        /// List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
        /// </summary>
        public InputList<string> SecurityIps
        {
            get => _securityIps ?? (_securityIps = new InputList<string>());
            set => _securityIps = value;
        }

        /// <summary>
        /// The content of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter.
        /// </summary>
        [Input("serverCert")]
        public Input<string>? ServerCert { get; set; }

        /// <summary>
        /// The private key of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter.
        /// </summary>
        [Input("serverKey")]
        public Input<string>? ServerKey { get; set; }

        [Input("serverlessConfigs")]
        private InputList<Inputs.InstanceServerlessConfigArgs>? _serverlessConfigs;

        /// <summary>
        /// The settings of the serverless instance. This parameter is required when you create a serverless instance. This parameter takes effect only when you create an ApsaraDB RDS for MySQL instance.
        /// </summary>
        public InputList<Inputs.InstanceServerlessConfigArgs> ServerlessConfigs
        {
            get => _serverlessConfigs ?? (_serverlessConfigs = new InputList<Inputs.InstanceServerlessConfigArgs>());
            set => _serverlessConfigs = value;
        }

        /// <summary>
        /// The sql collector keep time of the instance. Valid values are `30`, `180`, `365`, `1095`, `1825`, Default to `30`.
        /// </summary>
        [Input("sqlCollectorConfigValue")]
        public Input<int>? SqlCollectorConfigValue { get; set; }

        /// <summary>
        /// The sql collector status of the instance. Valid values are `Enabled`, `Disabled`, Default to `Disabled`.
        /// </summary>
        [Input("sqlCollectorStatus")]
        public Input<string>? SqlCollectorStatus { get; set; }

        /// <summary>
        /// Actions performed on SSL functions, Valid values: `Open`: turn on SSL encryption; `Close`: turn off SSL encryption; `Update`: update SSL certificate. See more [engine and engineVersion limitation](https://www.alibabacloud.com/help/zh/doc-detail/26254.htm).
        /// </summary>
        [Input("sslAction")]
        public Input<string>? SslAction { get; set; }

        /// <summary>
        /// The internal or public endpoint for which the server certificate needs to be created or updated.
        /// </summary>
        [Input("sslConnectionString")]
        public Input<string>? SslConnectionString { get; set; }

        /// <summary>
        /// Automatic storage space expansion switch. Valid values:
        /// - Enable
        /// - Disable
        /// </summary>
        [Input("storageAutoScale")]
        public Input<string>? StorageAutoScale { get; set; }

        /// <summary>
        /// The trigger threshold (percentage) for automatic storage space expansion. Valid values:
        /// - 10
        /// - 20
        /// - 30
        /// - 40
        /// - 50
        /// </summary>
        [Input("storageThreshold")]
        public Input<int>? StorageThreshold { get; set; }

        /// <summary>
        /// The upper limit of the total storage space for automatic expansion of the storage space, that is, automatic expansion will not cause the total storage space of the instance to exceed this value. Unit: GB. The value must be ≥0.
        /// </summary>
        [Input("storageUpperBound")]
        public Input<int>? StorageUpperBound { get; set; }

        /// <summary>
        /// The specific point in time when you want to perform the update. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. It is valid only when `target_minor_version` is changed. The time must be in UTC.
        /// </summary>
        [Input("switchTime")]
        public Input<string>? SwitchTime { get; set; }

        [Input("tags")]
        private InputMap<object>? _tags;

        /// <summary>
        /// A mapping of tags to assign to the resource.
        /// - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
        /// - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        /// <summary>
        /// The minor engine version to which you want to update the instance. If you do not specify this parameter, the instance is updated to the latest minor engine version. You must specify the minor engine version in one of the following formats:
        /// - PostgreSQL: rds_postgres_&lt;Major engine version&gt;00_&lt;Minor engine version&gt;. Example: rds_postgres_1200_20200830.
        /// - MySQL: &lt;RDS edition&gt;_&lt;Minor engine version&gt;. Examples: rds_20200229, xcluster_20200229, and xcluster80_20200229. The following RDS editions are supported:
        /// - rds: The instance runs RDS Basic or High-availability Edition.
        /// - xcluster: The instance runs MySQL 5.7 on RDS Enterprise Edition.
        /// - xcluster80: The instance runs MySQL 8.0 on RDS Enterprise Edition.
        /// - SQLServer: &lt;Minor engine version&gt;. Example: 15.0.4073.23.
        /// </summary>
        [Input("targetMinorVersion")]
        public Input<string>? TargetMinorVersion { get; set; }

        /// <summary>
        /// The availability check method of the instance. Valid values:
        /// - **SHORT**: Alibaba Cloud uses short-lived connections to check the availability of the instance.
        /// - **LONG**: Alibaba Cloud uses persistent connections to check the availability of the instance.
        /// </summary>
        [Input("tcpConnectionType")]
        public Input<string>? TcpConnectionType { get; set; }

        /// <summary>
        /// The TDE(Transparent Data Encryption) status. See more [engine and engineVersion limitation](https://www.alibabacloud.com/help/zh/doc-detail/26256.htm).
        /// </summary>
        [Input("tdeStatus")]
        public Input<string>? TdeStatus { get; set; }

        /// <summary>
        /// Whether to upgrade a minor version of the kernel. Valid values:
        /// - true: upgrade
        /// - false: not to upgrade
        /// </summary>
        [Input("upgradeDbInstanceKernelVersion")]
        public Input<bool>? UpgradeDbInstanceKernelVersion { get; set; }

        /// <summary>
        /// The method to update the minor engine version. Default value: Immediate. It is valid only when `target_minor_version` is changed. Valid values:
        /// - Immediate: The minor engine version is immediately updated.
        /// - MaintainTime: The minor engine version is updated during the maintenance window. For more information about how to change the maintenance window, see ModifyDBInstanceMaintainTime.
        /// - SpecifyTime: The minor engine version is updated at the point in time you specify.
        /// </summary>
        [Input("upgradeTime")]
        public Input<string>? UpgradeTime { get; set; }

        /// <summary>
        /// The VPC ID of the instance.
        /// </summary>
        [Input("vpcId")]
        public Input<string>? VpcId { get; set; }

        /// <summary>
        /// The virtual switch ID to launch DB instances in one VPC. If there are multiple vswitches, separate them with commas.
        /// </summary>
        [Input("vswitchId")]
        public Input<string>? VswitchId { get; set; }

        /// <summary>
        /// The network type of the IP address whitelist. Default value: MIX. Valid values:
        /// - Classic: classic network in enhanced whitelist mode
        /// - VPC: virtual private cloud (VPC) in enhanced whitelist mode
        /// - MIX: standard whitelist mode
        /// </summary>
        [Input("whitelistNetworkType")]
        public Input<string>? WhitelistNetworkType { get; set; }

        /// <summary>
        /// The Zone to launch the DB instance. From version 1.8.1, it supports multiple zone.
        /// If it is a multi-zone and `vswitch_id` is specified, the vswitch must in the one of them.
        /// The multiple zone ID can be retrieved by setting `multi` to "true" in the data source `alicloud.getZones`.
        /// </summary>
        [Input("zoneId")]
        public Input<string>? ZoneId { get; set; }

        /// <summary>
        /// The region ID of the secondary instance if you create a secondary instance. If you set this parameter to the same value as the ZoneId parameter, the instance is deployed in a single zone. Otherwise, the instance is deployed in multiple zones.
        /// </summary>
        [Input("zoneIdSlaveA")]
        public Input<string>? ZoneIdSlaveA { get; set; }

        /// <summary>
        /// The region ID of the log instance if you create a log instance. If you set this parameter to the same value as the ZoneId parameter, the instance is deployed in a single zone. Otherwise, the instance is deployed in multiple zones.
        /// </summary>
        [Input("zoneIdSlaveB")]
        public Input<string>? ZoneIdSlaveB { get; set; }

        public InstanceArgs()
        {
        }
        public static new InstanceArgs Empty => new InstanceArgs();
    }

    public sealed class InstanceState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The method that is used to verify the identities of clients. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
        /// - cert
        /// - perfer
        /// - verify-ca
        /// - verify-full (supported only when the instance runs PostgreSQL 12 or later)
        /// </summary>
        [Input("acl")]
        public Input<string>? Acl { get; set; }

        /// <summary>
        /// Whether to renewal a DB instance automatically or not. It is valid when instance_charge_type is `PrePaid`. Default to `false`.
        /// </summary>
        [Input("autoRenew")]
        public Input<bool>? AutoRenew { get; set; }

        /// <summary>
        /// Auto-renewal period of an instance, in the unit of the month. It is valid when instance_charge_type is `PrePaid`. Valid value:[1~12], Default to 1.
        /// </summary>
        [Input("autoRenewPeriod")]
        public Input<int>? AutoRenewPeriod { get; set; }

        /// <summary>
        /// The upgrade method to use. Valid values:
        /// - Auto: Instances are automatically upgraded to a higher minor version.
        /// - Manual: Instances are forcibly upgraded to a higher minor version when the current version is unpublished.
        /// </summary>
        [Input("autoUpgradeMinorVersion")]
        public Input<string>? AutoUpgradeMinorVersion { get; set; }

        [Input("babelfishConfigs")]
        private InputList<Inputs.InstanceBabelfishConfigGetArgs>? _babelfishConfigs;

        /// <summary>
        /// The configuration of an ApsaraDB RDS for PostgreSQL instance for which Babelfish is enabled. (documented below).
        /// </summary>
        public InputList<Inputs.InstanceBabelfishConfigGetArgs> BabelfishConfigs
        {
            get => _babelfishConfigs ?? (_babelfishConfigs = new InputList<Inputs.InstanceBabelfishConfigGetArgs>());
            set => _babelfishConfigs = value;
        }

        /// <summary>
        /// The TDS port of the instance for which Babelfish is enabled.
        /// </summary>
        [Input("babelfishPort")]
        public Input<string>? BabelfishPort { get; set; }

        /// <summary>
        /// The type of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the SSLEnabled parameter to 1, the default value of this parameter is aliyun. Value range:
        /// - aliyun: a cloud certificate
        /// - custom: a custom certificate
        /// </summary>
        [Input("caType")]
        public Input<string>? CaType { get; set; }

        /// <summary>
        /// The RDS edition of the instance. If you want to create a serverless instance, you must use this value. Valid values:
        /// * **Basic**: Basic Edition.
        /// * **HighAvailability**: High-availability Edition.
        /// * **AlwaysOn**: Cluster Edition.
        /// * **Finance**: Enterprise Edition.
        /// * **cluster**: MySQL Cluster Edition. (Available in 1.202.0+)
        /// * **serverless_basic**: RDS Serverless Basic Edition. This edition is available only for instances that run MySQL and PostgreSQL. (Available in 1.200.0+)
        /// * **serverless_standard**: RDS Serverless Basic Edition. This edition is available only for instances that run MySQL and PostgreSQL. (Available in 1.204.0+)
        /// * **serverless_ha**: RDS Serverless High-availability Edition for SQL Server. (Available in 1.204.0+)
        /// </summary>
        [Input("category")]
        public Input<string>? Category { get; set; }

        /// <summary>
        /// The public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCAEbabled parameter to 1, you must also specify this parameter.
        /// </summary>
        [Input("clientCaCert")]
        public Input<string>? ClientCaCert { get; set; }

        /// <summary>
        /// Specifies whether to enable the public key of the CA that issues client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. Valid values:
        /// - 1: enables the public key
        /// - 0: disables the public key
        /// </summary>
        [Input("clientCaEnabled")]
        public Input<int>? ClientCaEnabled { get; set; }

        /// <summary>
        /// The CRL that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the ClientCrlEnabled parameter to 1, you must also specify this parameter.
        /// </summary>
        [Input("clientCertRevocationList")]
        public Input<string>? ClientCertRevocationList { get; set; }

        /// <summary>
        /// Specifies whether to enable a certificate revocation list (CRL) that contains revoked client certificates. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
        /// - 1: enables the CRL
        /// - 0: disables the CRL
        /// </summary>
        [Input("clientCrlEnabled")]
        public Input<int>? ClientCrlEnabled { get; set; }

        /// <summary>
        /// RDS database connection string.
        /// </summary>
        [Input("connectionString")]
        public Input<string>? ConnectionString { get; set; }

        [Input("connectionStringPrefix")]
        public Input<string>? ConnectionStringPrefix { get; set; }

        /// <summary>
        /// The attribute of the IP address whitelist. By default, this parameter is empty.
        /// </summary>
        [Input("dbInstanceIpArrayAttribute")]
        public Input<string>? DbInstanceIpArrayAttribute { get; set; }

        /// <summary>
        /// The name of the IP address whitelist. Default value: Default.
        /// </summary>
        [Input("dbInstanceIpArrayName")]
        public Input<string>? DbInstanceIpArrayName { get; set; }

        /// <summary>
        /// The storage type of the instance. Serverless instance, only `cloud_essd` can be selected. Valid values:
        /// - local_ssd: specifies to use local SSDs. This value is recommended.
        /// - cloud_ssd: specifies to use standard SSDs.
        /// - cloud_essd: specifies to use enhanced SSDs (ESSDs).
        /// - cloud_essd2: specifies to use enhanced SSDs (ESSDs).
        /// - cloud_essd3: specifies to use enhanced SSDs (ESSDs).
        /// </summary>
        [Input("dbInstanceStorageType")]
        public Input<string>? DbInstanceStorageType { get; set; }

        /// <summary>
        /// (Available in 1.197.0+) The type of db instance.
        /// </summary>
        [Input("dbInstanceType")]
        public Input<string>? DbInstanceType { get; set; }

        /// <summary>
        /// Specifies whether table names on the instance are case-sensitive. Valid values: `true`, `false`.
        /// </summary>
        [Input("dbIsIgnoreCase")]
        public Input<bool>? DbIsIgnoreCase { get; set; }

        /// <summary>
        /// The time zone of the instance. This parameter takes effect only when you set the `Engine` parameter to MySQL or PostgreSQL.
        /// - If you set the `Engine` parameter to MySQL.
        /// - This time zone of the instance is in UTC. Valid values: -12:59 to +13:00.
        /// - You can specify this parameter when the instance is equipped with local SSDs. For example, you can specify the time zone to Asia/Hong_Kong. For more information about time zones, see [Time zones](https://www.alibabacloud.com/help/doc-detail/297356.htm).
        /// - If you set the `Engine` parameter to PostgreSQL.
        /// - This time zone of the instance is not in UTC. For more information about time zones, see [Time zones](https://www.alibabacloud.com/help/doc-detail/297356.htm).
        /// - You can specify this parameter only when the instance is equipped with standard SSDs or ESSDs.
        /// </summary>
        [Input("dbTimeZone")]
        public Input<string>? DbTimeZone { get; set; }

        /// <summary>
        /// The switch of delete protection. Valid values: 
        /// - true: delete protect.
        /// - false: no delete protect.
        /// </summary>
        [Input("deletionProtection")]
        public Input<bool>? DeletionProtection { get; set; }

        /// <summary>
        /// The method to update the engine version.  Default value: Immediate. Valid values:
        /// - Immediate: The change immediately takes effect.
        /// - MaintainTime: The change takes effect during the specified maintenance window. For more information, see ModifyDBInstanceMaintainTime.
        /// </summary>
        [Input("effectiveTime")]
        public Input<string>? EffectiveTime { get; set; }

        /// <summary>
        /// The key id of the KMS. Used for encrypting a disk if not null. Only for PostgreSQL, MySQL and SQLServer.
        /// </summary>
        [Input("encryptionKey")]
        public Input<string>? EncryptionKey { get; set; }

        /// <summary>
        /// Database type. Value options: MySQL, SQLServer, PostgreSQL, MariaDB. Create a serverless instance, you must set this parameter to MySQL.
        /// </summary>
        [Input("engine")]
        public Input<string>? Engine { get; set; }

        /// <summary>
        /// Database version. Value options can refer to the latest docs [CreateDBInstance](https://www.alibabacloud.com/help/doc-detail/26228.htm) `EngineVersion`.
        /// </summary>
        [Input("engineVersion")]
        public Input<string>? EngineVersion { get; set; }

        /// <summary>
        /// Set it to true to make some parameter efficient when modifying them. Default to false.
        /// </summary>
        [Input("forceRestart")]
        public Input<bool>? ForceRestart { get; set; }

        /// <summary>
        /// The read-only instances to which you want to synchronize the IP address whitelist.
        /// * If the instance is attached with a read-only instance, you can use this parameter to synchronize the IP address whitelist to the read-only instance. If the instance is attached with multiple read-only instances, the read-only instances must be separated by commas (,).
        /// * If the instance is not attached with a read-only instance, this parameter is empty.
        /// </summary>
        [Input("freshWhiteListReadins")]
        public Input<string>? FreshWhiteListReadins { get; set; }

        /// <summary>
        /// The primary/secondary switchover mode of the instance. Default value: Auto. Valid values:
        /// - Auto: The system automatically switches over services from the primary to secondary instances in the event of a fault.
        /// - Manual: You must manually switch over services from the primary to secondary instances in the event of a fault.
        /// </summary>
        [Input("haConfig")]
        public Input<string>? HaConfig { get; set; }

        /// <summary>
        /// Valid values are `Prepaid`, `Postpaid`, `Serverless`, Default to `Postpaid`. Currently, the resource only supports PostPaid to PrePaid. `Serverless` This value is supported only for instances that run MySQL. For more information, see [Overview](https://www.alibabacloud.com/help/en/apsaradb-for-rds/latest/what-is-serverless?spm=a2c63.p38356.0.0.772a28cfTAGqIv).
        /// </summary>
        [Input("instanceChargeType")]
        public Input<string>? InstanceChargeType { get; set; }

        /// <summary>
        /// The name of DB instance. It a string of 2 to 256 characters.
        /// </summary>
        [Input("instanceName")]
        public Input<string>? InstanceName { get; set; }

        /// <summary>
        /// User-defined DB instance storage space. Value range:
        /// - [5, 2000] for MySQL/PostgreSQL HA dual node edition;
        /// - [20,1000] for MySQL 5.7 basic single node edition;
        /// - [10, 2000] for SQL Server 2008R2;
        /// - [20,2000] for SQL Server 2012 basic single node edition
        /// Increase progressively at a rate of 5 GB. For details, see [Instance type table](https://www.alibabacloud.com/help/doc-detail/26312.htm).
        /// Note: There is extra 5 GB storage for SQL Server Instance and it is not in specified `instance_storage`.
        /// </summary>
        [Input("instanceStorage")]
        public Input<int>? InstanceStorage { get; set; }

        /// <summary>
        /// DB Instance type. Create a serverless instance, you must set this parameter to mysql.n2.serverless.1c. For details, see [Instance type table](https://www.alibabacloud.com/help/doc-detail/26312.htm).
        /// </summary>
        [Input("instanceType")]
        public Input<string>? InstanceType { get; set; }

        /// <summary>
        /// Maintainable time period format of the instance: HH:MMZ-HH:MMZ (UTC time)
        /// </summary>
        [Input("maintainTime")]
        public Input<string>? MaintainTime { get; set; }

        /// <summary>
        /// The time after when you want to enable automatic primary/secondary switchover. At most, you can set this parameter to 23:59:59 seven days later. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
        /// </summary>
        [Input("manualHaTime")]
        public Input<string>? ManualHaTime { get; set; }

        /// <summary>
        /// The method that is used to modify the IP address whitelist. Default value: Cover. Valid values:
        /// - Cover: Use the value of the SecurityIps parameter to overwrite the existing entries in the IP address whitelist.
        /// - Append: Add the IP addresses and CIDR blocks that are specified in the SecurityIps parameter to the IP address whitelist.
        /// - Delete: Delete IP addresses and CIDR blocks that are specified in the SecurityIps parameter from the IP address whitelist. You must retain at least one IP address or CIDR block.
        /// </summary>
        [Input("modifyMode")]
        public Input<string>? ModifyMode { get; set; }

        /// <summary>
        /// The monitoring frequency in seconds. Valid values are 5, 10, 60, 300. Defaults to 300.
        /// </summary>
        [Input("monitoringPeriod")]
        public Input<int>? MonitoringPeriod { get; set; }

        [Input("parameters")]
        private InputList<Inputs.InstanceParameterGetArgs>? _parameters;

        /// <summary>
        /// Set of parameters needs to be set after DB instance was launched. Available parameters can refer to the latest docs [View database parameter templates](https://www.alibabacloud.com/help/doc-detail/26284.htm) .
        /// </summary>
        public InputList<Inputs.InstanceParameterGetArgs> Parameters
        {
            get => _parameters ?? (_parameters = new InputList<Inputs.InstanceParameterGetArgs>());
            set => _parameters = value;
        }

        [Input("period")]
        public Input<int>? Period { get; set; }

        [Input("pgHbaConfs")]
        private InputList<Inputs.InstancePgHbaConfGetArgs>? _pgHbaConfs;

        /// <summary>
        /// The configuration of [AD domain](https://www.alibabacloud.com/help/en/doc-detail/349288.htm) (documented below).
        /// </summary>
        public InputList<Inputs.InstancePgHbaConfGetArgs> PgHbaConfs
        {
            get => _pgHbaConfs ?? (_pgHbaConfs = new InputList<Inputs.InstancePgHbaConfGetArgs>());
            set => _pgHbaConfs = value;
        }

        [Input("port")]
        public Input<string>? Port { get; set; }

        /// <summary>
        /// The private IP address of the instance. The private IP address must be within the Classless Inter-Domain Routing (CIDR) block of the vSwitch that is specified by the VSwitchId parameter.
        /// </summary>
        [Input("privateIpAddress")]
        public Input<string>? PrivateIpAddress { get; set; }

        /// <summary>
        /// The policy based on which ApsaraDB RDS retains archived backup files after the instance is released. Valid values:
        /// - None: No archived backup files are retained.
        /// - Lastest: Only the last archived backup file is retained.
        /// - All: All the archived backup files are retained.
        /// </summary>
        [Input("releasedKeepPolicy")]
        public Input<string>? ReleasedKeepPolicy { get; set; }

        /// <summary>
        /// The method that is used to verify the replication permission. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. In addition, this parameter is available only when the public key of the CA that issues client certificates is enabled. Valid values:
        /// - cert
        /// - perfer
        /// - verify-ca
        /// - verify-full (supported only when the instance runs PostgreSQL 12 or later)
        /// </summary>
        [Input("replicationAcl")]
        public Input<string>? ReplicationAcl { get; set; }

        /// <summary>
        /// The ID of resource group which the DB instance belongs.
        /// </summary>
        [Input("resourceGroupId")]
        public Input<string>? ResourceGroupId { get; set; }

        /// <summary>
        /// It has been deprecated from 1.69.0 and use `security_group_ids` instead.
        /// </summary>
        [Input("securityGroupId")]
        public Input<string>? SecurityGroupId { get; set; }

        [Input("securityGroupIds")]
        private InputList<string>? _securityGroupIds;

        /// <summary>
        /// , Available in 1.69.0+) The list IDs to join ECS Security Group. At most supports three security groups.
        /// </summary>
        public InputList<string> SecurityGroupIds
        {
            get => _securityGroupIds ?? (_securityGroupIds = new InputList<string>());
            set => _securityGroupIds = value;
        }

        /// <summary>
        /// Valid values are `normal`, `safety`, Default to `normal`. support `safety` switch to high security access mode.
        /// </summary>
        [Input("securityIpMode")]
        public Input<string>? SecurityIpMode { get; set; }

        /// <summary>
        /// The type of IP address in the IP address whitelist.
        /// </summary>
        [Input("securityIpType")]
        public Input<string>? SecurityIpType { get; set; }

        [Input("securityIps")]
        private InputList<string>? _securityIps;

        /// <summary>
        /// List of IP addresses allowed to access all databases of an instance. The list contains up to 1,000 IP addresses, separated by commas. Supported formats include 0.0.0.0/0, 10.23.12.24 (IP), and 10.23.12.24/24 (Classless Inter-Domain Routing (CIDR) mode. /24 represents the length of the prefix in an IP address. The range of the prefix length is [1,32]).
        /// </summary>
        public InputList<string> SecurityIps
        {
            get => _securityIps ?? (_securityIps = new InputList<string>());
            set => _securityIps = value;
        }

        /// <summary>
        /// The content of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter.
        /// </summary>
        [Input("serverCert")]
        public Input<string>? ServerCert { get; set; }

        /// <summary>
        /// The private key of the server certificate. This parameter is supported only when the instance runs PostgreSQL with standard or enhanced SSDs. If you set the CAType parameter to custom, you must also specify this parameter.
        /// </summary>
        [Input("serverKey")]
        public Input<string>? ServerKey { get; set; }

        [Input("serverlessConfigs")]
        private InputList<Inputs.InstanceServerlessConfigGetArgs>? _serverlessConfigs;

        /// <summary>
        /// The settings of the serverless instance. This parameter is required when you create a serverless instance. This parameter takes effect only when you create an ApsaraDB RDS for MySQL instance.
        /// </summary>
        public InputList<Inputs.InstanceServerlessConfigGetArgs> ServerlessConfigs
        {
            get => _serverlessConfigs ?? (_serverlessConfigs = new InputList<Inputs.InstanceServerlessConfigGetArgs>());
            set => _serverlessConfigs = value;
        }

        /// <summary>
        /// The sql collector keep time of the instance. Valid values are `30`, `180`, `365`, `1095`, `1825`, Default to `30`.
        /// </summary>
        [Input("sqlCollectorConfigValue")]
        public Input<int>? SqlCollectorConfigValue { get; set; }

        /// <summary>
        /// The sql collector status of the instance. Valid values are `Enabled`, `Disabled`, Default to `Disabled`.
        /// </summary>
        [Input("sqlCollectorStatus")]
        public Input<string>? SqlCollectorStatus { get; set; }

        /// <summary>
        /// Actions performed on SSL functions, Valid values: `Open`: turn on SSL encryption; `Close`: turn off SSL encryption; `Update`: update SSL certificate. See more [engine and engineVersion limitation](https://www.alibabacloud.com/help/zh/doc-detail/26254.htm).
        /// </summary>
        [Input("sslAction")]
        public Input<string>? SslAction { get; set; }

        /// <summary>
        /// The internal or public endpoint for which the server certificate needs to be created or updated.
        /// </summary>
        [Input("sslConnectionString")]
        public Input<string>? SslConnectionString { get; set; }

        /// <summary>
        /// Status of the SSL feature. `Yes`: SSL is turned on; `No`: SSL is turned off.
        /// </summary>
        [Input("sslStatus")]
        public Input<string>? SslStatus { get; set; }

        /// <summary>
        /// Automatic storage space expansion switch. Valid values:
        /// - Enable
        /// - Disable
        /// </summary>
        [Input("storageAutoScale")]
        public Input<string>? StorageAutoScale { get; set; }

        /// <summary>
        /// The trigger threshold (percentage) for automatic storage space expansion. Valid values:
        /// - 10
        /// - 20
        /// - 30
        /// - 40
        /// - 50
        /// </summary>
        [Input("storageThreshold")]
        public Input<int>? StorageThreshold { get; set; }

        /// <summary>
        /// The upper limit of the total storage space for automatic expansion of the storage space, that is, automatic expansion will not cause the total storage space of the instance to exceed this value. Unit: GB. The value must be ≥0.
        /// </summary>
        [Input("storageUpperBound")]
        public Input<int>? StorageUpperBound { get; set; }

        /// <summary>
        /// The specific point in time when you want to perform the update. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. It is valid only when `target_minor_version` is changed. The time must be in UTC.
        /// </summary>
        [Input("switchTime")]
        public Input<string>? SwitchTime { get; set; }

        [Input("tags")]
        private InputMap<object>? _tags;

        /// <summary>
        /// A mapping of tags to assign to the resource.
        /// - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
        /// - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        /// <summary>
        /// The minor engine version to which you want to update the instance. If you do not specify this parameter, the instance is updated to the latest minor engine version. You must specify the minor engine version in one of the following formats:
        /// - PostgreSQL: rds_postgres_&lt;Major engine version&gt;00_&lt;Minor engine version&gt;. Example: rds_postgres_1200_20200830.
        /// - MySQL: &lt;RDS edition&gt;_&lt;Minor engine version&gt;. Examples: rds_20200229, xcluster_20200229, and xcluster80_20200229. The following RDS editions are supported:
        /// - rds: The instance runs RDS Basic or High-availability Edition.
        /// - xcluster: The instance runs MySQL 5.7 on RDS Enterprise Edition.
        /// - xcluster80: The instance runs MySQL 8.0 on RDS Enterprise Edition.
        /// - SQLServer: &lt;Minor engine version&gt;. Example: 15.0.4073.23.
        /// </summary>
        [Input("targetMinorVersion")]
        public Input<string>? TargetMinorVersion { get; set; }

        /// <summary>
        /// The availability check method of the instance. Valid values:
        /// - **SHORT**: Alibaba Cloud uses short-lived connections to check the availability of the instance.
        /// - **LONG**: Alibaba Cloud uses persistent connections to check the availability of the instance.
        /// </summary>
        [Input("tcpConnectionType")]
        public Input<string>? TcpConnectionType { get; set; }

        /// <summary>
        /// The TDE(Transparent Data Encryption) status. See more [engine and engineVersion limitation](https://www.alibabacloud.com/help/zh/doc-detail/26256.htm).
        /// </summary>
        [Input("tdeStatus")]
        public Input<string>? TdeStatus { get; set; }

        /// <summary>
        /// Whether to upgrade a minor version of the kernel. Valid values:
        /// - true: upgrade
        /// - false: not to upgrade
        /// </summary>
        [Input("upgradeDbInstanceKernelVersion")]
        public Input<bool>? UpgradeDbInstanceKernelVersion { get; set; }

        /// <summary>
        /// The method to update the minor engine version. Default value: Immediate. It is valid only when `target_minor_version` is changed. Valid values:
        /// - Immediate: The minor engine version is immediately updated.
        /// - MaintainTime: The minor engine version is updated during the maintenance window. For more information about how to change the maintenance window, see ModifyDBInstanceMaintainTime.
        /// - SpecifyTime: The minor engine version is updated at the point in time you specify.
        /// </summary>
        [Input("upgradeTime")]
        public Input<string>? UpgradeTime { get; set; }

        /// <summary>
        /// The VPC ID of the instance.
        /// </summary>
        [Input("vpcId")]
        public Input<string>? VpcId { get; set; }

        /// <summary>
        /// The virtual switch ID to launch DB instances in one VPC. If there are multiple vswitches, separate them with commas.
        /// </summary>
        [Input("vswitchId")]
        public Input<string>? VswitchId { get; set; }

        /// <summary>
        /// The network type of the IP address whitelist. Default value: MIX. Valid values:
        /// - Classic: classic network in enhanced whitelist mode
        /// - VPC: virtual private cloud (VPC) in enhanced whitelist mode
        /// - MIX: standard whitelist mode
        /// </summary>
        [Input("whitelistNetworkType")]
        public Input<string>? WhitelistNetworkType { get; set; }

        /// <summary>
        /// The Zone to launch the DB instance. From version 1.8.1, it supports multiple zone.
        /// If it is a multi-zone and `vswitch_id` is specified, the vswitch must in the one of them.
        /// The multiple zone ID can be retrieved by setting `multi` to "true" in the data source `alicloud.getZones`.
        /// </summary>
        [Input("zoneId")]
        public Input<string>? ZoneId { get; set; }

        /// <summary>
        /// The region ID of the secondary instance if you create a secondary instance. If you set this parameter to the same value as the ZoneId parameter, the instance is deployed in a single zone. Otherwise, the instance is deployed in multiple zones.
        /// </summary>
        [Input("zoneIdSlaveA")]
        public Input<string>? ZoneIdSlaveA { get; set; }

        /// <summary>
        /// The region ID of the log instance if you create a log instance. If you set this parameter to the same value as the ZoneId parameter, the instance is deployed in a single zone. Otherwise, the instance is deployed in multiple zones.
        /// </summary>
        [Input("zoneIdSlaveB")]
        public Input<string>? ZoneIdSlaveB { get; set; }

        public InstanceState()
        {
        }
        public static new InstanceState Empty => new InstanceState();
    }
}
