Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

getSpotMarketPrice

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

Example Usage

using Pulumi;
using EquinixMetal = Pulumi.EquinixMetal;

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

}
package main

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

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := equinix - metal.GetSpotMarketPrice(ctx, &equinix-metal.GetSpotMarketPriceArgs{
            Facility: "ewr1",
            Plan:     "c1.small.x86",
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_equinix_metal as equinix_metal

example = equinix_metal.get_spot_market_price(facility="ewr1",
    plan="c1.small.x86")
import * as pulumi from "@pulumi/pulumi";
import * as metal from "@pulumi/metal";

const example = pulumi.output(metal.getSpotMarketPrice({
    facility: "ewr1",
    plan: "c1.small.x86",
}, { async: true }));

Using getSpotMarketPrice

function getSpotMarketPrice(args: GetSpotMarketPriceArgs, opts?: InvokeOptions): Promise<GetSpotMarketPriceResult>
def get_spot_market_price(facility: Optional[str] = None, plan: Optional[str] = None, opts: Optional[InvokeOptions] = None) -> GetSpotMarketPriceResult
func GetSpotMarketPrice(ctx *Context, args *GetSpotMarketPriceArgs, opts ...InvokeOption) (*GetSpotMarketPriceResult, error)

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

public static class GetSpotMarketPrice {
    public static Task<GetSpotMarketPriceResult> InvokeAsync(GetSpotMarketPriceArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Facility string

Name of the facility.

Plan string

Name of the plan.

Facility string

Name of the facility.

Plan string

Name of the plan.

facility string

Name of the facility.

plan string

Name of the plan.

facility str

Name of the facility.

plan str

Name of the plan.

getSpotMarketPrice Result

The following output properties are available:

Facility 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
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
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 str
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.

Package Details

Repository
https://github.com/pulumi/pulumi-equinix-metal
License
Apache-2.0
Notes
This Pulumi package is based on the metal Terraform Provider.