<reponame>Dwonczykj/gember_deploy// *** 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.Dcdb
{
    /// <summary>
    /// Provides a resource to create a dcdb hourdb_instance
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var hourdbInstance = new Tencentcloud.Dcdb.HourdbInstance("hourdbInstance", new Tencentcloud.Dcdb.HourdbInstanceArgs
    ///         {
    ///             InstanceName = "test_dcdc_dc_instance",
    ///             Zones = 
    ///             {
    ///                 "ap-guangzhou-5",
    ///                 "ap-guangzhou-6",
    ///             },
    ///             ShardMemory = 2,
    ///             ShardStorage = 10,
    ///             ShardNodeCount = 2,
    ///             ShardCount = 2,
    ///             VpcId = local.Vpc_id,
    ///             SubnetId = local.Subnet_id,
    ///             SecurityGroupId = local.Sg_id,
    ///             DbVersionId = "8.0",
    ///             ResourceTags = 
    ///             {
    ///                 new Tencentcloud.Dcdb.Inputs.HourdbInstanceResourceTagArgs
    ///                 {
    ///                     TagKey = "aaa",
    ///                     TagValue = "bbb",
    ///                 },
    ///             },
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// ## Import
    /// 
    /// dcdb hourdb_instance can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import tencentcloud:Dcdb/hourdbInstance:HourdbInstance hourdb_instance hourdbInstance_id
    /// ```
    /// </summary>
    [TencentcloudResourceType("tencentcloud:Dcdb/hourdbInstance:HourdbInstance")]
    public partial class HourdbInstance : Pulumi.CustomResource
    {
        /// <summary>
        /// db engine version, default to Percona 5.7.17.
        /// </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>
        /// project id.
        /// </summary>
        [Output("projectId")]
        public Output<int?> ProjectId { get; private set; } = null!;

        /// <summary>
        /// resource tags.
        /// </summary>
        [Output("resourceTags")]
        public Output<ImmutableArray<Outputs.HourdbInstanceResourceTag>> ResourceTags { get; private set; } = null!;

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

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

        /// <summary>
        /// memory(GB) for each shard. It can be obtained by querying api DescribeShardSpec.
        /// </summary>
        [Output("shardMemory")]
        public Output<int> ShardMemory { get; private set; } = null!;

        /// <summary>
        /// node count for each shard. It can be obtained by querying api DescribeShardSpec.
        /// </summary>
        [Output("shardNodeCount")]
        public Output<int> ShardNodeCount { get; private set; } = null!;

        /// <summary>
        /// storage(GB) for each shard. It can be obtained by querying api DescribeShardSpec.
        /// </summary>
        [Output("shardStorage")]
        public Output<int> ShardStorage { 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>
        /// vpc id.
        /// </summary>
        [Output("vpcId")]
        public Output<string?> VpcId { get; private set; } = null!;

        /// <summary>
        /// available zone.
        /// </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:Dcdb/hourdbInstance:HourdbInstance", name, args ?? new HourdbInstanceArgs(), MakeResourceOptions(options, ""))
        {
        }

        private HourdbInstance(string name, Input<string> id, HourdbInstanceState? state = null, CustomResourceOptions? options = null)
            : base("tencentcloud:Dcdb/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 Percona 5.7.17.
        /// </summary>
        [Input("dbVersionId")]
        public Input<string>? DbVersionId { get; set; }

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

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

        [Input("resourceTags")]
        private InputList<Inputs.HourdbInstanceResourceTagArgs>? _resourceTags;

        /// <summary>
        /// resource tags.
        /// </summary>
        public InputList<Inputs.HourdbInstanceResourceTagArgs> ResourceTags
        {
            get => _resourceTags ?? (_resourceTags = new InputList<Inputs.HourdbInstanceResourceTagArgs>());
            set => _resourceTags = value;
        }

        /// <summary>
        /// security group id.
        /// </summary>
        [Input("securityGroupId")]
        public Input<string>? SecurityGroupId { get; set; }

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

        /// <summary>
        /// memory(GB) for each shard. It can be obtained by querying api DescribeShardSpec.
        /// </summary>
        [Input("shardMemory", required: true)]
        public Input<int> ShardMemory { get; set; } = null!;

        /// <summary>
        /// node count for each shard. It can be obtained by querying api DescribeShardSpec.
        /// </summary>
        [Input("shardNodeCount", required: true)]
        public Input<int> ShardNodeCount { get; set; } = null!;

        /// <summary>
        /// storage(GB) for each shard. It can be obtained by querying api DescribeShardSpec.
        /// </summary>
        [Input("shardStorage", required: true)]
        public Input<int> ShardStorage { 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; }

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

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

        /// <summary>
        /// available zone.
        /// </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 Percona 5.7.17.
        /// </summary>
        [Input("dbVersionId")]
        public Input<string>? DbVersionId { get; set; }

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

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

        [Input("resourceTags")]
        private InputList<Inputs.HourdbInstanceResourceTagGetArgs>? _resourceTags;

        /// <summary>
        /// resource tags.
        /// </summary>
        public InputList<Inputs.HourdbInstanceResourceTagGetArgs> ResourceTags
        {
            get => _resourceTags ?? (_resourceTags = new InputList<Inputs.HourdbInstanceResourceTagGetArgs>());
            set => _resourceTags = value;
        }

        /// <summary>
        /// security group id.
        /// </summary>
        [Input("securityGroupId")]
        public Input<string>? SecurityGroupId { get; set; }

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

        /// <summary>
        /// memory(GB) for each shard. It can be obtained by querying api DescribeShardSpec.
        /// </summary>
        [Input("shardMemory")]
        public Input<int>? ShardMemory { get; set; }

        /// <summary>
        /// node count for each shard. It can be obtained by querying api DescribeShardSpec.
        /// </summary>
        [Input("shardNodeCount")]
        public Input<int>? ShardNodeCount { get; set; }

        /// <summary>
        /// storage(GB) for each shard. It can be obtained by querying api DescribeShardSpec.
        /// </summary>
        [Input("shardStorage")]
        public Input<int>? ShardStorage { get; set; }

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

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

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

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

        public HourdbInstanceState()
        {
        }
    }
}
