<filename>sdk/dotnet/Tencentcloud/Tdcpg/Cluster.cs// *** 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;
using Pulumi;

namespace TencentCloudIAC.PulumiPackage.Tencentcloud.Tdcpg
{
    /// <summary>
    /// Provides a resource to create a tdcpg cluster.
    /// 
    /// &gt; **NOTE:** This resource is still in internal testing. To experience its functions, you need to apply for a whitelist from Tencent Cloud.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var cluster = new Tencentcloud.Tdcpg.Cluster("cluster", new Tencentcloud.Tdcpg.ClusterArgs
    ///         {
    ///             ClusterName = "cluster_name",
    ///             Cpu = 1,
    ///             DbVersion = "10.17",
    ///             InstanceCount = 1,
    ///             MasterUserPassword = "",
    ///             Memory = 1,
    ///             PayMode = "POSTPAID_BY_HOUR",
    ///             Period = 1,
    ///             ProjectId = 0,
    ///             SubnetId = "subnet_id",
    ///             VpcId = "vpc_id",
    ///             Zone = "ap-guangzhou-3",
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// ## Import
    /// 
    /// tdcpg cluster can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import tencentcloud:Tdcpg/cluster:Cluster cluster cluster_id
    /// ```
    /// </summary>
    [TencentcloudResourceType("tencentcloud:Tdcpg/cluster:Cluster")]
    public partial class Cluster : Pulumi.CustomResource
    {
        /// <summary>
        /// cluster name.
        /// </summary>
        [Output("clusterName")]
        public Output<string?> ClusterName { get; private set; } = null!;

        /// <summary>
        /// cpu cores.
        /// </summary>
        [Output("cpu")]
        public Output<int> Cpu { get; private set; } = null!;

        /// <summary>
        /// community version number, default to 10.17.
        /// </summary>
        [Output("dbVersion")]
        public Output<string?> DbVersion { get; private set; } = null!;

        /// <summary>
        /// instance count.
        /// </summary>
        [Output("instanceCount")]
        public Output<int?> InstanceCount { get; private set; } = null!;

        /// <summary>
        /// user password.
        /// </summary>
        [Output("masterUserPassword")]
        public Output<string> MasterUserPassword { get; private set; } = null!;

        /// <summary>
        /// memory size.
        /// </summary>
        [Output("memory")]
        public Output<int> Memory { get; private set; } = null!;

        /// <summary>
        /// pay mode, the value is either PREPAID or POSTPAID_BY_HOUR.
        /// </summary>
        [Output("payMode")]
        public Output<string> PayMode { get; private set; } = null!;

        /// <summary>
        /// purchase time, required when PayMode is PREPAID, the value range is 1~60, default to 1.
        /// </summary>
        [Output("period")]
        public Output<int> Period { get; private set; } = null!;

        /// <summary>
        /// project id, default to 0, means default project.
        /// </summary>
        [Output("projectId")]
        public Output<int?> ProjectId { get; private set; } = null!;

        /// <summary>
        /// max storage, the unit is GB.
        /// </summary>
        [Output("storage")]
        public Output<int> Storage { get; private set; } = null!;

        /// <summary>
        /// subnet id.
        /// </summary>
        [Output("subnetId")]
        public Output<string> SubnetId { get; private set; } = null!;

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

