// *** 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.Eds
{
    /// <summary>
    /// Provides a ECD Ad Connector Office Site resource.
    /// 
    /// For information about ECD Ad Connector Office Site and how to use it, see [What is Ad Connector Office Site](https://www.alibabacloud.com/help/en/elastic-desktop-service/latest/createadconnectorofficesite).
    /// 
    /// &gt; **NOTE:** Available in v1.176.0+.
    /// 
    /// ## Example Usage
    /// 
    /// Basic Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var defaultInstance = new AliCloud.Cen.Instance("defaultInstance", new()
    ///     {
    ///         CenInstanceName = @var.Name,
    ///         ProtectionLevel = "REDUCED",
    ///     });
    /// 
    ///     var defaultAdConnectorOfficeSite = new AliCloud.Eds.AdConnectorOfficeSite("defaultAdConnectorOfficeSite", new()
    ///     {
    ///         AdConnectorOfficeSiteName = @var.Name,
    ///         Bandwidth = 100,
    ///         CenId = defaultInstance.Id,
    ///         CidrBlock = "10.0.0.0/12",
    ///         DesktopAccessType = "INTERNET",
    ///         DnsAddresses = new[]
    ///         {
    ///             "127.0.0.2",
    ///         },
    ///         DomainName = "example1234.com",
    ///         DomainPassword = "YourPassword1234",
    ///         DomainUserName = "Administrator",
    ///         EnableAdminAccess = true,
    ///         EnableInternetAccess = true,
    ///         MfaEnabled = false,
    ///         SubDomainDnsAddresses = new[]
    ///         {
    ///             "127.0.0.3",
    ///         },
    ///         SubDomainName = "child.example1234.com",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// ECD Ad Connector Office Site can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:eds/adConnectorOfficeSite:AdConnectorOfficeSite example &lt;id&gt;
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:eds/adConnectorOfficeSite:AdConnectorOfficeSite")]
    public partial class AdConnectorOfficeSite : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The name of the workspace. The name must be 2 to 255 characters in length. It must start with a letter and cannot start with `http://` or `https://`. It can contain digits, colons (:), underscores (_), and hyphens (-).
        /// </summary>
        [Output("adConnectorOfficeSiteName")]
        public Output<string> AdConnectorOfficeSiteName { get; private set; } = null!;

        /// <summary>
        /// The ad hostname.
        /// </summary>
        [Output("adHostname")]
        public Output<string?> AdHostname { get; private set; } = null!;

        /// <summary>
        /// The maximum public bandwidth value. Valid values: 0 to 200. If you do not specify this parameter or you set this parameter to 0, Internet access is disabled.
        /// </summary>
        [Output("bandwidth")]
        public Output<int?> Bandwidth { get; private set; } = null!;

        /// <summary>
        /// The ID of the CEN instance.
        /// </summary>
        [Output("cenId")]
        public Output<string> CenId { get; private set; } = null!;

        /// <summary>
        /// The cen owner id.
        /// </summary>
        [Output("cenOwnerId")]
        public Output<string?> CenOwnerId { get; private set; } = null!;

        /// <summary>
        /// Workspace Corresponds to the Security Office Network of IPv4 Segment.
        /// </summary>
        [Output("cidrBlock")]
        public Output<string> CidrBlock { get; private set; } = null!;

        /// <summary>
        /// The method that you use to connect to cloud desktops. **Note:** The VPC connection method is provided by Alibaba Cloud PrivateLink. You are not charged for PrivateLink. When you set this parameter to VPC or Any, PrivateLink is automatically activated. Default value: `INTERNET`. Valid values:
        /// - `INTERNET`: connects clients to cloud desktops only over the Internet.
        /// - `VPC`: connects clients to cloud desktops only over a VPC.
        /// - `ANY`: connects clients to cloud desktops over the Internet or a VPC. You can select a connection method when you use a client to connect to the cloud desktop.
        /// </summary>
        [Output("desktopAccessType")]
        public Output<string> DesktopAccessType { get; private set; } = null!;

        /// <summary>
        /// The IP address N of the DNS server of the enterprise AD system. You can specify only one IP address.
        /// </summary>
        [Output("dnsAddresses")]
        public Output<ImmutableArray<string>> DnsAddresses { get; private set; } = null!;

        /// <summary>
        /// The domain name of the enterprise AD system. You can register each domain name only once.
        /// </summary>
        [Output("domainName")]
        public Output<string> DomainName { get; private set; } = null!;

        /// <summary>
        /// The password of the domain administrator. The password can be up to 64 characters in length.
        /// </summary>
        [Output("domainPassword")]
        public Output<string?> DomainPassword { get; private set; } = null!;

        /// <summary>
        /// The username of the domain administrator. The username can be up to 64 characters in length.
        /// </summary>
        [Output("domainUserName")]
        public Output<string?> DomainUserName { get; private set; } = null!;

        /// <summary>
        /// Specifies whether to grant the permissions of the local administrator to the desktop users. Default value: true.
        /// </summary>
        [Output("enableAdminAccess")]
        public Output<bool> EnableAdminAccess { get; private set; } = null!;

        /// <summary>
        /// Specifies whether to enable Internet access.
        /// </summary>
        [Output("enableInternetAccess")]
        public Output<bool> EnableInternetAccess { get; private set; } = null!;

        /// <summary>
        /// Specifies whether to enable multi-factor authentication (MFA).
        /// </summary>
        [Output("mfaEnabled")]
        public Output<bool?> MfaEnabled { get; private set; } = null!;

        /// <summary>
        /// The protocol type. Valid values: `ASP`, `HDX`.
        /// </summary>
        [Output("protocolType")]
        public Output<string?> ProtocolType { get; private set; } = null!;

        /// <summary>
        /// The AD Connector specifications. Valid values: `1`, `2`.
        /// </summary>
        [Output("specification")]
        public Output<int?> Specification { get; private set; } = null!;

        /// <summary>
        /// The resource State.
        /// </summary>
        [Output("status")]
        public Output<string> Status { get; private set; } = null!;

        /// <summary>
        /// The DNS address N of the enterprise AD subdomain. If you specify a value for the `sub_domain_name` parameter but you do not specify a value for this parameter, the DNS address of the subdomain is the same as the DNS address of the parent domain.
        /// </summary>
        [Output("subDomainDnsAddresses")]
        public Output<ImmutableArray<string>> SubDomainDnsAddresses { get; private set; } = null!;

        /// <summary>
        /// The domain name of the enterprise AD subdomain.
        /// </summary>
        [Output("subDomainName")]
        public Output<string?> SubDomainName { get; private set; } = null!;

        /// <summary>
        /// The verification code. If the CEN instance that you specify for the CenId parameter belongs to another Alibaba Cloud account, you must call the SendVerifyCode operation to obtain the verification code.
        /// </summary>
        [Output("verifyCode")]
        public Output<string?> VerifyCode { get; private set; } = null!;


        /// <summary>
        /// Create a AdConnectorOfficeSite 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 AdConnectorOfficeSite(string name, AdConnectorOfficeSiteArgs args, CustomResourceOptions? options = null)
            : base("alicloud:eds/adConnectorOfficeSite:AdConnectorOfficeSite", name, args ?? new AdConnectorOfficeSiteArgs(), MakeResourceOptions(options, ""))
        {
        }

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

    public sealed class AdConnectorOfficeSiteArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The name of the workspace. The name must be 2 to 255 characters in length. It must start with a letter and cannot start with `http://` or `https://`. It can contain digits, colons (:), underscores (_), and hyphens (-).
        /// </summary>
        [Input("adConnectorOfficeSiteName", required: true)]
        public Input<string> AdConnectorOfficeSiteName { get; set; } = null!;

        /// <summary>
        /// The ad hostname.
        /// </summary>
        [Input("adHostname")]
        public Input<string>? AdHostname { get; set; }

        /// <summary>
        /// The maximum public bandwidth value. Valid values: 0 to 200. If you do not specify this parameter or you set this parameter to 0, Internet access is disabled.
        /// </summary>
        [Input("bandwidth")]
        public Input<int>? Bandwidth { get; set; }

        /// <summary>
        /// The ID of the CEN instance.
        /// </summary>
        [Input("cenId", required: true)]
        public Input<string> CenId { get; set; } = null!;

        /// <summary>
        /// The cen owner id.
        /// </summary>
        [Input("cenOwnerId")]
        public Input<string>? CenOwnerId { get; set; }

        /// <summary>
        /// Workspace Corresponds to the Security Office Network of IPv4 Segment.
        /// </summary>
        [Input("cidrBlock", required: true)]
        public Input<string> CidrBlock { get; set; } = null!;

        /// <summary>
        /// The method that you use to connect to cloud desktops. **Note:** The VPC connection method is provided by Alibaba Cloud PrivateLink. You are not charged for PrivateLink. When you set this parameter to VPC or Any, PrivateLink is automatically activated. Default value: `INTERNET`. Valid values:
        /// - `INTERNET`: connects clients to cloud desktops only over the Internet.
        /// - `VPC`: connects clients to cloud desktops only over a VPC.
        /// - `ANY`: connects clients to cloud desktops over the Internet or a VPC. You can select a connection method when you use a client to connect to the cloud desktop.
        /// </summary>
        [Input("desktopAccessType")]
        public Input<string>? DesktopAccessType { get; set; }

        [Input("dnsAddresses", required: true)]
        private InputList<string>? _dnsAddresses;

        /// <summary>
        /// The IP address N of the DNS server of the enterprise AD system. You can specify only one IP address.
        /// </summary>
        public InputList<string> DnsAddresses
        {
            get => _dnsAddresses ?? (_dnsAddresses = new InputList<string>());
            set => _dnsAddresses = value;
        }

        /// <summary>
        /// The domain name of the enterprise AD system. You can register each domain name only once.
        /// </summary>
        [Input("domainName", required: true)]
        public Input<string> DomainName { get; set; } = null!;

        /// <summary>
        /// The password of the domain administrator. The password can be up to 64 characters in length.
        /// </summary>
        [Input("domainPassword")]
        public Input<string>? DomainPassword { get; set; }

        /// <summary>
        /// The username of the domain administrator. The username can be up to 64 characters in length.
        /// </summary>
        [Input("domainUserName")]
        public Input<string>? DomainUserName { get; set; }

        /// <summary>
        /// Specifies whether to grant the permissions of the local administrator to the desktop users. Default value: true.
        /// </summary>
        [Input("enableAdminAccess")]
        public Input<bool>? EnableAdminAccess { get; set; }

        /// <summary>
        /// Specifies whether to enable Internet access.
        /// </summary>
        [Input("enableInternetAccess")]
        public Input<bool>? EnableInternetAccess { get; set; }

        /// <summary>
        /// Specifies whether to enable multi-factor authentication (MFA).
        /// </summary>
        [Input("mfaEnabled")]
        public Input<bool>? MfaEnabled { get; set; }

        /// <summary>
        /// The protocol type. Valid values: `ASP`, `HDX`.
        /// </summary>
        [Input("protocolType")]
        public Input<string>? ProtocolType { get; set; }

        /// <summary>
        /// The AD Connector specifications. Valid values: `1`, `2`.
        /// </summary>
        [Input("specification")]
        public Input<int>? Specification { get; set; }

        [Input("subDomainDnsAddresses")]
        private InputList<string>? _subDomainDnsAddresses;

        /// <summary>
        /// The DNS address N of the enterprise AD subdomain. If you specify a value for the `sub_domain_name` parameter but you do not specify a value for this parameter, the DNS address of the subdomain is the same as the DNS address of the parent domain.
        /// </summary>
        public InputList<string> SubDomainDnsAddresses
        {
            get => _subDomainDnsAddresses ?? (_subDomainDnsAddresses = new InputList<string>());
            set => _subDomainDnsAddresses = value;
        }

        /// <summary>
        /// The domain name of the enterprise AD subdomain.
        /// </summary>
        [Input("subDomainName")]
        public Input<string>? SubDomainName { get; set; }

        /// <summary>
        /// The verification code. If the CEN instance that you specify for the CenId parameter belongs to another Alibaba Cloud account, you must call the SendVerifyCode operation to obtain the verification code.
        /// </summary>
        [Input("verifyCode")]
        public Input<string>? VerifyCode { get; set; }

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

    public sealed class AdConnectorOfficeSiteState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The name of the workspace. The name must be 2 to 255 characters in length. It must start with a letter and cannot start with `http://` or `https://`. It can contain digits, colons (:), underscores (_), and hyphens (-).
        /// </summary>
        [Input("adConnectorOfficeSiteName")]
        public Input<string>? AdConnectorOfficeSiteName { get; set; }

        /// <summary>
        /// The ad hostname.
        /// </summary>
        [Input("adHostname")]
        public Input<string>? AdHostname { get; set; }

        /// <summary>
        /// The maximum public bandwidth value. Valid values: 0 to 200. If you do not specify this parameter or you set this parameter to 0, Internet access is disabled.
        /// </summary>
        [Input("bandwidth")]
        public Input<int>? Bandwidth { get; set; }

        /// <summary>
        /// The ID of the CEN instance.
        /// </summary>
        [Input("cenId")]
        public Input<string>? CenId { get; set; }

        /// <summary>
        /// The cen owner id.
        /// </summary>
        [Input("cenOwnerId")]
        public Input<string>? CenOwnerId { get; set; }

        /// <summary>
        /// Workspace Corresponds to the Security Office Network of IPv4 Segment.
        /// </summary>
        [Input("cidrBlock")]
        public Input<string>? CidrBlock { get; set; }

        /// <summary>
        /// The method that you use to connect to cloud desktops. **Note:** The VPC connection method is provided by Alibaba Cloud PrivateLink. You are not charged for PrivateLink. When you set this parameter to VPC or Any, PrivateLink is automatically activated. Default value: `INTERNET`. Valid values:
        /// - `INTERNET`: connects clients to cloud desktops only over the Internet.
        /// - `VPC`: connects clients to cloud desktops only over a VPC.
        /// - `ANY`: connects clients to cloud desktops over the Internet or a VPC. You can select a connection method when you use a client to connect to the cloud desktop.
        /// </summary>
        [Input("desktopAccessType")]
        public Input<string>? DesktopAccessType { get; set; }

        [Input("dnsAddresses")]
        private InputList<string>? _dnsAddresses;

        /// <summary>
        /// The IP address N of the DNS server of the enterprise AD system. You can specify only one IP address.
        /// </summary>
        public InputList<string> DnsAddresses
        {
            get => _dnsAddresses ?? (_dnsAddresses = new InputList<string>());
            set => _dnsAddresses = value;
        }

        /// <summary>
        /// The domain name of the enterprise AD system. You can register each domain name only once.
        /// </summary>
        [Input("domainName")]
        public Input<string>? DomainName { get; set; }

        /// <summary>
        /// The password of the domain administrator. The password can be up to 64 characters in length.
        /// </summary>
        [Input("domainPassword")]
        public Input<string>? DomainPassword { get; set; }

        /// <summary>
        /// The username of the domain administrator. The username can be up to 64 characters in length.
        /// </summary>
        [Input("domainUserName")]
        public Input<string>? DomainUserName { get; set; }

        /// <summary>
        /// Specifies whether to grant the permissions of the local administrator to the desktop users. Default value: true.
        /// </summary>
        [Input("enableAdminAccess")]
        public Input<bool>? EnableAdminAccess { get; set; }

        /// <summary>
        /// Specifies whether to enable Internet access.
        /// </summary>
        [Input("enableInternetAccess")]
        public Input<bool>? EnableInternetAccess { get; set; }

        /// <summary>
        /// Specifies whether to enable multi-factor authentication (MFA).
        /// </summary>
        [Input("mfaEnabled")]
        public Input<bool>? MfaEnabled { get; set; }

        /// <summary>
        /// The protocol type. Valid values: `ASP`, `HDX`.
        /// </summary>
        [Input("protocolType")]
        public Input<string>? ProtocolType { get; set; }

        /// <summary>
        /// The AD Connector specifications. Valid values: `1`, `2`.
        /// </summary>
        [Input("specification")]
        public Input<int>? Specification { get; set; }

        /// <summary>
        /// The resource State.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

        [Input("subDomainDnsAddresses")]
        private InputList<string>? _subDomainDnsAddresses;

        /// <summary>
        /// The DNS address N of the enterprise AD subdomain. If you specify a value for the `sub_domain_name` parameter but you do not specify a value for this parameter, the DNS address of the subdomain is the same as the DNS address of the parent domain.
        /// </summary>
        public InputList<string> SubDomainDnsAddresses
        {
            get => _subDomainDnsAddresses ?? (_subDomainDnsAddresses = new InputList<string>());
            set => _subDomainDnsAddresses = value;
        }

        /// <summary>
        /// The domain name of the enterprise AD subdomain.
        /// </summary>
        [Input("subDomainName")]
        public Input<string>? SubDomainName { get; set; }

        /// <summary>
        /// The verification code. If the CEN instance that you specify for the CenId parameter belongs to another Alibaba Cloud account, you must call the SendVerifyCode operation to obtain the verification code.
        /// </summary>
        [Input("verifyCode")]
        public Input<string>? VerifyCode { get; set; }

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