<reponame>rhysmdnz/pulumi-alicloud-rhys-hacks// *** 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.PolarDB
{
    /// <summary>
    /// Provides a PolarDB cluster resource. A PolarDB cluster is an isolated database
    /// environment in the cloud. A PolarDB cluster can contain multiple user-created
    /// databases.
    /// 
    /// &gt; **NOTE:** Available in v1.66.0+.
    /// 
    /// ## Example Usage
    /// ### Create a PolarDB MySQL cluster
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var config = new Config();
    ///     var name = config.Get("name") ?? "polardbClusterconfig";
    ///     var creation = config.Get("creation") ?? "PolarDB";
    ///     var defaultZones = AliCloud.GetZones.Invoke(new()
    ///     {
    ///         AvailableResourceCreation = creation,
    ///     });
    /// 
    ///     var defaultNetwork = new AliCloud.Vpc.Network("defaultNetwork", new()
    ///     {
    ///         VpcName = name,
    ///         CidrBlock = "172.16.0.0/16",
    ///     });
    /// 
    ///     var defaultSwitch = new AliCloud.Vpc.Switch("defaultSwitch", new()
    ///     {
    ///         VpcId = defaultNetwork.Id,
    ///         CidrBlock = "172.16.0.0/24",
    ///         ZoneId = defaultZones.Apply(getZonesResult =&gt; getZonesResult.Zones[0]?.Id),
    ///         VswitchName = name,
    ///     });
    /// 
    ///     var defaultCluster = new AliCloud.PolarDB.Cluster("defaultCluster", new()
    ///     {
    ///         DbType = "MySQL",
    ///         DbVersion = "5.6",
    ///         DbNodeClass = "polar.mysql.x4.medium",
    ///         PayType = "PostPaid",
    ///         Description = name,
    ///         VswitchId = defaultSwitch.Id,
    ///         DbClusterIpArrays = new[]
    ///         {
    ///             new AliCloud.PolarDB.Inputs.ClusterDbClusterIpArrayArgs
    ///             {
    ///                 DbClusterIpArrayName = "default",
    ///                 SecurityIps = new[]
    ///                 {
    ///                     "1.2.3.4",
    ///                     "1.2.3.5",
    ///                 },
    ///             },
    ///             new AliCloud.PolarDB.Inputs.ClusterDbClusterIpArrayArgs
    ///             {
    ///                 DbClusterIpArrayName = "test_ips1",
    ///                 SecurityIps = new[]
    ///                 {
    ///                     "1.2.3.6",
    ///                 },
    ///             },
    ///         },
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// PolarDB cluster can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:polardb/cluster:Cluster example pc-abc12345678
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:polardb/cluster:Cluster")]
    public partial class Cluster : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Specifies whether to enable the no-activity suspension feature. Default value: false. Valid values are `true`, `false`.
        /// &gt; **NOTE:** This parameter is valid only for serverless clusters.
        /// </summary>
        [Output("allowShutDown")]
        public Output<string?> AllowShutDown { get; private set; } = null!;

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

        /// <summary>
        /// The retention policy for the backup sets when you delete the cluster.  Valid values are `ALL`, `LATEST`, `NONE`. Value options can refer to the latest docs [DeleteDBCluster](https://help.aliyun.com/document_detail/98170.html)
        /// </summary>
        [Output("backupRetentionPolicyOnClusterDeletion")]
        public Output<string> BackupRetentionPolicyOnClusterDeletion { get; private set; } = null!;

        /// <summary>
        /// The time point of data to be cloned. Valid values are `LATEST`,`BackupID`,`Timestamp`.Value options can refer to the latest docs [CreateDBCluster](https://help.aliyun.com/document_detail/98169.html) `CloneDataPoint`.
        /// &gt; **NOTE:** If CreationOption is set to CloneFromRDS, the value of this parameter must be LATEST.
        /// </summary>
        [Output("cloneDataPoint")]
        public Output<string?> CloneDataPoint { get; private set; } = null!;

        /// <summary>
        /// Specifies whether to enable or disable SQL data collector. Valid values are `Enable`, `Disabled`.
        /// </summary>
        [Output("collectorStatus")]
        public Output<string> CollectorStatus { get; private set; } = null!;

        /// <summary>
        /// (Available in 1.81.0+) PolarDB cluster connection string.
        /// </summary>
        [Output("connectionString")]
        public Output<string> ConnectionString { get; private set; } = null!;

        /// <summary>
        /// The edition of the PolarDB service. Valid values are `Normal`,`Basic`,`ArchiveNormal`,`NormalMultimaster`,`SENormal`.Value options can refer to the latest docs [CreateDBCluster](https://help.aliyun.com/document_detail/98169.html) `CreationCategory`.
        /// &gt; **NOTE:** You can set this parameter to Basic only when DBType is set to MySQL and DBVersion is set to 5.6, 5.7, or 8.0. You can set this parameter to Archive only when DBType is set to MySQL and DBVersion is set to 8.0. From version 1.188.0, `creation_category` can be set to `NormalMultimaster`. From version 1.203.0, `creation_category` can be set to `SENormal`.
        /// </summary>
        [Output("creationCategory")]
        public Output<string> CreationCategory { get; private set; } = null!;

        /// <summary>
        /// The method that is used to create a cluster. Valid values are `Normal`,`CloneFromPolarDB`,`CloneFromRDS`,`MigrationFromRDS`,`CreateGdnStandby`.Value options can refer to the latest docs [CreateDBCluster](https://help.aliyun.com/document_detail/98169.html) `CreationOption`.
        /// &gt; **NOTE:** The default value is Normal. If DBType is set to MySQL and DBVersion is set to 5.6 or 5.7, this parameter can be set to CloneFromRDS or MigrationFromRDS. If DBType is set to MySQL and DBVersion is set to 8.0, this parameter can be set to CreateGdnStandby.
        /// </summary>
        [Output("creationOption")]
        public Output<string> CreationOption { get; private set; } = null!;

        /// <summary>
        /// db_cluster_ip_array defines how users can send requests to your API.
        /// </summary>
        [Output("dbClusterIpArrays")]
        public Output<ImmutableArray<Outputs.ClusterDbClusterIpArray>> DbClusterIpArrays { get; private set; } = null!;

        /// <summary>
        /// The db_node_class of cluster node.
        /// &gt; **NOTE:** Node specifications are divided into cluster version, single node version and History Library version. They can't change each other, but the general specification and exclusive specification of cluster version can be changed. From version 1.204.0, If you need to create a Serverless cluster, `db_node_class` can be set to `polar. mysql. sl. small`.
        /// </summary>
        [Output("dbNodeClass")]
        public Output<string> DbNodeClass { get; private set; } = null!;

        /// <summary>
        /// Number of the PolarDB cluster nodes, default is 2(Each cluster must contain at least a primary node and a read-only node). Add/remove nodes by modifying this parameter, valid values: [2~16].  
        /// &gt; **NOTE:** To avoid adding or removing multiple read-only nodes by mistake, the system allows you to add or remove one read-only node at a time.
        /// </summary>
        [Output("dbNodeCount")]
        public Output<int> DbNodeCount { get; private set; } = null!;

        /// <summary>
        /// Database type. Value options: MySQL, Oracle, PostgreSQL.
        /// </summary>
        [Output("dbType")]
        public Output<string> DbType { get; private set; } = null!;

        /// <summary>
        /// Database version. Value options can refer to the latest docs [CreateDBCluster](https://help.aliyun.com/document_detail/98169.html) `DBVersion`.
        /// </summary>
        [Output("dbVersion")]
        public Output<string> DbVersion { get; private set; } = null!;

        /// <summary>
        /// turn on table deletion_lock. Valid values are 0, 1. 1 means to open the cluster protection lock, 0 means to close the cluster protection lock
        /// &gt; **NOTE:**  Cannot modify after created when `pay_type` is `Prepaid` .`deletion_lock` the cluster protection lock can be turned on or off when `pay_type` is `Postpaid`.
        /// </summary>
        [Output("deletionLock")]
        public Output<int?> DeletionLock { get; private set; } = null!;

        /// <summary>
        /// The description of cluster.
        /// </summary>
        [Output("description")]
        public Output<string> Description { get; private set; } = null!;

        /// <summary>
        /// turn on table auto encryption. Valid values are `ON`, `OFF`. Only MySQL 8.0 supports. 
        /// &gt; **NOTE:** `encrypt_new_tables` Polardb MySQL 8.0 cluster, after TDE and Automatic Encryption are enabled, all newly created tables are automatically encrypted in the cluster.
        /// </summary>
        [Output("encryptNewTables")]
        public Output<string?> EncryptNewTables { get; private set; } = null!;

        /// <summary>
        /// The ID of the custom key. `encryption_key` cannot be modified after TDE is opened.
        /// </summary>
        [Output("encryptionKey")]
        public Output<string?> EncryptionKey { get; private set; } = null!;

        /// <summary>
        /// The ID of the global database network (GDN).
        /// &gt; **NOTE:** This parameter is required if CreationOption is set to CreateGdnStandby.
        /// </summary>
        [Output("gdnId")]
        public Output<string?> GdnId { get; private set; } = null!;

        /// <summary>
        /// Whether to enable the hot standby cluster. Valid values are `ON`, `OFF`. Only MySQL supports.
        /// </summary>
        [Output("hotStandbyCluster")]
        public Output<string> HotStandbyCluster { get; private set; } = null!;

        /// <summary>
        /// Specifies whether to enable the In-Memory Column Index (IMCI) feature. Valid values are `ON`, `OFF`.
        /// &gt; **NOTE:**  Only polardb MySQL Cluster version is available. The cluster with minor version number of 8.0.1 supports the column index feature, and the specific kernel version must be 8.0.1.1.22 or above.
        /// &gt; **NOTE:**  The single node, the single node version of the history library, and the cluster version of the history library do not support column save indexes.
        /// </summary>
        [Output("imciSwitch")]
        public Output<string> ImciSwitch { 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>
        /// Use as `db_node_class` change class, define upgrade or downgrade. Valid values are `Upgrade`, `Downgrade`, Default to `Upgrade`.
        /// </summary>
        [Output("modifyType")]
        public Output<string?> ModifyType { get; private set; } = null!;

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

        /// <summary>
        /// Valid values are `PrePaid`, `PostPaid`, Default to `PostPaid`.
        /// </summary>
        [Output("payType")]
        public Output<string?> PayType { get; private set; } = null!;

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

        /// <summary>
        /// (Available in 1.196.0+) PolarDB cluster connection port.
        /// </summary>
        [Output("port")]
        public Output<string> Port { get; private set; } = null!;

        /// <summary>
        /// Valid values are `AutoRenewal`, `Normal`, `NotRenewal`, Default to `NotRenewal`.
        /// </summary>
        [Output("renewalStatus")]
        public Output<string?> RenewalStatus { get; private set; } = null!;

        /// <summary>
        /// The ID of resource group which the PolarDB cluster belongs. If not specified, then it belongs to the default resource group.
        /// </summary>
        [Output("resourceGroupId")]
        public Output<string> ResourceGroupId { get; private set; } = null!;

        /// <summary>
        /// The Alibaba Cloud Resource Name (ARN) of the RAM role. A RAM role is a virtual identity that you can create within your Alibaba Cloud account. For more information see [RAM role overview](https://www.alibabacloud.com/help/en/resource-access-management/latest/ram-role-overview).
        /// </summary>
        [Output("roleArn")]
        public Output<string> RoleArn { get; private set; } = null!;

        /// <summary>
        /// The maximum number of PCUs per node for scaling. Valid values: 1 PCU to 32 PCUs.
        /// &gt; **NOTE:** This parameter is valid only for serverless clusters.
        /// </summary>
        [Output("scaleMax")]
        public Output<int?> ScaleMax { get; private set; } = null!;

        /// <summary>
        /// The minimum number of PCUs per node for scaling. Valid values: 1 PCU to 31 PCUs.
        /// &gt; **NOTE:** This parameter is valid only for serverless clusters.
        /// </summary>
        [Output("scaleMin")]
        public Output<int?> ScaleMin { get; private set; } = null!;

        /// <summary>
        /// The maximum number of read-only nodes for scaling. Valid values: 0 to 15.
        /// &gt; **NOTE:** This parameter is valid only for serverless clusters.
        /// </summary>
        [Output("scaleRoNumMax")]
        public Output<int?> ScaleRoNumMax { get; private set; } = null!;

        /// <summary>
        /// The minimum number of read-only nodes for scaling. Valid values: 0 to 15.
        /// &gt; **NOTE:** This parameter is valid only for serverless clusters.
        /// </summary>
        [Output("scaleRoNumMin")]
        public Output<int?> ScaleRoNumMin { get; private set; } = null!;

        /// <summary>
        /// The detection period for No-activity Suspension. Valid values: 300 to 86,4005. Unit: seconds. The detection duration must be a multiple of 300 seconds.
        /// &gt; **NOTE:** This parameter is valid only for serverless clusters.
        /// </summary>
        [Output("secondsUntilAutoPause")]
        public Output<int> SecondsUntilAutoPause { get; private set; } = null!;

        /// <summary>
        /// The ID of the security group. Separate multiple security groups with commas (,). You can add a maximum of three security groups to a cluster.
        /// &gt; **NOTE:** Because of data backup and migration, change DB cluster type and storage would cost 15~20 minutes. Please make full preparation before changing them.
        /// </summary>
        [Output("securityGroupIds")]
        public Output<ImmutableArray<string>> SecurityGroupIds { get; private set; } = null!;

        /// <summary>
        /// List of IP addresses allowed to access all databases of a cluster. 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 type of the serverless cluster. Set the value to AgileServerless.
        /// &gt; **NOTE:** This parameter is valid only for serverless clusters.
        /// </summary>
        [Output("serverlessType")]
        public Output<string?> ServerlessType { get; private set; } = null!;

        /// <summary>
        /// The ID of the source RDS instance or the ID of the source PolarDB cluster. This parameter is required only when CreationOption is set to MigrationFromRDS, CloneFromRDS, or CloneFromPolarDB.Value options can refer to the latest docs [CreateDBCluster](https://help.aliyun.com/document_detail/98169.html) `SourceResourceId`.
        /// </summary>
        [Output("sourceResourceId")]
        public Output<string?> SourceResourceId { get; private set; } = null!;

        /// <summary>
        /// Storage space charged by space (monthly package). Unit: GB.
        /// </summary>
        [Output("storageSpace")]
        public Output<int?> StorageSpace { get; private set; } = null!;

        /// <summary>
        /// The storage type of the cluster. Enterprise storage type values are `PSL5`, `PSL4`. The standard version storage type values are `ESSDPL1`, `ESSDPL2`, `ESSDPL3`. The standard version only supports MySQL.
        /// &gt; **NOTE:** Serverless cluster does not support this parameter.
        /// </summary>
        [Output("storageType")]
        public Output<string> StorageType { get; private set; } = null!;

        /// <summary>
        /// The category of the cluster. Valid values are `Exclusive`, `General`. Only MySQL supports.
        /// </summary>
        [Output("subCategory")]
        public Output<string> SubCategory { 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>
        /// (Available in 1.200.0+) The region where the TDE key resides.
        /// &gt; **NOTE:** TDE can be enabled on clusters that have joined a global database network (GDN). After TDE is enabled on the primary cluster in a GDN, TDE is enabled on the secondary clusters in the GDN by default. The key used by the secondary clusters and the region for the key resides must be the same as the primary cluster. The region of the key cannot be modified.
        /// &gt; **NOTE:** You cannot enable TDE for the secondary clusters in a GDN. Used to view user KMS activation status.
        /// </summary>
        [Output("tdeRegion")]
        public Output<string> TdeRegion { get; private set; } = null!;

        /// <summary>
        /// turn on TDE encryption. Valid values are `Enabled`, `Disabled`. Default to `Disabled`. TDE cannot be closed after it is turned on. 
        /// &gt; **NOTE:** `tde_status` Cannot modify after created when `db_type` is `PostgreSQL` or `Oracle`.`tde_status` only support modification from `Disabled` to `Enabled` when `db_type` is `MySQL`.
        /// </summary>
        [Output("tdeStatus")]
        public Output<string?> TdeStatus { get; private set; } = null!;

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

        /// <summary>
        /// The virtual switch ID to launch DB instances in one VPC.
        /// &gt; **NOTE:** If vswitch_id is not specified, system will get a vswitch belongs to the user automatically.
        /// </summary>
        [Output("vswitchId")]
        public Output<string?> VswitchId { get; private set; } = null!;

        /// <summary>
        /// The Zone to launch the DB cluster. it supports multiple zone.
        /// </summary>
        [Output("zoneId")]
        public Output<string> ZoneId { get; private set; } = null!;


        /// <summary>
        /// Create a Cluster 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 Cluster(string name, ClusterArgs args, CustomResourceOptions? options = null)
            : base("alicloud:polardb/cluster:Cluster", name, args ?? new ClusterArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Cluster(string name, Input<string> id, ClusterState? state = null, CustomResourceOptions? options = null)
            : base("alicloud:polardb/cluster:Cluster", 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 Cluster 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 Cluster Get(string name, Input<string> id, ClusterState? state = null, CustomResourceOptions? options = null)
        {
            return new Cluster(name, id, state, options);
        }
    }

    public sealed class ClusterArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Specifies whether to enable the no-activity suspension feature. Default value: false. Valid values are `true`, `false`.
        /// &gt; **NOTE:** This parameter is valid only for serverless clusters.
        /// </summary>
        [Input("allowShutDown")]
        public Input<string>? AllowShutDown { get; set; }

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

        /// <summary>
        /// The retention policy for the backup sets when you delete the cluster.  Valid values are `ALL`, `LATEST`, `NONE`. Value options can refer to the latest docs [DeleteDBCluster](https://help.aliyun.com/document_detail/98170.html)
        /// </summary>
        [Input("backupRetentionPolicyOnClusterDeletion")]
        public Input<string>? BackupRetentionPolicyOnClusterDeletion { get; set; }

        /// <summary>
        /// The time point of data to be cloned. Valid values are `LATEST`,`BackupID`,`Timestamp`.Value options can refer to the latest docs [CreateDBCluster](https://help.aliyun.com/document_detail/98169.html) `CloneDataPoint`.
        /// &gt; **NOTE:** If CreationOption is set to CloneFromRDS, the value of this parameter must be LATEST.
        /// </summary>
        [Input("cloneDataPoint")]
        public Input<string>? CloneDataPoint { get; set; }

        /// <summary>
        /// Specifies whether to enable or disable SQL data collector. Valid values are `Enable`, `Disabled`.
        /// </summary>
        [Input("collectorStatus")]
        public Input<string>? CollectorStatus { get; set; }

        /// <summary>
        /// The edition of the PolarDB service. Valid values are `Normal`,`Basic`,`ArchiveNormal`,`NormalMultimaster`,`SENormal`.Value options can refer to the latest docs [CreateDBCluster](https://help.aliyun.com/document_detail/98169.html) `CreationCategory`.
        /// &gt; **NOTE:** You can set this parameter to Basic only when DBType is set to MySQL and DBVersion is set to 5.6, 5.7, or 8.0. You can set this parameter to Archive only when DBType is set to MySQL and DBVersion is set to 8.0. From version 1.188.0, `creation_category` can be set to `NormalMultimaster`. From version 1.203.0, `creation_category` can be set to `SENormal`.
        /// </summary>
        [Input("creationCategory")]
        public Input<string>? CreationCategory { get; set; }

        /// <summary>
        /// The method that is used to create a cluster. Valid values are `Normal`,`CloneFromPolarDB`,`CloneFromRDS`,`MigrationFromRDS`,`CreateGdnStandby`.Value options can refer to the latest docs [CreateDBCluster](https://help.aliyun.com/document_detail/98169.html) `CreationOption`.
        /// &gt; **NOTE:** The default value is Normal. If DBType is set to MySQL and DBVersion is set to 5.6 or 5.7, this parameter can be set to CloneFromRDS or MigrationFromRDS. If DBType is set to MySQL and DBVersion is set to 8.0, this parameter can be set to CreateGdnStandby.
        /// </summary>
        [Input("creationOption")]
        public Input<string>? CreationOption { get; set; }

        [Input("dbClusterIpArrays")]
        private InputList<Inputs.ClusterDbClusterIpArrayArgs>? _dbClusterIpArrays;

        /// <summary>
        /// db_cluster_ip_array defines how users can send requests to your API.
        /// </summary>
        public InputList<Inputs.ClusterDbClusterIpArrayArgs> DbClusterIpArrays
        {
            get => _dbClusterIpArrays ?? (_dbClusterIpArrays = new InputList<Inputs.ClusterDbClusterIpArrayArgs>());
            set => _dbClusterIpArrays = value;
        }

        /// <summary>
        /// The db_node_class of cluster node.
        /// &gt; **NOTE:** Node specifications are divided into cluster version, single node version and History Library version. They can't change each other, but the general specification and exclusive specification of cluster version can be changed. From version 1.204.0, If you need to create a Serverless cluster, `db_node_class` can be set to `polar. mysql. sl. small`.
        /// </summary>
        [Input("dbNodeClass", required: true)]
        public Input<string> DbNodeClass { get; set; } = null!;

        /// <summary>
        /// Number of the PolarDB cluster nodes, default is 2(Each cluster must contain at least a primary node and a read-only node). Add/remove nodes by modifying this parameter, valid values: [2~16].  
        /// &gt; **NOTE:** To avoid adding or removing multiple read-only nodes by mistake, the system allows you to add or remove one read-only node at a time.
        /// </summary>
        [Input("dbNodeCount")]
        public Input<int>? DbNodeCount { get; set; }

        /// <summary>
        /// Database type. Value options: MySQL, Oracle, PostgreSQL.
        /// </summary>
        [Input("dbType", required: true)]
        public Input<string> DbType { get; set; } = null!;

        /// <summary>
        /// Database version. Value options can refer to the latest docs [CreateDBCluster](https://help.aliyun.com/document_detail/98169.html) `DBVersion`.
        /// </summary>
        [Input("dbVersion", required: true)]
        public Input<string> DbVersion { get; set; } = null!;

        /// <summary>
        /// turn on table deletion_lock. Valid values are 0, 1. 1 means to open the cluster protection lock, 0 means to close the cluster protection lock
        /// &gt; **NOTE:**  Cannot modify after created when `pay_type` is `Prepaid` .`deletion_lock` the cluster protection lock can be turned on or off when `pay_type` is `Postpaid`.
        /// </summary>
        [Input("deletionLock")]
        public Input<int>? DeletionLock { get; set; }

        /// <summary>
        /// The description of cluster.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// turn on table auto encryption. Valid values are `ON`, `OFF`. Only MySQL 8.0 supports. 
        /// &gt; **NOTE:** `encrypt_new_tables` Polardb MySQL 8.0 cluster, after TDE and Automatic Encryption are enabled, all newly created tables are automatically encrypted in the cluster.
        /// </summary>
        [Input("encryptNewTables")]
        public Input<string>? EncryptNewTables { get; set; }

        /// <summary>
        /// The ID of the custom key. `encryption_key` cannot be modified after TDE is opened.
        /// </summary>
        [Input("encryptionKey")]
        public Input<string>? EncryptionKey { get; set; }

        /// <summary>
        /// The ID of the global database network (GDN).
        /// &gt; **NOTE:** This parameter is required if CreationOption is set to CreateGdnStandby.
        /// </summary>
        [Input("gdnId")]
        public Input<string>? GdnId { get; set; }

        /// <summary>
        /// Whether to enable the hot standby cluster. Valid values are `ON`, `OFF`. Only MySQL supports.
        /// </summary>
        [Input("hotStandbyCluster")]
        public Input<string>? HotStandbyCluster { get; set; }

        /// <summary>
        /// Specifies whether to enable the In-Memory Column Index (IMCI) feature. Valid values are `ON`, `OFF`.
        /// &gt; **NOTE:**  Only polardb MySQL Cluster version is available. The cluster with minor version number of 8.0.1 supports the column index feature, and the specific kernel version must be 8.0.1.1.22 or above.
        /// &gt; **NOTE:**  The single node, the single node version of the history library, and the cluster version of the history library do not support column save indexes.
        /// </summary>
        [Input("imciSwitch")]
        public Input<string>? ImciSwitch { 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>
        /// Use as `db_node_class` change class, define upgrade or downgrade. Valid values are `Upgrade`, `Downgrade`, Default to `Upgrade`.
        /// </summary>
        [Input("modifyType")]
        public Input<string>? ModifyType { get; set; }

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

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

        /// <summary>
        /// Valid values are `PrePaid`, `PostPaid`, Default to `PostPaid`.
        /// </summary>
        [Input("payType")]
        public Input<string>? PayType { get; set; }

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

        /// <summary>
        /// Valid values are `AutoRenewal`, `Normal`, `NotRenewal`, Default to `NotRenewal`.
        /// </summary>
        [Input("renewalStatus")]
        public Input<string>? RenewalStatus { get; set; }

        /// <summary>
        /// The ID of resource group which the PolarDB cluster belongs. If not specified, then it belongs to the default resource group.
        /// </summary>
        [Input("resourceGroupId")]
        public Input<string>? ResourceGroupId { get; set; }

        /// <summary>
        /// The Alibaba Cloud Resource Name (ARN) of the RAM role. A RAM role is a virtual identity that you can create within your Alibaba Cloud account. For more information see [RAM role overview](https://www.alibabacloud.com/help/en/resource-access-management/latest/ram-role-overview).
        /// </summary>
        [Input("roleArn")]
        public Input<string>? RoleArn { get; set; }

        /// <summary>
        /// The maximum number of PCUs per node for scaling. Valid values: 1 PCU to 32 PCUs.
        /// &gt; **NOTE:** This parameter is valid only for serverless clusters.
        /// </summary>
        [Input("scaleMax")]
        public Input<int>? ScaleMax { get; set; }

        /// <summary>
        /// The minimum number of PCUs per node for scaling. Valid values: 1 PCU to 31 PCUs.
        /// &gt; **NOTE:** This parameter is valid only for serverless clusters.
        /// </summary>
        [Input("scaleMin")]
        public Input<int>? ScaleMin { get; set; }

        /// <summary>
        /// The maximum number of read-only nodes for scaling. Valid values: 0 to 15.
        /// &gt; **NOTE:** This parameter is valid only for serverless clusters.
        /// </summary>
        [Input("scaleRoNumMax")]
        public Input<int>? ScaleRoNumMax { get; set; }

        /// <summary>
        /// The minimum number of read-only nodes for scaling. Valid values: 0 to 15.
        /// &gt; **NOTE:** This parameter is valid only for serverless clusters.
        /// </summary>
        [Input("scaleRoNumMin")]
        public Input<int>? ScaleRoNumMin { get; set; }

        /// <summary>
        /// The detection period for No-activity Suspension. Valid values: 300 to 86,4005. Unit: seconds. The detection duration must be a multiple of 300 seconds.
        /// &gt; **NOTE:** This parameter is valid only for serverless clusters.
        /// </summary>
        [Input("secondsUntilAutoPause")]
        public Input<int>? SecondsUntilAutoPause { get; set; }

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

        /// <summary>
        /// The ID of the security group. Separate multiple security groups with commas (,). You can add a maximum of three security groups to a cluster.
        /// &gt; **NOTE:** Because of data backup and migration, change DB cluster type and storage would cost 15~20 minutes. Please make full preparation before changing them.
        /// </summary>
        public InputList<string> SecurityGroupIds
        {
            get => _securityGroupIds ?? (_securityGroupIds = new InputList<string>());
            set => _securityGroupIds = value;
        }

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

        /// <summary>
        /// List of IP addresses allowed to access all databases of a cluster. 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 type of the serverless cluster. Set the value to AgileServerless.
        /// &gt; **NOTE:** This parameter is valid only for serverless clusters.
        /// </summary>
        [Input("serverlessType")]
        public Input<string>? ServerlessType { get; set; }

        /// <summary>
        /// The ID of the source RDS instance or the ID of the source PolarDB cluster. This parameter is required only when CreationOption is set to MigrationFromRDS, CloneFromRDS, or CloneFromPolarDB.Value options can refer to the latest docs [CreateDBCluster](https://help.aliyun.com/document_detail/98169.html) `SourceResourceId`.
        /// </summary>
        [Input("sourceResourceId")]
        public Input<string>? SourceResourceId { get; set; }

        /// <summary>
        /// Storage space charged by space (monthly package). Unit: GB.
        /// </summary>
        [Input("storageSpace")]
        public Input<int>? StorageSpace { get; set; }

        /// <summary>
        /// The storage type of the cluster. Enterprise storage type values are `PSL5`, `PSL4`. The standard version storage type values are `ESSDPL1`, `ESSDPL2`, `ESSDPL3`. The standard version only supports MySQL.
        /// &gt; **NOTE:** Serverless cluster does not support this parameter.
        /// </summary>
        [Input("storageType")]
        public Input<string>? StorageType { get; set; }

        /// <summary>
        /// The category of the cluster. Valid values are `Exclusive`, `General`. Only MySQL supports.
        /// </summary>
        [Input("subCategory")]
        public Input<string>? SubCategory { 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>
        /// turn on TDE encryption. Valid values are `Enabled`, `Disabled`. Default to `Disabled`. TDE cannot be closed after it is turned on. 
        /// &gt; **NOTE:** `tde_status` Cannot modify after created when `db_type` is `PostgreSQL` or `Oracle`.`tde_status` only support modification from `Disabled` to `Enabled` when `db_type` is `MySQL`.
        /// </summary>
        [Input("tdeStatus")]
        public Input<string>? TdeStatus { get; set; }

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

        /// <summary>
        /// The virtual switch ID to launch DB instances in one VPC.
        /// &gt; **NOTE:** If vswitch_id is not specified, system will get a vswitch belongs to the user automatically.
        /// </summary>
        [Input("vswitchId")]
        public Input<string>? VswitchId { get; set; }

        /// <summary>
        /// The Zone to launch the DB cluster. it supports multiple zone.
        /// </summary>
        [Input("zoneId")]
        public Input<string>? ZoneId { get; set; }

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

    public sealed class ClusterState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Specifies whether to enable the no-activity suspension feature. Default value: false. Valid values are `true`, `false`.
        /// &gt; **NOTE:** This parameter is valid only for serverless clusters.
        /// </summary>
        [Input("allowShutDown")]
        public Input<string>? AllowShutDown { get; set; }

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

        /// <summary>
        /// The retention policy for the backup sets when you delete the cluster.  Valid values are `ALL`, `LATEST`, `NONE`. Value options can refer to the latest docs [DeleteDBCluster](https://help.aliyun.com/document_detail/98170.html)
        /// </summary>
        [Input("backupRetentionPolicyOnClusterDeletion")]
        public Input<string>? BackupRetentionPolicyOnClusterDeletion { get; set; }

        /// <summary>
        /// The time point of data to be cloned. Valid values are `LATEST`,`BackupID`,`Timestamp`.Value options can refer to the latest docs [CreateDBCluster](https://help.aliyun.com/document_detail/98169.html) `CloneDataPoint`.
        /// &gt; **NOTE:** If CreationOption is set to CloneFromRDS, the value of this parameter must be LATEST.
        /// </summary>
        [Input("cloneDataPoint")]
        public Input<string>? CloneDataPoint { get; set; }

        /// <summary>
        /// Specifies whether to enable or disable SQL data collector. Valid values are `Enable`, `Disabled`.
        /// </summary>
        [Input("collectorStatus")]
        public Input<string>? CollectorStatus { get; set; }

        /// <summary>
        /// (Available in 1.81.0+) PolarDB cluster connection string.
        /// </summary>
        [Input("connectionString")]
        public Input<string>? ConnectionString { get; set; }

        /// <summary>
        /// The edition of the PolarDB service. Valid values are `Normal`,`Basic`,`ArchiveNormal`,`NormalMultimaster`,`SENormal`.Value options can refer to the latest docs [CreateDBCluster](https://help.aliyun.com/document_detail/98169.html) `CreationCategory`.
        /// &gt; **NOTE:** You can set this parameter to Basic only when DBType is set to MySQL and DBVersion is set to 5.6, 5.7, or 8.0. You can set this parameter to Archive only when DBType is set to MySQL and DBVersion is set to 8.0. From version 1.188.0, `creation_category` can be set to `NormalMultimaster`. From version 1.203.0, `creation_category` can be set to `SENormal`.
        /// </summary>
        [Input("creationCategory")]
        public Input<string>? CreationCategory { get; set; }

        /// <summary>
        /// The method that is used to create a cluster. Valid values are `Normal`,`CloneFromPolarDB`,`CloneFromRDS`,`MigrationFromRDS`,`CreateGdnStandby`.Value options can refer to the latest docs [CreateDBCluster](https://help.aliyun.com/document_detail/98169.html) `CreationOption`.
        /// &gt; **NOTE:** The default value is Normal. If DBType is set to MySQL and DBVersion is set to 5.6 or 5.7, this parameter can be set to CloneFromRDS or MigrationFromRDS. If DBType is set to MySQL and DBVersion is set to 8.0, this parameter can be set to CreateGdnStandby.
        /// </summary>
        [Input("creationOption")]
        public Input<string>? CreationOption { get; set; }

        [Input("dbClusterIpArrays")]
        private InputList<Inputs.ClusterDbClusterIpArrayGetArgs>? _dbClusterIpArrays;

        /// <summary>
        /// db_cluster_ip_array defines how users can send requests to your API.
        /// </summary>
        public InputList<Inputs.ClusterDbClusterIpArrayGetArgs> DbClusterIpArrays
        {
            get => _dbClusterIpArrays ?? (_dbClusterIpArrays = new InputList<Inputs.ClusterDbClusterIpArrayGetArgs>());
            set => _dbClusterIpArrays = value;
        }

        /// <summary>
        /// The db_node_class of cluster node.
        /// &gt; **NOTE:** Node specifications are divided into cluster version, single node version and History Library version. They can't change each other, but the general specification and exclusive specification of cluster version can be changed. From version 1.204.0, If you need to create a Serverless cluster, `db_node_class` can be set to `polar. mysql. sl. small`.
        /// </summary>
        [Input("dbNodeClass")]
        public Input<string>? DbNodeClass { get; set; }

        /// <summary>
        /// Number of the PolarDB cluster nodes, default is 2(Each cluster must contain at least a primary node and a read-only node). Add/remove nodes by modifying this parameter, valid values: [2~16].  
        /// &gt; **NOTE:** To avoid adding or removing multiple read-only nodes by mistake, the system allows you to add or remove one read-only node at a time.
        /// </summary>
        [Input("dbNodeCount")]
        public Input<int>? DbNodeCount { get; set; }

        /// <summary>
        /// Database type. Value options: MySQL, Oracle, PostgreSQL.
        /// </summary>
        [Input("dbType")]
        public Input<string>? DbType { get; set; }

        /// <summary>
        /// Database version. Value options can refer to the latest docs [CreateDBCluster](https://help.aliyun.com/document_detail/98169.html) `DBVersion`.
        /// </summary>
        [Input("dbVersion")]
        public Input<string>? DbVersion { get; set; }

        /// <summary>
        /// turn on table deletion_lock. Valid values are 0, 1. 1 means to open the cluster protection lock, 0 means to close the cluster protection lock
        /// &gt; **NOTE:**  Cannot modify after created when `pay_type` is `Prepaid` .`deletion_lock` the cluster protection lock can be turned on or off when `pay_type` is `Postpaid`.
        /// </summary>
        [Input("deletionLock")]
        public Input<int>? DeletionLock { get; set; }

        /// <summary>
        /// The description of cluster.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// turn on table auto encryption. Valid values are `ON`, `OFF`. Only MySQL 8.0 supports. 
        /// &gt; **NOTE:** `encrypt_new_tables` Polardb MySQL 8.0 cluster, after TDE and Automatic Encryption are enabled, all newly created tables are automatically encrypted in the cluster.
        /// </summary>
        [Input("encryptNewTables")]
        public Input<string>? EncryptNewTables { get; set; }

        /// <summary>
        /// The ID of the custom key. `encryption_key` cannot be modified after TDE is opened.
        /// </summary>
        [Input("encryptionKey")]
        public Input<string>? EncryptionKey { get; set; }

        /// <summary>
        /// The ID of the global database network (GDN).
        /// &gt; **NOTE:** This parameter is required if CreationOption is set to CreateGdnStandby.
        /// </summary>
        [Input("gdnId")]
        public Input<string>? GdnId { get; set; }

        /// <summary>
        /// Whether to enable the hot standby cluster. Valid values are `ON`, `OFF`. Only MySQL supports.
        /// </summary>
        [Input("hotStandbyCluster")]
        public Input<string>? HotStandbyCluster { get; set; }

        /// <summary>
        /// Specifies whether to enable the In-Memory Column Index (IMCI) feature. Valid values are `ON`, `OFF`.
        /// &gt; **NOTE:**  Only polardb MySQL Cluster version is available. The cluster with minor version number of 8.0.1 supports the column index feature, and the specific kernel version must be 8.0.1.1.22 or above.
        /// &gt; **NOTE:**  The single node, the single node version of the history library, and the cluster version of the history library do not support column save indexes.
        /// </summary>
        [Input("imciSwitch")]
        public Input<string>? ImciSwitch { 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>
        /// Use as `db_node_class` change class, define upgrade or downgrade. Valid values are `Upgrade`, `Downgrade`, Default to `Upgrade`.
        /// </summary>
        [Input("modifyType")]
        public Input<string>? ModifyType { get; set; }

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

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

        /// <summary>
        /// Valid values are `PrePaid`, `PostPaid`, Default to `PostPaid`.
        /// </summary>
        [Input("payType")]
        public Input<string>? PayType { get; set; }

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

        /// <summary>
        /// (Available in 1.196.0+) PolarDB cluster connection port.
        /// </summary>
        [Input("port")]
        public Input<string>? Port { get; set; }

        /// <summary>
        /// Valid values are `AutoRenewal`, `Normal`, `NotRenewal`, Default to `NotRenewal`.
        /// </summary>
        [Input("renewalStatus")]
        public Input<string>? RenewalStatus { get; set; }

        /// <summary>
        /// The ID of resource group which the PolarDB cluster belongs. If not specified, then it belongs to the default resource group.
        /// </summary>
        [Input("resourceGroupId")]
        public Input<string>? ResourceGroupId { get; set; }

        /// <summary>
        /// The Alibaba Cloud Resource Name (ARN) of the RAM role. A RAM role is a virtual identity that you can create within your Alibaba Cloud account. For more information see [RAM role overview](https://www.alibabacloud.com/help/en/resource-access-management/latest/ram-role-overview).
        /// </summary>
        [Input("roleArn")]
        public Input<string>? RoleArn { get; set; }

        /// <summary>
        /// The maximum number of PCUs per node for scaling. Valid values: 1 PCU to 32 PCUs.
        /// &gt; **NOTE:** This parameter is valid only for serverless clusters.
        /// </summary>
        [Input("scaleMax")]
        public Input<int>? ScaleMax { get; set; }

        /// <summary>
        /// The minimum number of PCUs per node for scaling. Valid values: 1 PCU to 31 PCUs.
        /// &gt; **NOTE:** This parameter is valid only for serverless clusters.
        /// </summary>
        [Input("scaleMin")]
        public Input<int>? ScaleMin { get; set; }

        /// <summary>
        /// The maximum number of read-only nodes for scaling. Valid values: 0 to 15.
        /// &gt; **NOTE:** This parameter is valid only for serverless clusters.
        /// </summary>
        [Input("scaleRoNumMax")]
        public Input<int>? ScaleRoNumMax { get; set; }

        /// <summary>
        /// The minimum number of read-only nodes for scaling. Valid values: 0 to 15.
        /// &gt; **NOTE:** This parameter is valid only for serverless clusters.
        /// </summary>
        [Input("scaleRoNumMin")]
        public Input<int>? ScaleRoNumMin { get; set; }

        /// <summary>
        /// The detection period for No-activity Suspension. Valid values: 300 to 86,4005. Unit: seconds. The detection duration must be a multiple of 300 seconds.
        /// &gt; **NOTE:** This parameter is valid only for serverless clusters.
        /// </summary>
        [Input("secondsUntilAutoPause")]
        public Input<int>? SecondsUntilAutoPause { get; set; }

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

        /// <summary>
        /// The ID of the security group. Separate multiple security groups with commas (,). You can add a maximum of three security groups to a cluster.
        /// &gt; **NOTE:** Because of data backup and migration, change DB cluster type and storage would cost 15~20 minutes. Please make full preparation before changing them.
        /// </summary>
        public InputList<string> SecurityGroupIds
        {
            get => _securityGroupIds ?? (_securityGroupIds = new InputList<string>());
            set => _securityGroupIds = value;
        }

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

        /// <summary>
        /// List of IP addresses allowed to access all databases of a cluster. 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 type of the serverless cluster. Set the value to AgileServerless.
        /// &gt; **NOTE:** This parameter is valid only for serverless clusters.
        /// </summary>
        [Input("serverlessType")]
        public Input<string>? ServerlessType { get; set; }

        /// <summary>
        /// The ID of the source RDS instance or the ID of the source PolarDB cluster. This parameter is required only when CreationOption is set to MigrationFromRDS, CloneFromRDS, or CloneFromPolarDB.Value options can refer to the latest docs [CreateDBCluster](https://help.aliyun.com/document_detail/98169.html) `SourceResourceId`.
        /// </summary>
        [Input("sourceResourceId")]
        public Input<string>? SourceResourceId { get; set; }

        /// <summary>
        /// Storage space charged by space (monthly package). Unit: GB.
        /// </summary>
        [Input("storageSpace")]
        public Input<int>? StorageSpace { get; set; }

        /// <summary>
        /// The storage type of the cluster. Enterprise storage type values are `PSL5`, `PSL4`. The standard version storage type values are `ESSDPL1`, `ESSDPL2`, `ESSDPL3`. The standard version only supports MySQL.
        /// &gt; **NOTE:** Serverless cluster does not support this parameter.
        /// </summary>
        [Input("storageType")]
        public Input<string>? StorageType { get; set; }

        /// <summary>
        /// The category of the cluster. Valid values are `Exclusive`, `General`. Only MySQL supports.
        /// </summary>
        [Input("subCategory")]
        public Input<string>? SubCategory { 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>
        /// (Available in 1.200.0+) The region where the TDE key resides.
        /// &gt; **NOTE:** TDE can be enabled on clusters that have joined a global database network (GDN). After TDE is enabled on the primary cluster in a GDN, TDE is enabled on the secondary clusters in the GDN by default. The key used by the secondary clusters and the region for the key resides must be the same as the primary cluster. The region of the key cannot be modified.
        /// &gt; **NOTE:** You cannot enable TDE for the secondary clusters in a GDN. Used to view user KMS activation status.
        /// </summary>
        [Input("tdeRegion")]
        public Input<string>? TdeRegion { get; set; }

        /// <summary>
        /// turn on TDE encryption. Valid values are `Enabled`, `Disabled`. Default to `Disabled`. TDE cannot be closed after it is turned on. 
        /// &gt; **NOTE:** `tde_status` Cannot modify after created when `db_type` is `PostgreSQL` or `Oracle`.`tde_status` only support modification from `Disabled` to `Enabled` when `db_type` is `MySQL`.
        /// </summary>
        [Input("tdeStatus")]
        public Input<string>? TdeStatus { get; set; }

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

        /// <summary>
        /// The virtual switch ID to launch DB instances in one VPC.
        /// &gt; **NOTE:** If vswitch_id is not specified, system will get a vswitch belongs to the user automatically.
        /// </summary>
        [Input("vswitchId")]
        public Input<string>? VswitchId { get; set; }

        /// <summary>
        /// The Zone to launch the DB cluster. it supports multiple zone.
        /// </summary>
        [Input("zoneId")]
        public Input<string>? ZoneId { get; set; }

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