Viewing docs for netbox 6.0.0
published on Wednesday, Nov 4, 2026 by e-breuninger
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
published on Wednesday, Nov 4, 2026 by e-breuninger
Lists device_bay objects matching the given filters.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as netbox from "@pulumi/netbox";
const test = netbox.getDeviceBays({
filters: [{
name: "name",
value: "test-device_bay",
}],
});
import pulumi
import pulumi_netbox as netbox
test = netbox.get_device_bays(filters=[{
"name": "name",
"value": "test-device_bay",
}])
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 {
_, err := netbox.GetDeviceBays(ctx, &netbox.GetDeviceBaysArgs{
Filters: []netbox.GetDeviceBaysFilter{
{
Name: "name",
Value: "test-device_bay",
},
},
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Netbox = Pulumi.Netbox;
return await Deployment.RunAsync(() =>
{
var test = Netbox.GetDeviceBays.Invoke(new()
{
Filters = new[]
{
new Netbox.Inputs.GetDeviceBaysFilterInputArgs
{
Name = "name",
Value = "test-device_bay",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.netbox.NetboxFunctions;
import com.pulumi.netbox.inputs.GetDeviceBaysArgs;
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) {
final var test = NetboxFunctions.getDeviceBays(GetDeviceBaysArgs.builder()
.filters(GetDeviceBaysFilterArgs.builder()
.name("name")
.value("test-device_bay")
.build())
.build());
}
}
variables:
test:
fn::invoke:
function: netbox:getDeviceBays
arguments:
filters:
- name: name
value: test-device_bay
Example coming soon!
Using getDeviceBays
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getDeviceBays(args: GetDeviceBaysArgs, opts?: InvokeOptions): Promise<GetDeviceBaysResult>
function getDeviceBaysOutput(args: GetDeviceBaysOutputArgs, opts?: InvokeOutputOptions): Output<GetDeviceBaysResult>def get_device_bays(filters: Optional[Sequence[GetDeviceBaysFilter]] = None,
limit: Optional[float] = None,
opts: Optional[InvokeOptions] = None) -> GetDeviceBaysResult
def get_device_bays_output(filters: pulumi.Input[Optional[Sequence[pulumi.Input[GetDeviceBaysFilterArgs]]]] = None,
limit: pulumi.Input[Optional[float]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetDeviceBaysResult]func GetDeviceBays(ctx *Context, args *GetDeviceBaysArgs, opts ...InvokeOption) (*GetDeviceBaysResult, error)
func GetDeviceBaysOutput(ctx *Context, args *GetDeviceBaysOutputArgs, opts ...InvokeOption) GetDeviceBaysResultOutput> Note: This function is named GetDeviceBays in the Go SDK.
public static class GetDeviceBays
{
public static Task<GetDeviceBaysResult> InvokeAsync(GetDeviceBaysArgs args, InvokeOptions? opts = null)
public static Output<GetDeviceBaysResult> Invoke(GetDeviceBaysInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetDeviceBaysResult> Invoke(GetDeviceBaysInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetDeviceBaysResult> getDeviceBays(GetDeviceBaysArgs args, InvokeOptions options)
public static Output<GetDeviceBaysResult> getDeviceBays(GetDeviceBaysArgs args, InvokeOptions options)
public static Output<GetDeviceBaysResult> getDeviceBays(GetDeviceBaysArgs args, InvokeOutputOptions options)
fn::invoke:
function: netbox:index/getDeviceBays:getDeviceBays
arguments:
# arguments dictionarydata "netbox_get_device_bays" "name" {
# arguments
}The following arguments are supported:
- Filters
List<Get
Device Bays Filter> - Query filters, sent as API list parameters. Supported names: deviceid, deviceidn, id, idempty, idgt, idgte, idlt, idlte, idn, label, labelempty, labelic, labelie, labeliew, labeliregex, labelisw, labeln, labelnic, labelnie, labelniew, labelnisw, labelregex, name, nameempty, nameic, nameie, nameiew, nameiregex, nameisw, namen, namenic, namenie, nameniew, namenisw, nameregex, ownerid, owneridn, tag, tagany, tagn. Repeating a name sends that parameter once per value. Custom fields filter as cf*\n\n, e.g. cf*tier, with the field's own filter logic: loose is a case-insensitive substring match, exact an exact match. NetBox ignores names it has no custom field for, and such an entry does not narrow the result.
- Limit double
- The maximum number of objects to return from the API lookup. Defaults to 1000.
- Filters
[]Get
Device Bays Filter - Query filters, sent as API list parameters. Supported names: deviceid, deviceidn, id, idempty, idgt, idgte, idlt, idlte, idn, label, labelempty, labelic, labelie, labeliew, labeliregex, labelisw, labeln, labelnic, labelnie, labelniew, labelnisw, labelregex, name, nameempty, nameic, nameie, nameiew, nameiregex, nameisw, namen, namenic, namenie, nameniew, namenisw, nameregex, ownerid, owneridn, tag, tagany, tagn. Repeating a name sends that parameter once per value. Custom fields filter as cf*\n\n, e.g. cf*tier, with the field's own filter logic: loose is a case-insensitive substring match, exact an exact match. NetBox ignores names it has no custom field for, and such an entry does not narrow the result.
- Limit float64
- The maximum number of objects to return from the API lookup. Defaults to 1000.
- filters list(object)
- Query filters, sent as API list parameters. Supported names: deviceid, deviceidn, id, idempty, idgt, idgte, idlt, idlte, idn, label, labelempty, labelic, labelie, labeliew, labeliregex, labelisw, labeln, labelnic, labelnie, labelniew, labelnisw, labelregex, name, nameempty, nameic, nameie, nameiew, nameiregex, nameisw, namen, namenic, namenie, nameniew, namenisw, nameregex, ownerid, owneridn, tag, tagany, tagn. Repeating a name sends that parameter once per value. Custom fields filter as cf*\n\n, e.g. cf*tier, with the field's own filter logic: loose is a case-insensitive substring match, exact an exact match. NetBox ignores names it has no custom field for, and such an entry does not narrow the result.
- limit number
- The maximum number of objects to return from the API lookup. Defaults to 1000.
- filters
List<Get
Device Bays Filter> - Query filters, sent as API list parameters. Supported names: deviceid, deviceidn, id, idempty, idgt, idgte, idlt, idlte, idn, label, labelempty, labelic, labelie, labeliew, labeliregex, labelisw, labeln, labelnic, labelnie, labelniew, labelnisw, labelregex, name, nameempty, nameic, nameie, nameiew, nameiregex, nameisw, namen, namenic, namenie, nameniew, namenisw, nameregex, ownerid, owneridn, tag, tagany, tagn. Repeating a name sends that parameter once per value. Custom fields filter as cf*\n\n, e.g. cf*tier, with the field's own filter logic: loose is a case-insensitive substring match, exact an exact match. NetBox ignores names it has no custom field for, and such an entry does not narrow the result.
- limit Double
- The maximum number of objects to return from the API lookup. Defaults to 1000.
- filters
Get
Device Bays Filter[] - Query filters, sent as API list parameters. Supported names: deviceid, deviceidn, id, idempty, idgt, idgte, idlt, idlte, idn, label, labelempty, labelic, labelie, labeliew, labeliregex, labelisw, labeln, labelnic, labelnie, labelniew, labelnisw, labelregex, name, nameempty, nameic, nameie, nameiew, nameiregex, nameisw, namen, namenic, namenie, nameniew, namenisw, nameregex, ownerid, owneridn, tag, tagany, tagn. Repeating a name sends that parameter once per value. Custom fields filter as cf*\n\n, e.g. cf*tier, with the field's own filter logic: loose is a case-insensitive substring match, exact an exact match. NetBox ignores names it has no custom field for, and such an entry does not narrow the result.
- limit number
- The maximum number of objects to return from the API lookup. Defaults to 1000.
- filters
Sequence[Get
Device Bays Filter] - Query filters, sent as API list parameters. Supported names: deviceid, deviceidn, id, idempty, idgt, idgte, idlt, idlte, idn, label, labelempty, labelic, labelie, labeliew, labeliregex, labelisw, labeln, labelnic, labelnie, labelniew, labelnisw, labelregex, name, nameempty, nameic, nameie, nameiew, nameiregex, nameisw, namen, namenic, namenie, nameniew, namenisw, nameregex, ownerid, owneridn, tag, tagany, tagn. Repeating a name sends that parameter once per value. Custom fields filter as cf*\n\n, e.g. cf*tier, with the field's own filter logic: loose is a case-insensitive substring match, exact an exact match. NetBox ignores names it has no custom field for, and such an entry does not narrow the result.
- limit float
- The maximum number of objects to return from the API lookup. Defaults to 1000.
- filters List<Property Map>
- Query filters, sent as API list parameters. Supported names: deviceid, deviceidn, id, idempty, idgt, idgte, idlt, idlte, idn, label, labelempty, labelic, labelie, labeliew, labeliregex, labelisw, labeln, labelnic, labelnie, labelniew, labelnisw, labelregex, name, nameempty, nameic, nameie, nameiew, nameiregex, nameisw, namen, namenic, namenie, nameniew, namenisw, nameregex, ownerid, owneridn, tag, tagany, tagn. Repeating a name sends that parameter once per value. Custom fields filter as cf*\n\n, e.g. cf*tier, with the field's own filter logic: loose is a case-insensitive substring match, exact an exact match. NetBox ignores names it has no custom field for, and such an entry does not narrow the result.
- limit Number
- The maximum number of objects to return from the API lookup. Defaults to 1000.
getDeviceBays Result
The following output properties are available:
- Device
Bays List<GetDevice Bays Device Bay> - The matching device*bays.
- Id string
- The provider-assigned unique ID for this managed resource.
- Filters
List<Get
Device Bays Filter> - Query filters, sent as API list parameters. Supported names: deviceid, deviceidn, id, idempty, idgt, idgte, idlt, idlte, idn, label, labelempty, labelic, labelie, labeliew, labeliregex, labelisw, labeln, labelnic, labelnie, labelniew, labelnisw, labelregex, name, nameempty, nameic, nameie, nameiew, nameiregex, nameisw, namen, namenic, namenie, nameniew, namenisw, nameregex, ownerid, owneridn, tag, tagany, tagn. Repeating a name sends that parameter once per value. Custom fields filter as cf*\n\n, e.g. cf*tier, with the field's own filter logic: loose is a case-insensitive substring match, exact an exact match. NetBox ignores names it has no custom field for, and such an entry does not narrow the result.
- Limit double
- The maximum number of objects to return from the API lookup. Defaults to 1000.
- Device
Bays []GetDevice Bays Device Bay - The matching device*bays.
- Id string
- The provider-assigned unique ID for this managed resource.
- Filters
[]Get
Device Bays Filter - Query filters, sent as API list parameters. Supported names: deviceid, deviceidn, id, idempty, idgt, idgte, idlt, idlte, idn, label, labelempty, labelic, labelie, labeliew, labeliregex, labelisw, labeln, labelnic, labelnie, labelniew, labelnisw, labelregex, name, nameempty, nameic, nameie, nameiew, nameiregex, nameisw, namen, namenic, namenie, nameniew, namenisw, nameregex, ownerid, owneridn, tag, tagany, tagn. Repeating a name sends that parameter once per value. Custom fields filter as cf*\n\n, e.g. cf*tier, with the field's own filter logic: loose is a case-insensitive substring match, exact an exact match. NetBox ignores names it has no custom field for, and such an entry does not narrow the result.
- Limit float64
- The maximum number of objects to return from the API lookup. Defaults to 1000.
- device_
bays list(object) - The matching device*bays.
- id string
- The provider-assigned unique ID for this managed resource.
- filters list(object)
- Query filters, sent as API list parameters. Supported names: deviceid, deviceidn, id, idempty, idgt, idgte, idlt, idlte, idn, label, labelempty, labelic, labelie, labeliew, labeliregex, labelisw, labeln, labelnic, labelnie, labelniew, labelnisw, labelregex, name, nameempty, nameic, nameie, nameiew, nameiregex, nameisw, namen, namenic, namenie, nameniew, namenisw, nameregex, ownerid, owneridn, tag, tagany, tagn. Repeating a name sends that parameter once per value. Custom fields filter as cf*\n\n, e.g. cf*tier, with the field's own filter logic: loose is a case-insensitive substring match, exact an exact match. NetBox ignores names it has no custom field for, and such an entry does not narrow the result.
- limit number
- The maximum number of objects to return from the API lookup. Defaults to 1000.
- device
Bays List<GetDevice Bays Device Bay> - The matching device*bays.
- id String
- The provider-assigned unique ID for this managed resource.
- filters
List<Get
Device Bays Filter> - Query filters, sent as API list parameters. Supported names: deviceid, deviceidn, id, idempty, idgt, idgte, idlt, idlte, idn, label, labelempty, labelic, labelie, labeliew, labeliregex, labelisw, labeln, labelnic, labelnie, labelniew, labelnisw, labelregex, name, nameempty, nameic, nameie, nameiew, nameiregex, nameisw, namen, namenic, namenie, nameniew, namenisw, nameregex, ownerid, owneridn, tag, tagany, tagn. Repeating a name sends that parameter once per value. Custom fields filter as cf*\n\n, e.g. cf*tier, with the field's own filter logic: loose is a case-insensitive substring match, exact an exact match. NetBox ignores names it has no custom field for, and such an entry does not narrow the result.
- limit Double
- The maximum number of objects to return from the API lookup. Defaults to 1000.
- device
Bays GetDevice Bays Device Bay[] - The matching device*bays.
- id string
- The provider-assigned unique ID for this managed resource.
- filters
Get
Device Bays Filter[] - Query filters, sent as API list parameters. Supported names: deviceid, deviceidn, id, idempty, idgt, idgte, idlt, idlte, idn, label, labelempty, labelic, labelie, labeliew, labeliregex, labelisw, labeln, labelnic, labelnie, labelniew, labelnisw, labelregex, name, nameempty, nameic, nameie, nameiew, nameiregex, nameisw, namen, namenic, namenie, nameniew, namenisw, nameregex, ownerid, owneridn, tag, tagany, tagn. Repeating a name sends that parameter once per value. Custom fields filter as cf*\n\n, e.g. cf*tier, with the field's own filter logic: loose is a case-insensitive substring match, exact an exact match. NetBox ignores names it has no custom field for, and such an entry does not narrow the result.
- limit number
- The maximum number of objects to return from the API lookup. Defaults to 1000.
- device_
bays Sequence[GetDevice Bays Device Bay] - The matching device*bays.
- id str
- The provider-assigned unique ID for this managed resource.
- filters
Sequence[Get
Device Bays Filter] - Query filters, sent as API list parameters. Supported names: deviceid, deviceidn, id, idempty, idgt, idgte, idlt, idlte, idn, label, labelempty, labelic, labelie, labeliew, labeliregex, labelisw, labeln, labelnic, labelnie, labelniew, labelnisw, labelregex, name, nameempty, nameic, nameie, nameiew, nameiregex, nameisw, namen, namenic, namenie, nameniew, namenisw, nameregex, ownerid, owneridn, tag, tagany, tagn. Repeating a name sends that parameter once per value. Custom fields filter as cf*\n\n, e.g. cf*tier, with the field's own filter logic: loose is a case-insensitive substring match, exact an exact match. NetBox ignores names it has no custom field for, and such an entry does not narrow the result.
- limit float
- The maximum number of objects to return from the API lookup. Defaults to 1000.
- device
Bays List<Property Map> - The matching device*bays.
- id String
- The provider-assigned unique ID for this managed resource.
- filters List<Property Map>
- Query filters, sent as API list parameters. Supported names: deviceid, deviceidn, id, idempty, idgt, idgte, idlt, idlte, idn, label, labelempty, labelic, labelie, labeliew, labeliregex, labelisw, labeln, labelnic, labelnie, labelniew, labelnisw, labelregex, name, nameempty, nameic, nameie, nameiew, nameiregex, nameisw, namen, namenic, namenie, nameniew, namenisw, nameregex, ownerid, owneridn, tag, tagany, tagn. Repeating a name sends that parameter once per value. Custom fields filter as cf*\n\n, e.g. cf*tier, with the field's own filter logic: loose is a case-insensitive substring match, exact an exact match. NetBox ignores names it has no custom field for, and such an entry does not narrow the result.
- limit Number
- The maximum number of objects to return from the API lookup. Defaults to 1000.
Supporting Types
GetDeviceBaysDeviceBay
- Created string
- Custom
Fields 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
- Device
Id double - Id of the device.
- Enabled bool
- Whether the device bay is enabled.
- Id double
- NetBox id.
- Installed
Device doubleId - Id of the device installed in this bay.
- Label string
- Physical label.
- Last
Updated string - Name string
- Owner
Id double - Id of the owner the object is assigned to.
- List<string>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- List<string>
- Slugs of all tags on the object, including the provider's default_tags.
- Url string
- Created string
- Custom
Fields 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
- Device
Id float64 - Id of the device.
- Enabled bool
- Whether the device bay is enabled.
- Id float64
- NetBox id.
- Installed
Device float64Id - Id of the device installed in this bay.
- Label string
- Physical label.
- Last
Updated string - Name string
- Owner
Id float64 - Id of the owner the object is assigned to.
- []string
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- []string
- Slugs of all tags on the object, including the provider's default_tags.
- 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_
id number - Id of the device.
- enabled bool
- Whether the device bay is enabled.
- id number
- NetBox id.
- installed_
device_ numberid - Id of the device installed in this bay.
- label string
- Physical label.
- last_
updated string - name string
- owner_
id number - Id of the owner the object is assigned to.
- list(string)
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- list(string)
- Slugs of all tags on the object, including the provider's default_tags.
- url string
- created String
- custom
Fields 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
- device
Id Double - Id of the device.
- enabled Boolean
- Whether the device bay is enabled.
- id Double
- NetBox id.
- installed
Device DoubleId - Id of the device installed in this bay.
- label String
- Physical label.
- last
Updated String - name String
- owner
Id Double - Id of the owner the object is assigned to.
- List<String>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- List<String>
- Slugs of all tags on the object, including the provider's default_tags.
- url String
- created string
- custom
Fields {[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
- device
Id number - Id of the device.
- enabled boolean
- Whether the device bay is enabled.
- id number
- NetBox id.
- installed
Device numberId - Id of the device installed in this bay.
- label string
- Physical label.
- last
Updated string - name string
- owner
Id number - Id of the owner the object is assigned to.
- string[]
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- string[]
- Slugs of all tags on the object, including the provider's default_tags.
- 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_
id float - Id of the device.
- enabled bool
- Whether the device bay is enabled.
- id float
- NetBox id.
- installed_
device_ floatid - Id of the device installed in this bay.
- label str
- Physical label.
- last_
updated str - name str
- owner_
id float - Id of the owner the object is assigned to.
- Sequence[str]
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- Sequence[str]
- Slugs of all tags on the object, including the provider's default_tags.
- url str
- 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
Id Number - Id of the device.
- enabled Boolean
- Whether the device bay is enabled.
- id Number
- NetBox id.
- installed
Device NumberId - Id of the device installed in this bay.
- label String
- Physical label.
- last
Updated String - name String
- owner
Id Number - Id of the owner the object is assigned to.
- List<String>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- List<String>
- Slugs of all tags on the object, including the provider's default_tags.
- url String
GetDeviceBaysFilter
Package Details
- Repository
- netbox e-breuninger/terraform-provider-netbox
- License
- Notes
- This Pulumi package is based on the
netboxTerraform Provider.
netbox
Viewing docs for netbox 6.0.0
published on Wednesday, Nov 4, 2026 by e-breuninger
published on Wednesday, Nov 4, 2026 by e-breuninger