// *** 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 GetMetalOperatingSystem
    {
        /// <summary>
        /// Use this data source to get Equinix Metal Operating System image.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Equinix = Cuemby.Equinix;
        /// using Equinix = Pulumi.Equinix;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var example = Output.Create(Equinix.GetMetalOperatingSystem.InvokeAsync(new Equinix.GetMetalOperatingSystemArgs
        ///         {
        ///             Distro = "ubuntu",
        ///             Version = "20.04",
        ///             ProvisionableOn = "c3.medium.x86",
        ///         }));
        ///         var server = new Equinix.MetalDevice("server", new Equinix.MetalDeviceArgs
        ///         {
        ///             Hostname = "tf.ubuntu",
        ///             Plan = "c3.medium.x86",
        ///             Facilities = 
        ///             {
        ///                 "ny5",
        ///             },
        ///             OperatingSystem = example.Apply(example =&gt; example.Id),
        ///             BillingCycle = "hourly",
        ///             ProjectId = local.Project_id,
        ///         });
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetMetalOperatingSystemResult> InvokeAsync(GetMetalOperatingSystemArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetMetalOperatingSystemResult>("equinix:index/getMetalOperatingSystem:GetMetalOperatingSystem", args ?? new GetMetalOperatingSystemArgs(), options.WithDefaults());

        /// <summary>
        /// Use this data source to get Equinix Metal Operating System image.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Equinix = Cuemby.Equinix;
        /// using Equinix = Pulumi.Equinix;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var example = Output.Create(Equinix.GetMetalOperatingSystem.InvokeAsync(new Equinix.GetMetalOperatingSystemArgs
        ///         {
        ///             Distro = "ubuntu",
        ///             Version = "20.04",
        ///             ProvisionableOn = "c3.medium.x86",
        ///         }));
        ///         var server = new Equinix.MetalDevice("server", new Equinix.MetalDeviceArgs
        ///         {
        ///             Hostname = "tf.ubuntu",
        ///             Plan = "c3.medium.x86",
        ///             Facilities = 
        ///             {
        ///                 "ny5",
        ///             },
        ///             OperatingSystem = example.Apply(example =&gt; example.Id),
        ///             BillingCycle = "hourly",
        ///             ProjectId = local.Project_id,
        ///         });
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetMetalOperatingSystemResult> Invoke(GetMetalOperatingSystemInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetMetalOperatingSystemResult>("equinix:index/getMetalOperatingSystem:GetMetalOperatingSystem", args ?? new GetMetalOperatingSystemInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetMetalOperatingSystemArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// Name of the OS distribution.
        /// </summary>
        [Input("distro")]
        public string? Distro { get; set; }

        /// <summary>
        /// Name or part of the name of the distribution. Case insensitive.
        /// </summary>
        [Input("name")]
        public string? Name { get; set; }

        /// <summary>
        /// Plan name.
        /// </summary>
        [Input("provisionableOn")]
        public string? ProvisionableOn { get; set; }

        /// <summary>
        /// Version of the distribution.
        /// </summary>
        [Input("version")]
        public string? Version { get; set; }

        public GetMetalOperatingSystemArgs()
        {
        }
    }

    public sealed class GetMetalOperatingSystemInvokeArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// Name of the OS distribution.
        /// </summary>
        [Input("distro")]
        public Input<string>? Distro { get; set; }

        /// <summary>
        /// Name or part of the name of the distribution. Case insensitive.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// Plan name.
        /// </summary>
        [Input("provisionableOn")]
        public Input<string>? ProvisionableOn { get; set; }

        /// <summary>
        /// Version of the distribution.
        /// </summary>
        [Input("version")]
        public Input<string>? Version { get; set; }

        public GetMetalOperatingSystemInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetMetalOperatingSystemResult
    {
        public readonly string? Distro;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly string? Name;
        public readonly string? ProvisionableOn;
        /// <summary>
        /// Operating system slug (same as `id`).
        /// </summary>
        public readonly string Slug;
        public readonly string? Version;

        [OutputConstructor]
        private GetMetalOperatingSystemResult(
            string? distro,

            string id,

            string? name,

            string? provisionableOn,

            string slug,

            string? version)
        {
            Distro = distro;
            Id = id;
            Name = name;
            ProvisionableOn = provisionableOn;
            Slug = slug;
            Version = version;
        }
    }
}
