// *** 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.Vpn
{
    /// <summary>
    /// ## Example Usage
    /// 
    /// Basic Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var fooGateway = new AliCloud.Vpn.Gateway("fooGateway", new()
    ///     {
    ///         VpcId = "vpc-fake-id",
    ///         Bandwidth = 10,
    ///         EnableSsl = true,
    ///         InstanceChargeType = "PostPaid",
    ///         Description = "test_create_description",
    ///     });
    /// 
    ///     var fooSslVpnServer = new AliCloud.Vpn.SslVpnServer("fooSslVpnServer", new()
    ///     {
    ///         VpnGatewayId = fooGateway.Id,
    ///         ClientIpPool = "192.168.0.0/16",
    ///         LocalSubnet = "172.16.0.0/21",
    ///         Protocol = "UDP",
    ///         Cipher = "AES-128-CBC",
    ///         Port = 1194,
    ///         Compress = false,
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// SSL-VPN server can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:vpn/sslVpnServer:SslVpnServer example vss-abc123456
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:vpn/sslVpnServer:SslVpnServer")]
    public partial class SslVpnServer : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The encryption algorithm that is used in the SSL-VPN connection. Valid values: `AES-128-CBC`,`AES-192-CBC`,`AES-256-CBC`,`none`. Default value: `AES-128-CBC`.
        /// * `AES-128-CBC` - the AES-128-CBC algorithm.
        /// * `AES-192-CBC` - the AES-192-CBC algorithm.
        /// * `AES-256-CBC` - the AES-256-CBC algorithm.
        /// </summary>
        [Output("cipher")]
        public Output<string?> Cipher { get; private set; } = null!;

        /// <summary>
        /// The CIDR block from which access addresses are allocated to the virtual network interface card of the client.
        /// </summary>
        [Output("clientIpPool")]
        public Output<string> ClientIpPool { get; private set; } = null!;

        /// <summary>
        /// Specifies whether to enable data compression. Valid values: `true`,`false`. Default value: `false`
        /// </summary>
        [Output("compress")]
        public Output<bool?> Compress { get; private set; } = null!;

        /// <summary>
        /// The number of current connections.
        /// </summary>
        [Output("connections")]
        public Output<int> Connections { get; private set; } = null!;

        /// <summary>
        /// The internet IP of the SSL-VPN server.
        /// </summary>
        [Output("internetIp")]
        public Output<string> InternetIp { get; private set; } = null!;

        /// <summary>
        /// The CIDR block to be accessed by the client through the SSL-VPN connection. It supports to set multi CIDRs by comma join ways, like `10.0.1.0/24,10.0.2.0/24,10.0.3.0/24`.
        /// </summary>
        [Output("localSubnet")]
        public Output<string> LocalSubnet { get; private set; } = null!;

        /// <summary>
        /// The maximum number of connections.
        /// </summary>
        [Output("maxConnections")]
        public Output<int> MaxConnections { get; private set; } = null!;

        /// <summary>
        /// The name of the SSL-VPN server.
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// The port used by the SSL-VPN server. The default value is `1194`.The following ports cannot be used: [22, 2222, 22222, 9000, 9001, 9002, 7505, 80, 443, 53, 68, 123, 4510, 4560, 500, 4500].
        /// </summary>
        [Output("port")]
        public Output<int?> Port { get; private set; } = null!;

        /// <summary>
        /// The protocol used by the SSL-VPN server. Valid value: UDP(default) |TCP
        /// </summary>
        [Output("protocol")]
        public Output<string?> Protocol { get; private set; } = null!;

        /// <summary>
        /// The ID of the VPN gateway.
        /// </summary>
        [Output("vpnGatewayId")]
        public Output<string> VpnGatewayId { get; private set; } = null!;


        /// <summary>
        /// Create a SslVpnServer 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 SslVpnServer(string name, SslVpnServerArgs args, CustomResourceOptions? options = null)
            : base("alicloud:vpn/sslVpnServer:SslVpnServer", name, args ?? new SslVpnServerArgs(), MakeResourceOptions(options, ""))
        {
        }

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

    public sealed class SslVpnServerArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The encryption algorithm that is used in the SSL-VPN connection. Valid values: `AES-128-CBC`,`AES-192-CBC`,`AES-256-CBC`,`none`. Default value: `AES-128-CBC`.
        /// * `AES-128-CBC` - the AES-128-CBC algorithm.
        /// * `AES-192-CBC` - the AES-192-CBC algorithm.
        /// * `AES-256-CBC` - the AES-256-CBC algorithm.
        /// </summary>
        [Input("cipher")]
        public Input<string>? Cipher { get; set; }

        /// <summary>
        /// The CIDR block from which access addresses are allocated to the virtual network interface card of the client.
        /// </summary>
        [Input("clientIpPool", required: true)]
        public Input<string> ClientIpPool { get; set; } = null!;

        /// <summary>
        /// Specifies whether to enable data compression. Valid values: `true`,`false`. Default value: `false`
        /// </summary>
        [Input("compress")]
        public Input<bool>? Compress { get; set; }

        /// <summary>
        /// The CIDR block to be accessed by the client through the SSL-VPN connection. It supports to set multi CIDRs by comma join ways, like `10.0.1.0/24,10.0.2.0/24,10.0.3.0/24`.
        /// </summary>
        [Input("localSubnet", required: true)]
        public Input<string> LocalSubnet { get; set; } = null!;

        /// <summary>
        /// The name of the SSL-VPN server.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// The port used by the SSL-VPN server. The default value is `1194`.The following ports cannot be used: [22, 2222, 22222, 9000, 9001, 9002, 7505, 80, 443, 53, 68, 123, 4510, 4560, 500, 4500].
        /// </summary>
        [Input("port")]
        public Input<int>? Port { get; set; }

        /// <summary>
        /// The protocol used by the SSL-VPN server. Valid value: UDP(default) |TCP
        /// </summary>
        [Input("protocol")]
        public Input<string>? Protocol { get; set; }

        /// <summary>
        /// The ID of the VPN gateway.
        /// </summary>
        [Input("vpnGatewayId", required: true)]
        public Input<string> VpnGatewayId { get; set; } = null!;

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

    public sealed class SslVpnServerState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The encryption algorithm that is used in the SSL-VPN connection. Valid values: `AES-128-CBC`,`AES-192-CBC`,`AES-256-CBC`,`none`. Default value: `AES-128-CBC`.
        /// * `AES-128-CBC` - the AES-128-CBC algorithm.
        /// * `AES-192-CBC` - the AES-192-CBC algorithm.
        /// * `AES-256-CBC` - the AES-256-CBC algorithm.
        /// </summary>
        [Input("cipher")]
        public Input<string>? Cipher { get; set; }

        /// <summary>
        /// The CIDR block from which access addresses are allocated to the virtual network interface card of the client.
        /// </summary>
        [Input("clientIpPool")]
        public Input<string>? ClientIpPool { get; set; }

        /// <summary>
        /// Specifies whether to enable data compression. Valid values: `true`,`false`. Default value: `false`
        /// </summary>
        [Input("compress")]
        public Input<bool>? Compress { get; set; }

        /// <summary>
        /// The number of current connections.
        /// </summary>
        [Input("connections")]
        public Input<int>? Connections { get; set; }

        /// <summary>
        /// The internet IP of the SSL-VPN server.
        /// </summary>
        [Input("internetIp")]
        public Input<string>? InternetIp { get; set; }

        /// <summary>
        /// The CIDR block to be accessed by the client through the SSL-VPN connection. It supports to set multi CIDRs by comma join ways, like `10.0.1.0/24,10.0.2.0/24,10.0.3.0/24`.
        /// </summary>
        [Input("localSubnet")]
        public Input<string>? LocalSubnet { get; set; }

        /// <summary>
        /// The maximum number of connections.
        /// </summary>
        [Input("maxConnections")]
        public Input<int>? MaxConnections { get; set; }

        /// <summary>
        /// The name of the SSL-VPN server.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// The port used by the SSL-VPN server. The default value is `1194`.The following ports cannot be used: [22, 2222, 22222, 9000, 9001, 9002, 7505, 80, 443, 53, 68, 123, 4510, 4560, 500, 4500].
        /// </summary>
        [Input("port")]
        public Input<int>? Port { get; set; }

        /// <summary>
        /// The protocol used by the SSL-VPN server. Valid value: UDP(default) |TCP
        /// </summary>
        [Input("protocol")]
        public Input<string>? Protocol { get; set; }

        /// <summary>
        /// The ID of the VPN gateway.
        /// </summary>
        [Input("vpnGatewayId")]
        public Input<string>? VpnGatewayId { get; set; }

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