<gh_stars>0// *** 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.Vpc
{
    public static class GetIpv4Gateways
    {
        /// <summary>
        /// This data source provides the Vpc Ipv4 Gateways of the current Alibaba Cloud user.
        /// 
        /// &gt; **NOTE:** Available in v1.181.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Basic Usage
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var ids = AliCloud.Vpc.GetIpv4Gateways.Invoke();
        /// 
        ///     var nameRegex = AliCloud.Vpc.GetIpv4Gateways.Invoke(new()
        ///     {
        ///         NameRegex = "^my-Ipv4Gateway",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["vpcIpv4GatewayId1"] = ids.Apply(getIpv4GatewaysResult =&gt; getIpv4GatewaysResult.Gateways[0]?.Id),
        ///         ["vpcIpv4GatewayId2"] = nameRegex.Apply(getIpv4GatewaysResult =&gt; getIpv4GatewaysResult.Gateways[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetIpv4GatewaysResult> InvokeAsync(GetIpv4GatewaysArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetIpv4GatewaysResult>("alicloud:vpc/getIpv4Gateways:getIpv4Gateways", args ?? new GetIpv4GatewaysArgs(), options.WithDefaults());

        /// <summary>
        /// This data source provides the Vpc Ipv4 Gateways of the current Alibaba Cloud user.
        /// 
        /// &gt; **NOTE:** Available in v1.181.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Basic Usage
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var ids = AliCloud.Vpc.GetIpv4Gateways.Invoke();
        /// 
        ///     var nameRegex = AliCloud.Vpc.GetIpv4Gateways.Invoke(new()
        ///     {
        ///         NameRegex = "^my-Ipv4Gateway",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["vpcIpv4GatewayId1"] = ids.Apply(getIpv4GatewaysResult =&gt; getIpv4GatewaysResult.Gateways[0]?.Id),
        ///         ["vpcIpv4GatewayId2"] = nameRegex.Apply(getIpv4GatewaysResult =&gt; getIpv4GatewaysResult.Gateways[0]?.Id),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetIpv4GatewaysResult> Invoke(GetIpv4GatewaysInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetIpv4GatewaysResult>("alicloud:vpc/getIpv4Gateways:getIpv4Gateways", args ?? new GetIpv4GatewaysInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetIpv4GatewaysArgs : global::Pulumi.InvokeArgs
    {
        [Input("ids")]
        private List<string>? _ids;

        /// <summary>
        /// A list of Ipv4 Gateway IDs.
        /// </summary>
        public List<string> Ids
        {
            get => _ids ?? (_ids = new List<string>());
            set => _ids = value;
        }

        /// <summary>
        /// The name of the IPv4 gateway.
        /// </summary>
        [Input("ipv4GatewayName")]
        public string? Ipv4GatewayName { get; set; }

        /// <summary>
        /// A regex string to filter results by Ipv4 Gateway name.
        /// </summary>
        [Input("nameRegex")]
        public string? NameRegex { get; set; }

        [Input("outputFile")]
        public string? OutputFile { get; set; }

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

        /// <summary>
        /// The ID of the VPC associated with the IPv4 Gateway.
        /// </summary>
        [Input("vpcId")]
        public string? VpcId { get; set; }

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

    public sealed class GetIpv4GatewaysInvokeArgs : global::Pulumi.InvokeArgs
    {
        [Input("ids")]
        private InputList<string>? _ids;

        /// <summary>
        /// A list of Ipv4 Gateway IDs.
        /// </summary>
        public InputList<string> Ids
        {
            get => _ids ?? (_ids = new InputList<string>());
            set => _ids = value;
        }

        /// <summary>
        /// The name of the IPv4 gateway.
        /// </summary>
        [Input("ipv4GatewayName")]
        public Input<string>? Ipv4GatewayName { get; set; }

        /// <summary>
        /// A regex string to filter results by Ipv4 Gateway name.
        /// </summary>
        [Input("nameRegex")]
        public Input<string>? NameRegex { get; set; }

        [Input("outputFile")]
        public Input<string>? OutputFile { get; set; }

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

        /// <summary>
        /// The ID of the VPC associated with the IPv4 Gateway.
        /// </summary>
        [Input("vpcId")]
        public Input<string>? VpcId { get; set; }

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


    [OutputType]
    public sealed class GetIpv4GatewaysResult
    {
        public readonly ImmutableArray<Outputs.GetIpv4GatewaysGatewayResult> Gateways;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly ImmutableArray<string> Ids;
        public readonly string? Ipv4GatewayName;
        public readonly string? NameRegex;
        public readonly ImmutableArray<string> Names;
        public readonly string? OutputFile;
        public readonly string? Status;
        public readonly string? VpcId;

        [OutputConstructor]
        private GetIpv4GatewaysResult(
            ImmutableArray<Outputs.GetIpv4GatewaysGatewayResult> gateways,

            string id,

            ImmutableArray<string> ids,

            string? ipv4GatewayName,

            string? nameRegex,

            ImmutableArray<string> names,

            string? outputFile,

            string? status,

            string? vpcId)
        {
            Gateways = gateways;
            Id = id;
            Ids = ids;
            Ipv4GatewayName = ipv4GatewayName;
            NameRegex = nameRegex;
            Names = names;
            OutputFile = outputFile;
            Status = status;
            VpcId = vpcId;
        }
    }
}
