1. Registry
  2. Packages
  3. Netbox Provider
  4. API Docs
  5. DeviceConsoleServerPort
Viewing docs for netbox 6.0.0
published on Wednesday, Nov 4, 2026 by e-breuninger
netbox
Viewing docs for netbox 6.0.0
published on Wednesday, Nov 4, 2026 by e-breuninger

    A device console server port (dcim.consoleserverport).

    From the official documentation:

    A console server is a device which provides remote access to the local consoles of connected devices. They are typically used to provide remote out-of-band access to network devices, and generally connect to console ports.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as netbox from "@pulumi/netbox";
    
    const test = new netbox.Site("test", {name: "test-site"});
    const testManufacturer = new netbox.Manufacturer("test", {name: "test-manufacturer"});
    const testDeviceType = new netbox.DeviceType("test", {
        manufacturerId: testManufacturer.manufacturerId,
        model: "test-device-type",
    });
    const testDeviceRole = new netbox.DeviceRole("test", {name: "test-device-role"});
    const testDevice = new netbox.Device("test", {
        name: "test-device",
        deviceTypeId: testDeviceType.deviceTypeId,
        roleId: testDeviceRole.deviceRoleId,
        siteId: test.siteId,
    });
    const testDeviceConsoleServerPort = new netbox.DeviceConsoleServerPort("test", {
        deviceId: testDevice.deviceId,
        name: "test-console-server-port",
        type: "rj-45",
        speed: 115200,
        label: "test-label",
        markConnected: true,
        description: "test-description",
    });
    
    import pulumi
    import pulumi_netbox as netbox
    
    test = netbox.Site("test", name="test-site")
    test_manufacturer = netbox.Manufacturer("test", name="test-manufacturer")
    test_device_type = netbox.DeviceType("test",
        manufacturer_id=test_manufacturer.manufacturer_id,
        model="test-device-type")
    test_device_role = netbox.DeviceRole("test", name="test-device-role")
    test_device = netbox.Device("test",
        name="test-device",
        device_type_id=test_device_type.device_type_id,
        role_id=test_device_role.device_role_id,
        site_id=test.site_id)
    test_device_console_server_port = netbox.DeviceConsoleServerPort("test",
        device_id=test_device.device_id,
        name="test-console-server-port",
        type="rj-45",
        speed=115200,
        label="test-label",
        mark_connected=True,
        description="test-description")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/netbox/v6/netbox"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		test, err := netbox.NewSite(ctx, "test", &netbox.SiteArgs{
    			Name: pulumi.String("test-site"),
    		})
    		if err != nil {
    			return err
    		}
    		testManufacturer, err := netbox.NewManufacturer(ctx, "test", &netbox.ManufacturerArgs{
    			Name: pulumi.String("test-manufacturer"),
    		})
    		if err != nil {
    			return err
    		}
    		testDeviceType, err := netbox.NewDeviceType(ctx, "test", &netbox.DeviceTypeArgs{
    			ManufacturerId: testManufacturer.ManufacturerId,
    			Model:          pulumi.String("test-device-type"),
    		})
    		if err != nil {
    			return err
    		}
    		testDeviceRole, err := netbox.NewDeviceRole(ctx, "test", &netbox.DeviceRoleArgs{
    			Name: pulumi.String("test-device-role"),
    		})
    		if err != nil {
    			return err
    		}
    		testDevice, err := netbox.NewDevice(ctx, "test", &netbox.DeviceArgs{
    			Name:         pulumi.String("test-device"),
    			DeviceTypeId: testDeviceType.DeviceTypeId,
    			RoleId:       testDeviceRole.DeviceRoleId,
    			SiteId:       test.SiteId,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = netbox.NewDeviceConsoleServerPort(ctx, "test", &netbox.DeviceConsoleServerPortArgs{
    			DeviceId:      testDevice.DeviceId,
    			Name:          pulumi.String("test-console-server-port"),
    			Type:          pulumi.String("rj-45"),
    			Speed:         pulumi.Float64(115200),
    			Label:         pulumi.String("test-label"),
    			MarkConnected: pulumi.Bool(true),
    			Description:   pulumi.String("test-description"),
    		})
    		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 test = new Netbox.Site("test", new()
        {
            Name = "test-site",
        });
    
        var testManufacturer = new Netbox.Manufacturer("test", new()
        {
            Name = "test-manufacturer",
        });
    
        var testDeviceType = new Netbox.DeviceType("test", new()
        {
            ManufacturerId = testManufacturer.ManufacturerId,
            Model = "test-device-type",
        });
    
        var testDeviceRole = new Netbox.DeviceRole("test", new()
        {
            Name = "test-device-role",
        });
    
        var testDevice = new Netbox.Device("test", new()
        {
            Name = "test-device",
            DeviceTypeId = testDeviceType.DeviceTypeId,
            RoleId = testDeviceRole.DeviceRoleId,
            SiteId = test.SiteId,
        });
    
        var testDeviceConsoleServerPort = new Netbox.DeviceConsoleServerPort("test", new()
        {
            DeviceId = testDevice.DeviceId,
            Name = "test-console-server-port",
            Type = "rj-45",
            Speed = 115200,
            Label = "test-label",
            MarkConnected = true,
            Description = "test-description",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.netbox.Site;
    import com.pulumi.netbox.SiteArgs;
    import com.pulumi.netbox.Manufacturer;
    import com.pulumi.netbox.ManufacturerArgs;
    import com.pulumi.netbox.DeviceType;
    import com.pulumi.netbox.DeviceTypeArgs;
    import com.pulumi.netbox.DeviceRole;
    import com.pulumi.netbox.DeviceRoleArgs;
    import com.pulumi.netbox.Device;
    import com.pulumi.netbox.DeviceArgs;
    import com.pulumi.netbox.DeviceConsoleServerPort;
    import com.pulumi.netbox.DeviceConsoleServerPortArgs;
    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 test = new Site("test", SiteArgs.builder()
                .name("test-site")
                .build());
    
            var testManufacturer = new Manufacturer("testManufacturer", ManufacturerArgs.builder()
                .name("test-manufacturer")
                .build());
    
            var testDeviceType = new DeviceType("testDeviceType", DeviceTypeArgs.builder()
                .manufacturerId(testManufacturer.manufacturerId())
                .model("test-device-type")
                .build());
    
            var testDeviceRole = new DeviceRole("testDeviceRole", DeviceRoleArgs.builder()
                .name("test-device-role")
                .build());
    
            var testDevice = new Device("testDevice", DeviceArgs.builder()
                .name("test-device")
                .deviceTypeId(testDeviceType.deviceTypeId())
                .roleId(testDeviceRole.deviceRoleId())
                .siteId(test.siteId())
                .build());
    
            var testDeviceConsoleServerPort = new DeviceConsoleServerPort("testDeviceConsoleServerPort", DeviceConsoleServerPortArgs.builder()
                .deviceId(testDevice.deviceId())
                .name("test-console-server-port")
                .type("rj-45")
                .speed(115200.0)
                .label("test-label")
                .markConnected(true)
                .description("test-description")
                .build());
    
        }
    }
    
    resources:
      test:
        type: netbox:Site
        properties:
          name: test-site
      testManufacturer:
        type: netbox:Manufacturer
        name: test
        properties:
          name: test-manufacturer
      testDeviceType:
        type: netbox:DeviceType
        name: test
        properties:
          manufacturerId: ${testManufacturer.manufacturerId}
          model: test-device-type
      testDeviceRole:
        type: netbox:DeviceRole
        name: test
        properties:
          name: test-device-role
      testDevice:
        type: netbox:Device
        name: test
        properties:
          name: test-device
          deviceTypeId: ${testDeviceType.deviceTypeId}
          roleId: ${testDeviceRole.deviceRoleId}
          siteId: ${test.siteId}
      testDeviceConsoleServerPort:
        type: netbox:DeviceConsoleServerPort
        name: test
        properties:
          deviceId: ${testDevice.deviceId}
          name: test-console-server-port
          type: rj-45
          speed: 115200
          label: test-label
          markConnected: true
          description: test-description
    
    Example coming soon!
    

    Create DeviceConsoleServerPort Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DeviceConsoleServerPort(name: string, args: DeviceConsoleServerPortArgs, opts?: CustomResourceOptions);
    @overload
    def DeviceConsoleServerPort(resource_name: str,
                                args: DeviceConsoleServerPortArgs,
                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def DeviceConsoleServerPort(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                device_id: Optional[float] = None,
                                custom_fields: Optional[Mapping[str, str]] = None,
                                description: Optional[str] = None,
                                label: Optional[str] = None,
                                mark_connected: Optional[bool] = None,
                                module_id: Optional[float] = None,
                                name: Optional[str] = None,
                                owner_id: Optional[float] = None,
                                speed: Optional[float] = None,
                                tags: Optional[Sequence[str]] = None,
                                type: Optional[str] = None)
    func NewDeviceConsoleServerPort(ctx *Context, name string, args DeviceConsoleServerPortArgs, opts ...ResourceOption) (*DeviceConsoleServerPort, error)
    public DeviceConsoleServerPort(string name, DeviceConsoleServerPortArgs args, CustomResourceOptions? opts = null)
    public DeviceConsoleServerPort(String name, DeviceConsoleServerPortArgs args)
    public DeviceConsoleServerPort(String name, DeviceConsoleServerPortArgs args, CustomResourceOptions options)
    
    type: netbox:DeviceConsoleServerPort
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "netbox_device_console_server_port" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args DeviceConsoleServerPortArgs
    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 DeviceConsoleServerPortArgs
    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 DeviceConsoleServerPortArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DeviceConsoleServerPortArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DeviceConsoleServerPortArgs
    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 deviceConsoleServerPortResource = new Netbox.DeviceConsoleServerPort("deviceConsoleServerPortResource", new()
    {
        DeviceId = 0.0,
        CustomFields = 
        {
            { "string", "string" },
        },
        Description = "string",
        Label = "string",
        MarkConnected = false,
        ModuleId = 0.0,
        Name = "string",
        OwnerId = 0.0,
        Speed = 0.0,
        Tags = new[]
        {
            "string",
        },
        Type = "string",
    });
    
    example, err := netbox.NewDeviceConsoleServerPort(ctx, "deviceConsoleServerPortResource", &netbox.DeviceConsoleServerPortArgs{
    	DeviceId: pulumi.Float64(0),
    	CustomFields: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Description:   pulumi.String("string"),
    	Label:         pulumi.String("string"),
    	MarkConnected: pulumi.Bool(false),
    	ModuleId:      pulumi.Float64(0),
    	Name:          pulumi.String("string"),
    	OwnerId:       pulumi.Float64(0),
    	Speed:         pulumi.Float64(0),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Type: pulumi.String("string"),
    })
    
    resource "netbox_device_console_server_port" "deviceConsoleServerPortResource" {
      lifecycle {
        create_before_destroy = true
      }
      device_id = 0
      custom_fields = {
        "string" = "string"
      }
      description    = "string"
      label          = "string"
      mark_connected = false
      module_id      = 0
      name           = "string"
      owner_id       = 0
      speed          = 0
      tags           = ["string"]
      type           = "string"
    }
    
    var deviceConsoleServerPortResource = new DeviceConsoleServerPort("deviceConsoleServerPortResource", DeviceConsoleServerPortArgs.builder()
        .deviceId(0.0)
        .customFields(Map.of("string", "string"))
        .description("string")
        .label("string")
        .markConnected(false)
        .moduleId(0.0)
        .name("string")
        .ownerId(0.0)
        .speed(0.0)
        .tags("string")
        .type("string")
        .build());
    
    device_console_server_port_resource = netbox.DeviceConsoleServerPort("deviceConsoleServerPortResource",
        device_id=float(0),
        custom_fields={
            "string": "string",
        },
        description="string",
        label="string",
        mark_connected=False,
        module_id=float(0),
        name="string",
        owner_id=float(0),
        speed=float(0),
        tags=["string"],
        type="string")
    
    const deviceConsoleServerPortResource = new netbox.DeviceConsoleServerPort("deviceConsoleServerPortResource", {
        deviceId: 0,
        customFields: {
            string: "string",
        },
        description: "string",
        label: "string",
        markConnected: false,
        moduleId: 0,
        name: "string",
        ownerId: 0,
        speed: 0,
        tags: ["string"],
        type: "string",
    });
    
    type: netbox:DeviceConsoleServerPort
    properties:
        customFields:
            string: string
        description: string
        deviceId: 0
        label: string
        markConnected: false
        moduleId: 0
        name: string
        ownerId: 0
        speed: 0
        tags:
            - string
        type: string
    

    DeviceConsoleServerPort 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 DeviceConsoleServerPort resource accepts the following input properties:

    DeviceId double
    Id of the device.
    CustomFields Dictionary<string, string>
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    Description string
    Label string
    Physical label.
    MarkConnected bool
    Treat as if a cable is connected.
    ModuleId double
    Id of the installed module this component belongs to.
    Name string
    OwnerId double
    Id of the owner the object is assigned to.
    Speed double
    Port speed in bps. One of: 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200.
    Tags List<string>
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    Type string
    Port type as its NetBox slug, e.g. de-9, rj-45, usb-a (any of NetBox's console server port type choices).
    DeviceId float64
    Id of the device.
    CustomFields map[string]string
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    Description string
    Label string
    Physical label.
    MarkConnected bool
    Treat as if a cable is connected.
    ModuleId float64
    Id of the installed module this component belongs to.
    Name string
    OwnerId float64
    Id of the owner the object is assigned to.
    Speed float64
    Port speed in bps. One of: 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200.
    Tags []string
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    Type string
    Port type as its NetBox slug, e.g. de-9, rj-45, usb-a (any of NetBox's console server port type choices).
    device_id number
    Id of the device.
    custom_fields map(string)
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    description string
    label string
    Physical label.
    mark_connected bool
    Treat as if a cable is connected.
    module_id number
    Id of the installed module this component belongs to.
    name string
    owner_id number
    Id of the owner the object is assigned to.
    speed number
    Port speed in bps. One of: 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200.
    tags list(string)
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    type string
    Port type as its NetBox slug, e.g. de-9, rj-45, usb-a (any of NetBox's console server port type choices).
    deviceId Double
    Id of the device.
    customFields Map<String,String>
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    description String
    label String
    Physical label.
    markConnected Boolean
    Treat as if a cable is connected.
    moduleId Double
    Id of the installed module this component belongs to.
    name String
    ownerId Double
    Id of the owner the object is assigned to.
    speed Double
    Port speed in bps. One of: 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200.
    tags List<String>
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    type String
    Port type as its NetBox slug, e.g. de-9, rj-45, usb-a (any of NetBox's console server port type choices).
    deviceId number
    Id of the device.
    customFields {[key: string]: string}
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    description string
    label string
    Physical label.
    markConnected boolean
    Treat as if a cable is connected.
    moduleId number
    Id of the installed module this component belongs to.
    name string
    ownerId number
    Id of the owner the object is assigned to.
    speed number
    Port speed in bps. One of: 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200.
    tags string[]
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    type string
    Port type as its NetBox slug, e.g. de-9, rj-45, usb-a (any of NetBox's console server port type choices).
    device_id float
    Id of the device.
    custom_fields Mapping[str, str]
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    description str
    label str
    Physical label.
    mark_connected bool
    Treat as if a cable is connected.
    module_id float
    Id of the installed module this component belongs to.
    name str
    owner_id float
    Id of the owner the object is assigned to.
    speed float
    Port speed in bps. One of: 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200.
    tags Sequence[str]
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    type str
    Port type as its NetBox slug, e.g. de-9, rj-45, usb-a (any of NetBox's console server port type choices).
    deviceId Number
    Id of the device.
    customFields Map<String>
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    description String
    label String
    Physical label.
    markConnected Boolean
    Treat as if a cable is connected.
    moduleId Number
    Id of the installed module this component belongs to.
    name String
    ownerId Number
    Id of the owner the object is assigned to.
    speed Number
    Port speed in bps. One of: 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200.
    tags List<String>
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    type String
    Port type as its NetBox slug, e.g. de-9, rj-45, usb-a (any of NetBox's console server port type choices).

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DeviceConsoleServerPort resource produces the following output properties:

    Created string
    DeviceConsoleServerPortId double
    NetBox id.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdated string
    TagsAlls List<string>
    Slugs of all tags on the object, including the provider's default_tags.
    Url string
    Created string
    DeviceConsoleServerPortId float64
    NetBox id.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdated string
    TagsAlls []string
    Slugs of all tags on the object, including the provider's default_tags.
    Url string
    created string
    device_console_server_port_id number
    NetBox id.
    id string
    The provider-assigned unique ID for this managed resource.
    last_updated string
    tags_alls list(string)
    Slugs of all tags on the object, including the provider's default_tags.
    url string
    created String
    deviceConsoleServerPortId Double
    NetBox id.
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdated String
    tagsAlls List<String>
    Slugs of all tags on the object, including the provider's default_tags.
    url String
    created string
    deviceConsoleServerPortId number
    NetBox id.
    id string
    The provider-assigned unique ID for this managed resource.
    lastUpdated string
    tagsAlls string[]
    Slugs of all tags on the object, including the provider's default_tags.
    url string
    created str
    device_console_server_port_id float
    NetBox id.
    id str
    The provider-assigned unique ID for this managed resource.
    last_updated str
    tags_alls Sequence[str]
    Slugs of all tags on the object, including the provider's default_tags.
    url str
    created String
    deviceConsoleServerPortId Number
    NetBox id.
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdated String
    tagsAlls List<String>
    Slugs of all tags on the object, including the provider's default_tags.
    url String

    Look up Existing DeviceConsoleServerPort Resource

    Get an existing DeviceConsoleServerPort 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?: DeviceConsoleServerPortState, opts?: CustomResourceOptions): DeviceConsoleServerPort
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created: Optional[str] = None,
            custom_fields: Optional[Mapping[str, str]] = None,
            description: Optional[str] = None,
            device_console_server_port_id: Optional[float] = None,
            device_id: Optional[float] = None,
            label: Optional[str] = None,
            last_updated: Optional[str] = None,
            mark_connected: Optional[bool] = None,
            module_id: Optional[float] = None,
            name: Optional[str] = None,
            owner_id: Optional[float] = None,
            speed: Optional[float] = None,
            tags: Optional[Sequence[str]] = None,
            tags_alls: Optional[Sequence[str]] = None,
            type: Optional[str] = None,
            url: Optional[str] = None) -> DeviceConsoleServerPort
    func GetDeviceConsoleServerPort(ctx *Context, name string, id IDInput, state *DeviceConsoleServerPortState, opts ...ResourceOption) (*DeviceConsoleServerPort, error)
    public static DeviceConsoleServerPort Get(string name, Input<string> id, DeviceConsoleServerPortState? state, CustomResourceOptions? opts = null)
    public static DeviceConsoleServerPort get(String name, Output<String> id, DeviceConsoleServerPortState state, CustomResourceOptions options)
    resources:  _:    type: netbox:DeviceConsoleServerPort    get:      id: ${id}
    import {
      to = netbox_device_console_server_port.example
      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:
    Created string
    CustomFields Dictionary<string, string>
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    Description string
    DeviceConsoleServerPortId double
    NetBox id.
    DeviceId double
    Id of the device.
    Label string
    Physical label.
    LastUpdated string
    MarkConnected bool
    Treat as if a cable is connected.
    ModuleId double
    Id of the installed module this component belongs to.
    Name string
    OwnerId double
    Id of the owner the object is assigned to.
    Speed double
    Port speed in bps. One of: 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200.
    Tags List<string>
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    TagsAlls List<string>
    Slugs of all tags on the object, including the provider's default_tags.
    Type string
    Port type as its NetBox slug, e.g. de-9, rj-45, usb-a (any of NetBox's console server port type choices).
    Url string
    Created string
    CustomFields map[string]string
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    Description string
    DeviceConsoleServerPortId float64
    NetBox id.
    DeviceId float64
    Id of the device.
    Label string
    Physical label.
    LastUpdated string
    MarkConnected bool
    Treat as if a cable is connected.
    ModuleId float64
    Id of the installed module this component belongs to.
    Name string
    OwnerId float64
    Id of the owner the object is assigned to.
    Speed float64
    Port speed in bps. One of: 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200.
    Tags []string
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    TagsAlls []string
    Slugs of all tags on the object, including the provider's default_tags.
    Type string
    Port type as its NetBox slug, e.g. de-9, rj-45, usb-a (any of NetBox's console server port type choices).
    Url string
    created string
    custom_fields map(string)
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    description string
    device_console_server_port_id number
    NetBox id.
    device_id number
    Id of the device.
    label string
    Physical label.
    last_updated string
    mark_connected bool
    Treat as if a cable is connected.
    module_id number
    Id of the installed module this component belongs to.
    name string
    owner_id number
    Id of the owner the object is assigned to.
    speed number
    Port speed in bps. One of: 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200.
    tags list(string)
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tags_alls list(string)
    Slugs of all tags on the object, including the provider's default_tags.
    type string
    Port type as its NetBox slug, e.g. de-9, rj-45, usb-a (any of NetBox's console server port type choices).
    url string
    created String
    customFields Map<String,String>
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    description String
    deviceConsoleServerPortId Double
    NetBox id.
    deviceId Double
    Id of the device.
    label String
    Physical label.
    lastUpdated String
    markConnected Boolean
    Treat as if a cable is connected.
    moduleId Double
    Id of the installed module this component belongs to.
    name String
    ownerId Double
    Id of the owner the object is assigned to.
    speed Double
    Port speed in bps. One of: 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200.
    tags List<String>
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tagsAlls List<String>
    Slugs of all tags on the object, including the provider's default_tags.
    type String
    Port type as its NetBox slug, e.g. de-9, rj-45, usb-a (any of NetBox's console server port type choices).
    url String
    created string
    customFields {[key: string]: string}
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    description string
    deviceConsoleServerPortId number
    NetBox id.
    deviceId number
    Id of the device.
    label string
    Physical label.
    lastUpdated string
    markConnected boolean
    Treat as if a cable is connected.
    moduleId number
    Id of the installed module this component belongs to.
    name string
    ownerId number
    Id of the owner the object is assigned to.
    speed number
    Port speed in bps. One of: 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200.
    tags string[]
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tagsAlls string[]
    Slugs of all tags on the object, including the provider's default_tags.
    type string
    Port type as its NetBox slug, e.g. de-9, rj-45, usb-a (any of NetBox's console server port type choices).
    url string
    created str
    custom_fields Mapping[str, str]
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    description str
    device_console_server_port_id float
    NetBox id.
    device_id float
    Id of the device.
    label str
    Physical label.
    last_updated str
    mark_connected bool
    Treat as if a cable is connected.
    module_id float
    Id of the installed module this component belongs to.
    name str
    owner_id float
    Id of the owner the object is assigned to.
    speed float
    Port speed in bps. One of: 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200.
    tags Sequence[str]
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tags_alls Sequence[str]
    Slugs of all tags on the object, including the provider's default_tags.
    type str
    Port type as its NetBox slug, e.g. de-9, rj-45, usb-a (any of NetBox's console server port type choices).
    url str
    created String
    customFields Map<String>
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    description String
    deviceConsoleServerPortId Number
    NetBox id.
    deviceId Number
    Id of the device.
    label String
    Physical label.
    lastUpdated String
    markConnected Boolean
    Treat as if a cable is connected.
    moduleId Number
    Id of the installed module this component belongs to.
    name String
    ownerId Number
    Id of the owner the object is assigned to.
    speed Number
    Port speed in bps. One of: 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200.
    tags List<String>
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tagsAlls List<String>
    Slugs of all tags on the object, including the provider's default_tags.
    type String
    Port type as its NetBox slug, e.g. de-9, rj-45, usb-a (any of NetBox's console server port type choices).
    url String

    Import

    In Terraform v1.5.0 and later, the import block can be used with the id attribute, for example:

    terraform

    import {

    to = netbox_device_console_server_port.test

    id = “123”

    }

    The pulumi import command can be used, for example:

    $ pulumi import netbox:index/deviceConsoleServerPort:DeviceConsoleServerPort test 123
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    netbox e-breuninger/terraform-provider-netbox
    License
    Notes
    This Pulumi package is based on the netbox Terraform Provider.
    netbox
    Viewing docs for netbox 6.0.0
    published on Wednesday, Nov 4, 2026 by e-breuninger

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial