<filename>sdk/dotnet/GetMetalIPBlockRanges.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 Cuemby.Equinix
{
    public static class GetMetalIPBlockRanges
    {
        /// <summary>
        /// Use this datasource to get CIDR expressions for allocated IP blocks of all the types in a project, optionally filtered by facility or metro.
        /// 
        /// There are four types of IP blocks in Equinix: equinix_metal_global IPv4, public IPv4, private IPv4 and IPv6. Both global and public IPv4 are routable from the Internet. Public IPv4 blocks are allocated in a facility or metro, and addresses from it can only be assigned to devices in that location. Addresses from Global IPv4 block can be assigned to a device in any metro.
        /// 
        /// The datasource has 4 list attributes: `global_ipv4`, `public_ipv4`, `private_ipv4` and `ipv6`, each listing CIDR notation (`&lt;network&gt;/&lt;mask&gt;`) of respective blocks from the project.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Equinix = Pulumi.Equinix;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var projectId = "&lt;UUID_of_your_project&gt;";
        ///         var test = Output.Create(Equinix.GetMetalIPBlockRanges.InvokeAsync(new Equinix.GetMetalIPBlockRangesArgs
        ///         {
        ///             ProjectId = projectId,
        ///         }));
        ///         this.Out = test;
        ///     }
        /// 
        ///     [Output("out")]
        ///     public Output&lt;string&gt; Out { get; set; }
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetMetalIPBlockRangesResult> InvokeAsync(GetMetalIPBlockRangesArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetMetalIPBlockRangesResult>("equinix:index/getMetalIPBlockRanges:GetMetalIPBlockRanges", args ?? new GetMetalIPBlockRangesArgs(), options.WithDefaults());

        /// <summary>
        /// Use this datasource to get CIDR expressions for allocated IP blocks of all the types in a project, optionally filtered by facility or metro.
        /// 
        /// There are four types of IP blocks in Equinix: equinix_metal_global IPv4, public IPv4, private IPv4 and IPv6. Both global and public IPv4 are routable from the Internet. Public IPv4 blocks are allocated in a facility or metro, and addresses from it can only be assigned to devices in that location. Addresses from Global IPv4 block can be assigned to a device in any metro.
        /// 
        /// The datasource has 4 list attributes: `global_ipv4`, `public_ipv4`, `private_ipv4` and `ipv6`, each listing CIDR notation (`&lt;network&gt;/&lt;mask&gt;`) of respective blocks from the project.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Equinix = Pulumi.Equinix;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var projectId = "&lt;UUID_of_your_project&gt;";
        ///         var test = Output.Create(Equinix.GetMetalIPBlockRanges.InvokeAsync(new Equinix.GetMetalIPBlockRangesArgs
        ///         {
        ///             ProjectId = projectId,
        ///         }));
        ///         this.Out = test;
        ///     }
        /// 
        ///     [Output("out")]
        ///     public Output&lt;string&gt; Out { get; set; }
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetMetalIPBlockRangesResult> Invoke(GetMetalIPBlockRangesInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetMetalIPBlockRangesResult>("equinix:index/getMetalIPBlockRanges:GetMetalIPBlockRanges", args ?? new GetMetalIPBlockRangesInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetMetalIPBlockRangesArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// Facility code filtering the IP blocks. Global IPv4 blcoks will be listed
        /// anyway. If you omit this and metro, all the block from the project will be listed.
        /// </summary>
        [Input("facility")]
        public string? Facility { get; set; }

        /// <summary>
        /// Metro code filtering the IP blocks. Global IPv4 blcoks will be listed
        /// anyway. If you omit this and facility, all the block from the project will be listed.
        /// </summary>
        [Input("metro")]
        public string? Metro { get; set; }

        /// <summary>
        /// ID of the project from which to list the blocks.
        /// </summary>
        [Input("projectId", required: true)]
        public string ProjectId { get; set; } = null!;

        public GetMetalIPBlockRangesArgs()
        {
        }
    }

    public sealed class GetMetalIPBlockRangesInvokeArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// Facility code filtering the IP blocks. Global IPv4 blcoks will be listed
        /// anyway. If you omit this and metro, all the block from the project will be listed.
        /// </summary>
        [Input("facility")]
        public Input<string>? Facility { get; set; }

        /// <summary>
        /// Metro code filtering the IP blocks. Global IPv4 blcoks will be listed
        /// anyway. If you omit this and facility, all the block from the project will be listed.
        /// </summary>
        [Input("metro")]
        public Input<string>? Metro { get; set; }

        /// <summary>
        /// ID of the project from which to list the blocks.
        /// </summary>
        [Input("projectId", required: true)]
        public Input<string> ProjectId { get; set; } = null!;

        public GetMetalIPBlockRangesInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetMetalIPBlockRangesResult
    {
        public readonly string? Facility;
        /// <summary>
        /// list of CIDR expressions for Global IPv4 blocks in the project.
        /// </summary>
        public readonly ImmutableArray<string> GlobalIpv4s;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// list of CIDR expressions for IPv6 blocks in the project.
        /// </summary>
        public readonly ImmutableArray<string> Ipv6s;
        public readonly string? Metro;
        /// <summary>
        /// list of CIDR expressions for Private IPv4 blocks in the project.
        /// </summary>
        public readonly ImmutableArray<string> PrivateIpv4s;
        public readonly string ProjectId;
        /// <summary>
        /// list of CIDR expressions for Public IPv4 blocks in the project.
        /// </summary>
        public readonly ImmutableArray<string> PublicIpv4s;

        [OutputConstructor]
        private GetMetalIPBlockRangesResult(
            string? facility,

            ImmutableArray<string> globalIpv4s,

            string id,

            ImmutableArray<string> ipv6s,

            string? metro,

            ImmutableArray<string> privateIpv4s,

            string projectId,

            ImmutableArray<string> publicIpv4s)
        {
            Facility = facility;
            GlobalIpv4s = globalIpv4s;
            Id = id;
            Ipv6s = ipv6s;
            Metro = metro;
            PrivateIpv4s = privateIpv4s;
            ProjectId = projectId;
            PublicIpv4s = publicIpv4s;
        }
    }
}
