<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;
using Pulumi;

namespace Cuemby.Equinix
{
    public static class GetMetalSpotMarketPrice
    {
        /// <summary>
        /// Use this data source to get Equinix Metal Spot Market Price for a plan.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Lookup by facility:
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Equinix = Pulumi.Equinix;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var example = Output.Create(Equinix.GetMetalSpotMarketPrice.InvokeAsync(new Equinix.GetMetalSpotMarketPriceArgs
        ///         {
        ///             Facility = "ny5",
        ///             Plan = "c3.small.x86",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// 
        /// Lookup by metro:
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Equinix = Pulumi.Equinix;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var example = Output.Create(Equinix.GetMetalSpotMarketPrice.InvokeAsync(new Equinix.GetMetalSpotMarketPriceArgs
        ///         {
        ///             Metro = "sv",
        ///             Plan = "c3.small.x86",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetMetalSpotMarketPriceResult> InvokeAsync(GetMetalSpotMarketPriceArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetMetalSpotMarketPriceResult>("equinix:index/getMetalSpotMarketPrice:GetMetalSpotMarketPrice", args ?? new GetMetalSpotMarketPriceArgs(), options.WithDefaults());

        /// <summary>
        /// Use this data source to get Equinix Metal Spot Market Price for a plan.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Lookup by facility:
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Equinix = Pulumi.Equinix;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var example = Output.Create(Equinix.GetMetalSpotMarketPrice.InvokeAsync(new Equinix.GetMetalSpotMarketPriceArgs
        ///         {
        ///             Facility = "ny5",
        ///             Plan = "c3.small.x86",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// 
        /// Lookup by metro:
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Equinix = Pulumi.Equinix;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var example = Output.Create(Equinix.GetMetalSpotMarketPrice.InvokeAsync(new Equinix.GetMetalSpotMarketPriceArgs
        ///         {
        ///             Metro = "sv",
        ///             Plan = "c3.small.x86",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetMetalSpotMarketPriceResult> Invoke(GetMetalSpotMarketPriceInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetMetalSpotMarketPriceResult>("equinix:index/getMetalSpotMarketPrice:GetMetalSpotMarketPrice", args ?? new GetMetalSpotMarketPriceInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetMetalSpotMarketPriceArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// Name of the facility.
        /// </summary>
        [Input("facility")]
        public string? Facility { get; set; }

        /// <summary>
        /// Name of the metro.
        /// </summary>
        [Input("metro")]
        public string? Metro { get; set; }

        /// <summary>
        /// Name of the plan.
        /// </summary>
        [Input("plan", required: true)]
        public string Plan { get; set; } = null!;

        public GetMetalSpotMarketPriceArgs()
        {
        }
    }

    public sealed class GetMetalSpotMarketPriceInvokeArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// Name of the facility.
        /// </summary>
        [Input("facility")]
        public Input<string>? Facility { get; set; }

        /// <summary>
        /// Name of the metro.
        /// </summary>
        [Input("metro")]
        public Input<string>? Metro { get; set; }

        /// <summary>
        /// Name of the plan.
        /// </summary>
        [Input("plan", required: true)]
        public Input<string> Plan { get; set; } = null!;

        public GetMetalSpotMarketPriceInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetMetalSpotMarketPriceResult
    {
        public readonly string? Facility;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly string? Metro;
        public readonly string Plan;
        /// <summary>
        /// Current spot market price for given plan in given facility.
        /// </summary>
        public readonly double Price;

        [OutputConstructor]
        private GetMetalSpotMarketPriceResult(
            string? facility,

            string id,

            string? metro,

            string plan,

            double price)
        {
            Facility = facility;
            Id = id;
            Metro = metro;
            Plan = plan;
            Price = price;
        }
    }
}
