UNPKG

@cuemby/equinix

Version:

A Pulumi package for creating and managing equinix cloud resources.

184 lines (183 loc) 6.91 kB
import * as pulumi from "@pulumi/pulumi"; import { input as inputs, output as outputs } from "./types"; /** * 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](https://metal.equinix.com/developers/docs/deploy/spot-market/). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as equinix from "@cuemby/equinix"; * * // Create a spot market request * const req = new equinix.MetalSpotMarketRequest("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", * }, * }); * ``` * * ## Import * * This resource can be imported using an existing spot market request ID * * ```sh * $ pulumi import equinix:index/metalSpotMarketRequest:MetalSpotMarketRequest equinix_metal_spot_market_request {existing_spot_market_request_id} * ``` */ export declare class MetalSpotMarketRequest extends pulumi.CustomResource { /** * Get an existing MetalSpotMarketRequest resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: MetalSpotMarketRequestState, opts?: pulumi.CustomResourceOptions): MetalSpotMarketRequest; /** * Returns true if the given object is an instance of MetalSpotMarketRequest. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is MetalSpotMarketRequest; /** * Maximum number devices to be created. */ readonly devicesMax: pulumi.Output<number>; /** * Miniumum number devices to be created. */ readonly devicesMin: pulumi.Output<number>; /** * Facility IDs where devices should be created. */ readonly facilities: pulumi.Output<string[]>; /** * Key/Value pairs of parameters for devices provisioned from * this request. Valid keys are: `billingCycle`, `plan`, `operatingSystem`, `hostname`, * `termintationTime`, `alwaysPxe`, `description`, `features`, `locked`, `projectSshKeys`, * `userSshKeys`, `userdata`, `customdata`, `ipxeScriptUrl`, `tags`. You can find each parameter * description in equinix.MetalDevice docs. */ readonly instanceParameters: pulumi.Output<outputs.MetalSpotMarketRequestInstanceParameters>; /** * Maximum price user is willing to pay per hour per device. */ readonly maxBidPrice: pulumi.Output<number>; /** * Metro where devices should be created. */ readonly metro: pulumi.Output<string | undefined>; /** * Project ID. */ readonly projectId: pulumi.Output<string>; /** * On resource creation wait until all desired devices are active. * On resource destruction wait until devices are removed. */ readonly waitForDevices: pulumi.Output<boolean | undefined>; /** * Create a MetalSpotMarketRequest resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: MetalSpotMarketRequestArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering MetalSpotMarketRequest resources. */ export interface MetalSpotMarketRequestState { /** * Maximum number devices to be created. */ devicesMax?: pulumi.Input<number>; /** * Miniumum number devices to be created. */ devicesMin?: pulumi.Input<number>; /** * Facility IDs where devices should be created. */ facilities?: pulumi.Input<pulumi.Input<string>[]>; /** * Key/Value pairs of parameters for devices provisioned from * this request. Valid keys are: `billingCycle`, `plan`, `operatingSystem`, `hostname`, * `termintationTime`, `alwaysPxe`, `description`, `features`, `locked`, `projectSshKeys`, * `userSshKeys`, `userdata`, `customdata`, `ipxeScriptUrl`, `tags`. You can find each parameter * description in equinix.MetalDevice docs. */ instanceParameters?: pulumi.Input<inputs.MetalSpotMarketRequestInstanceParameters>; /** * Maximum price user is willing to pay per hour per device. */ maxBidPrice?: pulumi.Input<number>; /** * Metro where devices should be created. */ metro?: pulumi.Input<string>; /** * Project ID. */ projectId?: pulumi.Input<string>; /** * On resource creation wait until all desired devices are active. * On resource destruction wait until devices are removed. */ waitForDevices?: pulumi.Input<boolean>; } /** * The set of arguments for constructing a MetalSpotMarketRequest resource. */ export interface MetalSpotMarketRequestArgs { /** * Maximum number devices to be created. */ devicesMax: pulumi.Input<number>; /** * Miniumum number devices to be created. */ devicesMin: pulumi.Input<number>; /** * Facility IDs where devices should be created. */ facilities?: pulumi.Input<pulumi.Input<string>[]>; /** * Key/Value pairs of parameters for devices provisioned from * this request. Valid keys are: `billingCycle`, `plan`, `operatingSystem`, `hostname`, * `termintationTime`, `alwaysPxe`, `description`, `features`, `locked`, `projectSshKeys`, * `userSshKeys`, `userdata`, `customdata`, `ipxeScriptUrl`, `tags`. You can find each parameter * description in equinix.MetalDevice docs. */ instanceParameters: pulumi.Input<inputs.MetalSpotMarketRequestInstanceParameters>; /** * Maximum price user is willing to pay per hour per device. */ maxBidPrice: pulumi.Input<number>; /** * Metro where devices should be created. */ metro?: pulumi.Input<string>; /** * Project ID. */ projectId: pulumi.Input<string>; /** * On resource creation wait until all desired devices are active. * On resource destruction wait until devices are removed. */ waitForDevices?: pulumi.Input<boolean>; }