netbox.DeviceType
Explore with Pulumi AI
From the official documentation:
A device type represents a particular make and model of hardware that exists in the real world. Device types define the physical attributes of a device (rack height and depth) and its individual components (console, power, network interfaces, and so on).
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as netbox from "@pulumi/netbox";
const testManufacturer = new netbox.Manufacturer("testManufacturer", {});
const testDeviceType = new netbox.DeviceType("testDeviceType", {
model: "test",
partNumber: "123",
manufacturerId: testManufacturer.manufacturerId,
});
import pulumi
import pulumi_netbox as netbox
test_manufacturer = netbox.Manufacturer("testManufacturer")
test_device_type = netbox.DeviceType("testDeviceType",
model="test",
part_number="123",
manufacturer_id=test_manufacturer.manufacturer_id)
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.NewDeviceType(ctx, "testDeviceType", &netbox.DeviceTypeArgs{
Model: pulumi.String("test"),
PartNumber: pulumi.String("123"),
ManufacturerId: testManufacturer.ManufacturerId,
})
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 testDeviceType = new Netbox.DeviceType("testDeviceType", new()
{
Model = "test",
PartNumber = "123",
ManufacturerId = testManufacturer.ManufacturerId,
});
});
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.DeviceType;
import com.pulumi.netbox.DeviceTypeArgs;
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 testDeviceType = new DeviceType("testDeviceType", DeviceTypeArgs.builder()
.model("test")
.partNumber("123")
.manufacturerId(testManufacturer.manufacturerId())
.build());
}
}
resources:
testManufacturer:
type: netbox:Manufacturer
testDeviceType:
type: netbox:DeviceType
properties:
model: test
partNumber: '123'
manufacturerId: ${testManufacturer.manufacturerId}
Create DeviceType Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DeviceType(name: string, args: DeviceTypeArgs, opts?: CustomResourceOptions);
@overload
def DeviceType(resource_name: str,
args: DeviceTypeArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DeviceType(resource_name: str,
opts: Optional[ResourceOptions] = None,
manufacturer_id: Optional[float] = None,
model: Optional[str] = None,
device_type_id: Optional[str] = None,
is_full_depth: Optional[bool] = None,
part_number: Optional[str] = None,
slug: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
u_height: Optional[float] = None)
func NewDeviceType(ctx *Context, name string, args DeviceTypeArgs, opts ...ResourceOption) (*DeviceType, error)
public DeviceType(string name, DeviceTypeArgs args, CustomResourceOptions? opts = null)
public DeviceType(String name, DeviceTypeArgs args)
public DeviceType(String name, DeviceTypeArgs args, CustomResourceOptions options)
type: netbox:DeviceType
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 DeviceTypeArgs
- 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 DeviceTypeArgs
- 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 DeviceTypeArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DeviceTypeArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DeviceTypeArgs
- 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 deviceTypeResource = new Netbox.DeviceType("deviceTypeResource", new()
{
ManufacturerId = 0,
Model = "string",
DeviceTypeId = "string",
IsFullDepth = false,
PartNumber = "string",
Slug = "string",
Tags = new[]
{
"string",
},
UHeight = 0,
});
example, err := netbox.NewDeviceType(ctx, "deviceTypeResource", &netbox.DeviceTypeArgs{
ManufacturerId: pulumi.Float64(0),
Model: pulumi.String("string"),
DeviceTypeId: pulumi.String("string"),
IsFullDepth: pulumi.Bool(false),
PartNumber: pulumi.String("string"),
Slug: pulumi.String("string"),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
UHeight: pulumi.Float64(0),
})
var deviceTypeResource = new DeviceType("deviceTypeResource", DeviceTypeArgs.builder()
.manufacturerId(0)
.model("string")
.deviceTypeId("string")
.isFullDepth(false)
.partNumber("string")
.slug("string")
.tags("string")
.uHeight(0)
.build());
device_type_resource = netbox.DeviceType("deviceTypeResource",
manufacturer_id=0,
model="string",
device_type_id="string",
is_full_depth=False,
part_number="string",
slug="string",
tags=["string"],
u_height=0)
const deviceTypeResource = new netbox.DeviceType("deviceTypeResource", {
manufacturerId: 0,
model: "string",
deviceTypeId: "string",
isFullDepth: false,
partNumber: "string",
slug: "string",
tags: ["string"],
uHeight: 0,
});
type: netbox:DeviceType
properties:
deviceTypeId: string
isFullDepth: false
manufacturerId: 0
model: string
partNumber: string
slug: string
tags:
- string
uHeight: 0
DeviceType 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 DeviceType resource accepts the following input properties:
- Manufacturer
Id double - Model string
- Device
Type stringId - The ID of this resource.
- Is
Full boolDepth - Part
Number string - Slug string
- List<string>
- UHeight double
- Defaults to
1.0
.
- Manufacturer
Id float64 - Model string
- Device
Type stringId - The ID of this resource.
- Is
Full boolDepth - Part
Number string - Slug string
- []string
- UHeight float64
- Defaults to
1.0
.
- manufacturer
Id Double - model String
- device
Type StringId - The ID of this resource.
- is
Full BooleanDepth - part
Number String - slug String
- List<String>
- u
Height Double - Defaults to
1.0
.
- manufacturer
Id number - model string
- device
Type stringId - The ID of this resource.
- is
Full booleanDepth - part
Number string - slug string
- string[]
- u
Height number - Defaults to
1.0
.
- manufacturer_
id float - model str
- device_
type_ strid - The ID of this resource.
- is_
full_ booldepth - part_
number str - slug str
- Sequence[str]
- u_
height float - Defaults to
1.0
.
- manufacturer
Id Number - model String
- device
Type StringId - The ID of this resource.
- is
Full BooleanDepth - part
Number String - slug String
- List<String>
- u
Height Number - Defaults to
1.0
.
Outputs
All input properties are implicitly available as output properties. Additionally, the DeviceType 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 DeviceType Resource
Get an existing DeviceType 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?: DeviceTypeState, opts?: CustomResourceOptions): DeviceType
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
device_type_id: Optional[str] = None,
is_full_depth: Optional[bool] = None,
manufacturer_id: Optional[float] = None,
model: Optional[str] = None,
part_number: Optional[str] = None,
slug: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
u_height: Optional[float] = None) -> DeviceType
func GetDeviceType(ctx *Context, name string, id IDInput, state *DeviceTypeState, opts ...ResourceOption) (*DeviceType, error)
public static DeviceType Get(string name, Input<string> id, DeviceTypeState? state, CustomResourceOptions? opts = null)
public static DeviceType get(String name, Output<String> id, DeviceTypeState state, CustomResourceOptions options)
resources: _: type: netbox:DeviceType 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.
- Device
Type stringId - The ID of this resource.
- Is
Full boolDepth - Manufacturer
Id double - Model string
- Part
Number string - Slug string
- List<string>
- UHeight double
- Defaults to
1.0
.
- Device
Type stringId - The ID of this resource.
- Is
Full boolDepth - Manufacturer
Id float64 - Model string
- Part
Number string - Slug string
- []string
- UHeight float64
- Defaults to
1.0
.
- device
Type StringId - The ID of this resource.
- is
Full BooleanDepth - manufacturer
Id Double - model String
- part
Number String - slug String
- List<String>
- u
Height Double - Defaults to
1.0
.
- device
Type stringId - The ID of this resource.
- is
Full booleanDepth - manufacturer
Id number - model string
- part
Number string - slug string
- string[]
- u
Height number - Defaults to
1.0
.
- device_
type_ strid - The ID of this resource.
- is_
full_ booldepth - manufacturer_
id float - model str
- part_
number str - slug str
- Sequence[str]
- u_
height float - Defaults to
1.0
.
- device
Type StringId - The ID of this resource.
- is
Full BooleanDepth - manufacturer
Id Number - model String
- part
Number String - slug String
- List<String>
- u
Height Number - Defaults to
1.0
.
Package Details
- Repository
- netbox e-breuninger/terraform-provider-netbox
- License
- Notes
- This Pulumi package is based on the
netbox
Terraform Provider.