// *** 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 Host resource.
    /// 
    /// For information about Bastion Host Host and how to use it, see [What is Host](https://www.alibabacloud.com/help/en/doc-detail/201330.htm).
    /// 
    /// &gt; **NOTE:** Available in v1.135.0+.
    /// 
    /// ## Example Usage
    /// 
    /// Basic Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var example = new AliCloud.BastionHost.Host("example", new()
    ///     {
    ///         ActiveAddressType = "Private",
    ///         HostName = "example_value",
    ///         HostPrivateAddress = "172.16.0.10",
    ///         InstanceId = "bastionhost-cn-tl3xxxxxxx",
    ///         OsType = "Linux",
    ///         Source = "Local",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// Bastion Host Host can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:bastionhost/host:Host example &lt;instance_id&gt;:&lt;host_id&gt;
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:bastionhost/host:Host")]
    public partial class Host : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Specify the new create a host of address types. Valid values: `Public`: the IP address of a Public network. `Private`: Private network address.
        /// </summary>
        [Output("activeAddressType")]
        public Output<string> ActiveAddressType { get; private set; } = null!;

        /// <summary>
        /// Specify a host of notes, supports up to 500 characters.
        /// </summary>
        [Output("comment")]
        public Output<string?> Comment { get; private set; } = null!;

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

        /// <summary>
        /// Specify the new create a host name of the supports up to 128 characters.
        /// </summary>
        [Output("hostName")]
        public Output<string> HostName { get; private set; } = null!;

        /// <summary>
        /// Specify the new create a host of the private network address, it is possible to use the domain name or IP ADDRESS. **NOTE:**  This parameter is required if the `active_address_type` parameter is set to `Private`.
        /// </summary>
        [Output("hostPrivateAddress")]
        public Output<string?> HostPrivateAddress { get; private set; } = null!;

        /// <summary>
        /// Specify the new create a host of the IP address of a public network, it is possible to use the domain name or IP ADDRESS.
        /// </summary>
        [Output("hostPublicAddress")]
        public Output<string?> HostPublicAddress { get; private set; } = null!;

        /// <summary>
        /// Specify the new create a host where the Bastion host ID of.
        /// </summary>
        [Output("instanceId")]
        public Output<string> InstanceId { get; private set; } = null!;

        /// <summary>
        /// The instance region id.
        /// </summary>
        [Output("instanceRegionId")]
        public Output<string?> InstanceRegionId { get; private set; } = null!;

        /// <summary>
        /// Specify the new create the host's operating system. Valid values: `Linux`,`Windows`.
        /// </summary>
        [Output("osType")]
        public Output<string> OsType { get; private set; } = null!;

        /// <summary>
        /// Specify the new create a host of source. Valid values: 
        /// * `Local`: localhost
        /// * `Ecs`:ECS instance
        /// * `Rds`:RDS exclusive cluster host.
        /// </summary>
        [Output("source")]
        public Output<string> Source { get; private set; } = null!;

        /// <summary>
        /// Specify the newly created ECS instance ID or dedicated cluster host ID. **NOTE:** This parameter is required if the `source` parameter is set to `Ecs` or `Rds`.
        /// </summary>
        [Output("sourceInstanceId")]
        public Output<string?> SourceInstanceId { get; private set; } = null!;


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

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

    public sealed class HostArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Specify the new create a host of address types. Valid values: `Public`: the IP address of a Public network. `Private`: Private network address.
        /// </summary>
        [Input("activeAddressType", required: true)]
        public Input<string> ActiveAddressType { get; set; } = null!;

        /// <summary>
        /// Specify a host of notes, supports up to 500 characters.
        /// </summary>
        [Input("comment")]
        public Input<string>? Comment { get; set; }

        /// <summary>
        /// Specify the new create a host name of the supports up to 128 characters.
        /// </summary>
        [Input("hostName", required: true)]
        public Input<string> HostName { get; set; } = null!;

        /// <summary>
        /// Specify the new create a host of the private network address, it is possible to use the domain name or IP ADDRESS. **NOTE:**  This parameter is required if the `active_address_type` parameter is set to `Private`.
        /// </summary>
        [Input("hostPrivateAddress")]
        public Input<string>? HostPrivateAddress { get; set; }

        /// <summary>
        /// Specify the new create a host of the IP address of a public network, it is possible to use the domain name or IP ADDRESS.
        /// </summary>
        [Input("hostPublicAddress")]
        public Input<string>? HostPublicAddress { get; set; }

        /// <summary>
        /// Specify the new create a host where the Bastion host ID of.
        /// </summary>
        [Input("instanceId", required: true)]
        public Input<string> InstanceId { get; set; } = null!;

        /// <summary>
        /// The instance region id.
        /// </summary>
        [Input("instanceRegionId")]
        public Input<string>? InstanceRegionId { get; set; }

        /// <summary>
        /// Specify the new create the host's operating system. Valid values: `Linux`,`Windows`.
        /// </summary>
        [Input("osType", required: true)]
        public Input<string> OsType { get; set; } = null!;

        /// <summary>
        /// Specify the new create a host of source. Valid values: 
        /// * `Local`: localhost
        /// * `Ecs`:ECS instance
        /// * `Rds`:RDS exclusive cluster host.
        /// </summary>
        [Input("source", required: true)]
        public Input<string> Source { get; set; } = null!;

        /// <summary>
        /// Specify the newly created ECS instance ID or dedicated cluster host ID. **NOTE:** This parameter is required if the `source` parameter is set to `Ecs` or `Rds`.
        /// </summary>
        [Input("sourceInstanceId")]
        public Input<string>? SourceInstanceId { get; set; }

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

    public sealed class HostState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Specify the new create a host of address types. Valid values: `Public`: the IP address of a Public network. `Private`: Private network address.
        /// </summary>
        [Input("activeAddressType")]
        public Input<string>? ActiveAddressType { get; set; }

        /// <summary>
        /// Specify a host of notes, supports up to 500 characters.
        /// </summary>
        [Input("comment")]
        public Input<string>? Comment { get; set; }

        /// <summary>
        /// The host ID.
        /// </summary>
        [Input("hostId")]
        public Input<string>? HostId { get; set; }

        /// <summary>
        /// Specify the new create a host name of the supports up to 128 characters.
        /// </summary>
        [Input("hostName")]
        public Input<string>? HostName { get; set; }

        /// <summary>
        /// Specify the new create a host of the private network address, it is possible to use the domain name or IP ADDRESS. **NOTE:**  This parameter is required if the `active_address_type` parameter is set to `Private`.
        /// </summary>
        [Input("hostPrivateAddress")]
        public Input<string>? HostPrivateAddress { get; set; }

        /// <summary>
        /// Specify the new create a host of the IP address of a public network, it is possible to use the domain name or IP ADDRESS.
        /// </summary>
        [Input("hostPublicAddress")]
        public Input<string>? HostPublicAddress { get; set; }

        /// <summary>
        /// Specify the new create a host where the Bastion host ID of.
        /// </summary>
        [Input("instanceId")]
        public Input<string>? InstanceId { get; set; }

        /// <summary>
        /// The instance region id.
        /// </summary>
        [Input("instanceRegionId")]
        public Input<string>? InstanceRegionId { get; set; }

        /// <summary>
        /// Specify the new create the host's operating system. Valid values: `Linux`,`Windows`.
        /// </summary>
        [Input("osType")]
        public Input<string>? OsType { get; set; }

        /// <summary>
        /// Specify the new create a host of source. Valid values: 
        /// * `Local`: localhost
        /// * `Ecs`:ECS instance
        /// * `Rds`:RDS exclusive cluster host.
        /// </summary>
        [Input("source")]
        public Input<string>? Source { get; set; }

        /// <summary>
        /// Specify the newly created ECS instance ID or dedicated cluster host ID. **NOTE:** This parameter is required if the `source` parameter is set to `Ecs` or `Rds`.
        /// </summary>
        [Input("sourceInstanceId")]
        public Input<string>? SourceInstanceId { get; set; }

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