// *** 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>
    /// ## Import
    /// 
    /// Yundun_bastionhost instance can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:bastionhost/instance:Instance example bastionhost-exampe123456
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:bastionhost/instance:Instance")]
    public partial class Instance : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The AD auth server of the Instance. See the following `Block ad_auth_server`.
        /// </summary>
        [Output("adAuthServers")]
        public Output<ImmutableArray<Outputs.InstanceAdAuthServer>> AdAuthServers { get; private set; } = null!;

        /// <summary>
        /// The bandwidth of Cloud Bastionhost instance. Valid values: 0 to 500. Unit: Mbit/s.
        /// </summary>
        [Output("bandwidth")]
        public Output<string> Bandwidth { get; private set; } = null!;

        /// <summary>
        /// Description of the instance. This name can have a string of 1 to 63 characters.
        /// </summary>
        [Output("description")]
        public Output<string> Description { get; private set; } = null!;

        /// <summary>
        /// Whether to Enable the public internet access to a specified Bastionhost instance. The valid values: `true`, `false`.
        /// </summary>
        [Output("enablePublicAccess")]
        public Output<bool> EnablePublicAccess { get; private set; } = null!;

        /// <summary>
        /// The LDAP auth server of the Instance. See the following `Block ldap_auth_server`.
        /// </summary>
        [Output("ldapAuthServers")]
        public Output<ImmutableArray<Outputs.InstanceLdapAuthServer>> LdapAuthServers { get; private set; } = null!;

        /// <summary>
        /// The package type of Cloud Bastionhost instance. You can query more supported types through the [DescribePricingModule](https://help.aliyun.com/document_detail/96469.html).
        /// </summary>
        [Output("licenseCode")]
        public Output<string> LicenseCode { get; private set; } = null!;

        [Output("period")]
        public Output<int?> Period { get; private set; } = null!;

        /// <summary>
        /// The plan code of Cloud Bastionhost instance. Valid values:
        /// - `cloudbastion`: Basic Edition.
        /// - `cloudbastion_ha`: HA Edition.
        /// </summary>
        [Output("planCode")]
        public Output<string> PlanCode { get; private set; } = null!;

        /// <summary>
        /// The public IP address that you want to add to the whitelist.
        /// </summary>
        [Output("publicWhiteLists")]
        public Output<ImmutableArray<string>> PublicWhiteLists { get; private set; } = null!;

        /// <summary>
        /// Automatic renewal period. Valid values: `1` to `9`, `12`, `24`, `36`. **NOTE:** The `renew_period` is required under the condition that `renewal_status` is `AutoRenewal`. From version 1.193.0, `renew_period` can be modified.
        /// </summary>
        [Output("renewPeriod")]
        public Output<int?> RenewPeriod { get; private set; } = null!;

        /// <summary>
        /// The unit of the auto-renewal period. Valid values:  **NOTE:** The `renewal_period_unit` is required under the condition that `renewal_status` is `AutoRenewal`.
        /// - `M`: months.
        /// - `Y`: years.
        /// </summary>
        [Output("renewalPeriodUnit")]
        public Output<string> RenewalPeriodUnit { get; private set; } = null!;

        /// <summary>
        /// Automatic renewal status. Valid values: `AutoRenewal`, `ManualRenewal`, `NotRenewal`. From version 1.193.0, `renewal_status` can be modified.
        /// </summary>
        [Output("renewalStatus")]
        public Output<string> RenewalStatus { get; private set; } = null!;

        /// <summary>
        /// The Id of resource group which the Bastionhost Instance belongs. If not set, the resource is created in the default resource group.
        /// </summary>
        [Output("resourceGroupId")]
        public Output<string> ResourceGroupId { get; private set; } = null!;

        [Output("securityGroupIds")]
        public Output<ImmutableArray<string>> SecurityGroupIds { get; private set; } = null!;

        /// <summary>
        /// The storage of Cloud Bastionhost instance. Valid values: 0 to 500. Unit: TB.
        /// </summary>
        [Output("storage")]
        public Output<string> Storage { get; private set; } = null!;

        /// <summary>
        /// A mapping of tags to assign to the resource.
        /// </summary>
        [Output("tags")]
        public Output<ImmutableDictionary<string, object>?> Tags { get; private set; } = null!;

        /// <summary>
        /// VSwitch ID configured to Bastionhost.
        /// </summary>
        [Output("vswitchId")]
        public Output<string> VswitchId { get; private set; } = null!;


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

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

    public sealed class InstanceArgs : global::Pulumi.ResourceArgs
    {
        [Input("adAuthServers")]
        private InputList<Inputs.InstanceAdAuthServerArgs>? _adAuthServers;

        /// <summary>
        /// The AD auth server of the Instance. See the following `Block ad_auth_server`.
        /// </summary>
        public InputList<Inputs.InstanceAdAuthServerArgs> AdAuthServers
        {
            get => _adAuthServers ?? (_adAuthServers = new InputList<Inputs.InstanceAdAuthServerArgs>());
            set => _adAuthServers = value;
        }

        /// <summary>
        /// The bandwidth of Cloud Bastionhost instance. Valid values: 0 to 500. Unit: Mbit/s.
        /// </summary>
        [Input("bandwidth", required: true)]
        public Input<string> Bandwidth { get; set; } = null!;

        /// <summary>
        /// Description of the instance. This name can have a string of 1 to 63 characters.
        /// </summary>
        [Input("description", required: true)]
        public Input<string> Description { get; set; } = null!;

        /// <summary>
        /// Whether to Enable the public internet access to a specified Bastionhost instance. The valid values: `true`, `false`.
        /// </summary>
        [Input("enablePublicAccess")]
        public Input<bool>? EnablePublicAccess { get; set; }

        [Input("ldapAuthServers")]
        private InputList<Inputs.InstanceLdapAuthServerArgs>? _ldapAuthServers;

        /// <summary>
        /// The LDAP auth server of the Instance. See the following `Block ldap_auth_server`.
        /// </summary>
        public InputList<Inputs.InstanceLdapAuthServerArgs> LdapAuthServers
        {
            get => _ldapAuthServers ?? (_ldapAuthServers = new InputList<Inputs.InstanceLdapAuthServerArgs>());
            set => _ldapAuthServers = value;
        }

        /// <summary>
        /// The package type of Cloud Bastionhost instance. You can query more supported types through the [DescribePricingModule](https://help.aliyun.com/document_detail/96469.html).
        /// </summary>
        [Input("licenseCode", required: true)]
        public Input<string> LicenseCode { get; set; } = null!;

        [Input("period")]
        public Input<int>? Period { get; set; }

        /// <summary>
        /// The plan code of Cloud Bastionhost instance. Valid values:
        /// - `cloudbastion`: Basic Edition.
        /// - `cloudbastion_ha`: HA Edition.
        /// </summary>
        [Input("planCode", required: true)]
        public Input<string> PlanCode { get; set; } = null!;

        [Input("publicWhiteLists")]
        private InputList<string>? _publicWhiteLists;

        /// <summary>
        /// The public IP address that you want to add to the whitelist.
        /// </summary>
        public InputList<string> PublicWhiteLists
        {
            get => _publicWhiteLists ?? (_publicWhiteLists = new InputList<string>());
            set => _publicWhiteLists = value;
        }

        /// <summary>
        /// Automatic renewal period. Valid values: `1` to `9`, `12`, `24`, `36`. **NOTE:** The `renew_period` is required under the condition that `renewal_status` is `AutoRenewal`. From version 1.193.0, `renew_period` can be modified.
        /// </summary>
        [Input("renewPeriod")]
        public Input<int>? RenewPeriod { get; set; }

        /// <summary>
        /// The unit of the auto-renewal period. Valid values:  **NOTE:** The `renewal_period_unit` is required under the condition that `renewal_status` is `AutoRenewal`.
        /// - `M`: months.
        /// - `Y`: years.
        /// </summary>
        [Input("renewalPeriodUnit")]
        public Input<string>? RenewalPeriodUnit { get; set; }

        /// <summary>
        /// Automatic renewal status. Valid values: `AutoRenewal`, `ManualRenewal`, `NotRenewal`. From version 1.193.0, `renewal_status` can be modified.
        /// </summary>
        [Input("renewalStatus")]
        public Input<string>? RenewalStatus { get; set; }

        /// <summary>
        /// The Id of resource group which the Bastionhost Instance belongs. If not set, the resource is created in the default resource group.
        /// </summary>
        [Input("resourceGroupId")]
        public Input<string>? ResourceGroupId { get; set; }

        [Input("securityGroupIds", required: true)]
        private InputList<string>? _securityGroupIds;
        public InputList<string> SecurityGroupIds
        {
            get => _securityGroupIds ?? (_securityGroupIds = new InputList<string>());
            set => _securityGroupIds = value;
        }

        /// <summary>
        /// The storage of Cloud Bastionhost instance. Valid values: 0 to 500. Unit: TB.
        /// </summary>
        [Input("storage", required: true)]
        public Input<string> Storage { get; set; } = null!;

        [Input("tags")]
        private InputMap<object>? _tags;

        /// <summary>
        /// A mapping of tags to assign to the resource.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        /// <summary>
        /// VSwitch ID configured to Bastionhost.
        /// </summary>
        [Input("vswitchId", required: true)]
        public Input<string> VswitchId { get; set; } = null!;

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

    public sealed class InstanceState : global::Pulumi.ResourceArgs
    {
        [Input("adAuthServers")]
        private InputList<Inputs.InstanceAdAuthServerGetArgs>? _adAuthServers;

        /// <summary>
        /// The AD auth server of the Instance. See the following `Block ad_auth_server`.
        /// </summary>
        public InputList<Inputs.InstanceAdAuthServerGetArgs> AdAuthServers
        {
            get => _adAuthServers ?? (_adAuthServers = new InputList<Inputs.InstanceAdAuthServerGetArgs>());
            set => _adAuthServers = value;
        }

        /// <summary>
        /// The bandwidth of Cloud Bastionhost instance. Valid values: 0 to 500. Unit: Mbit/s.
        /// </summary>
        [Input("bandwidth")]
        public Input<string>? Bandwidth { get; set; }

        /// <summary>
        /// Description of the instance. This name can have a string of 1 to 63 characters.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// Whether to Enable the public internet access to a specified Bastionhost instance. The valid values: `true`, `false`.
        /// </summary>
        [Input("enablePublicAccess")]
        public Input<bool>? EnablePublicAccess { get; set; }

        [Input("ldapAuthServers")]
        private InputList<Inputs.InstanceLdapAuthServerGetArgs>? _ldapAuthServers;

        /// <summary>
        /// The LDAP auth server of the Instance. See the following `Block ldap_auth_server`.
        /// </summary>
        public InputList<Inputs.InstanceLdapAuthServerGetArgs> LdapAuthServers
        {
            get => _ldapAuthServers ?? (_ldapAuthServers = new InputList<Inputs.InstanceLdapAuthServerGetArgs>());
            set => _ldapAuthServers = value;
        }

        /// <summary>
        /// The package type of Cloud Bastionhost instance. You can query more supported types through the [DescribePricingModule](https://help.aliyun.com/document_detail/96469.html).
        /// </summary>
        [Input("licenseCode")]
        public Input<string>? LicenseCode { get; set; }

        [Input("period")]
        public Input<int>? Period { get; set; }

        /// <summary>
        /// The plan code of Cloud Bastionhost instance. Valid values:
        /// - `cloudbastion`: Basic Edition.
        /// - `cloudbastion_ha`: HA Edition.
        /// </summary>
        [Input("planCode")]
        public Input<string>? PlanCode { get; set; }

        [Input("publicWhiteLists")]
        private InputList<string>? _publicWhiteLists;

        /// <summary>
        /// The public IP address that you want to add to the whitelist.
        /// </summary>
        public InputList<string> PublicWhiteLists
        {
            get => _publicWhiteLists ?? (_publicWhiteLists = new InputList<string>());
            set => _publicWhiteLists = value;
        }

        /// <summary>
        /// Automatic renewal period. Valid values: `1` to `9`, `12`, `24`, `36`. **NOTE:** The `renew_period` is required under the condition that `renewal_status` is `AutoRenewal`. From version 1.193.0, `renew_period` can be modified.
        /// </summary>
        [Input("renewPeriod")]
        public Input<int>? RenewPeriod { get; set; }

        /// <summary>
        /// The unit of the auto-renewal period. Valid values:  **NOTE:** The `renewal_period_unit` is required under the condition that `renewal_status` is `AutoRenewal`.
        /// - `M`: months.
        /// - `Y`: years.
        /// </summary>
        [Input("renewalPeriodUnit")]
        public Input<string>? RenewalPeriodUnit { get; set; }

        /// <summary>
        /// Automatic renewal status. Valid values: `AutoRenewal`, `ManualRenewal`, `NotRenewal`. From version 1.193.0, `renewal_status` can be modified.
        /// </summary>
        [Input("renewalStatus")]
        public Input<string>? RenewalStatus { get; set; }

        /// <summary>
        /// The Id of resource group which the Bastionhost Instance belongs. If not set, the resource is created in the default resource group.
        /// </summary>
        [Input("resourceGroupId")]
        public Input<string>? ResourceGroupId { get; set; }

        [Input("securityGroupIds")]
        private InputList<string>? _securityGroupIds;
        public InputList<string> SecurityGroupIds
        {
            get => _securityGroupIds ?? (_securityGroupIds = new InputList<string>());
            set => _securityGroupIds = value;
        }

        /// <summary>
        /// The storage of Cloud Bastionhost instance. Valid values: 0 to 500. Unit: TB.
        /// </summary>
        [Input("storage")]
        public Input<string>? Storage { get; set; }

        [Input("tags")]
        private InputMap<object>? _tags;

        /// <summary>
        /// A mapping of tags to assign to the resource.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        /// <summary>
        /// VSwitch ID configured to Bastionhost.
        /// </summary>
        [Input("vswitchId")]
        public Input<string>? VswitchId { get; set; }

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