Equinix v0.18.0 published on Monday, Sep 23, 2024 by Equinix
equinix.metal.getHardwareReservation
Explore with Pulumi AI
Use this data source to retrieve a hardware reservation resource from Equinix Metal.
You can look up hardware reservation by its ID or by ID of device which occupies it.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as equinix from "@pulumi/equinix";
const example = equinix.metal.getHardwareReservation({
id: "4347e805-eb46-4699-9eb9-5c116e6a0172",
});
const exampleByDeviceId = equinix.metal.getHardwareReservation({
deviceId: "ff85aa58-c106-4624-8f1c-7c64554047ea",
});
import pulumi
import pulumi_equinix as equinix
example = equinix.metal.get_hardware_reservation(id="4347e805-eb46-4699-9eb9-5c116e6a0172")
example_by_device_id = equinix.metal.get_hardware_reservation(device_id="ff85aa58-c106-4624-8f1c-7c64554047ea")
package main
import (
"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := metal.GetHardwareReservation(ctx, &metal.GetHardwareReservationArgs{
Id: pulumi.StringRef("4347e805-eb46-4699-9eb9-5c116e6a0172"),
}, nil)
if err != nil {
return err
}
_, err = metal.GetHardwareReservation(ctx, &metal.GetHardwareReservationArgs{
DeviceId: pulumi.StringRef("ff85aa58-c106-4624-8f1c-7c64554047ea"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Equinix = Pulumi.Equinix;
return await Deployment.RunAsync(() =>
{
var example = Equinix.Metal.GetHardwareReservation.Invoke(new()
{
Id = "4347e805-eb46-4699-9eb9-5c116e6a0172",
});
var exampleByDeviceId = Equinix.Metal.GetHardwareReservation.Invoke(new()
{
DeviceId = "ff85aa58-c106-4624-8f1c-7c64554047ea",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.equinix.metal.MetalFunctions;
import com.pulumi.equinix.metal.inputs.GetHardwareReservationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = MetalFunctions.getHardwareReservation(GetHardwareReservationArgs.builder()
.id("4347e805-eb46-4699-9eb9-5c116e6a0172")
.build());
final var exampleByDeviceId = MetalFunctions.getHardwareReservation(GetHardwareReservationArgs.builder()
.deviceId("ff85aa58-c106-4624-8f1c-7c64554047ea")
.build());
}
}
variables:
example:
fn::invoke:
Function: equinix:metal:getHardwareReservation
Arguments:
id: 4347e805-eb46-4699-9eb9-5c116e6a0172
exampleByDeviceId:
fn::invoke:
Function: equinix:metal:getHardwareReservation
Arguments:
deviceId: ff85aa58-c106-4624-8f1c-7c64554047ea
Using getHardwareReservation
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 getHardwareReservation(args: GetHardwareReservationArgs, opts?: InvokeOptions): Promise<GetHardwareReservationResult>
function getHardwareReservationOutput(args: GetHardwareReservationOutputArgs, opts?: InvokeOptions): Output<GetHardwareReservationResult>
def get_hardware_reservation(device_id: Optional[str] = None,
id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetHardwareReservationResult
def get_hardware_reservation_output(device_id: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetHardwareReservationResult]
func GetHardwareReservation(ctx *Context, args *GetHardwareReservationArgs, opts ...InvokeOption) (*GetHardwareReservationResult, error)
func GetHardwareReservationOutput(ctx *Context, args *GetHardwareReservationOutputArgs, opts ...InvokeOption) GetHardwareReservationResultOutput
> Note: This function is named GetHardwareReservation
in the Go SDK.
public static class GetHardwareReservation
{
public static Task<GetHardwareReservationResult> InvokeAsync(GetHardwareReservationArgs args, InvokeOptions? opts = null)
public static Output<GetHardwareReservationResult> Invoke(GetHardwareReservationInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetHardwareReservationResult> getHardwareReservation(GetHardwareReservationArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: equinix:metal/getHardwareReservation:getHardwareReservation
arguments:
# arguments dictionary
The following arguments are supported:
getHardwareReservation Result
The following output properties are available:
- Device
Id string - UUID of device occupying the reservation.
- Facility string
- (Deprecated) Facility for the reservation. Use metro instead; read the facility to metro migration guide
- Id string
- ID of the hardware reservation to look up.
- Plan string
- Plan type for the reservation.
- Project
Id string - UUID of project this reservation is scoped to.
- Provisionable bool
- Flag indicating whether the reserved server is provisionable or not. Spare devices can't be provisioned unless they are activated first.
- Short
Id string - Reservation short ID.
- Spare bool
- Flag indicating whether the Hardware Reservation is a spare. Spare Hardware Reservations are used when a Hardware Reservations requires service from Metal Equinix.
- Switch
Uuid string - Switch short ID, can be used to determine if two devices are connected to the same switch.
- Device
Id string - UUID of device occupying the reservation.
- Facility string
- (Deprecated) Facility for the reservation. Use metro instead; read the facility to metro migration guide
- Id string
- ID of the hardware reservation to look up.
- Plan string
- Plan type for the reservation.
- Project
Id string - UUID of project this reservation is scoped to.
- Provisionable bool
- Flag indicating whether the reserved server is provisionable or not. Spare devices can't be provisioned unless they are activated first.
- Short
Id string - Reservation short ID.
- Spare bool
- Flag indicating whether the Hardware Reservation is a spare. Spare Hardware Reservations are used when a Hardware Reservations requires service from Metal Equinix.
- Switch
Uuid string - Switch short ID, can be used to determine if two devices are connected to the same switch.
- device
Id String - UUID of device occupying the reservation.
- facility String
- (Deprecated) Facility for the reservation. Use metro instead; read the facility to metro migration guide
- id String
- ID of the hardware reservation to look up.
- plan String
- Plan type for the reservation.
- project
Id String - UUID of project this reservation is scoped to.
- provisionable Boolean
- Flag indicating whether the reserved server is provisionable or not. Spare devices can't be provisioned unless they are activated first.
- short
Id String - Reservation short ID.
- spare Boolean
- Flag indicating whether the Hardware Reservation is a spare. Spare Hardware Reservations are used when a Hardware Reservations requires service from Metal Equinix.
- switch
Uuid String - Switch short ID, can be used to determine if two devices are connected to the same switch.
- device
Id string - UUID of device occupying the reservation.
- facility string
- (Deprecated) Facility for the reservation. Use metro instead; read the facility to metro migration guide
- id string
- ID of the hardware reservation to look up.
- plan string
- Plan type for the reservation.
- project
Id string - UUID of project this reservation is scoped to.
- provisionable boolean
- Flag indicating whether the reserved server is provisionable or not. Spare devices can't be provisioned unless they are activated first.
- short
Id string - Reservation short ID.
- spare boolean
- Flag indicating whether the Hardware Reservation is a spare. Spare Hardware Reservations are used when a Hardware Reservations requires service from Metal Equinix.
- switch
Uuid string - Switch short ID, can be used to determine if two devices are connected to the same switch.
- device_
id str - UUID of device occupying the reservation.
- facility str
- (Deprecated) Facility for the reservation. Use metro instead; read the facility to metro migration guide
- id str
- ID of the hardware reservation to look up.
- plan str
- Plan type for the reservation.
- project_
id str - UUID of project this reservation is scoped to.
- provisionable bool
- Flag indicating whether the reserved server is provisionable or not. Spare devices can't be provisioned unless they are activated first.
- short_
id str - Reservation short ID.
- spare bool
- Flag indicating whether the Hardware Reservation is a spare. Spare Hardware Reservations are used when a Hardware Reservations requires service from Metal Equinix.
- switch_
uuid str - Switch short ID, can be used to determine if two devices are connected to the same switch.
- device
Id String - UUID of device occupying the reservation.
- facility String
- (Deprecated) Facility for the reservation. Use metro instead; read the facility to metro migration guide
- id String
- ID of the hardware reservation to look up.
- plan String
- Plan type for the reservation.
- project
Id String - UUID of project this reservation is scoped to.
- provisionable Boolean
- Flag indicating whether the reserved server is provisionable or not. Spare devices can't be provisioned unless they are activated first.
- short
Id String - Reservation short ID.
- spare Boolean
- Flag indicating whether the Hardware Reservation is a spare. Spare Hardware Reservations are used when a Hardware Reservations requires service from Metal Equinix.
- switch
Uuid String - Switch short ID, can be used to determine if two devices are connected to the same switch.
Package Details
- Repository
- equinix equinix/pulumi-equinix
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
equinix
Terraform Provider.