// *** 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
{
    public static class GetGateways
    {
        /// <summary>
        /// The VPNs data source lists a number of VPNs resource information owned by an Alicloud account.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var vpnGateways = AliCloud.Vpn.GetGateways.Invoke(new()
        ///     {
        ///         BusinessStatus = "Normal",
        ///         Ids = new[]
        ///         {
        ///             "fake-vpn-id1",
        ///             "fake-vpn-id2",
        ///         },
        ///         IncludeReservationData = true,
        ///         NameRegex = "testAcc*",
        ///         OutputFile = "/tmp/vpns",
        ///         Status = "Active",
        ///         VpcId = "fake-vpc-id",
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetGatewaysResult> InvokeAsync(GetGatewaysArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetGatewaysResult>("alicloud:vpn/getGateways:getGateways", args ?? new GetGatewaysArgs(), options.WithDefaults());

        /// <summary>
        /// The VPNs data source lists a number of VPNs resource information owned by an Alicloud account.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var vpnGateways = AliCloud.Vpn.GetGateways.Invoke(new()
        ///     {
        ///         BusinessStatus = "Normal",
        ///         Ids = new[]
        ///         {
        ///             "fake-vpn-id1",
        ///             "fake-vpn-id2",
        ///         },
        ///         IncludeReservationData = true,
        ///         NameRegex = "testAcc*",
        ///         OutputFile = "/tmp/vpns",
        ///         Status = "Active",
        ///         VpcId = "fake-vpc-id",
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetGatewaysResult> Invoke(GetGatewaysInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetGatewaysResult>("alicloud:vpn/getGateways:getGateways", args ?? new GetGatewaysInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetGatewaysArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// Limit search to specific business status - valid value is "Normal", "FinancialLocked".
        /// </summary>
        [Input("businessStatus")]
        public string? BusinessStatus { get; set; }

        /// <summary>
        /// Indicates whether the IPsec-VPN feature is enabled.
        /// </summary>
        [Input("enableIpsec")]
        public bool? EnableIpsec { get; set; }

        [Input("ids")]
        private List<string>? _ids;

        /// <summary>
        /// IDs of the VPN.
        /// </summary>
        public List<string> Ids
        {
            get => _ids ?? (_ids = new List<string>());
            set => _ids = value;
        }

        /// <summary>
        /// Include ineffective ordering data.
        /// </summary>
        [Input("includeReservationData")]
        public bool? IncludeReservationData { get; set; }

        /// <summary>
        /// A regex string of VPN name.
        /// </summary>
        [Input("nameRegex")]
        public string? NameRegex { get; set; }

        /// <summary>
        /// Save the result to the file.
        /// </summary>
        [Input("outputFile")]
        public string? OutputFile { get; set; }

        /// <summary>
        /// Limit search to specific status - valid value is "Init", "Provisioning", "Active", "Updating", "Deleting".
        /// </summary>
        [Input("status")]
        public string? Status { get; set; }

        /// <summary>
        /// Use the VPC ID as the search key.
        /// </summary>
        [Input("vpcId")]
        public string? VpcId { get; set; }

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

    public sealed class GetGatewaysInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// Limit search to specific business status - valid value is "Normal", "FinancialLocked".
        /// </summary>
        [Input("businessStatus")]
        public Input<string>? BusinessStatus { get; set; }

        /// <summary>
        /// Indicates whether the IPsec-VPN feature is enabled.
        /// </summary>
        [Input("enableIpsec")]
        public Input<bool>? EnableIpsec { get; set; }

        [Input("ids")]
        private InputList<string>? _ids;

        /// <summary>
        /// IDs of the VPN.
        /// </summary>
        public InputList<string> Ids
        {
            get => _ids ?? (_ids = new InputList<string>());
            set => _ids = value;
        }

        /// <summary>
        /// Include ineffective ordering data.
        /// </summary>
        [Input("includeReservationData")]
        public Input<bool>? IncludeReservationData { get; set; }

        /// <summary>
        /// A regex string of VPN name.
        /// </summary>
        [Input("nameRegex")]
        public Input<string>? NameRegex { get; set; }

        /// <summary>
        /// Save the result to the file.
        /// </summary>
        [Input("outputFile")]
        public Input<string>? OutputFile { get; set; }

        /// <summary>
        /// Limit search to specific status - valid value is "Init", "Provisioning", "Active", "Updating", "Deleting".
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

        /// <summary>
        /// Use the VPC ID as the search key.
        /// </summary>
        [Input("vpcId")]
        public Input<string>? VpcId { get; set; }

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


    [OutputType]
    public sealed class GetGatewaysResult
    {
        /// <summary>
        /// The business status of the VPN gateway.
        /// </summary>
        public readonly string? BusinessStatus;
        /// <summary>
        /// Whether the ipsec function is enabled.
        /// </summary>
        public readonly bool? EnableIpsec;
        /// <summary>
        /// A list of VPN gateways. Each element contains the following attributes:
        /// </summary>
        public readonly ImmutableArray<Outputs.GetGatewaysGatewayResult> Gateways;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// IDs of the VPN.
        /// </summary>
        public readonly ImmutableArray<string> Ids;
        public readonly bool? IncludeReservationData;
        public readonly string? NameRegex;
        /// <summary>
        /// names of the VPN.
        /// </summary>
        public readonly ImmutableArray<string> Names;
        public readonly string? OutputFile;
        /// <summary>
        /// The status of the VPN
        /// </summary>
        public readonly string? Status;
        /// <summary>
        /// ID of the VPC that the VPN belongs.
        /// </summary>
        public readonly string? VpcId;

        [OutputConstructor]
        private GetGatewaysResult(
            string? businessStatus,

            bool? enableIpsec,

            ImmutableArray<Outputs.GetGatewaysGatewayResult> gateways,

            string id,

            ImmutableArray<string> ids,

            bool? includeReservationData,

            string? nameRegex,

            ImmutableArray<string> names,

            string? outputFile,

            string? status,

            string? vpcId)
        {
            BusinessStatus = businessStatus;
            EnableIpsec = enableIpsec;
            Gateways = gateways;
            Id = id;
            Ids = ids;
            IncludeReservationData = includeReservationData;
            NameRegex = nameRegex;
            Names = names;
            OutputFile = outputFile;
            Status = status;
            VpcId = vpcId;
        }
    }
}
