netbox.RackType
Explore with Pulumi AI
From the official documentation:
A rack type defines the physical characteristics of a particular model of rack.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as netbox from "@pulumi/netbox";
const testManufacturer = new netbox.Manufacturer("testManufacturer", {});
const testRackType = new netbox.RackType("testRackType", {
model: "mymodel",
manufacturerId: testManufacturer.manufacturerId,
width: 19,
uHeight: 48,
startingUnit: 1,
formFactor: "2-post-frame",
description: "My description",
outerWidth: 10,
outerDepth: 15,
outerUnit: "mm",
weight: 15,
maxWeight: 20,
weightUnit: "kg",
mountingDepthMm: 21,
comments: "My comments",
});
import pulumi
import pulumi_netbox as netbox
test_manufacturer = netbox.Manufacturer("testManufacturer")
test_rack_type = netbox.RackType("testRackType",
model="mymodel",
manufacturer_id=test_manufacturer.manufacturer_id,
width=19,
u_height=48,
starting_unit=1,
form_factor="2-post-frame",
description="My description",
outer_width=10,
outer_depth=15,
outer_unit="mm",
weight=15,
max_weight=20,
weight_unit="kg",
mounting_depth_mm=21,
comments="My comments")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/netbox/v3/netbox"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
testManufacturer, err := netbox.NewManufacturer(ctx, "testManufacturer", nil)
if err != nil {
return err
}
_, err = netbox.NewRackType(ctx, "testRackType", &netbox.RackTypeArgs{
Model: pulumi.String("mymodel"),
ManufacturerId: testManufacturer.ManufacturerId,
Width: pulumi.Float64(19),
UHeight: pulumi.Float64(48),
StartingUnit: pulumi.Float64(1),
FormFactor: pulumi.String("2-post-frame"),
Description: pulumi.String("My description"),
OuterWidth: pulumi.Float64(10),
OuterDepth: pulumi.Float64(15),
OuterUnit: pulumi.String("mm"),
Weight: pulumi.Float64(15),
MaxWeight: pulumi.Float64(20),
WeightUnit: pulumi.String("kg"),
MountingDepthMm: pulumi.Float64(21),
Comments: pulumi.String("My comments"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Netbox = Pulumi.Netbox;
return await Deployment.RunAsync(() =>
{
var testManufacturer = new Netbox.Manufacturer("testManufacturer");
var testRackType = new Netbox.RackType("testRackType", new()
{
Model = "mymodel",
ManufacturerId = testManufacturer.ManufacturerId,
Width = 19,
UHeight = 48,
StartingUnit = 1,
FormFactor = "2-post-frame",
Description = "My description",
OuterWidth = 10,
OuterDepth = 15,
OuterUnit = "mm",
Weight = 15,
MaxWeight = 20,
WeightUnit = "kg",
MountingDepthMm = 21,
Comments = "My comments",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.netbox.Manufacturer;
import com.pulumi.netbox.RackType;
import com.pulumi.netbox.RackTypeArgs;
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) {
var testManufacturer = new Manufacturer("testManufacturer");
var testRackType = new RackType("testRackType", RackTypeArgs.builder()
.model("mymodel")
.manufacturerId(testManufacturer.manufacturerId())
.width(19)
.uHeight(48)
.startingUnit(1)
.formFactor("2-post-frame")
.description("My description")
.outerWidth(10)
.outerDepth(15)
.outerUnit("mm")
.weight(15)
.maxWeight(20)
.weightUnit("kg")
.mountingDepthMm(21)
.comments("My comments")
.build());
}
}
resources:
testManufacturer:
type: netbox:Manufacturer
testRackType:
type: netbox:RackType
properties:
model: mymodel
manufacturerId: ${testManufacturer.manufacturerId}
width: 19
uHeight: 48
startingUnit: 1
formFactor: 2-post-frame
description: My description
outerWidth: 10
outerDepth: 15
outerUnit: mm
weight: 15
maxWeight: 20
weightUnit: kg
mountingDepthMm: 21
comments: My comments
Create RackType Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RackType(name: string, args: RackTypeArgs, opts?: CustomResourceOptions);
@overload
def RackType(resource_name: str,
args: RackTypeArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RackType(resource_name: str,
opts: Optional[ResourceOptions] = None,
model: Optional[str] = None,
width: Optional[float] = None,
form_factor: Optional[str] = None,
u_height: Optional[float] = None,
starting_unit: Optional[float] = None,
max_weight: Optional[float] = None,
mounting_depth_mm: Optional[float] = None,
outer_depth: Optional[float] = None,
outer_unit: Optional[str] = None,
outer_width: Optional[float] = None,
rack_type_id: Optional[str] = None,
slug: Optional[str] = None,
comments: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
manufacturer_id: Optional[float] = None,
weight: Optional[float] = None,
weight_unit: Optional[str] = None,
description: Optional[str] = None)
func NewRackType(ctx *Context, name string, args RackTypeArgs, opts ...ResourceOption) (*RackType, error)
public RackType(string name, RackTypeArgs args, CustomResourceOptions? opts = null)
public RackType(String name, RackTypeArgs args)
public RackType(String name, RackTypeArgs args, CustomResourceOptions options)
type: netbox:RackType
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 RackTypeArgs
- 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 RackTypeArgs
- 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 RackTypeArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RackTypeArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RackTypeArgs
- 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 rackTypeResource = new Netbox.RackType("rackTypeResource", new()
{
Model = "string",
Width = 0,
FormFactor = "string",
UHeight = 0,
StartingUnit = 0,
MaxWeight = 0,
MountingDepthMm = 0,
OuterDepth = 0,
OuterUnit = "string",
OuterWidth = 0,
RackTypeId = "string",
Slug = "string",
Comments = "string",
Tags = new[]
{
"string",
},
ManufacturerId = 0,
Weight = 0,
WeightUnit = "string",
Description = "string",
});
example, err := netbox.NewRackType(ctx, "rackTypeResource", &netbox.RackTypeArgs{
Model: pulumi.String("string"),
Width: pulumi.Float64(0),
FormFactor: pulumi.String("string"),
UHeight: pulumi.Float64(0),
StartingUnit: pulumi.Float64(0),
MaxWeight: pulumi.Float64(0),
MountingDepthMm: pulumi.Float64(0),
OuterDepth: pulumi.Float64(0),
OuterUnit: pulumi.String("string"),
OuterWidth: pulumi.Float64(0),
RackTypeId: pulumi.String("string"),
Slug: pulumi.String("string"),
Comments: pulumi.String("string"),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
ManufacturerId: pulumi.Float64(0),
Weight: pulumi.Float64(0),
WeightUnit: pulumi.String("string"),
Description: pulumi.String("string"),
})
var rackTypeResource = new RackType("rackTypeResource", RackTypeArgs.builder()
.model("string")
.width(0)
.formFactor("string")
.uHeight(0)
.startingUnit(0)
.maxWeight(0)
.mountingDepthMm(0)
.outerDepth(0)
.outerUnit("string")
.outerWidth(0)
.rackTypeId("string")
.slug("string")
.comments("string")
.tags("string")
.manufacturerId(0)
.weight(0)
.weightUnit("string")
.description("string")
.build());
rack_type_resource = netbox.RackType("rackTypeResource",
model="string",
width=0,
form_factor="string",
u_height=0,
starting_unit=0,
max_weight=0,
mounting_depth_mm=0,
outer_depth=0,
outer_unit="string",
outer_width=0,
rack_type_id="string",
slug="string",
comments="string",
tags=["string"],
manufacturer_id=0,
weight=0,
weight_unit="string",
description="string")
const rackTypeResource = new netbox.RackType("rackTypeResource", {
model: "string",
width: 0,
formFactor: "string",
uHeight: 0,
startingUnit: 0,
maxWeight: 0,
mountingDepthMm: 0,
outerDepth: 0,
outerUnit: "string",
outerWidth: 0,
rackTypeId: "string",
slug: "string",
comments: "string",
tags: ["string"],
manufacturerId: 0,
weight: 0,
weightUnit: "string",
description: "string",
});
type: netbox:RackType
properties:
comments: string
description: string
formFactor: string
manufacturerId: 0
maxWeight: 0
model: string
mountingDepthMm: 0
outerDepth: 0
outerUnit: string
outerWidth: 0
rackTypeId: string
slug: string
startingUnit: 0
tags:
- string
uHeight: 0
weight: 0
weightUnit: string
width: 0
RackType 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 RackType resource accepts the following input properties:
- Form
Factor string - Valid values are
2-post-frame
,4-post-frame
,4-post-cabinet
,wall-frame
,wall-frame-vertical
,wall-cabinet
andwall-cabinet-vertical
. - Model string
- Starting
Unit double - UHeight double
- Width double
- Valid values are
10
,19
,21
and23
. - Comments string
- Description string
- Manufacturer
Id double - Max
Weight double - Mounting
Depth doubleMm - Outer
Depth double - Outer
Unit string - Valid values are
mm
andin
. Required whenouter_width
andouter_depth
is set. - Outer
Width double - Rack
Type stringId - The ID of this resource.
- Slug string
- List<string>
- Weight double
- Weight
Unit string - Valid values are
kg
,g
,lb
andoz
. Required whenweight
andmax_weight
is set.
- Form
Factor string - Valid values are
2-post-frame
,4-post-frame
,4-post-cabinet
,wall-frame
,wall-frame-vertical
,wall-cabinet
andwall-cabinet-vertical
. - Model string
- Starting
Unit float64 - UHeight float64
- Width float64
- Valid values are
10
,19
,21
and23
. - Comments string
- Description string
- Manufacturer
Id float64 - Max
Weight float64 - Mounting
Depth float64Mm - Outer
Depth float64 - Outer
Unit string - Valid values are
mm
andin
. Required whenouter_width
andouter_depth
is set. - Outer
Width float64 - Rack
Type stringId - The ID of this resource.
- Slug string
- []string
- Weight float64
- Weight
Unit string - Valid values are
kg
,g
,lb
andoz
. Required whenweight
andmax_weight
is set.
- form
Factor String - Valid values are
2-post-frame
,4-post-frame
,4-post-cabinet
,wall-frame
,wall-frame-vertical
,wall-cabinet
andwall-cabinet-vertical
. - model String
- starting
Unit Double - u
Height Double - width Double
- Valid values are
10
,19
,21
and23
. - comments String
- description String
- manufacturer
Id Double - max
Weight Double - mounting
Depth DoubleMm - outer
Depth Double - outer
Unit String - Valid values are
mm
andin
. Required whenouter_width
andouter_depth
is set. - outer
Width Double - rack
Type StringId - The ID of this resource.
- slug String
- List<String>
- weight Double
- weight
Unit String - Valid values are
kg
,g
,lb
andoz
. Required whenweight
andmax_weight
is set.
- form
Factor string - Valid values are
2-post-frame
,4-post-frame
,4-post-cabinet
,wall-frame
,wall-frame-vertical
,wall-cabinet
andwall-cabinet-vertical
. - model string
- starting
Unit number - u
Height number - width number
- Valid values are
10
,19
,21
and23
. - comments string
- description string
- manufacturer
Id number - max
Weight number - mounting
Depth numberMm - outer
Depth number - outer
Unit string - Valid values are
mm
andin
. Required whenouter_width
andouter_depth
is set. - outer
Width number - rack
Type stringId - The ID of this resource.
- slug string
- string[]
- weight number
- weight
Unit string - Valid values are
kg
,g
,lb
andoz
. Required whenweight
andmax_weight
is set.
- form_
factor str - Valid values are
2-post-frame
,4-post-frame
,4-post-cabinet
,wall-frame
,wall-frame-vertical
,wall-cabinet
andwall-cabinet-vertical
. - model str
- starting_
unit float - u_
height float - width float
- Valid values are
10
,19
,21
and23
. - comments str
- description str
- manufacturer_
id float - max_
weight float - mounting_
depth_ floatmm - outer_
depth float - outer_
unit str - Valid values are
mm
andin
. Required whenouter_width
andouter_depth
is set. - outer_
width float - rack_
type_ strid - The ID of this resource.
- slug str
- Sequence[str]
- weight float
- weight_
unit str - Valid values are
kg
,g
,lb
andoz
. Required whenweight
andmax_weight
is set.
- form
Factor String - Valid values are
2-post-frame
,4-post-frame
,4-post-cabinet
,wall-frame
,wall-frame-vertical
,wall-cabinet
andwall-cabinet-vertical
. - model String
- starting
Unit Number - u
Height Number - width Number
- Valid values are
10
,19
,21
and23
. - comments String
- description String
- manufacturer
Id Number - max
Weight Number - mounting
Depth NumberMm - outer
Depth Number - outer
Unit String - Valid values are
mm
andin
. Required whenouter_width
andouter_depth
is set. - outer
Width Number - rack
Type StringId - The ID of this resource.
- slug String
- List<String>
- weight Number
- weight
Unit String - Valid values are
kg
,g
,lb
andoz
. Required whenweight
andmax_weight
is set.
Outputs
All input properties are implicitly available as output properties. Additionally, the RackType 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 RackType Resource
Get an existing RackType 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?: RackTypeState, opts?: CustomResourceOptions): RackType
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
comments: Optional[str] = None,
description: Optional[str] = None,
form_factor: Optional[str] = None,
manufacturer_id: Optional[float] = None,
max_weight: Optional[float] = None,
model: Optional[str] = None,
mounting_depth_mm: Optional[float] = None,
outer_depth: Optional[float] = None,
outer_unit: Optional[str] = None,
outer_width: Optional[float] = None,
rack_type_id: Optional[str] = None,
slug: Optional[str] = None,
starting_unit: Optional[float] = None,
tags: Optional[Sequence[str]] = None,
u_height: Optional[float] = None,
weight: Optional[float] = None,
weight_unit: Optional[str] = None,
width: Optional[float] = None) -> RackType
func GetRackType(ctx *Context, name string, id IDInput, state *RackTypeState, opts ...ResourceOption) (*RackType, error)
public static RackType Get(string name, Input<string> id, RackTypeState? state, CustomResourceOptions? opts = null)
public static RackType get(String name, Output<String> id, RackTypeState state, CustomResourceOptions options)
resources: _: type: netbox:RackType get: id: ${id}
- 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.
- Comments string
- Description string
- Form
Factor string - Valid values are
2-post-frame
,4-post-frame
,4-post-cabinet
,wall-frame
,wall-frame-vertical
,wall-cabinet
andwall-cabinet-vertical
. - Manufacturer
Id double - Max
Weight double - Model string
- Mounting
Depth doubleMm - Outer
Depth double - Outer
Unit string - Valid values are
mm
andin
. Required whenouter_width
andouter_depth
is set. - Outer
Width double - Rack
Type stringId - The ID of this resource.
- Slug string
- Starting
Unit double - List<string>
- UHeight double
- Weight double
- Weight
Unit string - Valid values are
kg
,g
,lb
andoz
. Required whenweight
andmax_weight
is set. - Width double
- Valid values are
10
,19
,21
and23
.
- Comments string
- Description string
- Form
Factor string - Valid values are
2-post-frame
,4-post-frame
,4-post-cabinet
,wall-frame
,wall-frame-vertical
,wall-cabinet
andwall-cabinet-vertical
. - Manufacturer
Id float64 - Max
Weight float64 - Model string
- Mounting
Depth float64Mm - Outer
Depth float64 - Outer
Unit string - Valid values are
mm
andin
. Required whenouter_width
andouter_depth
is set. - Outer
Width float64 - Rack
Type stringId - The ID of this resource.
- Slug string
- Starting
Unit float64 - []string
- UHeight float64
- Weight float64
- Weight
Unit string - Valid values are
kg
,g
,lb
andoz
. Required whenweight
andmax_weight
is set. - Width float64
- Valid values are
10
,19
,21
and23
.
- comments String
- description String
- form
Factor String - Valid values are
2-post-frame
,4-post-frame
,4-post-cabinet
,wall-frame
,wall-frame-vertical
,wall-cabinet
andwall-cabinet-vertical
. - manufacturer
Id Double - max
Weight Double - model String
- mounting
Depth DoubleMm - outer
Depth Double - outer
Unit String - Valid values are
mm
andin
. Required whenouter_width
andouter_depth
is set. - outer
Width Double - rack
Type StringId - The ID of this resource.
- slug String
- starting
Unit Double - List<String>
- u
Height Double - weight Double
- weight
Unit String - Valid values are
kg
,g
,lb
andoz
. Required whenweight
andmax_weight
is set. - width Double
- Valid values are
10
,19
,21
and23
.
- comments string
- description string
- form
Factor string - Valid values are
2-post-frame
,4-post-frame
,4-post-cabinet
,wall-frame
,wall-frame-vertical
,wall-cabinet
andwall-cabinet-vertical
. - manufacturer
Id number - max
Weight number - model string
- mounting
Depth numberMm - outer
Depth number - outer
Unit string - Valid values are
mm
andin
. Required whenouter_width
andouter_depth
is set. - outer
Width number - rack
Type stringId - The ID of this resource.
- slug string
- starting
Unit number - string[]
- u
Height number - weight number
- weight
Unit string - Valid values are
kg
,g
,lb
andoz
. Required whenweight
andmax_weight
is set. - width number
- Valid values are
10
,19
,21
and23
.
- comments str
- description str
- form_
factor str - Valid values are
2-post-frame
,4-post-frame
,4-post-cabinet
,wall-frame
,wall-frame-vertical
,wall-cabinet
andwall-cabinet-vertical
. - manufacturer_
id float - max_
weight float - model str
- mounting_
depth_ floatmm - outer_
depth float - outer_
unit str - Valid values are
mm
andin
. Required whenouter_width
andouter_depth
is set. - outer_
width float - rack_
type_ strid - The ID of this resource.
- slug str
- starting_
unit float - Sequence[str]
- u_
height float - weight float
- weight_
unit str - Valid values are
kg
,g
,lb
andoz
. Required whenweight
andmax_weight
is set. - width float
- Valid values are
10
,19
,21
and23
.
- comments String
- description String
- form
Factor String - Valid values are
2-post-frame
,4-post-frame
,4-post-cabinet
,wall-frame
,wall-frame-vertical
,wall-cabinet
andwall-cabinet-vertical
. - manufacturer
Id Number - max
Weight Number - model String
- mounting
Depth NumberMm - outer
Depth Number - outer
Unit String - Valid values are
mm
andin
. Required whenouter_width
andouter_depth
is set. - outer
Width Number - rack
Type StringId - The ID of this resource.
- slug String
- starting
Unit Number - List<String>
- u
Height Number - weight Number
- weight
Unit String - Valid values are
kg
,g
,lb
andoz
. Required whenweight
andmax_weight
is set. - width Number
- Valid values are
10
,19
,21
and23
.
Package Details
- Repository
- netbox e-breuninger/terraform-provider-netbox
- License
- Notes
- This Pulumi package is based on the
netbox
Terraform Provider.