// *** 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.Tctest.Elasticsearch
{
    [TctestResourceType("tctest:Elasticsearch/instance:Instance")]
    public partial class Instance : Pulumi.CustomResource
    {
        /// <summary>
        /// Availability zone. When create multi-az es, this parameter must be omitted.
        /// </summary>
        [Output("availabilityZone")]
        public Output<string?> AvailabilityZone { get; private set; } = null!;

        /// <summary>
        /// Whether to enable X-Pack security authentication in Basic Edition 6.8 and above. Valid values are `1` and `2`. `1` is
        /// disabled, `2` is enabled, and default value is `1`.
        /// </summary>
        [Output("basicSecurityType")]
        public Output<int?> BasicSecurityType { get; private set; } = null!;

        /// <summary>
        /// The tenancy of the prepaid instance, and uint is month. NOTE: it only works when charge_type is set to `PREPAID`.
        /// </summary>
        [Output("chargePeriod")]
        public Output<int?> ChargePeriod { get; private set; } = null!;

        /// <summary>
        /// The charge type of instance. Valid values are `PREPAID` and `POSTPAID_BY_HOUR`.
        /// </summary>
        [Output("chargeType")]
        public Output<string?> ChargeType { get; private set; } = null!;

        /// <summary>
        /// Instance creation time.
        /// </summary>
        [Output("createTime")]
        public Output<string> CreateTime { get; private set; } = null!;

        /// <summary>
        /// Cluster deployment mode. Valid values are `0` and `1`. `0` is single-AZ deployment, and `1` is multi-AZ deployment.
        /// Default value is `0`.
        /// </summary>
        [Output("deployMode")]
        public Output<int?> DeployMode { get; private set; } = null!;

        /// <summary>
        /// Elasticsearch domain name.
        /// </summary>
        [Output("elasticsearchDomain")]
        public Output<string> ElasticsearchDomain { get; private set; } = null!;

        /// <summary>
        /// Elasticsearch port.
        /// </summary>
        [Output("elasticsearchPort")]
        public Output<int> ElasticsearchPort { get; private set; } = null!;

        /// <summary>
        /// Elasticsearch VIP.
        /// </summary>
        [Output("elasticsearchVip")]
        public Output<string> ElasticsearchVip { get; private set; } = null!;

        /// <summary>
        /// Name of the instance, which can contain 1 to 50 English letters, Chinese characters, digits, dashes(-), or
        /// underscores(_).
        /// </summary>
        [Output("instanceName")]
        public Output<string?> InstanceName { get; private set; } = null!;

        /// <summary>
        /// Kibana access URL.
        /// </summary>
        [Output("kibanaUrl")]
        public Output<string> KibanaUrl { get; private set; } = null!;

        /// <summary>
        /// License type. Valid values are `oss`, `basic` and `platinum`. The default value is `platinum`.
        /// </summary>
        [Output("licenseType")]
        public Output<string?> LicenseType { get; private set; } = null!;

        /// <summary>
        /// Details of AZs in multi-AZ deployment mode (which is required when deploy_mode is `1`).
        /// </summary>
        [Output("multiZoneInfos")]
        public Output<ImmutableArray<Outputs.InstanceMultiZoneInfo>> MultiZoneInfos { get; private set; } = null!;

        /// <summary>
        /// Node information list, which is used to describe the specification information of various types of nodes in the cluster,
        /// such as node type, node quantity, node specification, disk type, and disk size.
        /// </summary>
        [Output("nodeInfoLists")]
        public Output<ImmutableArray<Outputs.InstanceNodeInfoList>> NodeInfoLists { get; private set; } = null!;

        /// <summary>
        /// Password to an instance.
        /// </summary>
        [Output("password")]
        public Output<string> Password { get; private set; } = null!;

        /// <summary>
        /// When enabled, the instance will be renew automatically when it reach the end of the prepaid tenancy. Valid values are
        /// `RENEW_FLAG_AUTO` and `RENEW_FLAG_MANUAL`. NOTE: it only works when charge_type is set to `PREPAID`.
        /// </summary>
        [Output("renewFlag")]
        public Output<string?> RenewFlag { get; private set; } = null!;

        /// <summary>
        /// The ID of a VPC subnetwork. When create multi-az es, this parameter must be omitted.
        /// </summary>
        [Output("subnetId")]
        public Output<string?> SubnetId { get; private set; } = null!;

        /// <summary>
        /// A mapping of tags to assign to the instance. For tag limits, please refer to [Use
        /// Limits](https://intl.cloud.tencent.com/document/product/651/13354).
        /// </summary>
        [Output("tags")]
        public Output<ImmutableDictionary<string, object>?> Tags { get; private set; } = null!;

        /// <summary>
        /// Version of the instance. Valid values are `5.6.4`, `6.4.3`, `6.8.2` and `7.5.1`.
        /// </summary>
        [Output("version")]
        public Output<string> Version { get; private set; } = null!;

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

        /// <summary>
        /// Visual node configuration.
        /// </summary>
        [Output("webNodeTypeInfos")]
        public Output<ImmutableArray<Outputs.InstanceWebNodeTypeInfo>> WebNodeTypeInfos { get; private set; } = null!;


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

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

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
            };
            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 : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Availability zone. When create multi-az es, this parameter must be omitted.
        /// </summary>
        [Input("availabilityZone")]
        public Input<string>? AvailabilityZone { get; set; }

        /// <summary>
        /// Whether to enable X-Pack security authentication in Basic Edition 6.8 and above. Valid values are `1` and `2`. `1` is
        /// disabled, `2` is enabled, and default value is `1`.
        /// </summary>
        [Input("basicSecurityType")]
        public Input<int>? BasicSecurityType { get; set; }

        /// <summary>
        /// The tenancy of the prepaid instance, and uint is month. NOTE: it only works when charge_type is set to `PREPAID`.
        /// </summary>
        [Input("chargePeriod")]
        public Input<int>? ChargePeriod { get; set; }

        /// <summary>
        /// The charge type of instance. Valid values are `PREPAID` and `POSTPAID_BY_HOUR`.
        /// </summary>
        [Input("chargeType")]
        public Input<string>? ChargeType { get; set; }

        /// <summary>
        /// Cluster deployment mode. Valid values are `0` and `1`. `0` is single-AZ deployment, and `1` is multi-AZ deployment.
        /// Default value is `0`.
        /// </summary>
        [Input("deployMode")]
        public Input<int>? DeployMode { get; set; }

        /// <summary>
        /// Name of the instance, which can contain 1 to 50 English letters, Chinese characters, digits, dashes(-), or
        /// underscores(_).
        /// </summary>
        [Input("instanceName")]
        public Input<string>? InstanceName { get; set; }

        /// <summary>
        /// License type. Valid values are `oss`, `basic` and `platinum`. The default value is `platinum`.
        /// </summary>
        [Input("licenseType")]
        public Input<string>? LicenseType { get; set; }

        [Input("multiZoneInfos")]
        private InputList<Inputs.InstanceMultiZoneInfoArgs>? _multiZoneInfos;

        /// <summary>
        /// Details of AZs in multi-AZ deployment mode (which is required when deploy_mode is `1`).
        /// </summary>
        public InputList<Inputs.InstanceMultiZoneInfoArgs> MultiZoneInfos
        {
            get => _multiZoneInfos ?? (_multiZoneInfos = new InputList<Inputs.InstanceMultiZoneInfoArgs>());
            set => _multiZoneInfos = value;
        }

        [Input("nodeInfoLists", required: true)]
        private InputList<Inputs.InstanceNodeInfoListArgs>? _nodeInfoLists;

        /// <summary>
        /// Node information list, which is used to describe the specification information of various types of nodes in the cluster,
        /// such as node type, node quantity, node specification, disk type, and disk size.
        /// </summary>
        public InputList<Inputs.InstanceNodeInfoListArgs> NodeInfoLists
        {
            get => _nodeInfoLists ?? (_nodeInfoLists = new InputList<Inputs.InstanceNodeInfoListArgs>());
            set => _nodeInfoLists = value;
        }

        /// <summary>
        /// Password to an instance.
        /// </summary>
        [Input("password", required: true)]
        public Input<string> Password { get; set; } = null!;

        /// <summary>
        /// When enabled, the instance will be renew automatically when it reach the end of the prepaid tenancy. Valid values are
        /// `RENEW_FLAG_AUTO` and `RENEW_FLAG_MANUAL`. NOTE: it only works when charge_type is set to `PREPAID`.
        /// </summary>
        [Input("renewFlag")]
        public Input<string>? RenewFlag { get; set; }

        /// <summary>
        /// The ID of a VPC subnetwork. When create multi-az es, this parameter must be omitted.
        /// </summary>
        [Input("subnetId")]
        public Input<string>? SubnetId { get; set; }

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

        /// <summary>
        /// A mapping of tags to assign to the instance. For tag limits, please refer to [Use
        /// Limits](https://intl.cloud.tencent.com/document/product/651/13354).
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        /// <summary>
        /// Version of the instance. Valid values are `5.6.4`, `6.4.3`, `6.8.2` and `7.5.1`.
        /// </summary>
        [Input("version", required: true)]
        public Input<string> Version { get; set; } = null!;

        /// <summary>
        /// The ID of a VPC network.
        /// </summary>
        [Input("vpcId", required: true)]
        public Input<string> VpcId { get; set; } = null!;

        [Input("webNodeTypeInfos")]
        private InputList<Inputs.InstanceWebNodeTypeInfoArgs>? _webNodeTypeInfos;

        /// <summary>
        /// Visual node configuration.
        /// </summary>
        public InputList<Inputs.InstanceWebNodeTypeInfoArgs> WebNodeTypeInfos
        {
            get => _webNodeTypeInfos ?? (_webNodeTypeInfos = new InputList<Inputs.InstanceWebNodeTypeInfoArgs>());
            set => _webNodeTypeInfos = value;
        }

        public InstanceArgs()
        {
        }
    }

    public sealed class InstanceState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Availability zone. When create multi-az es, this parameter must be omitted.
        /// </summary>
        [Input("availabilityZone")]
        public Input<string>? AvailabilityZone { get; set; }

        /// <summary>
        /// Whether to enable X-Pack security authentication in Basic Edition 6.8 and above. Valid values are `1` and `2`. `1` is
        /// disabled, `2` is enabled, and default value is `1`.
        /// </summary>
        [Input("basicSecurityType")]
        public Input<int>? BasicSecurityType { get; set; }

        /// <summary>
        /// The tenancy of the prepaid instance, and uint is month. NOTE: it only works when charge_type is set to `PREPAID`.
        /// </summary>
        [Input("chargePeriod")]
        public Input<int>? ChargePeriod { get; set; }

        /// <summary>
        /// The charge type of instance. Valid values are `PREPAID` and `POSTPAID_BY_HOUR`.
        /// </summary>
        [Input("chargeType")]
        public Input<string>? ChargeType { get; set; }

        /// <summary>
        /// Instance creation time.
        /// </summary>
        [Input("createTime")]
        public Input<string>? CreateTime { get; set; }

        /// <summary>
        /// Cluster deployment mode. Valid values are `0` and `1`. `0` is single-AZ deployment, and `1` is multi-AZ deployment.
        /// Default value is `0`.
        /// </summary>
        [Input("deployMode")]
        public Input<int>? DeployMode { get; set; }

        /// <summary>
        /// Elasticsearch domain name.
        /// </summary>
        [Input("elasticsearchDomain")]
        public Input<string>? ElasticsearchDomain { get; set; }

        /// <summary>
        /// Elasticsearch port.
        /// </summary>
        [Input("elasticsearchPort")]
        public Input<int>? ElasticsearchPort { get; set; }

        /// <summary>
        /// Elasticsearch VIP.
        /// </summary>
        [Input("elasticsearchVip")]
        public Input<string>? ElasticsearchVip { get; set; }

        /// <summary>
        /// Name of the instance, which can contain 1 to 50 English letters, Chinese characters, digits, dashes(-), or
        /// underscores(_).
        /// </summary>
        [Input("instanceName")]
        public Input<string>? InstanceName { get; set; }

        /// <summary>
        /// Kibana access URL.
        /// </summary>
        [Input("kibanaUrl")]
        public Input<string>? KibanaUrl { get; set; }

        /// <summary>
        /// License type. Valid values are `oss`, `basic` and `platinum`. The default value is `platinum`.
        /// </summary>
        [Input("licenseType")]
        public Input<string>? LicenseType { get; set; }

        [Input("multiZoneInfos")]
        private InputList<Inputs.InstanceMultiZoneInfoGetArgs>? _multiZoneInfos;

        /// <summary>
        /// Details of AZs in multi-AZ deployment mode (which is required when deploy_mode is `1`).
        /// </summary>
        public InputList<Inputs.InstanceMultiZoneInfoGetArgs> MultiZoneInfos
        {
            get => _multiZoneInfos ?? (_multiZoneInfos = new InputList<Inputs.InstanceMultiZoneInfoGetArgs>());
            set => _multiZoneInfos = value;
        }

        [Input("nodeInfoLists")]
        private InputList<Inputs.InstanceNodeInfoListGetArgs>? _nodeInfoLists;

        /// <summary>
        /// Node information list, which is used to describe the specification information of various types of nodes in the cluster,
        /// such as node type, node quantity, node specification, disk type, and disk size.
        /// </summary>
        public InputList<Inputs.InstanceNodeInfoListGetArgs> NodeInfoLists
        {
            get => _nodeInfoLists ?? (_nodeInfoLists = new InputList<Inputs.InstanceNodeInfoListGetArgs>());
            set => _nodeInfoLists = value;
        }

        /// <summary>
        /// Password to an instance.
        /// </summary>
        [Input("password")]
        public Input<string>? Password { get; set; }

        /// <summary>
        /// When enabled, the instance will be renew automatically when it reach the end of the prepaid tenancy. Valid values are
        /// `RENEW_FLAG_AUTO` and `RENEW_FLAG_MANUAL`. NOTE: it only works when charge_type is set to `PREPAID`.
        /// </summary>
        [Input("renewFlag")]
        public Input<string>? RenewFlag { get; set; }

        /// <summary>
        /// The ID of a VPC subnetwork. When create multi-az es, this parameter must be omitted.
        /// </summary>
        [Input("subnetId")]
        public Input<string>? SubnetId { get; set; }

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

        /// <summary>
        /// A mapping of tags to assign to the instance. For tag limits, please refer to [Use
        /// Limits](https://intl.cloud.tencent.com/document/product/651/13354).
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        /// <summary>
        /// Version of the instance. Valid values are `5.6.4`, `6.4.3`, `6.8.2` and `7.5.1`.
        /// </summary>
        [Input("version")]
        public Input<string>? Version { get; set; }

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

        [Input("webNodeTypeInfos")]
        private InputList<Inputs.InstanceWebNodeTypeInfoGetArgs>? _webNodeTypeInfos;

        /// <summary>
        /// Visual node configuration.
        /// </summary>
        public InputList<Inputs.InstanceWebNodeTypeInfoGetArgs> WebNodeTypeInfos
        {
            get => _webNodeTypeInfos ?? (_webNodeTypeInfos = new InputList<Inputs.InstanceWebNodeTypeInfoGetArgs>());
            set => _webNodeTypeInfos = value;
        }

        public InstanceState()
        {
        }
    }
}
