Viewing docs for netbox 5.7.0
published on Wednesday, Jul 15, 2026 by e-breuninger
published on Wednesday, Jul 15, 2026 by e-breuninger
Viewing docs for netbox 5.7.0
published on Wednesday, Jul 15, 2026 by e-breuninger
published on Wednesday, Jul 15, 2026 by e-breuninger
Look up a rack type by model or slug.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as netbox from "@pulumi/netbox";
// Get rack type by model
const ex1 = netbox.getRackType({
model: "APC 4-Post Cabinet",
});
// Get rack type by slug
const ex2 = netbox.getRackType({
slug: "apc-4-post-cabinet",
});
import pulumi
import pulumi_netbox as netbox
# Get rack type by model
ex1 = netbox.get_rack_type(model="APC 4-Post Cabinet")
# Get rack type by slug
ex2 = netbox.get_rack_type(slug="apc-4-post-cabinet")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/netbox/v5/netbox"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Get rack type by model
_, err := netbox.LookupRackType(ctx, &netbox.LookupRackTypeArgs{
Model: pulumi.StringRef("APC 4-Post Cabinet"),
}, nil)
if err != nil {
return err
}
// Get rack type by slug
_, err = netbox.LookupRackType(ctx, &netbox.LookupRackTypeArgs{
Slug: pulumi.StringRef("apc-4-post-cabinet"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Netbox = Pulumi.Netbox;
return await Deployment.RunAsync(() =>
{
// Get rack type by model
var ex1 = Netbox.GetRackType.Invoke(new()
{
Model = "APC 4-Post Cabinet",
});
// Get rack type by slug
var ex2 = Netbox.GetRackType.Invoke(new()
{
Slug = "apc-4-post-cabinet",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.netbox.NetboxFunctions;
import com.pulumi.netbox.inputs.GetRackTypeArgs;
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) {
// Get rack type by model
final var ex1 = NetboxFunctions.getRackType(GetRackTypeArgs.builder()
.model("APC 4-Post Cabinet")
.build());
// Get rack type by slug
final var ex2 = NetboxFunctions.getRackType(GetRackTypeArgs.builder()
.slug("apc-4-post-cabinet")
.build());
}
}
variables:
# Get rack type by model
ex1:
fn::invoke:
function: netbox:getRackType
arguments:
model: APC 4-Post Cabinet
# Get rack type by slug
ex2:
fn::invoke:
function: netbox:getRackType
arguments:
slug: apc-4-post-cabinet
Example coming soon!
Using getRackType
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 getRackType(args: GetRackTypeArgs, opts?: InvokeOptions): Promise<GetRackTypeResult>
function getRackTypeOutput(args: GetRackTypeOutputArgs, opts?: InvokeOptions): Output<GetRackTypeResult>def get_rack_type(id: Optional[str] = None,
model: Optional[str] = None,
slug: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRackTypeResult
def get_rack_type_output(id: pulumi.Input[Optional[str]] = None,
model: pulumi.Input[Optional[str]] = None,
slug: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRackTypeResult]func LookupRackType(ctx *Context, args *LookupRackTypeArgs, opts ...InvokeOption) (*LookupRackTypeResult, error)
func LookupRackTypeOutput(ctx *Context, args *LookupRackTypeOutputArgs, opts ...InvokeOption) LookupRackTypeResultOutput> Note: This function is named LookupRackType in the Go SDK.
public static class GetRackType
{
public static Task<GetRackTypeResult> InvokeAsync(GetRackTypeArgs args, InvokeOptions? opts = null)
public static Output<GetRackTypeResult> Invoke(GetRackTypeInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetRackTypeResult> getRackType(GetRackTypeArgs args, InvokeOptions options)
public static Output<GetRackTypeResult> getRackType(GetRackTypeArgs args, InvokeOptions options)
fn::invoke:
function: netbox:index/getRackType:getRackType
arguments:
# arguments dictionarydata "netbox_get_rack_type" "name" {
# arguments
}The following arguments are supported:
getRackType Result
The following output properties are available:
- Comments string
- Description string
- Form
Factor string - Id string
- The ID of this resource.
- Manufacturer
Id double - Max
Weight double - Model string
- At least one of
modelorslugmust be given. - Mounting
Depth doubleMm - Outer
Depth double - Outer
Unit string - Outer
Width double - Slug string
- At least one of
modelorslugmust be given. - Starting
Unit double - UHeight double
- Weight double
- Weight
Unit string - Width double
- Comments string
- Description string
- Form
Factor string - Id string
- The ID of this resource.
- Manufacturer
Id float64 - Max
Weight float64 - Model string
- At least one of
modelorslugmust be given. - Mounting
Depth float64Mm - Outer
Depth float64 - Outer
Unit string - Outer
Width float64 - Slug string
- At least one of
modelorslugmust be given. - Starting
Unit float64 - UHeight float64
- Weight float64
- Weight
Unit string - Width float64
- comments string
- description string
- form_
factor string - id string
- The ID of this resource.
- manufacturer_
id number - max_
weight number - model string
- At least one of
modelorslugmust be given. - mounting_
depth_ numbermm - outer_
depth number - outer_
unit string - outer_
width number - slug string
- At least one of
modelorslugmust be given. - starting_
unit number - u_
height number - weight number
- weight_
unit string - width number
- comments String
- description String
- form
Factor String - id String
- The ID of this resource.
- manufacturer
Id Double - max
Weight Double - model String
- At least one of
modelorslugmust be given. - mounting
Depth DoubleMm - outer
Depth Double - outer
Unit String - outer
Width Double - slug String
- At least one of
modelorslugmust be given. - starting
Unit Double - u
Height Double - weight Double
- weight
Unit String - width Double
- comments string
- description string
- form
Factor string - id string
- The ID of this resource.
- manufacturer
Id number - max
Weight number - model string
- At least one of
modelorslugmust be given. - mounting
Depth numberMm - outer
Depth number - outer
Unit string - outer
Width number - slug string
- At least one of
modelorslugmust be given. - starting
Unit number - u
Height number - weight number
- weight
Unit string - width number
- comments str
- description str
- form_
factor str - id str
- The ID of this resource.
- manufacturer_
id float - max_
weight float - model str
- At least one of
modelorslugmust be given. - mounting_
depth_ floatmm - outer_
depth float - outer_
unit str - outer_
width float - slug str
- At least one of
modelorslugmust be given. - starting_
unit float - u_
height float - weight float
- weight_
unit str - width float
- comments String
- description String
- form
Factor String - id String
- The ID of this resource.
- manufacturer
Id Number - max
Weight Number - model String
- At least one of
modelorslugmust be given. - mounting
Depth NumberMm - outer
Depth Number - outer
Unit String - outer
Width Number - slug String
- At least one of
modelorslugmust be given. - starting
Unit Number - u
Height Number - weight Number
- weight
Unit String - width Number
Package Details
- Repository
- netbox e-breuninger/terraform-provider-netbox
- License
- Notes
- This Pulumi package is based on the
netboxTerraform Provider.
Viewing docs for netbox 5.7.0
published on Wednesday, Jul 15, 2026 by e-breuninger
published on Wednesday, Jul 15, 2026 by e-breuninger