1. Packages
  2. Netbox Provider
  3. API Docs
  4. RackType
netbox 3.10.0 published on Monday, Apr 14, 2025 by e-breuninger

netbox.RackType

Explore with Pulumi AI

netbox logo
netbox 3.10.0 published on Monday, Apr 14, 2025 by e-breuninger

    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:

    FormFactor string
    Valid values are 2-post-frame, 4-post-frame, 4-post-cabinet, wall-frame, wall-frame-vertical, wall-cabinet and wall-cabinet-vertical.
    Model string
    StartingUnit double
    UHeight double
    Width double
    Valid values are 10, 19, 21 and 23.
    Comments string
    Description string
    ManufacturerId double
    MaxWeight double
    MountingDepthMm double
    OuterDepth double
    OuterUnit string
    Valid values are mm and in. Required when outer_width and outer_depth is set.
    OuterWidth double
    RackTypeId string
    The ID of this resource.
    Slug string
    Tags List<string>
    Weight double
    WeightUnit string
    Valid values are kg, g, lb and oz. Required when weight and max_weight is set.
    FormFactor string
    Valid values are 2-post-frame, 4-post-frame, 4-post-cabinet, wall-frame, wall-frame-vertical, wall-cabinet and wall-cabinet-vertical.
    Model string
    StartingUnit float64
    UHeight float64
    Width float64
    Valid values are 10, 19, 21 and 23.
    Comments string
    Description string
    ManufacturerId float64
    MaxWeight float64
    MountingDepthMm float64
    OuterDepth float64
    OuterUnit string
    Valid values are mm and in. Required when outer_width and outer_depth is set.
    OuterWidth float64
    RackTypeId string
    The ID of this resource.
    Slug string
    Tags []string
    Weight float64
    WeightUnit string
    Valid values are kg, g, lb and oz. Required when weight and max_weight is set.
    formFactor String
    Valid values are 2-post-frame, 4-post-frame, 4-post-cabinet, wall-frame, wall-frame-vertical, wall-cabinet and wall-cabinet-vertical.
    model String
    startingUnit Double
    uHeight Double
    width Double
    Valid values are 10, 19, 21 and 23.
    comments String
    description String
    manufacturerId Double
    maxWeight Double
    mountingDepthMm Double
    outerDepth Double
    outerUnit String
    Valid values are mm and in. Required when outer_width and outer_depth is set.
    outerWidth Double
    rackTypeId String
    The ID of this resource.
    slug String
    tags List<String>
    weight Double
    weightUnit String
    Valid values are kg, g, lb and oz. Required when weight and max_weight is set.
    formFactor string
    Valid values are 2-post-frame, 4-post-frame, 4-post-cabinet, wall-frame, wall-frame-vertical, wall-cabinet and wall-cabinet-vertical.
    model string
    startingUnit number
    uHeight number
    width number
    Valid values are 10, 19, 21 and 23.
    comments string
    description string
    manufacturerId number
    maxWeight number
    mountingDepthMm number
    outerDepth number
    outerUnit string
    Valid values are mm and in. Required when outer_width and outer_depth is set.
    outerWidth number
    rackTypeId string
    The ID of this resource.
    slug string
    tags string[]
    weight number
    weightUnit string
    Valid values are kg, g, lb and oz. Required when weight and max_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 and wall-cabinet-vertical.
    model str
    starting_unit float
    u_height float
    width float
    Valid values are 10, 19, 21 and 23.
    comments str
    description str
    manufacturer_id float
    max_weight float
    mounting_depth_mm float
    outer_depth float
    outer_unit str
    Valid values are mm and in. Required when outer_width and outer_depth is set.
    outer_width float
    rack_type_id str
    The ID of this resource.
    slug str
    tags Sequence[str]
    weight float
    weight_unit str
    Valid values are kg, g, lb and oz. Required when weight and max_weight is set.
    formFactor String
    Valid values are 2-post-frame, 4-post-frame, 4-post-cabinet, wall-frame, wall-frame-vertical, wall-cabinet and wall-cabinet-vertical.
    model String
    startingUnit Number
    uHeight Number
    width Number
    Valid values are 10, 19, 21 and 23.
    comments String
    description String
    manufacturerId Number
    maxWeight Number
    mountingDepthMm Number
    outerDepth Number
    outerUnit String
    Valid values are mm and in. Required when outer_width and outer_depth is set.
    outerWidth Number
    rackTypeId String
    The ID of this resource.
    slug String
    tags List<String>
    weight Number
    weightUnit String
    Valid values are kg, g, lb and oz. Required when weight and max_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.
    The following state arguments are supported:
    Comments string
    Description string
    FormFactor string
    Valid values are 2-post-frame, 4-post-frame, 4-post-cabinet, wall-frame, wall-frame-vertical, wall-cabinet and wall-cabinet-vertical.
    ManufacturerId double
    MaxWeight double
    Model string
    MountingDepthMm double
    OuterDepth double
    OuterUnit string
    Valid values are mm and in. Required when outer_width and outer_depth is set.
    OuterWidth double
    RackTypeId string
    The ID of this resource.
    Slug string
    StartingUnit double
    Tags List<string>
    UHeight double
    Weight double
    WeightUnit string
    Valid values are kg, g, lb and oz. Required when weight and max_weight is set.
    Width double
    Valid values are 10, 19, 21 and 23.
    Comments string
    Description string
    FormFactor string
    Valid values are 2-post-frame, 4-post-frame, 4-post-cabinet, wall-frame, wall-frame-vertical, wall-cabinet and wall-cabinet-vertical.
    ManufacturerId float64
    MaxWeight float64
    Model string
    MountingDepthMm float64
    OuterDepth float64
    OuterUnit string
    Valid values are mm and in. Required when outer_width and outer_depth is set.
    OuterWidth float64
    RackTypeId string
    The ID of this resource.
    Slug string
    StartingUnit float64
    Tags []string
    UHeight float64
    Weight float64
    WeightUnit string
    Valid values are kg, g, lb and oz. Required when weight and max_weight is set.
    Width float64
    Valid values are 10, 19, 21 and 23.
    comments String
    description String
    formFactor String
    Valid values are 2-post-frame, 4-post-frame, 4-post-cabinet, wall-frame, wall-frame-vertical, wall-cabinet and wall-cabinet-vertical.
    manufacturerId Double
    maxWeight Double
    model String
    mountingDepthMm Double
    outerDepth Double
    outerUnit String
    Valid values are mm and in. Required when outer_width and outer_depth is set.
    outerWidth Double
    rackTypeId String
    The ID of this resource.
    slug String
    startingUnit Double
    tags List<String>
    uHeight Double
    weight Double
    weightUnit String
    Valid values are kg, g, lb and oz. Required when weight and max_weight is set.
    width Double
    Valid values are 10, 19, 21 and 23.
    comments string
    description string
    formFactor string
    Valid values are 2-post-frame, 4-post-frame, 4-post-cabinet, wall-frame, wall-frame-vertical, wall-cabinet and wall-cabinet-vertical.
    manufacturerId number
    maxWeight number
    model string
    mountingDepthMm number
    outerDepth number
    outerUnit string
    Valid values are mm and in. Required when outer_width and outer_depth is set.
    outerWidth number
    rackTypeId string
    The ID of this resource.
    slug string
    startingUnit number
    tags string[]
    uHeight number
    weight number
    weightUnit string
    Valid values are kg, g, lb and oz. Required when weight and max_weight is set.
    width number
    Valid values are 10, 19, 21 and 23.
    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 and wall-cabinet-vertical.
    manufacturer_id float
    max_weight float
    model str
    mounting_depth_mm float
    outer_depth float
    outer_unit str
    Valid values are mm and in. Required when outer_width and outer_depth is set.
    outer_width float
    rack_type_id str
    The ID of this resource.
    slug str
    starting_unit float
    tags Sequence[str]
    u_height float
    weight float
    weight_unit str
    Valid values are kg, g, lb and oz. Required when weight and max_weight is set.
    width float
    Valid values are 10, 19, 21 and 23.
    comments String
    description String
    formFactor String
    Valid values are 2-post-frame, 4-post-frame, 4-post-cabinet, wall-frame, wall-frame-vertical, wall-cabinet and wall-cabinet-vertical.
    manufacturerId Number
    maxWeight Number
    model String
    mountingDepthMm Number
    outerDepth Number
    outerUnit String
    Valid values are mm and in. Required when outer_width and outer_depth is set.
    outerWidth Number
    rackTypeId String
    The ID of this resource.
    slug String
    startingUnit Number
    tags List<String>
    uHeight Number
    weight Number
    weightUnit String
    Valid values are kg, g, lb and oz. Required when weight and max_weight is set.
    width Number
    Valid values are 10, 19, 21 and 23.

    Package Details

    Repository
    netbox e-breuninger/terraform-provider-netbox
    License
    Notes
    This Pulumi package is based on the netbox Terraform Provider.
    netbox logo
    netbox 3.10.0 published on Monday, Apr 14, 2025 by e-breuninger