1. Packages
  2. Equinix Metal (Deprecated)
  3. API Docs
  4. getSpotMarketPrice

This package is deprecated. We recommend using the new Equinix package.

Equinix Metal v3.2.1 published on Thursday, Dec 30, 2021 by DEPRECATED

equinix-metal.getSpotMarketPrice

Explore with Pulumi AI

This package is deprecated. We recommend using the new Equinix package.

Equinix Metal v3.2.1 published on Thursday, Dec 30, 2021 by DEPRECATED

Use this data source to get Equinix Metal Spot Market Price for a plan.

Example Usage

Lookup by facility

using Pulumi;
using EquinixMetal = Pulumi.EquinixMetal;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(EquinixMetal.GetSpotMarketPrice.InvokeAsync(new EquinixMetal.GetSpotMarketPriceArgs
        {
            Facility = "ny5",
            Plan = "c3.small.x86",
        }));
    }

}
Copy
package main

import (
	"github.com/pulumi/pulumi-equinix-metal/sdk/v3/go/equinix-metal"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := "ny5"
		_, err := equinix - metal.GetSpotMarketPrice(ctx, &GetSpotMarketPriceArgs{
			Facility: &opt0,
			Plan:     "c3.small.x86",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy

Coming soon!

import * as pulumi from "@pulumi/pulumi";
import * as metal from "@pulumi/metal";

const example = pulumi.output(metal.getSpotMarketPrice({
    facility: "ny5",
    plan: "c3.small.x86",
}));
Copy
import pulumi
import pulumi_equinix_metal as equinix_metal

example = equinix_metal.get_spot_market_price(facility="ny5",
    plan="c3.small.x86")
Copy

Coming soon!

Lookup by metro

using Pulumi;
using EquinixMetal = Pulumi.EquinixMetal;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(EquinixMetal.GetSpotMarketPrice.InvokeAsync(new EquinixMetal.GetSpotMarketPriceArgs
        {
            Metro = "sv",
            Plan = "c3.small.x86",
        }));
    }

}
Copy
package main

import (
	"github.com/pulumi/pulumi-equinix-metal/sdk/v3/go/equinix-metal"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := "sv"
		_, err := equinix - metal.GetSpotMarketPrice(ctx, &GetSpotMarketPriceArgs{
			Metro: &opt0,
			Plan:  "c3.small.x86",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy

Coming soon!

import * as pulumi from "@pulumi/pulumi";
import * as metal from "@pulumi/metal";

const example = pulumi.output(metal.getSpotMarketPrice({
    metro: "sv",
    plan: "c3.small.x86",
}));
Copy
import pulumi
import pulumi_equinix_metal as equinix_metal

example = equinix_metal.get_spot_market_price(metro="sv",
    plan="c3.small.x86")
Copy

Coming soon!

Using getSpotMarketPrice

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getSpotMarketPrice(args: GetSpotMarketPriceArgs, opts?: InvokeOptions): Promise<GetSpotMarketPriceResult>
function getSpotMarketPriceOutput(args: GetSpotMarketPriceOutputArgs, opts?: InvokeOptions): Output<GetSpotMarketPriceResult>
Copy
def get_spot_market_price(facility: Optional[str] = None,
                          metro: Optional[str] = None,
                          plan: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetSpotMarketPriceResult
def get_spot_market_price_output(facility: Optional[pulumi.Input[str]] = None,
                          metro: Optional[pulumi.Input[str]] = None,
                          plan: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetSpotMarketPriceResult]
Copy
func GetSpotMarketPrice(ctx *Context, args *GetSpotMarketPriceArgs, opts ...InvokeOption) (*GetSpotMarketPriceResult, error)
func GetSpotMarketPriceOutput(ctx *Context, args *GetSpotMarketPriceOutputArgs, opts ...InvokeOption) GetSpotMarketPriceResultOutput
Copy

> Note: This function is named GetSpotMarketPrice in the Go SDK.

public static class GetSpotMarketPrice 
{
    public static Task<GetSpotMarketPriceResult> InvokeAsync(GetSpotMarketPriceArgs args, InvokeOptions? opts = null)
    public static Output<GetSpotMarketPriceResult> Invoke(GetSpotMarketPriceInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetSpotMarketPriceResult> getSpotMarketPrice(GetSpotMarketPriceArgs args, InvokeOptions options)
public static Output<GetSpotMarketPriceResult> getSpotMarketPrice(GetSpotMarketPriceArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: equinix-metal:index/getSpotMarketPrice:getSpotMarketPrice
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Plan This property is required. string
Name of the plan.
Facility string
Name of the facility.
Metro string
Name of the metro.
Plan This property is required. string
Name of the plan.
Facility string
Name of the facility.
Metro string
Name of the metro.
plan This property is required. String
Name of the plan.
facility String
Name of the facility.
metro String
Name of the metro.
plan This property is required. string
Name of the plan.
facility string
Name of the facility.
metro string
Name of the metro.
plan This property is required. str
Name of the plan.
facility str
Name of the facility.
metro str
Name of the metro.
plan This property is required. String
Name of the plan.
facility String
Name of the facility.
metro String
Name of the metro.

getSpotMarketPrice Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Plan string
Price double
Current spot market price for given plan in given facility.
Facility string
Metro string
Id string
The provider-assigned unique ID for this managed resource.
Plan string
Price float64
Current spot market price for given plan in given facility.
Facility string
Metro string
id String
The provider-assigned unique ID for this managed resource.
plan String
price Double
Current spot market price for given plan in given facility.
facility String
metro String
id string
The provider-assigned unique ID for this managed resource.
plan string
price number
Current spot market price for given plan in given facility.
facility string
metro string
id str
The provider-assigned unique ID for this managed resource.
plan str
price float
Current spot market price for given plan in given facility.
facility str
metro str
id String
The provider-assigned unique ID for this managed resource.
plan String
price Number
Current spot market price for given plan in given facility.
facility String
metro String

Package Details

Repository
Equinix Metal pulumi/pulumi-equinix-metal
License
Apache-2.0
Notes
This Pulumi package is based on the metal Terraform Provider.

This package is deprecated. We recommend using the new Equinix package.

Equinix Metal v3.2.1 published on Thursday, Dec 30, 2021 by DEPRECATED