<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.KVStore
{
    /// <summary>
    /// ## Import
    /// 
    /// KVStore instance can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:kvstore/instance:Instance example r-abc12345678
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:kvstore/instance:Instance")]
    public partial class Instance : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Whether to renewal a KVStore DBInstance automatically or not. It is valid when payment_type is `PrePaid`. Default to `false`.
        /// </summary>
        [Output("autoRenew")]
        public Output<bool?> AutoRenew { get; private set; } = null!;

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

        /// <summary>
        /// Specifies whether to use a coupon. Default to: `false`.
        /// </summary>
        [Output("autoUseCoupon")]
        public Output<bool?> AutoUseCoupon { get; private set; } = null!;

        /// <summary>
        /// It has been deprecated from provider version 1.101.0 and `zone_id` instead.
        /// </summary>
        [Output("availabilityZone")]
        public Output<string> AvailabilityZone { get; private set; } = null!;

        /// <summary>
        /// The ID of the backup file of the source instance.
        /// </summary>
        [Output("backupId")]
        public Output<string?> BackupId { get; private set; } = null!;

        /// <summary>
        /// Backup period.
        /// </summary>
        [Output("backupPeriods")]
        public Output<ImmutableArray<string>> BackupPeriods { get; private set; } = null!;

        /// <summary>
        /// Backup time, the format is HH:mmZ-HH:mmZ (UTC time).
        /// </summary>
        [Output("backupTime")]
        public Output<string> BackupTime { get; private set; } = null!;

        /// <summary>
        /// The bandwidth.
        /// </summary>
        [Output("bandwidth")]
        public Output<int> Bandwidth { get; private set; } = null!;

        /// <summary>
        /// The ID of the event or the business information.
        /// </summary>
        [Output("businessInfo")]
        public Output<string?> BusinessInfo { get; private set; } = null!;

        /// <summary>
        /// The storage capacity of the KVStore DBInstance. Unit: MB.
        /// </summary>
        [Output("capacity")]
        public Output<int> Capacity { get; private set; } = null!;

        /// <summary>
        /// The configuration of the KVStore DBInstance. Available parameters can refer to the latest docs [Instance configurations table](https://www.alibabacloud.com/help/doc-detail/61209.htm) .
        /// </summary>
        [Output("config")]
        public Output<ImmutableDictionary<string, object>> Config { get; private set; } = null!;

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

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

        /// <summary>
        /// It has been deprecated from provider version 1.101.0 and resource `alicloud.kvstore.Connection` instead.
        /// </summary>
        [Output("connectionStringPrefix")]
        public Output<string?> ConnectionStringPrefix { get; private set; } = null!;

        /// <summary>
        /// The coupon code. Default to: `youhuiquan_promotion_option_id_for_blank`.
        /// </summary>
        [Output("couponNo")]
        public Output<string?> CouponNo { get; private set; } = null!;

        /// <summary>
        /// The name of KVStore DBInstance. It is a string of 2 to 256 characters.
        /// </summary>
        [Output("dbInstanceName")]
        public Output<string> DbInstanceName { get; private set; } = null!;

        /// <summary>
        /// The ID of the dedicated cluster. This parameter is required when you create an ApsaraDB for Redis instance in a dedicated cluster.
        /// </summary>
        [Output("dedicatedHostGroupId")]
        public Output<string?> DedicatedHostGroupId { get; private set; } = null!;

        /// <summary>
        /// Specifies whether to precheck the request. Valid values:
        /// * true: prechecks the request without creating an instance. The system prechecks the required parameters, request format, service limits, and available resources. If the request fails the precheck, the corresponding error message is returned. If the request passes the precheck, the DryRunOperation error code is returned.
        /// * false: checks the request. After the request passes the check, an instance is created.
        /// </summary>
        [Output("dryRun")]
        public Output<bool?> DryRun { get; private set; } = null!;

        /// <summary>
        /// The time when the database is switched after the instance is migrated, 
        /// or when the major version is upgraded, or when the instance class is upgraded. Valid values:
        /// - Immediately (Default): The configurations are immediately changed.
        /// - MaintainTime: The configurations are changed within the maintenance window. You can set `maintain_start_time` and `maintain_end_time` to change the maintenance window.
        /// </summary>
        [Output("effectiveTime")]
        public Output<string?> EffectiveTime { get; private set; } = null!;

        /// <summary>
        /// Turn on or off incremental backup. Valid values: `1`, `0`. Default to `0`
        /// </summary>
        [Output("enableBackupLog")]
        public Output<int?> EnableBackupLog { get; private set; } = null!;

        /// <summary>
        /// It has been deprecated from provider version 1.101.0 and resource `alicloud.kvstore.Connection` instead.
        /// </summary>
        [Output("enablePublic")]
        public Output<bool> EnablePublic { get; private set; } = null!;

        /// <summary>
        /// The Custom key ID, which you can get by calling DescribeEncryptionKeyList.If this parameter is not passed, the key is automatically generated by the key management service. To create a custom key, you can call the CreateKey interface of the key management service.
        /// </summary>
        [Output("encryptionKey")]
        public Output<string> EncryptionKey { get; private set; } = null!;

        /// <summary>
        /// The Encryption algorithm, default AES-CTR-256.Note that this parameter is only available when the TDEStatus parameter is Enabled.
        /// </summary>
        [Output("encryptionName")]
        public Output<string> EncryptionName { get; private set; } = null!;

        /// <summary>
        /// The expiration time of the prepaid instance.
        /// </summary>
        [Output("endTime")]
        public Output<string> EndTime { get; private set; } = null!;

        /// <summary>
        /// The engine version of the KVStore DBInstance. Valid values: ["2.8", "4.0", "5.0", "6.0", "7.0"]. Default to "5.0".
        /// **NOTE:** When `instance_type = Memcache`, the `engine_version` only supports "4.0".
        /// </summary>
        [Output("engineVersion")]
        public Output<string> EngineVersion { get; private set; } = null!;

        /// <summary>
        /// Specifies whether to forcibly change the type. Default to: `true`.
        /// </summary>
        [Output("forceUpgrade")]
        public Output<bool?> ForceUpgrade { get; private set; } = null!;

        /// <summary>
        /// Whether to create a distributed cache. Default to: `false`.
        /// </summary>
        [Output("globalInstance")]
        public Output<bool?> GlobalInstance { get; private set; } = null!;

        /// <summary>
        /// The ID of distributed cache.
        /// </summary>
        [Output("globalInstanceId")]
        public Output<string?> GlobalInstanceId { get; private set; } = null!;

        /// <summary>
        /// It has been deprecated from provider version 1.101.0 and `payment_type` instead.
        /// </summary>
        [Output("instanceChargeType")]
        public Output<string> InstanceChargeType { get; private set; } = null!;

        [Output("instanceClass")]
        public Output<string?> InstanceClass { get; private set; } = null!;

        /// <summary>
        /// It has been deprecated from provider version 1.101.0 and `db_instance_name` instead.
        /// </summary>
        [Output("instanceName")]
        public Output<string> InstanceName { get; private set; } = null!;

        /// <summary>
        /// Whether to open the release protection.
        /// </summary>
        [Output("instanceReleaseProtection")]
        public Output<bool> InstanceReleaseProtection { get; private set; } = null!;

        /// <summary>
        /// The engine type of the KVStore DBInstance. Valid values: `Redis` or `Memcache`. Defaults to `Redis`.
        /// </summary>
        [Output("instanceType")]
        public Output<string?> InstanceType { get; private set; } = null!;

        /// <summary>
        /// An KMS encrypts password used to an instance. If the `password` is filled in, this field will be ignored.
        /// </summary>
        [Output("kmsEncryptedPassword")]
        public Output<string?> KmsEncryptedPassword { get; private set; } = null!;

        /// <summary>
        /// An KMS encryption context used to decrypt `kms_encrypted_password` before creating or updating instance with `kms_encrypted_password`. See [Encryption Context](https://www.alibabacloud.com/help/doc-detail/42975.htm). It is valid when `kms_encrypted_password` is set.
        /// </summary>
        [Output("kmsEncryptionContext")]
        public Output<ImmutableDictionary<string, object>?> KmsEncryptionContext { get; private set; } = null!;

        /// <summary>
        /// The end time of the operation and maintenance time period of the KVStore DBInstance, in the format of HH:mmZ (UTC time).
        /// </summary>
        [Output("maintainEndTime")]
        public Output<string> MaintainEndTime { get; private set; } = null!;

        /// <summary>
        /// The start time of the operation and maintenance time period of the KVStore DBInstance, in the format of HH:mmZ (UTC time).
        /// </summary>
        [Output("maintainStartTime")]
        public Output<string> MaintainStartTime { get; private set; } = null!;

        /// <summary>
        /// The method of modifying the whitelist. Valid values: `0`, `1` and `2`. Default to `0`. `0` means overwrites the original whitelist. `1` means adds the IP addresses to the whitelist. `2` means deletes the IP addresses from the whitelist.
        /// </summary>
        [Output("modifyMode")]
        public Output<int?> ModifyMode { get; private set; } = null!;

        /// <summary>
        /// "Field 'node_type' has been deprecated from version 1.120.1". This parameter is determined by the `instance_class`.
        /// </summary>
        [Output("nodeType")]
        public Output<string> NodeType { get; private set; } = null!;

        /// <summary>
        /// Specifies a change type when you change the configuration of a subscription instance. Valid values: `UPGRADE`, `DOWNGRADE`. Default to `UPGRADE`. `UPGRADE` means upgrades the configuration of a subscription instance. `DOWNGRADE` means downgrades the configuration of a subscription instance.
        /// </summary>
        [Output("orderType")]
        public Output<string?> OrderType { get; private set; } = null!;

        /// <summary>
        /// It has been deprecated from provider version 1.101.0 and `config` instead..
        /// </summary>
        [Output("parameters")]
        public Output<ImmutableArray<Outputs.InstanceParameter>> Parameters { get; private set; } = null!;

        /// <summary>
        /// The password of the KVStore DBInstance. The password that is used to connect to the instance. The password must be 8 to 32 characters in length and must contain at least three of the following character types: uppercase letters, lowercase letters, special characters, and digits. Special characters include: `! @ # $ % ^ &amp; * ( ) _ + - =`
        /// </summary>
        [Output("password")]
        public Output<string?> Password { get; private set; } = null!;

        /// <summary>
        /// The billing method of the KVStore DBInstance. Valid values: `PrePaid`, `PostPaid`. Default to `PostPaid`.
        /// </summary>
        [Output("paymentType")]
        public Output<string> PaymentType { get; private set; } = null!;

        /// <summary>
        /// The duration that you will buy KVStore DBInstance (in month). It is valid when payment_type is `PrePaid`. Valid values: `[1~9]`, `12`, `24`, `36`.
        /// </summary>
        [Output("period")]
        public Output<string?> Period { get; private set; } = null!;

        /// <summary>
        /// It has been deprecated from provider version 1.101.0 and resource `alicloud.kvstore.Connection` instead.
        /// </summary>
        [Output("port")]
        public Output<int?> Port { get; private set; } = null!;

        /// <summary>
        /// Private network connection port, used to modify the private network connection port.
        /// </summary>
        [Output("privateConnectionPort")]
        public Output<string> PrivateConnectionPort { get; private set; } = null!;

        /// <summary>
        /// Private network connection prefix, used to modify the private network connection address. Only supports updating private network connections for existing instance.
        /// </summary>
        [Output("privateConnectionPrefix")]
        public Output<string?> PrivateConnectionPrefix { get; private set; } = null!;

        /// <summary>
        /// The internal IP address of the instance.
        /// </summary>
        [Output("privateIp")]
        public Output<string> PrivateIp { get; private set; } = null!;

        /// <summary>
        /// Theoretical maximum QPS value.
        /// </summary>
        [Output("qps")]
        public Output<int> Qps { get; private set; } = null!;

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

        /// <summary>
        /// The point in time of a backup file.
        /// </summary>
        [Output("restoreTime")]
        public Output<string?> RestoreTime { get; private set; } = null!;

        /// <summary>
        /// The Specify the global resource descriptor ARN (Alibaba Cloud Resource Name) information of the role to be authorized, and use the related key management services after the authorization is completed, in the format: `acs:ram::$accountID:role/$roleName`.
        /// </summary>
        [Output("roleArn")]
        public Output<string?> RoleArn { get; private set; } = null!;

        /// <summary>
        /// The ID of the secondary zone to which you want to migrate the ApsaraDB for Redis instance.
        /// </summary>
        [Output("secondaryZoneId")]
        public Output<string?> SecondaryZoneId { get; private set; } = null!;

        /// <summary>
        /// The ID of security groups.
        /// </summary>
        [Output("securityGroupId")]
        public Output<string?> SecurityGroupId { get; private set; } = null!;

        /// <summary>
        /// The value of this parameter is empty by default. The attribute of the whitelist group. The console does not display the whitelist group whose value of this parameter is hidden.
        /// </summary>
        [Output("securityIpGroupAttribute")]
        public Output<string?> SecurityIpGroupAttribute { get; private set; } = null!;

        /// <summary>
        /// The name of the whitelist group.
        /// </summary>
        [Output("securityIpGroupName")]
        public Output<string> SecurityIpGroupName { get; private set; } = null!;

        /// <summary>
        /// The IP addresses in the whitelist group. The maximum number of IP addresses in the whitelist group is 1000.
        /// </summary>
        [Output("securityIps")]
        public Output<ImmutableArray<string>> SecurityIps { get; private set; } = null!;

        /// <summary>
        /// The ID of the source instance.
        /// </summary>
        [Output("srcdbInstanceId")]
        public Output<string?> SrcdbInstanceId { get; private set; } = null!;

        /// <summary>
        /// Modifies the SSL status. Valid values: `Disable`, `Enable` and `Update`. 
        /// Note: This functionality is supported by Cluster mode (Redis 2.8, 4.0, 5.0) and Standard mode( Redis 2.8 only)
        /// </summary>
        [Output("sslEnable")]
        public Output<string?> SslEnable { get; private set; } = null!;

        /// <summary>
        /// The status of KVStore DBInstance.
        /// * `connection_domain`- Intranet connection address of the KVStore instance.
        /// </summary>
        [Output("status")]
        public Output<string> Status { get; private set; } = null!;

        /// <summary>
        /// A mapping of tags to assign to the resource.
        /// </summary>
        [Output("tags")]
        public Output<ImmutableDictionary<string, object>?> Tags { get; private set; } = null!;

        /// <summary>
        /// The Is the TDE encryption function on. The TDE function cannot be switched off for the time being. Please assess whether it will affect your business before switching it on. Valid values: `Enabled`, `Disabled`.
        /// </summary>
        [Output("tdeStatus")]
        public Output<string> TdeStatus { get; private set; } = null!;

        /// <summary>
        /// Only meaningful if instance_type is `Redis` and network type is VPC. Valid values: `Close`, `Open`. Defaults to `Open`.  `Close` means the redis instance can be accessed without authentication. `Open` means authentication is required.
        /// </summary>
        [Output("vpcAuthMode")]
        public Output<string?> VpcAuthMode { get; private set; } = null!;

        /// <summary>
        /// The ID of VSwitch.
        /// </summary>
        [Output("vswitchId")]
        public Output<string?> VswitchId { get; private set; } = null!;

        /// <summary>
        /// The ID of the zone.
        /// </summary>
        [Output("zoneId")]
        public Output<string> ZoneId { 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 = null, CustomResourceOptions? options = null)
            : base("alicloud:kvstore/instance:Instance", name, args ?? new InstanceArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Instance(string name, Input<string> id, InstanceState? state = null, CustomResourceOptions? options = null)
            : base("alicloud:kvstore/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>
        /// Whether to renewal a KVStore DBInstance automatically or not. It is valid when payment_type is `PrePaid`. Default to `false`.
        /// </summary>
        [Input("autoRenew")]
        public Input<bool>? AutoRenew { get; set; }

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

        /// <summary>
        /// Specifies whether to use a coupon. Default to: `false`.
        /// </summary>
        [Input("autoUseCoupon")]
        public Input<bool>? AutoUseCoupon { get; set; }

        /// <summary>
        /// It has been deprecated from provider version 1.101.0 and `zone_id` instead.
        /// </summary>
        [Input("availabilityZone")]
        public Input<string>? AvailabilityZone { get; set; }

        /// <summary>
        /// The ID of the backup file of the source instance.
        /// </summary>
        [Input("backupId")]
        public Input<string>? BackupId { get; set; }

        [Input("backupPeriods")]
        private InputList<string>? _backupPeriods;

        /// <summary>
        /// Backup period.
        /// </summary>
        public InputList<string> BackupPeriods
        {
            get => _backupPeriods ?? (_backupPeriods = new InputList<string>());
            set => _backupPeriods = value;
        }

        /// <summary>
        /// Backup time, the format is HH:mmZ-HH:mmZ (UTC time).
        /// </summary>
        [Input("backupTime")]
        public Input<string>? BackupTime { get; set; }

        /// <summary>
        /// The ID of the event or the business information.
        /// </summary>
        [Input("businessInfo")]
        public Input<string>? BusinessInfo { get; set; }

        /// <summary>
        /// The storage capacity of the KVStore DBInstance. Unit: MB.
        /// </summary>
        [Input("capacity")]
        public Input<int>? Capacity { get; set; }

        [Input("config")]
        private InputMap<object>? _config;

        /// <summary>
        /// The configuration of the KVStore DBInstance. Available parameters can refer to the latest docs [Instance configurations table](https://www.alibabacloud.com/help/doc-detail/61209.htm) .
        /// </summary>
        public InputMap<object> Config
        {
            get => _config ?? (_config = new InputMap<object>());
            set => _config = value;
        }

        /// <summary>
        /// It has been deprecated from provider version 1.101.0 and resource `alicloud.kvstore.Connection` instead.
        /// </summary>
        [Input("connectionStringPrefix")]
        public Input<string>? ConnectionStringPrefix { get; set; }

        /// <summary>
        /// The coupon code. Default to: `youhuiquan_promotion_option_id_for_blank`.
        /// </summary>
        [Input("couponNo")]
        public Input<string>? CouponNo { get; set; }

        /// <summary>
        /// The name of KVStore DBInstance. It is a string of 2 to 256 characters.
        /// </summary>
        [Input("dbInstanceName")]
        public Input<string>? DbInstanceName { get; set; }

        /// <summary>
        /// The ID of the dedicated cluster. This parameter is required when you create an ApsaraDB for Redis instance in a dedicated cluster.
        /// </summary>
        [Input("dedicatedHostGroupId")]
        public Input<string>? DedicatedHostGroupId { get; set; }

        /// <summary>
        /// Specifies whether to precheck the request. Valid values:
        /// * true: prechecks the request without creating an instance. The system prechecks the required parameters, request format, service limits, and available resources. If the request fails the precheck, the corresponding error message is returned. If the request passes the precheck, the DryRunOperation error code is returned.
        /// * false: checks the request. After the request passes the check, an instance is created.
        /// </summary>
        [Input("dryRun")]
        public Input<bool>? DryRun { get; set; }

        /// <summary>
        /// The time when the database is switched after the instance is migrated, 
        /// or when the major version is upgraded, or when the instance class is upgraded. Valid values:
        /// - Immediately (Default): The configurations are immediately changed.
        /// - MaintainTime: The configurations are changed within the maintenance window. You can set `maintain_start_time` and `maintain_end_time` to change the maintenance window.
        /// </summary>
        [Input("effectiveTime")]
        public Input<string>? EffectiveTime { get; set; }

        /// <summary>
        /// Turn on or off incremental backup. Valid values: `1`, `0`. Default to `0`
        /// </summary>
        [Input("enableBackupLog")]
        public Input<int>? EnableBackupLog { get; set; }

        /// <summary>
        /// It has been deprecated from provider version 1.101.0 and resource `alicloud.kvstore.Connection` instead.
        /// </summary>
        [Input("enablePublic")]
        public Input<bool>? EnablePublic { get; set; }

        /// <summary>
        /// The Custom key ID, which you can get by calling DescribeEncryptionKeyList.If this parameter is not passed, the key is automatically generated by the key management service. To create a custom key, you can call the CreateKey interface of the key management service.
        /// </summary>
        [Input("encryptionKey")]
        public Input<string>? EncryptionKey { get; set; }

        /// <summary>
        /// The Encryption algorithm, default AES-CTR-256.Note that this parameter is only available when the TDEStatus parameter is Enabled.
        /// </summary>
        [Input("encryptionName")]
        public Input<string>? EncryptionName { get; set; }

        /// <summary>
        /// The engine version of the KVStore DBInstance. Valid values: ["2.8", "4.0", "5.0", "6.0", "7.0"]. Default to "5.0".
        /// **NOTE:** When `instance_type = Memcache`, the `engine_version` only supports "4.0".
        /// </summary>
        [Input("engineVersion")]
        public Input<string>? EngineVersion { get; set; }

        /// <summary>
        /// Specifies whether to forcibly change the type. Default to: `true`.
        /// </summary>
        [Input("forceUpgrade")]
        public Input<bool>? ForceUpgrade { get; set; }

        /// <summary>
        /// Whether to create a distributed cache. Default to: `false`.
        /// </summary>
        [Input("globalInstance")]
        public Input<bool>? GlobalInstance { get; set; }

        /// <summary>
        /// The ID of distributed cache.
        /// </summary>
        [Input("globalInstanceId")]
        public Input<string>? GlobalInstanceId { get; set; }

        /// <summary>
        /// It has been deprecated from provider version 1.101.0 and `payment_type` instead.
        /// </summary>
        [Input("instanceChargeType")]
        public Input<string>? InstanceChargeType { get; set; }

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

        /// <summary>
        /// It has been deprecated from provider version 1.101.0 and `db_instance_name` instead.
        /// </summary>
        [Input("instanceName")]
        public Input<string>? InstanceName { get; set; }

        /// <summary>
        /// Whether to open the release protection.
        /// </summary>
        [Input("instanceReleaseProtection")]
        public Input<bool>? InstanceReleaseProtection { get; set; }

        /// <summary>
        /// The engine type of the KVStore DBInstance. Valid values: `Redis` or `Memcache`. Defaults to `Redis`.
        /// </summary>
        [Input("instanceType")]
        public Input<string>? InstanceType { get; set; }

        /// <summary>
        /// An KMS encrypts password used to an instance. If the `password` is filled in, this field will be ignored.
        /// </summary>
        [Input("kmsEncryptedPassword")]
        public Input<string>? KmsEncryptedPassword { get; set; }

        [Input("kmsEncryptionContext")]
        private InputMap<object>? _kmsEncryptionContext;

        /// <summary>
        /// An KMS encryption context used to decrypt `kms_encrypted_password` before creating or updating instance with `kms_encrypted_password`. See [Encryption Context](https://www.alibabacloud.com/help/doc-detail/42975.htm). It is valid when `kms_encrypted_password` is set.
        /// </summary>
        public InputMap<object> KmsEncryptionContext
        {
            get => _kmsEncryptionContext ?? (_kmsEncryptionContext = new InputMap<object>());
            set => _kmsEncryptionContext = value;
        }

        /// <summary>
        /// The end time of the operation and maintenance time period of the KVStore DBInstance, in the format of HH:mmZ (UTC time).
        /// </summary>
        [Input("maintainEndTime")]
        public Input<string>? MaintainEndTime { get; set; }

        /// <summary>
        /// The start time of the operation and maintenance time period of the KVStore DBInstance, in the format of HH:mmZ (UTC time).
        /// </summary>
        [Input("maintainStartTime")]
        public Input<string>? MaintainStartTime { get; set; }

        /// <summary>
        /// The method of modifying the whitelist. Valid values: `0`, `1` and `2`. Default to `0`. `0` means overwrites the original whitelist. `1` means adds the IP addresses to the whitelist. `2` means deletes the IP addresses from the whitelist.
        /// </summary>
        [Input("modifyMode")]
        public Input<int>? ModifyMode { get; set; }

        /// <summary>
        /// "Field 'node_type' has been deprecated from version 1.120.1". This parameter is determined by the `instance_class`.
        /// </summary>
        [Input("nodeType")]
        public Input<string>? NodeType { get; set; }

        /// <summary>
        /// Specifies a change type when you change the configuration of a subscription instance. Valid values: `UPGRADE`, `DOWNGRADE`. Default to `UPGRADE`. `UPGRADE` means upgrades the configuration of a subscription instance. `DOWNGRADE` means downgrades the configuration of a subscription instance.
        /// </summary>
        [Input("orderType")]
        public Input<string>? OrderType { get; set; }

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

        /// <summary>
        /// It has been deprecated from provider version 1.101.0 and `config` instead..
        /// </summary>
        [Obsolete(@"Field 'parameters' has been deprecated from version 1.101.0. Use 'config' instead.")]
        public InputList<Inputs.InstanceParameterArgs> Parameters
        {
            get => _parameters ?? (_parameters = new InputList<Inputs.InstanceParameterArgs>());
            set => _parameters = value;
        }

        /// <summary>
        /// The password of the KVStore DBInstance. The password that is used to connect to the instance. The password must be 8 to 32 characters in length and must contain at least three of the following character types: uppercase letters, lowercase letters, special characters, and digits. Special characters include: `! @ # $ % ^ &amp; * ( ) _ + - =`
        /// </summary>
        [Input("password")]
        public Input<string>? Password { get; set; }

        /// <summary>
        /// The billing method of the KVStore DBInstance. Valid values: `PrePaid`, `PostPaid`. Default to `PostPaid`.
        /// </summary>
        [Input("paymentType")]
        public Input<string>? PaymentType { get; set; }

        /// <summary>
        /// The duration that you will buy KVStore DBInstance (in month). It is valid when payment_type is `PrePaid`. Valid values: `[1~9]`, `12`, `24`, `36`.
        /// </summary>
        [Input("period")]
        public Input<string>? Period { get; set; }

        /// <summary>
        /// It has been deprecated from provider version 1.101.0 and resource `alicloud.kvstore.Connection` instead.
        /// </summary>
        [Input("port")]
        public Input<int>? Port { get; set; }

        /// <summary>
        /// Private network connection port, used to modify the private network connection port.
        /// </summary>
        [Input("privateConnectionPort")]
        public Input<string>? PrivateConnectionPort { get; set; }

        /// <summary>
        /// Private network connection prefix, used to modify the private network connection address. Only supports updating private network connections for existing instance.
        /// </summary>
        [Input("privateConnectionPrefix")]
        public Input<string>? PrivateConnectionPrefix { get; set; }

        /// <summary>
        /// The internal IP address of the instance.
        /// </summary>
        [Input("privateIp")]
        public Input<string>? PrivateIp { get; set; }

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

        /// <summary>
        /// The point in time of a backup file.
        /// </summary>
        [Input("restoreTime")]
        public Input<string>? RestoreTime { get; set; }

        /// <summary>
        /// The Specify the global resource descriptor ARN (Alibaba Cloud Resource Name) information of the role to be authorized, and use the related key management services after the authorization is completed, in the format: `acs:ram::$accountID:role/$roleName`.
        /// </summary>
        [Input("roleArn")]
        public Input<string>? RoleArn { get; set; }

        /// <summary>
        /// The ID of the secondary zone to which you want to migrate the ApsaraDB for Redis instance.
        /// </summary>
        [Input("secondaryZoneId")]
        public Input<string>? SecondaryZoneId { get; set; }

        /// <summary>
        /// The ID of security groups.
        /// </summary>
        [Input("securityGroupId")]
        public Input<string>? SecurityGroupId { get; set; }

        /// <summary>
        /// The value of this parameter is empty by default. The attribute of the whitelist group. The console does not display the whitelist group whose value of this parameter is hidden.
        /// </summary>
        [Input("securityIpGroupAttribute")]
        public Input<string>? SecurityIpGroupAttribute { get; set; }

        /// <summary>
        /// The name of the whitelist group.
        /// </summary>
        [Input("securityIpGroupName")]
        public Input<string>? SecurityIpGroupName { get; set; }

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

        /// <summary>
        /// The IP addresses in the whitelist group. The maximum number of IP addresses in the whitelist group is 1000.
        /// </summary>
        public InputList<string> SecurityIps
        {
            get => _securityIps ?? (_securityIps = new InputList<string>());
            set => _securityIps = value;
        }

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

        /// <summary>
        /// Modifies the SSL status. Valid values: `Disable`, `Enable` and `Update`. 
        /// Note: This functionality is supported by Cluster mode (Redis 2.8, 4.0, 5.0) and Standard mode( Redis 2.8 only)
        /// </summary>
        [Input("sslEnable")]
        public Input<string>? SslEnable { get; set; }

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

        /// <summary>
        /// A mapping of tags to assign to the resource.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        /// <summary>
        /// The Is the TDE encryption function on. The TDE function cannot be switched off for the time being. Please assess whether it will affect your business before switching it on. Valid values: `Enabled`, `Disabled`.
        /// </summary>
        [Input("tdeStatus")]
        public Input<string>? TdeStatus { get; set; }

        /// <summary>
        /// Only meaningful if instance_type is `Redis` and network type is VPC. Valid values: `Close`, `Open`. Defaults to `Open`.  `Close` means the redis instance can be accessed without authentication. `Open` means authentication is required.
        /// </summary>
        [Input("vpcAuthMode")]
        public Input<string>? VpcAuthMode { get; set; }

        /// <summary>
        /// The ID of VSwitch.
        /// </summary>
        [Input("vswitchId")]
        public Input<string>? VswitchId { get; set; }

        /// <summary>
        /// The ID of the zone.
        /// </summary>
        [Input("zoneId")]
        public Input<string>? ZoneId { get; set; }

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

    public sealed class InstanceState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Whether to renewal a KVStore DBInstance automatically or not. It is valid when payment_type is `PrePaid`. Default to `false`.
        /// </summary>
        [Input("autoRenew")]
        public Input<bool>? AutoRenew { get; set; }

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

        /// <summary>
        /// Specifies whether to use a coupon. Default to: `false`.
        /// </summary>
        [Input("autoUseCoupon")]
        public Input<bool>? AutoUseCoupon { get; set; }

        /// <summary>
        /// It has been deprecated from provider version 1.101.0 and `zone_id` instead.
        /// </summary>
        [Input("availabilityZone")]
        public Input<string>? AvailabilityZone { get; set; }

        /// <summary>
        /// The ID of the backup file of the source instance.
        /// </summary>
        [Input("backupId")]
        public Input<string>? BackupId { get; set; }

        [Input("backupPeriods")]
        private InputList<string>? _backupPeriods;

        /// <summary>
        /// Backup period.
        /// </summary>
        public InputList<string> BackupPeriods
        {
            get => _backupPeriods ?? (_backupPeriods = new InputList<string>());
            set => _backupPeriods = value;
        }

        /// <summary>
        /// Backup time, the format is HH:mmZ-HH:mmZ (UTC time).
        /// </summary>
        [Input("backupTime")]
        public Input<string>? BackupTime { get; set; }

        /// <summary>
        /// The bandwidth.
        /// </summary>
        [Input("bandwidth")]
        public Input<int>? Bandwidth { get; set; }

        /// <summary>
        /// The ID of the event or the business information.
        /// </summary>
        [Input("businessInfo")]
        public Input<string>? BusinessInfo { get; set; }

        /// <summary>
        /// The storage capacity of the KVStore DBInstance. Unit: MB.
        /// </summary>
        [Input("capacity")]
        public Input<int>? Capacity { get; set; }

        [Input("config")]
        private InputMap<object>? _config;

        /// <summary>
        /// The configuration of the KVStore DBInstance. Available parameters can refer to the latest docs [Instance configurations table](https://www.alibabacloud.com/help/doc-detail/61209.htm) .
        /// </summary>
        public InputMap<object> Config
        {
            get => _config ?? (_config = new InputMap<object>());
            set => _config = value;
        }

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

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

        /// <summary>
        /// It has been deprecated from provider version 1.101.0 and resource `alicloud.kvstore.Connection` instead.
        /// </summary>
        [Input("connectionStringPrefix")]
        public Input<string>? ConnectionStringPrefix { get; set; }

        /// <summary>
        /// The coupon code. Default to: `youhuiquan_promotion_option_id_for_blank`.
        /// </summary>
        [Input("couponNo")]
        public Input<string>? CouponNo { get; set; }

        /// <summary>
        /// The name of KVStore DBInstance. It is a string of 2 to 256 characters.
        /// </summary>
        [Input("dbInstanceName")]
        public Input<string>? DbInstanceName { get; set; }

        /// <summary>
        /// The ID of the dedicated cluster. This parameter is required when you create an ApsaraDB for Redis instance in a dedicated cluster.
        /// </summary>
        [Input("dedicatedHostGroupId")]
        public Input<string>? DedicatedHostGroupId { get; set; }

        /// <summary>
        /// Specifies whether to precheck the request. Valid values:
        /// * true: prechecks the request without creating an instance. The system prechecks the required parameters, request format, service limits, and available resources. If the request fails the precheck, the corresponding error message is returned. If the request passes the precheck, the DryRunOperation error code is returned.
        /// * false: checks the request. After the request passes the check, an instance is created.
        /// </summary>
        [Input("dryRun")]
        public Input<bool>? DryRun { get; set; }

        /// <summary>
        /// The time when the database is switched after the instance is migrated, 
        /// or when the major version is upgraded, or when the instance class is upgraded. Valid values:
        /// - Immediately (Default): The configurations are immediately changed.
        /// - MaintainTime: The configurations are changed within the maintenance window. You can set `maintain_start_time` and `maintain_end_time` to change the maintenance window.
        /// </summary>
        [Input("effectiveTime")]
        public Input<string>? EffectiveTime { get; set; }

        /// <summary>
        /// Turn on or off incremental backup. Valid values: `1`, `0`. Default to `0`
        /// </summary>
        [Input("enableBackupLog")]
        public Input<int>? EnableBackupLog { get; set; }

        /// <summary>
        /// It has been deprecated from provider version 1.101.0 and resource `alicloud.kvstore.Connection` instead.
        /// </summary>
        [Input("enablePublic")]
        public Input<bool>? EnablePublic { get; set; }

        /// <summary>
        /// The Custom key ID, which you can get by calling DescribeEncryptionKeyList.If this parameter is not passed, the key is automatically generated by the key management service. To create a custom key, you can call the CreateKey interface of the key management service.
        /// </summary>
        [Input("encryptionKey")]
        public Input<string>? EncryptionKey { get; set; }

        /// <summary>
        /// The Encryption algorithm, default AES-CTR-256.Note that this parameter is only available when the TDEStatus parameter is Enabled.
        /// </summary>
        [Input("encryptionName")]
        public Input<string>? EncryptionName { get; set; }

        /// <summary>
        /// The expiration time of the prepaid instance.
        /// </summary>
        [Input("endTime")]
        public Input<string>? EndTime { get; set; }

        /// <summary>
        /// The engine version of the KVStore DBInstance. Valid values: ["2.8", "4.0", "5.0", "6.0", "7.0"]. Default to "5.0".
        /// **NOTE:** When `instance_type = Memcache`, the `engine_version` only supports "4.0".
        /// </summary>
        [Input("engineVersion")]
        public Input<string>? EngineVersion { get; set; }

        /// <summary>
        /// Specifies whether to forcibly change the type. Default to: `true`.
        /// </summary>
        [Input("forceUpgrade")]
        public Input<bool>? ForceUpgrade { get; set; }

        /// <summary>
        /// Whether to create a distributed cache. Default to: `false`.
        /// </summary>
        [Input("globalInstance")]
        public Input<bool>? GlobalInstance { get; set; }

        /// <summary>
        /// The ID of distributed cache.
        /// </summary>
        [Input("globalInstanceId")]
        public Input<string>? GlobalInstanceId { get; set; }

        /// <summary>
        /// It has been deprecated from provider version 1.101.0 and `payment_type` instead.
        /// </summary>
        [Input("instanceChargeType")]
        public Input<string>? InstanceChargeType { get; set; }

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

        /// <summary>
        /// It has been deprecated from provider version 1.101.0 and `db_instance_name` instead.
        /// </summary>
        [Input("instanceName")]
        public Input<string>? InstanceName { get; set; }

        /// <summary>
        /// Whether to open the release protection.
        /// </summary>
        [Input("instanceReleaseProtection")]
        public Input<bool>? InstanceReleaseProtection { get; set; }

        /// <summary>
        /// The engine type of the KVStore DBInstance. Valid values: `Redis` or `Memcache`. Defaults to `Redis`.
        /// </summary>
        [Input("instanceType")]
        public Input<string>? InstanceType { get; set; }

        /// <summary>
        /// An KMS encrypts password used to an instance. If the `password` is filled in, this field will be ignored.
        /// </summary>
        [Input("kmsEncryptedPassword")]
        public Input<string>? KmsEncryptedPassword { get; set; }

        [Input("kmsEncryptionContext")]
        private InputMap<object>? _kmsEncryptionContext;

        /// <summary>
        /// An KMS encryption context used to decrypt `kms_encrypted_password` before creating or updating instance with `kms_encrypted_password`. See [Encryption Context](https://www.alibabacloud.com/help/doc-detail/42975.htm). It is valid when `kms_encrypted_password` is set.
        /// </summary>
        public InputMap<object> KmsEncryptionContext
        {
            get => _kmsEncryptionContext ?? (_kmsEncryptionContext = new InputMap<object>());
            set => _kmsEncryptionContext = value;
        }

        /// <summary>
        /// The end time of the operation and maintenance time period of the KVStore DBInstance, in the format of HH:mmZ (UTC time).
        /// </summary>
        [Input("maintainEndTime")]
        public Input<string>? MaintainEndTime { get; set; }

        /// <summary>
        /// The start time of the operation and maintenance time period of the KVStore DBInstance, in the format of HH:mmZ (UTC time).
        /// </summary>
        [Input("maintainStartTime")]
        public Input<string>? MaintainStartTime { get; set; }

        /// <summary>
        /// The method of modifying the whitelist. Valid values: `0`, `1` and `2`. Default to `0`. `0` means overwrites the original whitelist. `1` means adds the IP addresses to the whitelist. `2` means deletes the IP addresses from the whitelist.
        /// </summary>
        [Input("modifyMode")]
        public Input<int>? ModifyMode { get; set; }

        /// <summary>
        /// "Field 'node_type' has been deprecated from version 1.120.1". This parameter is determined by the `instance_class`.
        /// </summary>
        [Input("nodeType")]
        public Input<string>? NodeType { get; set; }

        /// <summary>
        /// Specifies a change type when you change the configuration of a subscription instance. Valid values: `UPGRADE`, `DOWNGRADE`. Default to `UPGRADE`. `UPGRADE` means upgrades the configuration of a subscription instance. `DOWNGRADE` means downgrades the configuration of a subscription instance.
        /// </summary>
        [Input("orderType")]
        public Input<string>? OrderType { get; set; }

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

        /// <summary>
        /// It has been deprecated from provider version 1.101.0 and `config` instead..
        /// </summary>
        [Obsolete(@"Field 'parameters' has been deprecated from version 1.101.0. Use 'config' instead.")]
        public InputList<Inputs.InstanceParameterGetArgs> Parameters
        {
            get => _parameters ?? (_parameters = new InputList<Inputs.InstanceParameterGetArgs>());
            set => _parameters = value;
        }

        /// <summary>
        /// The password of the KVStore DBInstance. The password that is used to connect to the instance. The password must be 8 to 32 characters in length and must contain at least three of the following character types: uppercase letters, lowercase letters, special characters, and digits. Special characters include: `! @ # $ % ^ &amp; * ( ) _ + - =`
        /// </summary>
        [Input("password")]
        public Input<string>? Password { get; set; }

        /// <summary>
        /// The billing method of the KVStore DBInstance. Valid values: `PrePaid`, `PostPaid`. Default to `PostPaid`.
        /// </summary>
        [Input("paymentType")]
        public Input<string>? PaymentType { get; set; }

        /// <summary>
        /// The duration that you will buy KVStore DBInstance (in month). It is valid when payment_type is `PrePaid`. Valid values: `[1~9]`, `12`, `24`, `36`.
        /// </summary>
        [Input("period")]
        public Input<string>? Period { get; set; }

        /// <summary>
        /// It has been deprecated from provider version 1.101.0 and resource `alicloud.kvstore.Connection` instead.
        /// </summary>
        [Input("port")]
        public Input<int>? Port { get; set; }

        /// <summary>
        /// Private network connection port, used to modify the private network connection port.
        /// </summary>
        [Input("privateConnectionPort")]
        public Input<string>? PrivateConnectionPort { get; set; }

        /// <summary>
        /// Private network connection prefix, used to modify the private network connection address. Only supports updating private network connections for existing instance.
        /// </summary>
        [Input("privateConnectionPrefix")]
        public Input<string>? PrivateConnectionPrefix { get; set; }

        /// <summary>
        /// The internal IP address of the instance.
        /// </summary>
        [Input("privateIp")]
        public Input<string>? PrivateIp { get; set; }

        /// <summary>
        /// Theoretical maximum QPS value.
        /// </summary>
        [Input("qps")]
        public Input<int>? Qps { get; set; }

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

        /// <summary>
        /// The point in time of a backup file.
        /// </summary>
        [Input("restoreTime")]
        public Input<string>? RestoreTime { get; set; }

        /// <summary>
        /// The Specify the global resource descriptor ARN (Alibaba Cloud Resource Name) information of the role to be authorized, and use the related key management services after the authorization is completed, in the format: `acs:ram::$accountID:role/$roleName`.
        /// </summary>
        [Input("roleArn")]
        public Input<string>? RoleArn { get; set; }

        /// <summary>
        /// The ID of the secondary zone to which you want to migrate the ApsaraDB for Redis instance.
        /// </summary>
        [Input("secondaryZoneId")]
        public Input<string>? SecondaryZoneId { get; set; }

        /// <summary>
        /// The ID of security groups.
        /// </summary>
        [Input("securityGroupId")]
        public Input<string>? SecurityGroupId { get; set; }

        /// <summary>
        /// The value of this parameter is empty by default. The attribute of the whitelist group. The console does not display the whitelist group whose value of this parameter is hidden.
        /// </summary>
        [Input("securityIpGroupAttribute")]
        public Input<string>? SecurityIpGroupAttribute { get; set; }

        /// <summary>
        /// The name of the whitelist group.
        /// </summary>
        [Input("securityIpGroupName")]
        public Input<string>? SecurityIpGroupName { get; set; }

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

        /// <summary>
        /// The IP addresses in the whitelist group. The maximum number of IP addresses in the whitelist group is 1000.
        /// </summary>
        public InputList<string> SecurityIps
        {
            get => _securityIps ?? (_securityIps = new InputList<string>());
            set => _securityIps = value;
        }

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

        /// <summary>
        /// Modifies the SSL status. Valid values: `Disable`, `Enable` and `Update`. 
        /// Note: This functionality is supported by Cluster mode (Redis 2.8, 4.0, 5.0) and Standard mode( Redis 2.8 only)
        /// </summary>
        [Input("sslEnable")]
        public Input<string>? SslEnable { get; set; }

        /// <summary>
        /// The status of KVStore DBInstance.
        /// * `connection_domain`- Intranet connection address of the KVStore instance.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

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

        /// <summary>
        /// A mapping of tags to assign to the resource.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        /// <summary>
        /// The Is the TDE encryption function on. The TDE function cannot be switched off for the time being. Please assess whether it will affect your business before switching it on. Valid values: `Enabled`, `Disabled`.
        /// </summary>
        [Input("tdeStatus")]
        public Input<string>? TdeStatus { get; set; }

        /// <summary>
        /// Only meaningful if instance_type is `Redis` and network type is VPC. Valid values: `Close`, `Open`. Defaults to `Open`.  `Close` means the redis instance can be accessed without authentication. `Open` means authentication is required.
        /// </summary>
        [Input("vpcAuthMode")]
        public Input<string>? VpcAuthMode { get; set; }

        /// <summary>
        /// The ID of VSwitch.
        /// </summary>
        [Input("vswitchId")]
        public Input<string>? VswitchId { get; set; }

        /// <summary>
        /// The ID of the zone.
        /// </summary>
        [Input("zoneId")]
        public Input<string>? ZoneId { get; set; }

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