// *** 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.Emr
{
    [TctestResourceType("tctest:Emr/cluster:Cluster")]
    public partial class Cluster : Pulumi.CustomResource
    {
        /// <summary>
        /// Display strategy of EMR instance.
        /// </summary>
        [Output("displayStrategy")]
        public Output<string> DisplayStrategy { get; private set; } = null!;

        /// <summary>
        /// Access the external file system.
        /// </summary>
        [Output("extendFsField")]
        public Output<string?> ExtendFsField { get; private set; } = null!;

        /// <summary>
        /// Created EMR instance id.
        /// </summary>
        [Output("instanceId")]
        public Output<string> InstanceId { get; private set; } = null!;

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

        /// <summary>
        /// Instance login settings.
        /// </summary>
        [Output("loginSettings")]
        public Output<ImmutableDictionary<string, object>> LoginSettings { get; private set; } = null!;

        /// <summary>
        /// Whether to enable the cluster Master node public network. Value range: - NEED_MASTER_WAN: Indicates that the cluster
        /// Master node public network is enabled. - NOT_NEED_MASTER_WAN: Indicates that it is not turned on. By default, the
        /// cluster Master node internet is enabled.
        /// </summary>
        [Output("needMasterWan")]
        public Output<string?> NeedMasterWan { get; private set; } = null!;

        /// <summary>
        /// The pay mode of instance. 0 is pay on an annual basis, 1 is pay on a measure basis.
        /// </summary>
        [Output("payMode")]
        public Output<int> PayMode { get; private set; } = null!;

        /// <summary>
        /// The location of the instance.
        /// </summary>
        [Output("placement")]
        public Output<ImmutableDictionary<string, object>> Placement { get; private set; } = null!;

        /// <summary>
        /// The product id of EMR instance.
        /// </summary>
        [Output("productId")]
        public Output<int> ProductId { get; private set; } = null!;

        /// <summary>
        /// Resource specification of EMR instance.
        /// </summary>
        [Output("resourceSpec")]
        public Output<Outputs.ClusterResourceSpec?> ResourceSpec { get; private set; } = null!;

        /// <summary>
        /// The ID of the security group to which the instance belongs, in the form of sg-xxxxxxxx.
        /// </summary>
        [Output("sgId")]
        public Output<string?> SgId { get; private set; } = null!;

        /// <summary>
        /// The softwares of a EMR instance.
        /// </summary>
        [Output("softwares")]
        public Output<ImmutableArray<string>> Softwares { get; private set; } = null!;

        /// <summary>
        /// The flag whether the instance support high availability.(0=&gt;not support, 1=&gt;support).
        /// </summary>
        [Output("supportHa")]
        public Output<int> SupportHa { get; private set; } = null!;

        /// <summary>
        /// The length of time the instance was purchased. Use with TimeUnit.When TimeUnit is s, the parameter can only be filled in
        /// at 3600, representing a metered instance. When TimeUnit is m, the number filled in by this parameter indicates the
        /// length of purchase of the monthly instance of the package year, such as 1 for one month of purchase.
        /// </summary>
        [Output("timeSpan")]
        public Output<int> TimeSpan { get; private set; } = null!;

        /// <summary>
        /// The unit of time in which the instance was purchased. When PayMode is 0, TimeUnit can only take values of s(second).
        /// When PayMode is 1, TimeUnit can only take the value m(month).
        /// </summary>
        [Output("timeUnit")]
        public Output<string> TimeUnit { get; private set; } = null!;

        /// <summary>
        /// The private net config of EMR instance.
        /// </summary>
        [Output("vpcSettings")]
        public Output<ImmutableDictionary<string, object>> VpcSettings { 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("tctest:Emr/cluster:Cluster", name, args ?? new ClusterArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Cluster(string name, Input<string> id, ClusterState? state = null, CustomResourceOptions? options = null)
            : base("tctest:Emr/cluster:Cluster", 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 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 : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Display strategy of EMR instance.
        /// </summary>
        [Input("displayStrategy", required: true)]
        public Input<string> DisplayStrategy { get; set; } = null!;

        /// <summary>
        /// Access the external file system.
        /// </summary>
        [Input("extendFsField")]
        public Input<string>? ExtendFsField { get; set; }

        /// <summary>
        /// Name of the instance, which can contain 6 to 36 English letters, Chinese characters, digits, dashes(-), or
        /// underscores(_).
        /// </summary>
        [Input("instanceName", required: true)]
        public Input<string> InstanceName { get; set; } = null!;

        [Input("loginSettings", required: true)]
        private InputMap<object>? _loginSettings;

        /// <summary>
        /// Instance login settings.
        /// </summary>
        public InputMap<object> LoginSettings
        {
            get => _loginSettings ?? (_loginSettings = new InputMap<object>());
            set => _loginSettings = value;
        }

        /// <summary>
        /// Whether to enable the cluster Master node public network. Value range: - NEED_MASTER_WAN: Indicates that the cluster
        /// Master node public network is enabled. - NOT_NEED_MASTER_WAN: Indicates that it is not turned on. By default, the
        /// cluster Master node internet is enabled.
        /// </summary>
        [Input("needMasterWan")]
        public Input<string>? NeedMasterWan { get; set; }

        /// <summary>
        /// The pay mode of instance. 0 is pay on an annual basis, 1 is pay on a measure basis.
        /// </summary>
        [Input("payMode", required: true)]
        public Input<int> PayMode { get; set; } = null!;

        [Input("placement", required: true)]
        private InputMap<object>? _placement;

        /// <summary>
        /// The location of the instance.
        /// </summary>
        public InputMap<object> Placement
        {
            get => _placement ?? (_placement = new InputMap<object>());
            set => _placement = value;
        }

        /// <summary>
        /// The product id of EMR instance.
        /// </summary>
        [Input("productId", required: true)]
        public Input<int> ProductId { get; set; } = null!;

        /// <summary>
        /// Resource specification of EMR instance.
        /// </summary>
        [Input("resourceSpec")]
        public Input<Inputs.ClusterResourceSpecArgs>? ResourceSpec { get; set; }

        /// <summary>
        /// The ID of the security group to which the instance belongs, in the form of sg-xxxxxxxx.
        /// </summary>
        [Input("sgId")]
        public Input<string>? SgId { get; set; }

        [Input("softwares", required: true)]
        private InputList<string>? _softwares;

        /// <summary>
        /// The softwares of a EMR instance.
        /// </summary>
        public InputList<string> Softwares
        {
            get => _softwares ?? (_softwares = new InputList<string>());
            set => _softwares = value;
        }

        /// <summary>
        /// The flag whether the instance support high availability.(0=&gt;not support, 1=&gt;support).
        /// </summary>
        [Input("supportHa", required: true)]
        public Input<int> SupportHa { get; set; } = null!;

        /// <summary>
        /// The length of time the instance was purchased. Use with TimeUnit.When TimeUnit is s, the parameter can only be filled in
        /// at 3600, representing a metered instance. When TimeUnit is m, the number filled in by this parameter indicates the
        /// length of purchase of the monthly instance of the package year, such as 1 for one month of purchase.
        /// </summary>
        [Input("timeSpan", required: true)]
        public Input<int> TimeSpan { get; set; } = null!;

        /// <summary>
        /// The unit of time in which the instance was purchased. When PayMode is 0, TimeUnit can only take values of s(second).
        /// When PayMode is 1, TimeUnit can only take the value m(month).
        /// </summary>
        [Input("timeUnit", required: true)]
        public Input<string> TimeUnit { get; set; } = null!;

        [Input("vpcSettings", required: true)]
        private InputMap<object>? _vpcSettings;

        /// <summary>
        /// The private net config of EMR instance.
        /// </summary>
        public InputMap<object> VpcSettings
        {
            get => _vpcSettings ?? (_vpcSettings = new InputMap<object>());
            set => _vpcSettings = value;
        }

        public ClusterArgs()
        {
        }
    }

    public sealed class ClusterState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Display strategy of EMR instance.
        /// </summary>
        [Input("displayStrategy")]
        public Input<string>? DisplayStrategy { get; set; }

        /// <summary>
        /// Access the external file system.
        /// </summary>
        [Input("extendFsField")]
        public Input<string>? ExtendFsField { get; set; }

        /// <summary>
        /// Created EMR instance id.
        /// </summary>
        [Input("instanceId")]
        public Input<string>? InstanceId { get; set; }

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

        [Input("loginSettings")]
        private InputMap<object>? _loginSettings;

        /// <summary>
        /// Instance login settings.
        /// </summary>
        public InputMap<object> LoginSettings
        {
            get => _loginSettings ?? (_loginSettings = new InputMap<object>());
            set => _loginSettings = value;
        }

        /// <summary>
        /// Whether to enable the cluster Master node public network. Value range: - NEED_MASTER_WAN: Indicates that the cluster
        /// Master node public network is enabled. - NOT_NEED_MASTER_WAN: Indicates that it is not turned on. By default, the
        /// cluster Master node internet is enabled.
        /// </summary>
        [Input("needMasterWan")]
        public Input<string>? NeedMasterWan { get; set; }

        /// <summary>
        /// The pay mode of instance. 0 is pay on an annual basis, 1 is pay on a measure basis.
        /// </summary>
        [Input("payMode")]
        public Input<int>? PayMode { get; set; }

        [Input("placement")]
        private InputMap<object>? _placement;

        /// <summary>
        /// The location of the instance.
        /// </summary>
        public InputMap<object> Placement
        {
            get => _placement ?? (_placement = new InputMap<object>());
            set => _placement = value;
        }

        /// <summary>
        /// The product id of EMR instance.
        /// </summary>
        [Input("productId")]
        public Input<int>? ProductId { get; set; }

        /// <summary>
        /// Resource specification of EMR instance.
        /// </summary>
        [Input("resourceSpec")]
        public Input<Inputs.ClusterResourceSpecGetArgs>? ResourceSpec { get; set; }

        /// <summary>
        /// The ID of the security group to which the instance belongs, in the form of sg-xxxxxxxx.
        /// </summary>
        [Input("sgId")]
        public Input<string>? SgId { get; set; }

        [Input("softwares")]
        private InputList<string>? _softwares;

        /// <summary>
        /// The softwares of a EMR instance.
        /// </summary>
        public InputList<string> Softwares
        {
            get => _softwares ?? (_softwares = new InputList<string>());
            set => _softwares = value;
        }

        /// <summary>
        /// The flag whether the instance support high availability.(0=&gt;not support, 1=&gt;support).
        /// </summary>
        [Input("supportHa")]
        public Input<int>? SupportHa { get; set; }

        /// <summary>
        /// The length of time the instance was purchased. Use with TimeUnit.When TimeUnit is s, the parameter can only be filled in
        /// at 3600, representing a metered instance. When TimeUnit is m, the number filled in by this parameter indicates the
        /// length of purchase of the monthly instance of the package year, such as 1 for one month of purchase.
        /// </summary>
        [Input("timeSpan")]
        public Input<int>? TimeSpan { get; set; }

        /// <summary>
        /// The unit of time in which the instance was purchased. When PayMode is 0, TimeUnit can only take values of s(second).
        /// When PayMode is 1, TimeUnit can only take the value m(month).
        /// </summary>
        [Input("timeUnit")]
        public Input<string>? TimeUnit { get; set; }

        [Input("vpcSettings")]
        private InputMap<object>? _vpcSettings;

        /// <summary>
        /// The private net config of EMR instance.
        /// </summary>
        public InputMap<object> VpcSettings
        {
            get => _vpcSettings ?? (_vpcSettings = new InputMap<object>());
            set => _vpcSettings = value;
        }

        public ClusterState()
        {
        }
    }
}
