// *** 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.Mariadb
{
    /// <summary>
    /// Provides a resource to create a mariadb hour_db_instance
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var basic = new Tencentcloud.Mariadb.HourDbInstance("basic", new Tencentcloud.Mariadb.HourDbInstanceArgs
    ///         {
    ///             DbVersionId = "8.0",
    ///             InstanceName = "db-test-2",
    ///             Memory = 2,
    ///             NodeCount = 2,
    ///             Storage = 10,
    ///             SubnetId = "subnet-jdi5xn22",
    ///             Tags = 
    ///             {
    ///                 { "createdBy", "terraform" },
    ///             },
    ///             VpcId = "vpc-k1t8ickr",
    ///             Zones = 
    ///             {
    ///                 "ap-guangzhou-7",
    ///                 "ap-guangzhou-7",
    ///             },
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// ## Import
    /// 
    /// mariadb hour_db_instance can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import tencentcloud:Mariadb/hourDbInstance:HourDbInstance hour_db_instance tdsql-kjqih9nn
    /// ```
    /// </summary>
    [TencentcloudResourceType("tencentcloud:Mariadb/hourDbInstance:HourDbInstance")]
    public partial class HourDbInstance : Pulumi.CustomResource
    {
        /// <summary>
        /// db engine version, default to 10.1.9.
        /// </summary>
        [Output("dbVersionId")]
        public Output<string> DbVersionId { get; private set; } = null!;

        /// <summary>
        /// name of this instance.
        /// </summary>
        [Output("instanceName")]
        public Output<string?> InstanceName { get; private set; } = null!;

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

        /// <summary>
        /// number of node for instance.
        /// </summary>
        [Output("nodeCount")]
        public Output<int> NodeCount { get; private set; } = null!;

        /// <summary>
        /// instance disk storage.
        /// </summary>
        [Output("storage")]
        public Output<int> Storage { get; private set; } = null!;

        /// <summary>
        /// subnet id, it&amp;amp;#39;s required when vpcId is set.
        /// </summary>
        [Output("subnetId")]
        public Output<string?> SubnetId { get; private set; } = null!;

        /// <summary>
        /// Tag description list.
        /// </summary>
        [Output("tags")]
        public Output<ImmutableDictionary<string, object>?> Tags { get; private set; } = null!;

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

        /// <summary>
        /// available zone of instance.
        /// </summary>
        [Output("zones")]
        public Output<ImmutableArray<string>> Zones { get; private set; } = null!;


        /// <summary>
        /// Create a HourDbInstance 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 HourDbInstance(string name, HourDbInstanceArgs args, CustomResourceOptions? options = null)
            : base("tencentcloud:Mariadb/hourDbInstance:HourDbInstance", name, args ?? new HourDbInstanceArgs(), MakeResourceOptions(options, ""))
        {
        }

        private HourDbInstance(string name, Input<string> id, HourDbInstanceState? state = null, CustomResourceOptions? options = null)
            : base("tencentcloud:Mariadb/hourDbInstance:HourDbInstance", 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 HourDbInstance 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 HourDbInstance Get(string name, Input<string> id, HourDbInstanceState? state = null, CustomResourceOptions? options = null)
        {
            return new HourDbInstance(name, id, state, options);
        }
    }

    public sealed class HourDbInstanceArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// db engine version, default to 10.1.9.
        /// </summary>
        [Input("dbVersionId")]
        public Input<string>? DbVersionId { get; set; }

        /// <summary>
        /// name of this instance.
        /// </summary>
        [Input("instanceName")]
        public Input<string>? InstanceName { get; set; }

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

        /// <summary>
        /// number of node for instance.
        /// </summary>
        [Input("nodeCount", required: true)]
        public Input<int> NodeCount { get; set; } = null!;

        /// <summary>
        /// instance disk storage.
        /// </summary>
        [Input("storage", required: true)]
        public Input<int> Storage { get; set; } = null!;

        /// <summary>
        /// subnet id, it&amp;amp;#39;s required when vpcId is set.
        /// </summary>
        [Input("subnetId")]
        public Input<string>? SubnetId { get; set; }

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

        /// <summary>
        /// Tag description list.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

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

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

        /// <summary>
        /// available zone of instance.
        /// </summary>
        public InputList<string> Zones
        {
            get => _zones ?? (_zones = new InputList<string>());
            set => _zones = value;
        }

        public HourDbInstanceArgs()
        {
        }
    }

    public sealed class HourDbInstanceState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// db engine version, default to 10.1.9.
        /// </summary>
        [Input("dbVersionId")]
        public Input<string>? DbVersionId { get; set; }

        /// <summary>
        /// name of this instance.
        /// </summary>
        [Input("instanceName")]
        public Input<string>? InstanceName { get; set; }

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

        /// <summary>
        /// number of node for instance.
        /// </summary>
        [Input("nodeCount")]
        public Input<int>? NodeCount { get; set; }

        /// <summary>
        /// instance disk storage.
        /// </summary>
        [Input("storage")]
        public Input<int>? Storage { get; set; }

        /// <summary>
        /// subnet id, it&amp;amp;#39;s required when vpcId is set.
        /// </summary>
        [Input("subnetId")]
        public Input<string>? SubnetId { get; set; }

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

        /// <summary>
        /// Tag description list.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

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

        [Input("zones")]
        private InputList<string>? _zones;

        /// <summary>
        /// available zone of instance.
        /// </summary>
        public InputList<string> Zones
        {
            get => _zones ?? (_zones = new InputList<string>());
            set => _zones = value;
        }

        public HourDbInstanceState()
        {
        }
    }
}
