// *** 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.AliCloud.Cddc
{
    /// <summary>
    /// Provides a ApsaraDB for MyBase Dedicated Host Group resource.
    /// 
    /// For information about ApsaraDB for MyBase Dedicated Host Group and how to use it, see [What is Dedicated Host Group](https://www.alibabacloud.com/help/doc-detail/141455.htm).
    /// 
    /// &gt; **NOTE:** Available in v1.132.0+.
    /// 
    /// ## Example Usage
    /// 
    /// Basic Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var vpc = new AliCloud.Vpc.Network("vpc", new()
    ///     {
    ///         VpcName = "tf_test_foo",
    ///         CidrBlock = "172.16.0.0/12",
    ///     });
    /// 
    ///     var @default = new AliCloud.Cddc.DedicatedHostGroup("default", new()
    ///     {
    ///         Engine = "MongoDB",
    ///         VpcId = vpc.Id,
    ///         CpuAllocationRatio = 101,
    ///         MemAllocationRatio = 50,
    ///         DiskAllocationRatio = 200,
    ///         AllocationPolicy = "Evenly",
    ///         HostReplacePolicy = "Manual",
    ///         DedicatedHostGroupDesc = "tf-testaccDesc",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// ApsaraDB for MyBase Dedicated Host Group can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:cddc/dedicatedHostGroup:DedicatedHostGroup example &lt;id&gt;
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:cddc/dedicatedHostGroup:DedicatedHostGroup")]
    public partial class DedicatedHostGroup : global::Pulumi.CustomResource
    {
        /// <summary>
        /// AThe policy that is used to allocate resources in the dedicated cluster. Valid values:`Evenly`,`Intensively`
        /// </summary>
        [Output("allocationPolicy")]
        public Output<string> AllocationPolicy { get; private set; } = null!;

        /// <summary>
        /// The CPU overcommitment ratio of the dedicated cluster.Valid values: 100 to 300. Default value: 200.
        /// </summary>
        [Output("cpuAllocationRatio")]
        public Output<int> CpuAllocationRatio { get; private set; } = null!;

        /// <summary>
        /// The name of the dedicated cluster. The name must be 1 to 64 characters in length and can contain letters, digits, underscores (_), and hyphens (-). It must start with a letter.
        /// </summary>
        [Output("dedicatedHostGroupDesc")]
        public Output<string?> DedicatedHostGroupDesc { get; private set; } = null!;

        /// <summary>
        /// The Disk Allocation Ratio of the Dedicated Host Group. **NOTE:** When `engine = SQLServer`, this attribute does not support to set.
        /// </summary>
        [Output("diskAllocationRatio")]
        public Output<int> DiskAllocationRatio { get; private set; } = null!;

        /// <summary>
        /// Database Engine Type.The database engine of the dedicated cluster. Valid values:`Redis`, `SQLServer`, `MySQL`, `PostgreSQL`, `MongoDB`
        /// </summary>
        [Output("engine")]
        public Output<string> Engine { get; private set; } = null!;

        /// <summary>
        /// The policy based on which the system handles host failures. Valid values:`Auto`,`Manual`
        /// </summary>
        [Output("hostReplacePolicy")]
        public Output<string> HostReplacePolicy { get; private set; } = null!;

        /// <summary>
        /// The Memory Allocation Ratio of the Dedicated Host Group.
        /// </summary>
        [Output("memAllocationRatio")]
        public Output<int> MemAllocationRatio { get; private set; } = null!;

        /// <summary>
        /// Whether to enable the feature that allows you to have OS permissions on the hosts in the dedicated cluster. Valid values: `true` and `false`.
        /// **NOTE:** The `open_permission` should be `true` when `engine = "SQLServer"`
        /// </summary>
        [Output("openPermission")]
        public Output<bool> OpenPermission { get; private set; } = null!;

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


        /// <summary>
        /// Create a DedicatedHostGroup 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 DedicatedHostGroup(string name, DedicatedHostGroupArgs args, CustomResourceOptions? options = null)
            : base("alicloud:cddc/dedicatedHostGroup:DedicatedHostGroup", name, args ?? new DedicatedHostGroupArgs(), MakeResourceOptions(options, ""))
        {
        }

        private DedicatedHostGroup(string name, Input<string> id, DedicatedHostGroupState? state = null, CustomResourceOptions? options = null)
            : base("alicloud:cddc/dedicatedHostGroup:DedicatedHostGroup", 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/rhysmdnz/pulumi-alicloud",
            };
            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 DedicatedHostGroup 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 DedicatedHostGroup Get(string name, Input<string> id, DedicatedHostGroupState? state = null, CustomResourceOptions? options = null)
        {
            return new DedicatedHostGroup(name, id, state, options);
        }
    }

    public sealed class DedicatedHostGroupArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// AThe policy that is used to allocate resources in the dedicated cluster. Valid values:`Evenly`,`Intensively`
        /// </summary>
        [Input("allocationPolicy")]
        public Input<string>? AllocationPolicy { get; set; }

        /// <summary>
        /// The CPU overcommitment ratio of the dedicated cluster.Valid values: 100 to 300. Default value: 200.
        /// </summary>
        [Input("cpuAllocationRatio")]
        public Input<int>? CpuAllocationRatio { get; set; }

        /// <summary>
        /// The name of the dedicated cluster. The name must be 1 to 64 characters in length and can contain letters, digits, underscores (_), and hyphens (-). It must start with a letter.
        /// </summary>
        [Input("dedicatedHostGroupDesc")]
        public Input<string>? DedicatedHostGroupDesc { get; set; }

        /// <summary>
        /// The Disk Allocation Ratio of the Dedicated Host Group. **NOTE:** When `engine = SQLServer`, this attribute does not support to set.
        /// </summary>
        [Input("diskAllocationRatio")]
        public Input<int>? DiskAllocationRatio { get; set; }

        /// <summary>
        /// Database Engine Type.The database engine of the dedicated cluster. Valid values:`Redis`, `SQLServer`, `MySQL`, `PostgreSQL`, `MongoDB`
        /// </summary>
        [Input("engine", required: true)]
        public Input<string> Engine { get; set; } = null!;

        /// <summary>
        /// The policy based on which the system handles host failures. Valid values:`Auto`,`Manual`
        /// </summary>
        [Input("hostReplacePolicy")]
        public Input<string>? HostReplacePolicy { get; set; }

        /// <summary>
        /// The Memory Allocation Ratio of the Dedicated Host Group.
        /// </summary>
        [Input("memAllocationRatio")]
        public Input<int>? MemAllocationRatio { get; set; }

        /// <summary>
        /// Whether to enable the feature that allows you to have OS permissions on the hosts in the dedicated cluster. Valid values: `true` and `false`.
        /// **NOTE:** The `open_permission` should be `true` when `engine = "SQLServer"`
        /// </summary>
        [Input("openPermission")]
        public Input<bool>? OpenPermission { get; set; }

        /// <summary>
        /// The virtual private cloud (VPC) ID of the dedicated cluster.
        /// </summary>
        [Input("vpcId", required: true)]
        public Input<string> VpcId { get; set; } = null!;

        public DedicatedHostGroupArgs()
        {
        }
        public static new DedicatedHostGroupArgs Empty => new DedicatedHostGroupArgs();
    }

    public sealed class DedicatedHostGroupState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// AThe policy that is used to allocate resources in the dedicated cluster. Valid values:`Evenly`,`Intensively`
        /// </summary>
        [Input("allocationPolicy")]
        public Input<string>? AllocationPolicy { get; set; }

        /// <summary>
        /// The CPU overcommitment ratio of the dedicated cluster.Valid values: 100 to 300. Default value: 200.
        /// </summary>
        [Input("cpuAllocationRatio")]
        public Input<int>? CpuAllocationRatio { get; set; }

        /// <summary>
        /// The name of the dedicated cluster. The name must be 1 to 64 characters in length and can contain letters, digits, underscores (_), and hyphens (-). It must start with a letter.
        /// </summary>
        [Input("dedicatedHostGroupDesc")]
        public Input<string>? DedicatedHostGroupDesc { get; set; }

        /// <summary>
        /// The Disk Allocation Ratio of the Dedicated Host Group. **NOTE:** When `engine = SQLServer`, this attribute does not support to set.
        /// </summary>
        [Input("diskAllocationRatio")]
        public Input<int>? DiskAllocationRatio { get; set; }

        /// <summary>
        /// Database Engine Type.The database engine of the dedicated cluster. Valid values:`Redis`, `SQLServer`, `MySQL`, `PostgreSQL`, `MongoDB`
        /// </summary>
        [Input("engine")]
        public Input<string>? Engine { get; set; }

        /// <summary>
        /// The policy based on which the system handles host failures. Valid values:`Auto`,`Manual`
        /// </summary>
        [Input("hostReplacePolicy")]
        public Input<string>? HostReplacePolicy { get; set; }

        /// <summary>
        /// The Memory Allocation Ratio of the Dedicated Host Group.
        /// </summary>
        [Input("memAllocationRatio")]
        public Input<int>? MemAllocationRatio { get; set; }

        /// <summary>
        /// Whether to enable the feature that allows you to have OS permissions on the hosts in the dedicated cluster. Valid values: `true` and `false`.
        /// **NOTE:** The `open_permission` should be `true` when `engine = "SQLServer"`
        /// </summary>
        [Input("openPermission")]
        public Input<bool>? OpenPermission { get; set; }

        /// <summary>
        /// The virtual private cloud (VPC) ID of the dedicated cluster.
        /// </summary>
        [Input("vpcId")]
        public Input<string>? VpcId { get; set; }

        public DedicatedHostGroupState()
        {
        }
        public static new DedicatedHostGroupState Empty => new DedicatedHostGroupState();
    }
}
