equinix-metal logo
Equinix Metal v3.2.1, Dec 30 21

equinix-metal.SpotMarketRequest

Explore with Pulumi AI

Provides an Equinix Metal Spot Market Request resource to allow you to manage spot market requests on your account. For more detail on Spot Market, see this article in Equinix Metal documentation.

Example Usage

using Pulumi;
using EquinixMetal = Pulumi.EquinixMetal;

class MyStack : Stack
{
    public MyStack()
    {
        // Create a spot market request
        var req = new EquinixMetal.SpotMarketRequest("req", new EquinixMetal.SpotMarketRequestArgs
        {
            ProjectId = local.Project_id,
            MaxBidPrice = 0.03,
            Facilities = 
            {
                "ny5",
            },
            DevicesMin = 1,
            DevicesMax = 1,
            InstanceParameters = new EquinixMetal.Inputs.SpotMarketRequestInstanceParametersArgs
            {
                Hostname = "testspot",
                BillingCycle = "hourly",
                OperatingSystem = "ubuntu_20_04",
                Plan = "c3.small.x86",
            },
        });
    }

}
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 {
		_, err := equinix - metal.NewSpotMarketRequest(ctx, "req", &equinix-metal.SpotMarketRequestArgs{
			ProjectId:   pulumi.Any(local.Project_id),
			MaxBidPrice: pulumi.Float64(0.03),
			Facilities: pulumi.StringArray{
				pulumi.String("ny5"),
			},
			DevicesMin: pulumi.Int(1),
			DevicesMax: pulumi.Int(1),
			InstanceParameters: &SpotMarketRequestInstanceParametersArgs{
				Hostname:        pulumi.String("testspot"),
				BillingCycle:    pulumi.String("hourly"),
				OperatingSystem: pulumi.String("ubuntu_20_04"),
				Plan:            pulumi.String("c3.small.x86"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_equinix_metal as equinix_metal

# Create a spot market request
req = equinix_metal.SpotMarketRequest("req",
    project_id=local["project_id"],
    max_bid_price=0.03,
    facilities=["ny5"],
    devices_min=1,
    devices_max=1,
    instance_parameters=equinix_metal.SpotMarketRequestInstanceParametersArgs(
        hostname="testspot",
        billing_cycle="hourly",
        operating_system="ubuntu_20_04",
        plan="c3.small.x86",
    ))
import * as pulumi from "@pulumi/pulumi";
import * as equinix_metal from "@pulumi/equinix-metal";

// Create a spot market request
const req = new equinix_metal.SpotMarketRequest("req", {
    projectId: local.project_id,
    maxBidPrice: 0.03,
    facilities: ["ny5"],
    devicesMin: 1,
    devicesMax: 1,
    instanceParameters: {
        hostname: "testspot",
        billingCycle: "hourly",
        operatingSystem: "ubuntu_20_04",
        plan: "c3.small.x86",
    },
});

Coming soon!

Create SpotMarketRequest Resource

new SpotMarketRequest(name: string, args: SpotMarketRequestArgs, opts?: CustomResourceOptions);
@overload
def SpotMarketRequest(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      devices_max: Optional[int] = None,
                      devices_min: Optional[int] = None,
                      facilities: Optional[Sequence[str]] = None,
                      instance_parameters: Optional[SpotMarketRequestInstanceParametersArgs] = None,
                      max_bid_price: Optional[float] = None,
                      metro: Optional[str] = None,
                      project_id: Optional[str] = None,
                      wait_for_devices: Optional[bool] = None)
@overload
def SpotMarketRequest(resource_name: str,
                      args: SpotMarketRequestArgs,
                      opts: Optional[ResourceOptions] = None)
func NewSpotMarketRequest(ctx *Context, name string, args SpotMarketRequestArgs, opts ...ResourceOption) (*SpotMarketRequest, error)
public SpotMarketRequest(string name, SpotMarketRequestArgs args, CustomResourceOptions? opts = null)
public SpotMarketRequest(String name, SpotMarketRequestArgs args)
public SpotMarketRequest(String name, SpotMarketRequestArgs args, CustomResourceOptions options)
type: equinix-metal:SpotMarketRequest
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args SpotMarketRequestArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args SpotMarketRequestArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args SpotMarketRequestArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args SpotMarketRequestArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args SpotMarketRequestArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

SpotMarketRequest Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The SpotMarketRequest resource accepts the following input properties:

DevicesMax int

Maximum number devices to be created

DevicesMin int

Miniumum number devices to be created

InstanceParameters Pulumi.EquinixMetal.Inputs.SpotMarketRequestInstanceParametersArgs

Parameters for devices provisioned from this request. You can find the parameter description from the equinix-metal.Device doc.

  • billing_cycle
  • plan
  • operating_system
  • hostname
  • termintation_time
  • always_pxe
  • description
  • features
  • locked
  • project_ssh_keys
  • user_ssh_keys
  • userdata
  • customdata
  • ipxe_script_url
  • tags
MaxBidPrice double

Maximum price user is willing to pay per hour per device

ProjectId string

Project ID

Facilities List<string>

Facility IDs where devices should be created

Metro string

Metro where devices should be created

WaitForDevices bool

On resource creation - wait until all desired devices are active, on resource destruction - wait until devices are removed

DevicesMax int

Maximum number devices to be created

DevicesMin int

Miniumum number devices to be created

InstanceParameters SpotMarketRequestInstanceParametersArgs

Parameters for devices provisioned from this request. You can find the parameter description from the equinix-metal.Device doc.

  • billing_cycle
  • plan
  • operating_system
  • hostname
  • termintation_time
  • always_pxe
  • description
  • features
  • locked
  • project_ssh_keys
  • user_ssh_keys
  • userdata
  • customdata
  • ipxe_script_url
  • tags
MaxBidPrice float64

Maximum price user is willing to pay per hour per device

ProjectId string

Project ID

Facilities []string

Facility IDs where devices should be created

Metro string

Metro where devices should be created

WaitForDevices bool

On resource creation - wait until all desired devices are active, on resource destruction - wait until devices are removed

devicesMax Integer

Maximum number devices to be created

devicesMin Integer

Miniumum number devices to be created

instanceParameters SpotMarketRequestInstanceParametersArgs

Parameters for devices provisioned from this request. You can find the parameter description from the equinix-metal.Device doc.

  • billing_cycle
  • plan
  • operating_system
  • hostname
  • termintation_time
  • always_pxe
  • description
  • features
  • locked
  • project_ssh_keys
  • user_ssh_keys
  • userdata
  • customdata
  • ipxe_script_url
  • tags
maxBidPrice Double

Maximum price user is willing to pay per hour per device

projectId String

Project ID

facilities List<String>

Facility IDs where devices should be created

metro String

Metro where devices should be created

waitForDevices Boolean

On resource creation - wait until all desired devices are active, on resource destruction - wait until devices are removed

devicesMax number

Maximum number devices to be created

devicesMin number

Miniumum number devices to be created

instanceParameters SpotMarketRequestInstanceParametersArgs

Parameters for devices provisioned from this request. You can find the parameter description from the equinix-metal.Device doc.

  • billing_cycle
  • plan
  • operating_system
  • hostname
  • termintation_time
  • always_pxe
  • description
  • features
  • locked
  • project_ssh_keys
  • user_ssh_keys
  • userdata
  • customdata
  • ipxe_script_url
  • tags
maxBidPrice number

Maximum price user is willing to pay per hour per device

projectId string

Project ID

facilities string[]

Facility IDs where devices should be created

metro string

Metro where devices should be created

waitForDevices boolean

On resource creation - wait until all desired devices are active, on resource destruction - wait until devices are removed

devices_max int

Maximum number devices to be created

devices_min int

Miniumum number devices to be created

instance_parameters SpotMarketRequestInstanceParametersArgs

Parameters for devices provisioned from this request. You can find the parameter description from the equinix-metal.Device doc.

  • billing_cycle
  • plan
  • operating_system
  • hostname
  • termintation_time
  • always_pxe
  • description
  • features
  • locked
  • project_ssh_keys
  • user_ssh_keys
  • userdata
  • customdata
  • ipxe_script_url
  • tags
max_bid_price float

Maximum price user is willing to pay per hour per device

project_id str

Project ID

facilities Sequence[str]

Facility IDs where devices should be created

metro str

Metro where devices should be created

wait_for_devices bool

On resource creation - wait until all desired devices are active, on resource destruction - wait until devices are removed

devicesMax Number

Maximum number devices to be created

devicesMin Number

Miniumum number devices to be created

instanceParameters Property Map

Parameters for devices provisioned from this request. You can find the parameter description from the equinix-metal.Device doc.

  • billing_cycle
  • plan
  • operating_system
  • hostname
  • termintation_time
  • always_pxe
  • description
  • features
  • locked
  • project_ssh_keys
  • user_ssh_keys
  • userdata
  • customdata
  • ipxe_script_url
  • tags
maxBidPrice Number

Maximum price user is willing to pay per hour per device

projectId String

Project ID

facilities List<String>

Facility IDs where devices should be created

metro String

Metro where devices should be created

waitForDevices Boolean

On resource creation - wait until all desired devices are active, on resource destruction - wait until devices are removed

Outputs

All input properties are implicitly available as output properties. Additionally, the SpotMarketRequest resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing SpotMarketRequest Resource

Get an existing SpotMarketRequest resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: SpotMarketRequestState, opts?: CustomResourceOptions): SpotMarketRequest
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        devices_max: Optional[int] = None,
        devices_min: Optional[int] = None,
        facilities: Optional[Sequence[str]] = None,
        instance_parameters: Optional[SpotMarketRequestInstanceParametersArgs] = None,
        max_bid_price: Optional[float] = None,
        metro: Optional[str] = None,
        project_id: Optional[str] = None,
        wait_for_devices: Optional[bool] = None) -> SpotMarketRequest
func GetSpotMarketRequest(ctx *Context, name string, id IDInput, state *SpotMarketRequestState, opts ...ResourceOption) (*SpotMarketRequest, error)
public static SpotMarketRequest Get(string name, Input<string> id, SpotMarketRequestState? state, CustomResourceOptions? opts = null)
public static SpotMarketRequest get(String name, Output<String> id, SpotMarketRequestState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
DevicesMax int

Maximum number devices to be created

DevicesMin int

Miniumum number devices to be created

Facilities List<string>

Facility IDs where devices should be created

InstanceParameters Pulumi.EquinixMetal.Inputs.SpotMarketRequestInstanceParametersArgs

Parameters for devices provisioned from this request. You can find the parameter description from the equinix-metal.Device doc.

  • billing_cycle
  • plan
  • operating_system
  • hostname
  • termintation_time
  • always_pxe
  • description
  • features
  • locked
  • project_ssh_keys
  • user_ssh_keys
  • userdata
  • customdata
  • ipxe_script_url
  • tags
MaxBidPrice double

Maximum price user is willing to pay per hour per device

Metro string

Metro where devices should be created

ProjectId string

Project ID

WaitForDevices bool

On resource creation - wait until all desired devices are active, on resource destruction - wait until devices are removed

DevicesMax int

Maximum number devices to be created

DevicesMin int

Miniumum number devices to be created

Facilities []string

Facility IDs where devices should be created

InstanceParameters SpotMarketRequestInstanceParametersArgs

Parameters for devices provisioned from this request. You can find the parameter description from the equinix-metal.Device doc.

  • billing_cycle
  • plan
  • operating_system
  • hostname
  • termintation_time
  • always_pxe
  • description
  • features
  • locked
  • project_ssh_keys
  • user_ssh_keys
  • userdata
  • customdata
  • ipxe_script_url
  • tags
MaxBidPrice float64

Maximum price user is willing to pay per hour per device

Metro string

Metro where devices should be created

ProjectId string

Project ID

WaitForDevices bool

On resource creation - wait until all desired devices are active, on resource destruction - wait until devices are removed

devicesMax Integer

Maximum number devices to be created

devicesMin Integer

Miniumum number devices to be created

facilities List<String>

Facility IDs where devices should be created

instanceParameters SpotMarketRequestInstanceParametersArgs

Parameters for devices provisioned from this request. You can find the parameter description from the equinix-metal.Device doc.

  • billing_cycle
  • plan
  • operating_system
  • hostname
  • termintation_time
  • always_pxe
  • description
  • features
  • locked
  • project_ssh_keys
  • user_ssh_keys
  • userdata
  • customdata
  • ipxe_script_url
  • tags
maxBidPrice Double

Maximum price user is willing to pay per hour per device

metro String

Metro where devices should be created

projectId String

Project ID

waitForDevices Boolean

On resource creation - wait until all desired devices are active, on resource destruction - wait until devices are removed

devicesMax number

Maximum number devices to be created

devicesMin number

Miniumum number devices to be created

facilities string[]

Facility IDs where devices should be created

instanceParameters SpotMarketRequestInstanceParametersArgs

Parameters for devices provisioned from this request. You can find the parameter description from the equinix-metal.Device doc.

  • billing_cycle
  • plan
  • operating_system
  • hostname
  • termintation_time
  • always_pxe
  • description
  • features
  • locked
  • project_ssh_keys
  • user_ssh_keys
  • userdata
  • customdata
  • ipxe_script_url
  • tags
maxBidPrice number

Maximum price user is willing to pay per hour per device

metro string

Metro where devices should be created

projectId string

Project ID

waitForDevices boolean

On resource creation - wait until all desired devices are active, on resource destruction - wait until devices are removed

devices_max int

Maximum number devices to be created

devices_min int

Miniumum number devices to be created

facilities Sequence[str]

Facility IDs where devices should be created

instance_parameters SpotMarketRequestInstanceParametersArgs

Parameters for devices provisioned from this request. You can find the parameter description from the equinix-metal.Device doc.

  • billing_cycle
  • plan
  • operating_system
  • hostname
  • termintation_time
  • always_pxe
  • description
  • features
  • locked
  • project_ssh_keys
  • user_ssh_keys
  • userdata
  • customdata
  • ipxe_script_url
  • tags
max_bid_price float

Maximum price user is willing to pay per hour per device

metro str

Metro where devices should be created

project_id str

Project ID

wait_for_devices bool

On resource creation - wait until all desired devices are active, on resource destruction - wait until devices are removed

devicesMax Number

Maximum number devices to be created

devicesMin Number

Miniumum number devices to be created

facilities List<String>

Facility IDs where devices should be created

instanceParameters Property Map

Parameters for devices provisioned from this request. You can find the parameter description from the equinix-metal.Device doc.

  • billing_cycle
  • plan
  • operating_system
  • hostname
  • termintation_time
  • always_pxe
  • description
  • features
  • locked
  • project_ssh_keys
  • user_ssh_keys
  • userdata
  • customdata
  • ipxe_script_url
  • tags
maxBidPrice Number

Maximum price user is willing to pay per hour per device

metro String

Metro where devices should be created

projectId String

Project ID

waitForDevices Boolean

On resource creation - wait until all desired devices are active, on resource destruction - wait until devices are removed

Supporting Types

SpotMarketRequestInstanceParameters

BillingCycle string
Hostname string
OperatingSystem string
Plan string
AlwaysPxe bool
Customdata string
Description string
Features List<string>
IpxeScriptUrl string
Locked bool

Blocks deletion of the SpotMarketRequest device until the lock is disabled

ProjectSshKeys List<string>
Tags List<string>
TermintationTime string
UserSshKeys List<string>
Userdata string
BillingCycle string
Hostname string
OperatingSystem string
Plan string
AlwaysPxe bool
Customdata string
Description string
Features []string
IpxeScriptUrl string
Locked bool

Blocks deletion of the SpotMarketRequest device until the lock is disabled

ProjectSshKeys []string
Tags []string
TermintationTime string
UserSshKeys []string
Userdata string
billingCycle String
hostname String
operatingSystem String
plan String
alwaysPxe Boolean
customdata String
description String
features List<String>
ipxeScriptUrl String
locked Boolean

Blocks deletion of the SpotMarketRequest device until the lock is disabled

projectSshKeys List<String>
tags List<String>
termintationTime String
userSshKeys List<String>
userdata String
billingCycle string
hostname string
operatingSystem string
plan string
alwaysPxe boolean
customdata string
description string
features string[]
ipxeScriptUrl string
locked boolean

Blocks deletion of the SpotMarketRequest device until the lock is disabled

projectSshKeys string[]
tags string[]
termintationTime string
userSshKeys string[]
userdata string
billing_cycle str
hostname str
operating_system str
plan str
always_pxe bool
customdata str
description str
features Sequence[str]
ipxe_script_url str
locked bool

Blocks deletion of the SpotMarketRequest device until the lock is disabled

project_ssh_keys Sequence[str]
tags Sequence[str]
termintation_time str
user_ssh_keys Sequence[str]
userdata str
billingCycle String
hostname String
operatingSystem String
plan String
alwaysPxe Boolean
customdata String
description String
features List<String>
ipxeScriptUrl String
locked Boolean

Blocks deletion of the SpotMarketRequest device until the lock is disabled

projectSshKeys List<String>
tags List<String>
termintationTime String
userSshKeys List<String>
userdata String

Import

This resource can be imported using an existing spot market request ID

 $ pulumi import equinix-metal:index/spotMarketRequest:SpotMarketRequest metal_spot_market_request {existing_spot_market_request_id}

Package Details

Repository
Equinix Metal pulumi/pulumi-equinix-metal
License
Apache-2.0
Notes

This Pulumi package is based on the metal Terraform Provider.