This package is deprecated. We recommend using the new Equinix package.
equinix-metal.SpotMarketRequest
Explore with Pulumi AI
This package is deprecated. We recommend using the new Equinix package.
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
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SpotMarketRequest(name: string, args: SpotMarketRequestArgs, opts?: CustomResourceOptions);
@overload
def SpotMarketRequest(resource_name: str,
args: SpotMarketRequestArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SpotMarketRequest(resource_name: str,
opts: Optional[ResourceOptions] = None,
devices_max: Optional[int] = None,
devices_min: Optional[int] = None,
instance_parameters: Optional[SpotMarketRequestInstanceParametersArgs] = None,
max_bid_price: Optional[float] = None,
project_id: Optional[str] = None,
facilities: Optional[Sequence[str]] = None,
metro: Optional[str] = None,
wait_for_devices: Optional[bool] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var spotMarketRequestResource = new EquinixMetal.SpotMarketRequest("spotMarketRequestResource", new()
{
DevicesMax = 0,
DevicesMin = 0,
InstanceParameters = new EquinixMetal.Inputs.SpotMarketRequestInstanceParametersArgs
{
Hostname = "string",
BillingCycle = "string",
Plan = "string",
OperatingSystem = "string",
Description = "string",
Features = new[]
{
"string",
},
IpxeScriptUrl = "string",
Locked = false,
AlwaysPxe = false,
Customdata = "string",
ProjectSshKeys = new[]
{
"string",
},
Tags = new[]
{
"string",
},
TermintationTime = "string",
UserSshKeys = new[]
{
"string",
},
Userdata = "string",
},
MaxBidPrice = 0,
ProjectId = "string",
Facilities = new[]
{
"string",
},
Metro = "string",
WaitForDevices = false,
});
example, err := equinixmetal.NewSpotMarketRequest(ctx, "spotMarketRequestResource", &equinixmetal.SpotMarketRequestArgs{
DevicesMax: pulumi.Int(0),
DevicesMin: pulumi.Int(0),
InstanceParameters: &equinix.SpotMarketRequestInstanceParametersArgs{
Hostname: pulumi.String("string"),
BillingCycle: pulumi.String("string"),
Plan: pulumi.String("string"),
OperatingSystem: pulumi.String("string"),
Description: pulumi.String("string"),
Features: pulumi.StringArray{
pulumi.String("string"),
},
IpxeScriptUrl: pulumi.String("string"),
Locked: pulumi.Bool(false),
AlwaysPxe: pulumi.Bool(false),
Customdata: pulumi.String("string"),
ProjectSshKeys: pulumi.StringArray{
pulumi.String("string"),
},
Tags: pulumi.StringArray{
pulumi.String("string"),
},
TermintationTime: pulumi.String("string"),
UserSshKeys: pulumi.StringArray{
pulumi.String("string"),
},
Userdata: pulumi.String("string"),
},
MaxBidPrice: pulumi.Float64(0),
ProjectId: pulumi.String("string"),
Facilities: pulumi.StringArray{
pulumi.String("string"),
},
Metro: pulumi.String("string"),
WaitForDevices: pulumi.Bool(false),
})
var spotMarketRequestResource = new SpotMarketRequest("spotMarketRequestResource", SpotMarketRequestArgs.builder()
.devicesMax(0)
.devicesMin(0)
.instanceParameters(SpotMarketRequestInstanceParametersArgs.builder()
.hostname("string")
.billingCycle("string")
.plan("string")
.operatingSystem("string")
.description("string")
.features("string")
.ipxeScriptUrl("string")
.locked(false)
.alwaysPxe(false)
.customdata("string")
.projectSshKeys("string")
.tags("string")
.termintationTime("string")
.userSshKeys("string")
.userdata("string")
.build())
.maxBidPrice(0)
.projectId("string")
.facilities("string")
.metro("string")
.waitForDevices(false)
.build());
spot_market_request_resource = equinix_metal.SpotMarketRequest("spotMarketRequestResource",
devices_max=0,
devices_min=0,
instance_parameters={
"hostname": "string",
"billing_cycle": "string",
"plan": "string",
"operating_system": "string",
"description": "string",
"features": ["string"],
"ipxe_script_url": "string",
"locked": False,
"always_pxe": False,
"customdata": "string",
"project_ssh_keys": ["string"],
"tags": ["string"],
"termintation_time": "string",
"user_ssh_keys": ["string"],
"userdata": "string",
},
max_bid_price=0,
project_id="string",
facilities=["string"],
metro="string",
wait_for_devices=False)
const spotMarketRequestResource = new equinix_metal.SpotMarketRequest("spotMarketRequestResource", {
devicesMax: 0,
devicesMin: 0,
instanceParameters: {
hostname: "string",
billingCycle: "string",
plan: "string",
operatingSystem: "string",
description: "string",
features: ["string"],
ipxeScriptUrl: "string",
locked: false,
alwaysPxe: false,
customdata: "string",
projectSshKeys: ["string"],
tags: ["string"],
termintationTime: "string",
userSshKeys: ["string"],
userdata: "string",
},
maxBidPrice: 0,
projectId: "string",
facilities: ["string"],
metro: "string",
waitForDevices: false,
});
type: equinix-metal:SpotMarketRequest
properties:
devicesMax: 0
devicesMin: 0
facilities:
- string
instanceParameters:
alwaysPxe: false
billingCycle: string
customdata: string
description: string
features:
- string
hostname: string
ipxeScriptUrl: string
locked: false
operatingSystem: string
plan: string
projectSshKeys:
- string
tags:
- string
termintationTime: string
userSshKeys:
- string
userdata: string
maxBidPrice: 0
metro: string
projectId: string
waitForDevices: false
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The SpotMarketRequest resource accepts the following input properties:
- Devices
Max int - Maximum number devices to be created
- Devices
Min int - Miniumum number devices to be created
- Instance
Parameters Pulumi.Equinix Metal. Inputs. Spot Market Request Instance Parameters - 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 doublePrice - Maximum price user is willing to pay per hour per device
- Project
Id string - Project ID
- Facilities List<string>
- Facility IDs where devices should be created
- Metro string
- Metro where devices should be created
- Wait
For boolDevices - 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 SpotMarket Request Instance Parameters Args - 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 float64Price - Maximum price user is willing to pay per hour per device
- Project
Id string - Project ID
- Facilities []string
- Facility IDs where devices should be created
- Metro string
- Metro where devices should be created
- Wait
For boolDevices - On resource creation - wait until all desired devices are active, on resource destruction - wait until devices are removed
- devices
Max Integer - Maximum number devices to be created
- devices
Min Integer - Miniumum number devices to be created
- instance
Parameters SpotMarket Request Instance Parameters - 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 DoublePrice - Maximum price user is willing to pay per hour per device
- project
Id String - Project ID
- facilities List<String>
- Facility IDs where devices should be created
- metro String
- Metro where devices should be created
- wait
For BooleanDevices - On resource creation - wait until all desired devices are active, on resource destruction - wait until devices are removed
- devices
Max number - Maximum number devices to be created
- devices
Min number - Miniumum number devices to be created
- instance
Parameters SpotMarket Request Instance Parameters - 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 numberPrice - Maximum price user is willing to pay per hour per device
- project
Id string - Project ID
- facilities string[]
- Facility IDs where devices should be created
- metro string
- Metro where devices should be created
- wait
For booleanDevices - 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 SpotMarket Request Instance Parameters Args - 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_ floatprice - 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_ booldevices - On resource creation - wait until all desired devices are active, on resource destruction - wait until devices are removed
- devices
Max Number - Maximum number devices to be created
- devices
Min Number - Miniumum number devices to be created
- instance
Parameters 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
- max
Bid NumberPrice - Maximum price user is willing to pay per hour per device
- project
Id String - Project ID
- facilities List<String>
- Facility IDs where devices should be created
- metro String
- Metro where devices should be created
- wait
For BooleanDevices - 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.
- Devices
Max int - Maximum number devices to be created
- Devices
Min int - Miniumum number devices to be created
- Facilities List<string>
- Facility IDs where devices should be created
- Instance
Parameters Pulumi.Equinix Metal. Inputs. Spot Market Request Instance Parameters - 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 doublePrice - Maximum price user is willing to pay per hour per device
- Metro string
- Metro where devices should be created
- Project
Id string - Project ID
- Wait
For boolDevices - 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 []string
- Facility IDs where devices should be created
- Instance
Parameters SpotMarket Request Instance Parameters Args - 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 float64Price - Maximum price user is willing to pay per hour per device
- Metro string
- Metro where devices should be created
- Project
Id string - Project ID
- Wait
For boolDevices - On resource creation - wait until all desired devices are active, on resource destruction - wait until devices are removed
- devices
Max Integer - Maximum number devices to be created
- devices
Min Integer - Miniumum number devices to be created
- facilities List<String>
- Facility IDs where devices should be created
- instance
Parameters SpotMarket Request Instance Parameters - 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 DoublePrice - Maximum price user is willing to pay per hour per device
- metro String
- Metro where devices should be created
- project
Id String - Project ID
- wait
For BooleanDevices - On resource creation - wait until all desired devices are active, on resource destruction - wait until devices are removed
- devices
Max number - Maximum number devices to be created
- devices
Min number - Miniumum number devices to be created
- facilities string[]
- Facility IDs where devices should be created
- instance
Parameters SpotMarket Request Instance Parameters - 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 numberPrice - Maximum price user is willing to pay per hour per device
- metro string
- Metro where devices should be created
- project
Id string - Project ID
- wait
For booleanDevices - 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 SpotMarket Request Instance Parameters Args - 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_ floatprice - 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_ booldevices - On resource creation - wait until all desired devices are active, on resource destruction - wait until devices are removed
- devices
Max Number - Maximum number devices to be created
- devices
Min Number - Miniumum number devices to be created
- facilities List<String>
- Facility IDs where devices should be created
- instance
Parameters 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
- max
Bid NumberPrice - Maximum price user is willing to pay per hour per device
- metro String
- Metro where devices should be created
- project
Id String - Project ID
- wait
For BooleanDevices - On resource creation - wait until all desired devices are active, on resource destruction - wait until devices are removed
Supporting Types
SpotMarketRequestInstanceParameters, SpotMarketRequestInstanceParametersArgs
- Billing
Cycle string - Hostname string
- Operating
System string - Plan string
- Always
Pxe bool - Customdata string
- Description string
- Features List<string>
- Ipxe
Script stringUrl - Locked bool
- Blocks deletion of the SpotMarketRequest device until the lock is disabled
- Project
Ssh List<string>Keys - List<string>
- Termintation
Time string - User
Ssh List<string>Keys - Userdata string
- Billing
Cycle string - Hostname string
- Operating
System string - Plan string
- Always
Pxe bool - Customdata string
- Description string
- Features []string
- Ipxe
Script stringUrl - Locked bool
- Blocks deletion of the SpotMarketRequest device until the lock is disabled
- Project
Ssh []stringKeys - []string
- Termintation
Time string - User
Ssh []stringKeys - Userdata string
- billing
Cycle String - hostname String
- operating
System String - plan String
- always
Pxe Boolean - customdata String
- description String
- features List<String>
- ipxe
Script StringUrl - locked Boolean
- Blocks deletion of the SpotMarketRequest device until the lock is disabled
- project
Ssh List<String>Keys - List<String>
- termintation
Time String - user
Ssh List<String>Keys - userdata String
- billing
Cycle string - hostname string
- operating
System string - plan string
- always
Pxe boolean - customdata string
- description string
- features string[]
- ipxe
Script stringUrl - locked boolean
- Blocks deletion of the SpotMarketRequest device until the lock is disabled
- project
Ssh string[]Keys - string[]
- termintation
Time string - user
Ssh string[]Keys - userdata string
- billing_
cycle str - hostname str
- operating_
system str - plan str
- always_
pxe bool - customdata str
- description str
- features Sequence[str]
- ipxe_
script_ strurl - locked bool
- Blocks deletion of the SpotMarketRequest device until the lock is disabled
- project_
ssh_ Sequence[str]keys - Sequence[str]
- termintation_
time str - user_
ssh_ Sequence[str]keys - userdata str
- billing
Cycle String - hostname String
- operating
System String - plan String
- always
Pxe Boolean - customdata String
- description String
- features List<String>
- ipxe
Script StringUrl - locked Boolean
- Blocks deletion of the SpotMarketRequest device until the lock is disabled
- project
Ssh List<String>Keys - List<String>
- termintation
Time String - user
Ssh List<String>Keys - 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}
To learn more about importing existing cloud resources, see Importing resources.
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.