// *** 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.BastionHost
{
    /// <summary>
    /// Provides a Bastion Host User resource.
    /// 
    /// For information about Bastion Host User and how to use it, see [What is User](https://www.alibabacloud.com/help/doc-detail/204503.htm).
    /// 
    /// &gt; **NOTE:** Available in v1.133.0+.
    /// 
    /// ## Example Usage
    /// 
    /// Basic Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var local = new AliCloud.BastionHost.User("local", new()
    ///     {
    ///         InstanceId = "example_value",
    ///         Mobile = "13312345678",
    ///         MobileCountryCode = "CN",
    ///         Password = "YourPassword-123",
    ///         Source = "Local",
    ///         UserName = "my-local-user",
    ///     });
    /// 
    ///     var ram = new AliCloud.BastionHost.User("ram", new()
    ///     {
    ///         InstanceId = "example_value",
    ///         Mobile = "13312345678",
    ///         MobileCountryCode = "CN",
    ///         Password = "YourPassword-123",
    ///         Source = "Ram",
    ///         SourceUserId = "1234567890",
    ///         UserName = "my-ram-user",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// Bastion Host User can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:bastionhost/user:User example &lt;instance_id&gt;:&lt;user_id&gt;
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:bastionhost/user:User")]
    public partial class User : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Specify the New of the User That Created the Remark Information. Supports up to 500 Characters.
        /// </summary>
        [Output("comment")]
        public Output<string?> Comment { get; private set; } = null!;

        /// <summary>
        /// Specify the New Created the User's Display Name. Supports up to 128 Characters.
        /// </summary>
        [Output("displayName")]
        public Output<string> DisplayName { get; private set; } = null!;

        /// <summary>
        /// Specify the New User's Mailbox.
        /// </summary>
        [Output("email")]
        public Output<string?> Email { get; private set; } = null!;

        /// <summary>
        /// You Want to Query the User the Bastion Host ID of.
        /// </summary>
        [Output("instanceId")]
        public Output<string> InstanceId { get; private set; } = null!;

        /// <summary>
        /// Specify the New of the User That Created a Different Mobile Phone Number from Your.
        /// </summary>
        [Output("mobile")]
        public Output<string?> Mobile { get; private set; } = null!;

        /// <summary>
        /// Specify the New Create User Mobile Phone Number of the International Domain Name. The Default Value Is the CN. Valid Values:
        /// * CN: Mainland China (+86)
        /// * HK: hong Kong, China (+852)
        /// * MO: Macau, China (+853)
        /// * TW: Taiwan, China (+886)
        /// * RU: Russian (+7)
        /// * SG: Singapore (+65)
        /// * MY: malaysia (+60)
        /// * ID: Indonesia (+62)
        /// * DE: Germany (+49)
        /// * AU: Australia (+61)
        /// * US: United States (+1)
        /// * AE: dubai (+971)
        /// * JP: Japan (+81) Introducing the Long-Range
        /// * GB: United Kingdom (+44)
        /// * IN: India (+91)
        /// * KR: South Korea (+82)
        /// * PH: philippines (+63)
        /// * CH: Switzerland (+41)
        /// * SE: Sweden (+46)
        /// </summary>
        [Output("mobileCountryCode")]
        public Output<string> MobileCountryCode { get; private set; } = null!;

        /// <summary>
        /// Specify the New User's Password. Supports up to 128 Characters. Description of the New User as the Source of the Local User (That Is, Source Value for Local, this Parameter Is Required.
        /// </summary>
        [Output("password")]
        public Output<string?> Password { get; private set; } = null!;

        /// <summary>
        /// Specify the New of the User That Created the Source. Valid Values:
        /// * Local: Local User
        /// * Ram: Ram User
        /// * AD: AD-authenticated User
        /// * LDAP: LDAP-authenticated User
        /// &gt; **NOTE:** From version 1.199.0, `source` can be set to `AD`, `LDAP`.
        /// </summary>
        [Output("source")]
        public Output<string> Source { get; private set; } = null!;

        /// <summary>
        /// Specify the Newly Created User Is Uniquely Identified. Indicates That the Parameter Is a Bastion Host Corresponding to the User with the Ram User's Unique Identifier. The Newly Created User Source Grant Permission to a RAM User (That Is, Source Used as a Ram), this Parameter Is Required. You Can Call Access Control of Listusers Interface from the Return Data Userid to Obtain the Parameters.
        /// </summary>
        [Output("sourceUserId")]
        public Output<string?> SourceUserId { get; private set; } = null!;

        /// <summary>
        /// The status of the resource. Valid values: `Frozen`, `Normal`.
        /// </summary>
        [Output("status")]
        public Output<string> Status { get; private set; } = null!;

        /// <summary>
        /// The User ID.
        /// </summary>
        [Output("userId")]
        public Output<string> UserId { get; private set; } = null!;

        /// <summary>
        /// Specify the New User Name. This Parameter Is Only by Letters, Lowercase Letters, Numbers, and Underscores (_), Supports up to 128 Characters.
        /// </summary>
        [Output("userName")]
        public Output<string> UserName { get; private set; } = null!;


        /// <summary>
        /// Create a User 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 User(string name, UserArgs args, CustomResourceOptions? options = null)
            : base("alicloud:bastionhost/user:User", name, args ?? new UserArgs(), MakeResourceOptions(options, ""))
        {
        }

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

    public sealed class UserArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Specify the New of the User That Created the Remark Information. Supports up to 500 Characters.
        /// </summary>
        [Input("comment")]
        public Input<string>? Comment { get; set; }

        /// <summary>
        /// Specify the New Created the User's Display Name. Supports up to 128 Characters.
        /// </summary>
        [Input("displayName")]
        public Input<string>? DisplayName { get; set; }

        /// <summary>
        /// Specify the New User's Mailbox.
        /// </summary>
        [Input("email")]
        public Input<string>? Email { get; set; }

        /// <summary>
        /// You Want to Query the User the Bastion Host ID of.
        /// </summary>
        [Input("instanceId", required: true)]
        public Input<string> InstanceId { get; set; } = null!;

        /// <summary>
        /// Specify the New of the User That Created a Different Mobile Phone Number from Your.
        /// </summary>
        [Input("mobile")]
        public Input<string>? Mobile { get; set; }

        /// <summary>
        /// Specify the New Create User Mobile Phone Number of the International Domain Name. The Default Value Is the CN. Valid Values:
        /// * CN: Mainland China (+86)
        /// * HK: hong Kong, China (+852)
        /// * MO: Macau, China (+853)
        /// * TW: Taiwan, China (+886)
        /// * RU: Russian (+7)
        /// * SG: Singapore (+65)
        /// * MY: malaysia (+60)
        /// * ID: Indonesia (+62)
        /// * DE: Germany (+49)
        /// * AU: Australia (+61)
        /// * US: United States (+1)
        /// * AE: dubai (+971)
        /// * JP: Japan (+81) Introducing the Long-Range
        /// * GB: United Kingdom (+44)
        /// * IN: India (+91)
        /// * KR: South Korea (+82)
        /// * PH: philippines (+63)
        /// * CH: Switzerland (+41)
        /// * SE: Sweden (+46)
        /// </summary>
        [Input("mobileCountryCode")]
        public Input<string>? MobileCountryCode { get; set; }

        /// <summary>
        /// Specify the New User's Password. Supports up to 128 Characters. Description of the New User as the Source of the Local User (That Is, Source Value for Local, this Parameter Is Required.
        /// </summary>
        [Input("password")]
        public Input<string>? Password { get; set; }

        /// <summary>
        /// Specify the New of the User That Created the Source. Valid Values:
        /// * Local: Local User
        /// * Ram: Ram User
        /// * AD: AD-authenticated User
        /// * LDAP: LDAP-authenticated User
        /// &gt; **NOTE:** From version 1.199.0, `source` can be set to `AD`, `LDAP`.
        /// </summary>
        [Input("source", required: true)]
        public Input<string> Source { get; set; } = null!;

        /// <summary>
        /// Specify the Newly Created User Is Uniquely Identified. Indicates That the Parameter Is a Bastion Host Corresponding to the User with the Ram User's Unique Identifier. The Newly Created User Source Grant Permission to a RAM User (That Is, Source Used as a Ram), this Parameter Is Required. You Can Call Access Control of Listusers Interface from the Return Data Userid to Obtain the Parameters.
        /// </summary>
        [Input("sourceUserId")]
        public Input<string>? SourceUserId { get; set; }

        /// <summary>
        /// The status of the resource. Valid values: `Frozen`, `Normal`.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

        /// <summary>
        /// Specify the New User Name. This Parameter Is Only by Letters, Lowercase Letters, Numbers, and Underscores (_), Supports up to 128 Characters.
        /// </summary>
        [Input("userName", required: true)]
        public Input<string> UserName { get; set; } = null!;

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

    public sealed class UserState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Specify the New of the User That Created the Remark Information. Supports up to 500 Characters.
        /// </summary>
        [Input("comment")]
        public Input<string>? Comment { get; set; }

        /// <summary>
        /// Specify the New Created the User's Display Name. Supports up to 128 Characters.
        /// </summary>
        [Input("displayName")]
        public Input<string>? DisplayName { get; set; }

        /// <summary>
        /// Specify the New User's Mailbox.
        /// </summary>
        [Input("email")]
        public Input<string>? Email { get; set; }

        /// <summary>
        /// You Want to Query the User the Bastion Host ID of.
        /// </summary>
        [Input("instanceId")]
        public Input<string>? InstanceId { get; set; }

        /// <summary>
        /// Specify the New of the User That Created a Different Mobile Phone Number from Your.
        /// </summary>
        [Input("mobile")]
        public Input<string>? Mobile { get; set; }

        /// <summary>
        /// Specify the New Create User Mobile Phone Number of the International Domain Name. The Default Value Is the CN. Valid Values:
        /// * CN: Mainland China (+86)
        /// * HK: hong Kong, China (+852)
        /// * MO: Macau, China (+853)
        /// * TW: Taiwan, China (+886)
        /// * RU: Russian (+7)
        /// * SG: Singapore (+65)
        /// * MY: malaysia (+60)
        /// * ID: Indonesia (+62)
        /// * DE: Germany (+49)
        /// * AU: Australia (+61)
        /// * US: United States (+1)
        /// * AE: dubai (+971)
        /// * JP: Japan (+81) Introducing the Long-Range
        /// * GB: United Kingdom (+44)
        /// * IN: India (+91)
        /// * KR: South Korea (+82)
        /// * PH: philippines (+63)
        /// * CH: Switzerland (+41)
        /// * SE: Sweden (+46)
        /// </summary>
        [Input("mobileCountryCode")]
        public Input<string>? MobileCountryCode { get; set; }

        /// <summary>
        /// Specify the New User's Password. Supports up to 128 Characters. Description of the New User as the Source of the Local User (That Is, Source Value for Local, this Parameter Is Required.
        /// </summary>
        [Input("password")]
        public Input<string>? Password { get; set; }

        /// <summary>
        /// Specify the New of the User That Created the Source. Valid Values:
        /// * Local: Local User
        /// * Ram: Ram User
        /// * AD: AD-authenticated User
        /// * LDAP: LDAP-authenticated User
        /// &gt; **NOTE:** From version 1.199.0, `source` can be set to `AD`, `LDAP`.
        /// </summary>
        [Input("source")]
        public Input<string>? Source { get; set; }

        /// <summary>
        /// Specify the Newly Created User Is Uniquely Identified. Indicates That the Parameter Is a Bastion Host Corresponding to the User with the Ram User's Unique Identifier. The Newly Created User Source Grant Permission to a RAM User (That Is, Source Used as a Ram), this Parameter Is Required. You Can Call Access Control of Listusers Interface from the Return Data Userid to Obtain the Parameters.
        /// </summary>
        [Input("sourceUserId")]
        public Input<string>? SourceUserId { get; set; }

        /// <summary>
        /// The status of the resource. Valid values: `Frozen`, `Normal`.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

        /// <summary>
        /// The User ID.
        /// </summary>
        [Input("userId")]
        public Input<string>? UserId { get; set; }

        /// <summary>
        /// Specify the New User Name. This Parameter Is Only by Letters, Lowercase Letters, Numbers, and Underscores (_), Supports up to 128 Characters.
        /// </summary>
        [Input("userName")]
        public Input<string>? UserName { get; set; }

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