        /// <summary>
        /// available zone.
        /// </summary>
        [Output("zone")]
        public Output<string> Zone { 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("tencentcloud:Tdcpg/cluster:Cluster", name, args ?? new ClusterArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Cluster(string name, Input<string> id, ClusterState? state = null, CustomResourceOptions? options = null)
            : base("tencentcloud:Tdcpg/cluster:Cluster", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "github://api.github.com/tencentcloudstack",
            };
            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>
        /// cluster name.
        /// </summary>
        [Input("clusterName")]
        public Input<string>? ClusterName { get; set; }

        /// <summary>
        /// cpu cores.
        /// </summary>
        [Input("cpu", required: true)]
        public Input<int> Cpu { get; set; } = null!;

        /// <summary>
        /// community version number, default to 10.17.
        /// </summary>
        [Input("dbVersion")]
        public Input<string>? DbVersion { get; set; }

        /// <summary>
        /// instance count.
        /// </summary>
        [Input("instanceCount")]
        public Input<int>? InstanceCount { get; set; }

        /// <summary>
        /// user password.
        /// </summary>
        [Input("masterUserPassword", required: true)]
        public Input<string> MasterUserPassword { get; set; } = null!;

        /// <summary>
        /// memory size.
        /// </summary>
        [Input("memory", required: true)]
        public Input<int> Memory { get; set; } = null!;

        /// <summary>
        /// pay mode, the value is either PREPAID or POSTPAID_BY_HOUR.
        /// </summary>
        [Input("payMode", required: true)]
        public Input<string> PayMode { get; set; } = null!;

        /// <summary>
        /// purchase time, required when PayMode is PREPAID, the value range is 1~60, default to 1.
        /// </summary>
        [Input("period")]
        public Input<int>? Period { get; set; }

        /// <summary>
        /// project id, default to 0, means default project.
        /// </summary>
        [Input("projectId")]
        public Input<int>? ProjectId { get; set; }

        /// <summary>
        /// max storage, the unit is GB.
        /// </summary>
        [Input("storage")]
        public Input<int>? Storage { get; set; }

        /// <summary>
        /// subnet id.
        /// </summary>
        [Input("subnetId", required: true)]
        public Input<string> SubnetId { get; set; } = null!;

        /// <summary>
        /// vpc id.
        /// </summary>
        [Input("vpcId", required: true)]
        public Input<string> VpcId { get; set; } = null!;

        /// <summary>
        /// available zone.
        /// </summary>
        [Input("zone", required: true)]
        public Input<string> Zone { get; set; } = null!;

        public ClusterArgs()
        {
        }
    }

    public sealed class ClusterState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// cluster name.
        /// </summary>
        [Input("clusterName")]
        public Input<string>? ClusterName { get; set; }

        /// <summary>
        /// cpu cores.
        /// </summary>
        [Input("cpu")]
        public Input<int>? Cpu { get; set; }

        /// <summary>
        /// community version number, default to 10.17.
        /// </summary>
        [Input("dbVersion")]
        public Input<string>? DbVersion { get; set; }

        /// <summary>
        /// instance count.
        /// </summary>
        [Input("instanceCount")]
        public Input<int>? InstanceCount { get; set; }

        /// <summary>
        /// user password.
        /// </summary>
        [Input("masterUserPassword")]
        public Input<string>? MasterUserPassword { get; set; }

        /// <summary>
        /// memory size.
        /// </summary>
        [Input("memory")]
        public Input<int>? Memory { get; set; }

        /// <summary>
        /// pay mode, the value is either PREPAID or POSTPAID_BY_HOUR.
        /// </summary>
        [Input("payMode")]
        public Input<string>? PayMode { get; set; }

        /// <summary>
        /// purchase time, required when PayMode is PREPAID, the value range is 1~60, default to 1.
        /// </summary>
        [Input("period")]
        public Input<int>? Period { get; set; }

        /// <summary>
        /// project id, default to 0, means default project.
        /// </summary>
        [Input("projectId")]
        public Input<int>? ProjectId { get; set; }

        /// <summary>
        /// max storage, the unit is GB.
        /// </summary>
        [Input("storage")]
        public Input<int>? Storage { get; set; }

        /// <summary>
        /// subnet id.
        /// </summary>
        [Input("subnetId")]
        public Input<string>? SubnetId { get; set; }

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

        /// <summary>
        /// available zone.
        /// </summary>
        [Input("zone")]
        public Input<string>? Zone { get; set; }

        public ClusterState()
        {
        }
    }
}
