<filename>sdk/dotnet/Cddc/DedicatedHostAccount.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;

namespace Pulumi.AliCloud.Cddc
{
    /// <summary>
    /// Provides a ApsaraDB for MyBase Dedicated Host Account resource.
    /// 
    /// For information about ApsaraDB for MyBase Dedicated Host Account and how to use it, see [What is Dedicated Host Account](https://www.alibabacloud.com/help/en/doc-detail/196877.html).
    /// 
    /// &gt; **NOTE:** Available in v1.148.0+.
    /// 
    /// &gt; **NOTE:** Each Dedicated host can have only one account. Before you create an account for a host, make sure that the existing account is deleted.
    /// 
    /// ## Import
    /// 
    /// ApsaraDB for MyBase Dedicated Host Account can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:cddc/dedicatedHostAccount:DedicatedHostAccount example &lt;dedicated_host_id&gt;:&lt;account_name&gt;
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:cddc/dedicatedHostAccount:DedicatedHostAccount")]
    public partial class DedicatedHostAccount : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The name of the Dedicated host account. The account name must be 2 to 16 characters in length, contain lower case letters, digits, and underscore(_). At the same time, the name must start with a letter and end with a letter or number.
        /// </summary>
        [Output("accountName")]
        public Output<string> AccountName { get; private set; } = null!;

        /// <summary>
        /// The password of the Dedicated host account. The account password must be 6 to 32 characters in length, and can contain letters, digits, and special characters `!@#$%^&amp;*()_+-=`.
        /// </summary>
        [Output("accountPassword")]
        public Output<string> AccountPassword { get; private set; } = null!;

        /// <summary>
        /// The type of the Dedicated host account. Valid values: `Admin`, `Normal`.
        /// </summary>
        [Output("accountType")]
        public Output<string?> AccountType { get; private set; } = null!;

        /// <summary>
        /// The ID of Dedicated the host.
        /// </summary>
        [Output("dedicatedHostId")]
        public Output<string> DedicatedHostId { get; private set; } = null!;


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

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

    public sealed class DedicatedHostAccountArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The name of the Dedicated host account. The account name must be 2 to 16 characters in length, contain lower case letters, digits, and underscore(_). At the same time, the name must start with a letter and end with a letter or number.
        /// </summary>
        [Input("accountName", required: true)]
        public Input<string> AccountName { get; set; } = null!;

        /// <summary>
        /// The password of the Dedicated host account. The account password must be 6 to 32 characters in length, and can contain letters, digits, and special characters `!@#$%^&amp;*()_+-=`.
        /// </summary>
        [Input("accountPassword", required: true)]
        public Input<string> AccountPassword { get; set; } = null!;

        /// <summary>
        /// The type of the Dedicated host account. Valid values: `Admin`, `Normal`.
        /// </summary>
        [Input("accountType")]
        public Input<string>? AccountType { get; set; }

        /// <summary>
        /// The ID of Dedicated the host.
        /// </summary>
        [Input("dedicatedHostId", required: true)]
        public Input<string> DedicatedHostId { get; set; } = null!;

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

    public sealed class DedicatedHostAccountState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The name of the Dedicated host account. The account name must be 2 to 16 characters in length, contain lower case letters, digits, and underscore(_). At the same time, the name must start with a letter and end with a letter or number.
        /// </summary>
        [Input("accountName")]
        public Input<string>? AccountName { get; set; }

        /// <summary>
        /// The password of the Dedicated host account. The account password must be 6 to 32 characters in length, and can contain letters, digits, and special characters `!@#$%^&amp;*()_+-=`.
        /// </summary>
        [Input("accountPassword")]
        public Input<string>? AccountPassword { get; set; }

        /// <summary>
        /// The type of the Dedicated host account. Valid values: `Admin`, `Normal`.
        /// </summary>
        [Input("accountType")]
        public Input<string>? AccountType { get; set; }

        /// <summary>
        /// The ID of Dedicated the host.
        /// </summary>
        [Input("dedicatedHostId")]
        public Input<string>? DedicatedHostId { get; set; }

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