<filename>sdk/dotnet/Ovh/GetVrackNetworks.cs// *** 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;
using Pulumi;

namespace Lbrlabs.PulumiPackage.Ovh
{
    public static class GetVrackNetworks
    {
        /// <summary>
        /// Use this data source to get the list of Vrack network ids available for your IPLoadbalancer associated with your OVHcloud account.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using System.Linq;
        /// using Pulumi;
        /// using Ovh = Pulumi.Ovh;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var lbNetworks = Ovh.GetVrackNetworks.Invoke(new()
        ///     {
        ///         ServiceName = "XXXXXX",
        ///         Subnet = "10.0.0.0/24",
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetVrackNetworksResult> InvokeAsync(GetVrackNetworksArgs args, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.InvokeAsync<GetVrackNetworksResult>("ovh:index/getVrackNetworks:getVrackNetworks", args ?? new GetVrackNetworksArgs(), options.WithDefaults());

        /// <summary>
        /// Use this data source to get the list of Vrack network ids available for your IPLoadbalancer associated with your OVHcloud account.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using System.Linq;
        /// using Pulumi;
        /// using Ovh = Pulumi.Ovh;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var lbNetworks = Ovh.GetVrackNetworks.Invoke(new()
        ///     {
        ///         ServiceName = "XXXXXX",
        ///         Subnet = "10.0.0.0/24",
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetVrackNetworksResult> Invoke(GetVrackNetworksInvokeArgs args, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.Invoke<GetVrackNetworksResult>("ovh:index/getVrackNetworks:getVrackNetworks", args ?? new GetVrackNetworksInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetVrackNetworksArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The internal name of your IP load balancing
        /// </summary>
        [Input("serviceName", required: true)]
        public string ServiceName { get; set; } = null!;

        /// <summary>
        /// Filters networks on the subnet.
        /// </summary>
        [Input("subnet")]
        public string? Subnet { get; set; }

        /// <summary>
        /// Filters networks on the vlan id.
        /// </summary>
        [Input("vlanId")]
        public int? VlanId { get; set; }

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

    public sealed class GetVrackNetworksInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The internal name of your IP load balancing
        /// </summary>
        [Input("serviceName", required: true)]
        public Input<string> ServiceName { get; set; } = null!;

        /// <summary>
        /// Filters networks on the subnet.
        /// </summary>
        [Input("subnet")]
        public Input<string>? Subnet { get; set; }

        /// <summary>
        /// Filters networks on the vlan id.
        /// </summary>
        [Input("vlanId")]
        public Input<int>? VlanId { get; set; }

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


    [OutputType]
    public sealed class GetVrackNetworksResult
    {
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// The list of vrack network ids.
        /// </summary>
        public readonly ImmutableArray<int> Results;
        public readonly string ServiceName;
        public readonly string? Subnet;
        public readonly int? VlanId;

        [OutputConstructor]
        private GetVrackNetworksResult(
            string id,

            ImmutableArray<int> results,

            string serviceName,

            string? subnet,

            int? vlanId)
        {
            Id = id;
            Results = results;
            ServiceName = serviceName;
            Subnet = subnet;
            VlanId = vlanId;
        }
    }
}
