Viewing docs for netbox 6.0.1
published on Monday, Nov 16, 2026 by e-breuninger
published on Monday, Nov 16, 2026 by e-breuninger
netbox
Viewing docs for netbox 6.0.1
published on Monday, Nov 16, 2026 by e-breuninger
published on Monday, Nov 16, 2026 by e-breuninger
Lists device_role objects matching the given filters.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as netbox from "@pulumi/netbox";
const test = netbox.getDeviceRoles({
filters: [{
name: "name",
value: "test-device_role",
}],
});
import pulumi
import pulumi_netbox as netbox
test = netbox.get_device_roles(filters=[{
"name": "name",
"value": "test-device_role",
}])
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.GetDeviceRoles(ctx, &netbox.GetDeviceRolesArgs{
Filters: []netbox.GetDeviceRolesFilter{
{
Name: "name",
Value: "test-device_role",
},
},
}, 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.GetDeviceRoles.Invoke(new()
{
Filters = new[]
{
new Netbox.Inputs.GetDeviceRolesFilterInputArgs
{
Name = "name",
Value = "test-device_role",
},
},
});
});
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.GetDeviceRolesArgs;
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.getDeviceRoles(GetDeviceRolesArgs.builder()
.filters(GetDeviceRolesFilterArgs.builder()
.name("name")
.value("test-device_role")
.build())
.build());
}
}
variables:
test:
fn::invoke:
function: netbox:getDeviceRoles
arguments:
filters:
- name: name
value: test-device_role
Example coming soon!
Using getDeviceRoles
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 getDeviceRoles(args: GetDeviceRolesArgs, opts?: InvokeOptions): Promise<GetDeviceRolesResult>
function getDeviceRolesOutput(args: GetDeviceRolesOutputArgs, opts?: InvokeOutputOptions): Output<GetDeviceRolesResult>def get_device_roles(filters: Optional[Sequence[GetDeviceRolesFilter]] = None,
limit: Optional[float] = None,
opts: Optional[InvokeOptions] = None) -> GetDeviceRolesResult
def get_device_roles_output(filters: pulumi.Input[Optional[Sequence[pulumi.Input[GetDeviceRolesFilterArgs]]]] = None,
limit: pulumi.Input[Optional[float]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetDeviceRolesResult]func GetDeviceRoles(ctx *Context, args *GetDeviceRolesArgs, opts ...InvokeOption) (*GetDeviceRolesResult, error)
func GetDeviceRolesOutput(ctx *Context, args *GetDeviceRolesOutputArgs, opts ...InvokeOption) GetDeviceRolesResultOutput> Note: This function is named GetDeviceRoles in the Go SDK.
public static class GetDeviceRoles
{
public static Task<GetDeviceRolesResult> InvokeAsync(GetDeviceRolesArgs args, InvokeOptions? opts = null)
public static Output<GetDeviceRolesResult> Invoke(GetDeviceRolesInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetDeviceRolesResult> Invoke(GetDeviceRolesInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetDeviceRolesResult> getDeviceRoles(GetDeviceRolesArgs args, InvokeOptions options)
public static Output<GetDeviceRolesResult> getDeviceRoles(GetDeviceRolesArgs args, InvokeOptions options)
public static Output<GetDeviceRolesResult> getDeviceRoles(GetDeviceRolesArgs args, InvokeOutputOptions options)
fn::invoke:
function: netbox:index/getDeviceRoles:getDeviceRoles
arguments:
# arguments dictionarydata "netbox_get_device_roles" "name" {
# arguments
}The following arguments are supported:
- Filters
List<Get
Device Roles Filter> - Query filters, sent as API list parameters. Supported names: ancestor, ancestorn, ancestorid, ancestoridn, color, colorempty, coloric, colorie, coloriew, coloriregex, colorisw, colorn, colornic, colornie, colorniew, colornisw, colorregex, configtemplateid, configtemplateidn, created, createdempty, createdgt, createdgte, createdlt, createdlte, createdn, description, descriptionempty, descriptionic, descriptionie, descriptioniew, descriptioniregex, descriptionisw, descriptionn, descriptionnic, descriptionnie, descriptionniew, descriptionnisw, descriptionregex, id, idempty, idgt, idgte, idlt, idlte, idn, lastupdated, lastupdatedempty, last_updatedgt, last_updatedgte, last_updatedlt, last_updatedlte, last_updatedn, name, nameempty, nameic, nameie, nameiew, nameiregex, nameisw, namen, namenic, namenie, nameniew, namenisw, nameregex, owner, ownern, ownergroup, ownergroupn, ownergroupid, ownergroupidn, ownerid, owneridn, parent, parentn, parentid, parentidn, q, slug, slugempty, slugic, slugie, slugiew, slugiregex, slugisw, slugn, slugnic, slugnie, slugniew, slugnisw, slugregex, tag, tagany, tagn, tagid, tagidany, tag_id_*n, vm*role. 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 Roles Filter - Query filters, sent as API list parameters. Supported names: ancestor, ancestorn, ancestorid, ancestoridn, color, colorempty, coloric, colorie, coloriew, coloriregex, colorisw, colorn, colornic, colornie, colorniew, colornisw, colorregex, configtemplateid, configtemplateidn, created, createdempty, createdgt, createdgte, createdlt, createdlte, createdn, description, descriptionempty, descriptionic, descriptionie, descriptioniew, descriptioniregex, descriptionisw, descriptionn, descriptionnic, descriptionnie, descriptionniew, descriptionnisw, descriptionregex, id, idempty, idgt, idgte, idlt, idlte, idn, lastupdated, lastupdatedempty, last_updatedgt, last_updatedgte, last_updatedlt, last_updatedlte, last_updatedn, name, nameempty, nameic, nameie, nameiew, nameiregex, nameisw, namen, namenic, namenie, nameniew, namenisw, nameregex, owner, ownern, ownergroup, ownergroupn, ownergroupid, ownergroupidn, ownerid, owneridn, parent, parentn, parentid, parentidn, q, slug, slugempty, slugic, slugie, slugiew, slugiregex, slugisw, slugn, slugnic, slugnie, slugniew, slugnisw, slugregex, tag, tagany, tagn, tagid, tagidany, tag_id_*n, vm*role. 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: ancestor, ancestorn, ancestorid, ancestoridn, color, colorempty, coloric, colorie, coloriew, coloriregex, colorisw, colorn, colornic, colornie, colorniew, colornisw, colorregex, configtemplateid, configtemplateidn, created, createdempty, createdgt, createdgte, createdlt, createdlte, createdn, description, descriptionempty, descriptionic, descriptionie, descriptioniew, descriptioniregex, descriptionisw, descriptionn, descriptionnic, descriptionnie, descriptionniew, descriptionnisw, descriptionregex, id, idempty, idgt, idgte, idlt, idlte, idn, lastupdated, lastupdatedempty, last_updatedgt, last_updatedgte, last_updatedlt, last_updatedlte, last_updatedn, name, nameempty, nameic, nameie, nameiew, nameiregex, nameisw, namen, namenic, namenie, nameniew, namenisw, nameregex, owner, ownern, ownergroup, ownergroupn, ownergroupid, ownergroupidn, ownerid, owneridn, parent, parentn, parentid, parentidn, q, slug, slugempty, slugic, slugie, slugiew, slugiregex, slugisw, slugn, slugnic, slugnie, slugniew, slugnisw, slugregex, tag, tagany, tagn, tagid, tagidany, tag_id_*n, vm*role. 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 Roles Filter> - Query filters, sent as API list parameters. Supported names: ancestor, ancestorn, ancestorid, ancestoridn, color, colorempty, coloric, colorie, coloriew, coloriregex, colorisw, colorn, colornic, colornie, colorniew, colornisw, colorregex, configtemplateid, configtemplateidn, created, createdempty, createdgt, createdgte, createdlt, createdlte, createdn, description, descriptionempty, descriptionic, descriptionie, descriptioniew, descriptioniregex, descriptionisw, descriptionn, descriptionnic, descriptionnie, descriptionniew, descriptionnisw, descriptionregex, id, idempty, idgt, idgte, idlt, idlte, idn, lastupdated, lastupdatedempty, last_updatedgt, last_updatedgte, last_updatedlt, last_updatedlte, last_updatedn, name, nameempty, nameic, nameie, nameiew, nameiregex, nameisw, namen, namenic, namenie, nameniew, namenisw, nameregex, owner, ownern, ownergroup, ownergroupn, ownergroupid, ownergroupidn, ownerid, owneridn, parent, parentn, parentid, parentidn, q, slug, slugempty, slugic, slugie, slugiew, slugiregex, slugisw, slugn, slugnic, slugnie, slugniew, slugnisw, slugregex, tag, tagany, tagn, tagid, tagidany, tag_id_*n, vm*role. 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 Roles Filter[] - Query filters, sent as API list parameters. Supported names: ancestor, ancestorn, ancestorid, ancestoridn, color, colorempty, coloric, colorie, coloriew, coloriregex, colorisw, colorn, colornic, colornie, colorniew, colornisw, colorregex, configtemplateid, configtemplateidn, created, createdempty, createdgt, createdgte, createdlt, createdlte, createdn, description, descriptionempty, descriptionic, descriptionie, descriptioniew, descriptioniregex, descriptionisw, descriptionn, descriptionnic, descriptionnie, descriptionniew, descriptionnisw, descriptionregex, id, idempty, idgt, idgte, idlt, idlte, idn, lastupdated, lastupdatedempty, last_updatedgt, last_updatedgte, last_updatedlt, last_updatedlte, last_updatedn, name, nameempty, nameic, nameie, nameiew, nameiregex, nameisw, namen, namenic, namenie, nameniew, namenisw, nameregex, owner, ownern, ownergroup, ownergroupn, ownergroupid, ownergroupidn, ownerid, owneridn, parent, parentn, parentid, parentidn, q, slug, slugempty, slugic, slugie, slugiew, slugiregex, slugisw, slugn, slugnic, slugnie, slugniew, slugnisw, slugregex, tag, tagany, tagn, tagid, tagidany, tag_id_*n, vm*role. 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 Roles Filter] - Query filters, sent as API list parameters. Supported names: ancestor, ancestorn, ancestorid, ancestoridn, color, colorempty, coloric, colorie, coloriew, coloriregex, colorisw, colorn, colornic, colornie, colorniew, colornisw, colorregex, configtemplateid, configtemplateidn, created, createdempty, createdgt, createdgte, createdlt, createdlte, createdn, description, descriptionempty, descriptionic, descriptionie, descriptioniew, descriptioniregex, descriptionisw, descriptionn, descriptionnic, descriptionnie, descriptionniew, descriptionnisw, descriptionregex, id, idempty, idgt, idgte, idlt, idlte, idn, lastupdated, lastupdatedempty, last_updatedgt, last_updatedgte, last_updatedlt, last_updatedlte, last_updatedn, name, nameempty, nameic, nameie, nameiew, nameiregex, nameisw, namen, namenic, namenie, nameniew, namenisw, nameregex, owner, ownern, ownergroup, ownergroupn, ownergroupid, ownergroupidn, ownerid, owneridn, parent, parentn, parentid, parentidn, q, slug, slugempty, slugic, slugie, slugiew, slugiregex, slugisw, slugn, slugnic, slugnie, slugniew, slugnisw, slugregex, tag, tagany, tagn, tagid, tagidany, tag_id_*n, vm*role. 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: ancestor, ancestorn, ancestorid, ancestoridn, color, colorempty, coloric, colorie, coloriew, coloriregex, colorisw, colorn, colornic, colornie, colorniew, colornisw, colorregex, configtemplateid, configtemplateidn, created, createdempty, createdgt, createdgte, createdlt, createdlte, createdn, description, descriptionempty, descriptionic, descriptionie, descriptioniew, descriptioniregex, descriptionisw, descriptionn, descriptionnic, descriptionnie, descriptionniew, descriptionnisw, descriptionregex, id, idempty, idgt, idgte, idlt, idlte, idn, lastupdated, lastupdatedempty, last_updatedgt, last_updatedgte, last_updatedlt, last_updatedlte, last_updatedn, name, nameempty, nameic, nameie, nameiew, nameiregex, nameisw, namen, namenic, namenie, nameniew, namenisw, nameregex, owner, ownern, ownergroup, ownergroupn, ownergroupid, ownergroupidn, ownerid, owneridn, parent, parentn, parentid, parentidn, q, slug, slugempty, slugic, slugie, slugiew, slugiregex, slugisw, slugn, slugnic, slugnie, slugniew, slugnisw, slugregex, tag, tagany, tagn, tagid, tagidany, tag_id_*n, vm*role. 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.
getDeviceRoles Result
The following output properties are available:
- Device
Roles List<GetDevice Roles Device Role> - The matching device*roles.
- Id string
- The provider-assigned unique ID for this managed resource.
- Filters
List<Get
Device Roles Filter> - Query filters, sent as API list parameters. Supported names: ancestor, ancestorn, ancestorid, ancestoridn, color, colorempty, coloric, colorie, coloriew, coloriregex, colorisw, colorn, colornic, colornie, colorniew, colornisw, colorregex, configtemplateid, configtemplateidn, created, createdempty, createdgt, createdgte, createdlt, createdlte, createdn, description, descriptionempty, descriptionic, descriptionie, descriptioniew, descriptioniregex, descriptionisw, descriptionn, descriptionnic, descriptionnie, descriptionniew, descriptionnisw, descriptionregex, id, idempty, idgt, idgte, idlt, idlte, idn, lastupdated, lastupdatedempty, last_updatedgt, last_updatedgte, last_updatedlt, last_updatedlte, last_updatedn, name, nameempty, nameic, nameie, nameiew, nameiregex, nameisw, namen, namenic, namenie, nameniew, namenisw, nameregex, owner, ownern, ownergroup, ownergroupn, ownergroupid, ownergroupidn, ownerid, owneridn, parent, parentn, parentid, parentidn, q, slug, slugempty, slugic, slugie, slugiew, slugiregex, slugisw, slugn, slugnic, slugnie, slugniew, slugnisw, slugregex, tag, tagany, tagn, tagid, tagidany, tag_id_*n, vm*role. 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
Roles []GetDevice Roles Device Role - The matching device*roles.
- Id string
- The provider-assigned unique ID for this managed resource.
- Filters
[]Get
Device Roles Filter - Query filters, sent as API list parameters. Supported names: ancestor, ancestorn, ancestorid, ancestoridn, color, colorempty, coloric, colorie, coloriew, coloriregex, colorisw, colorn, colornic, colornie, colorniew, colornisw, colorregex, configtemplateid, configtemplateidn, created, createdempty, createdgt, createdgte, createdlt, createdlte, createdn, description, descriptionempty, descriptionic, descriptionie, descriptioniew, descriptioniregex, descriptionisw, descriptionn, descriptionnic, descriptionnie, descriptionniew, descriptionnisw, descriptionregex, id, idempty, idgt, idgte, idlt, idlte, idn, lastupdated, lastupdatedempty, last_updatedgt, last_updatedgte, last_updatedlt, last_updatedlte, last_updatedn, name, nameempty, nameic, nameie, nameiew, nameiregex, nameisw, namen, namenic, namenie, nameniew, namenisw, nameregex, owner, ownern, ownergroup, ownergroupn, ownergroupid, ownergroupidn, ownerid, owneridn, parent, parentn, parentid, parentidn, q, slug, slugempty, slugic, slugie, slugiew, slugiregex, slugisw, slugn, slugnic, slugnie, slugniew, slugnisw, slugregex, tag, tagany, tagn, tagid, tagidany, tag_id_*n, vm*role. 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_
roles list(object) - The matching device*roles.
- id string
- The provider-assigned unique ID for this managed resource.
- filters list(object)
- Query filters, sent as API list parameters. Supported names: ancestor, ancestorn, ancestorid, ancestoridn, color, colorempty, coloric, colorie, coloriew, coloriregex, colorisw, colorn, colornic, colornie, colorniew, colornisw, colorregex, configtemplateid, configtemplateidn, created, createdempty, createdgt, createdgte, createdlt, createdlte, createdn, description, descriptionempty, descriptionic, descriptionie, descriptioniew, descriptioniregex, descriptionisw, descriptionn, descriptionnic, descriptionnie, descriptionniew, descriptionnisw, descriptionregex, id, idempty, idgt, idgte, idlt, idlte, idn, lastupdated, lastupdatedempty, last_updatedgt, last_updatedgte, last_updatedlt, last_updatedlte, last_updatedn, name, nameempty, nameic, nameie, nameiew, nameiregex, nameisw, namen, namenic, namenie, nameniew, namenisw, nameregex, owner, ownern, ownergroup, ownergroupn, ownergroupid, ownergroupidn, ownerid, owneridn, parent, parentn, parentid, parentidn, q, slug, slugempty, slugic, slugie, slugiew, slugiregex, slugisw, slugn, slugnic, slugnie, slugniew, slugnisw, slugregex, tag, tagany, tagn, tagid, tagidany, tag_id_*n, vm*role. 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
Roles List<GetDevice Roles Device Role> - The matching device*roles.
- id String
- The provider-assigned unique ID for this managed resource.
- filters
List<Get
Device Roles Filter> - Query filters, sent as API list parameters. Supported names: ancestor, ancestorn, ancestorid, ancestoridn, color, colorempty, coloric, colorie, coloriew, coloriregex, colorisw, colorn, colornic, colornie, colorniew, colornisw, colorregex, configtemplateid, configtemplateidn, created, createdempty, createdgt, createdgte, createdlt, createdlte, createdn, description, descriptionempty, descriptionic, descriptionie, descriptioniew, descriptioniregex, descriptionisw, descriptionn, descriptionnic, descriptionnie, descriptionniew, descriptionnisw, descriptionregex, id, idempty, idgt, idgte, idlt, idlte, idn, lastupdated, lastupdatedempty, last_updatedgt, last_updatedgte, last_updatedlt, last_updatedlte, last_updatedn, name, nameempty, nameic, nameie, nameiew, nameiregex, nameisw, namen, namenic, namenie, nameniew, namenisw, nameregex, owner, ownern, ownergroup, ownergroupn, ownergroupid, ownergroupidn, ownerid, owneridn, parent, parentn, parentid, parentidn, q, slug, slugempty, slugic, slugie, slugiew, slugiregex, slugisw, slugn, slugnic, slugnie, slugniew, slugnisw, slugregex, tag, tagany, tagn, tagid, tagidany, tag_id_*n, vm*role. 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
Roles GetDevice Roles Device Role[] - The matching device*roles.
- id string
- The provider-assigned unique ID for this managed resource.
- filters
Get
Device Roles Filter[] - Query filters, sent as API list parameters. Supported names: ancestor, ancestorn, ancestorid, ancestoridn, color, colorempty, coloric, colorie, coloriew, coloriregex, colorisw, colorn, colornic, colornie, colorniew, colornisw, colorregex, configtemplateid, configtemplateidn, created, createdempty, createdgt, createdgte, createdlt, createdlte, createdn, description, descriptionempty, descriptionic, descriptionie, descriptioniew, descriptioniregex, descriptionisw, descriptionn, descriptionnic, descriptionnie, descriptionniew, descriptionnisw, descriptionregex, id, idempty, idgt, idgte, idlt, idlte, idn, lastupdated, lastupdatedempty, last_updatedgt, last_updatedgte, last_updatedlt, last_updatedlte, last_updatedn, name, nameempty, nameic, nameie, nameiew, nameiregex, nameisw, namen, namenic, namenie, nameniew, namenisw, nameregex, owner, ownern, ownergroup, ownergroupn, ownergroupid, ownergroupidn, ownerid, owneridn, parent, parentn, parentid, parentidn, q, slug, slugempty, slugic, slugie, slugiew, slugiregex, slugisw, slugn, slugnic, slugnie, slugniew, slugnisw, slugregex, tag, tagany, tagn, tagid, tagidany, tag_id_*n, vm*role. 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_
roles Sequence[GetDevice Roles Device Role] - The matching device*roles.
- id str
- The provider-assigned unique ID for this managed resource.
- filters
Sequence[Get
Device Roles Filter] - Query filters, sent as API list parameters. Supported names: ancestor, ancestorn, ancestorid, ancestoridn, color, colorempty, coloric, colorie, coloriew, coloriregex, colorisw, colorn, colornic, colornie, colorniew, colornisw, colorregex, configtemplateid, configtemplateidn, created, createdempty, createdgt, createdgte, createdlt, createdlte, createdn, description, descriptionempty, descriptionic, descriptionie, descriptioniew, descriptioniregex, descriptionisw, descriptionn, descriptionnic, descriptionnie, descriptionniew, descriptionnisw, descriptionregex, id, idempty, idgt, idgte, idlt, idlte, idn, lastupdated, lastupdatedempty, last_updatedgt, last_updatedgte, last_updatedlt, last_updatedlte, last_updatedn, name, nameempty, nameic, nameie, nameiew, nameiregex, nameisw, namen, namenic, namenie, nameniew, namenisw, nameregex, owner, ownern, ownergroup, ownergroupn, ownergroupid, ownergroupidn, ownerid, owneridn, parent, parentn, parentid, parentidn, q, slug, slugempty, slugic, slugie, slugiew, slugiregex, slugisw, slugn, slugnic, slugnie, slugniew, slugnisw, slugregex, tag, tagany, tagn, tagid, tagidany, tag_id_*n, vm*role. 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
Roles List<Property Map> - The matching device*roles.
- id String
- The provider-assigned unique ID for this managed resource.
- filters List<Property Map>
- Query filters, sent as API list parameters. Supported names: ancestor, ancestorn, ancestorid, ancestoridn, color, colorempty, coloric, colorie, coloriew, coloriregex, colorisw, colorn, colornic, colornie, colorniew, colornisw, colorregex, configtemplateid, configtemplateidn, created, createdempty, createdgt, createdgte, createdlt, createdlte, createdn, description, descriptionempty, descriptionic, descriptionie, descriptioniew, descriptioniregex, descriptionisw, descriptionn, descriptionnic, descriptionnie, descriptionniew, descriptionnisw, descriptionregex, id, idempty, idgt, idgte, idlt, idlte, idn, lastupdated, lastupdatedempty, last_updatedgt, last_updatedgte, last_updatedlt, last_updatedlte, last_updatedn, name, nameempty, nameic, nameie, nameiew, nameiregex, nameisw, namen, namenic, namenie, nameniew, namenisw, nameregex, owner, ownern, ownergroup, ownergroupn, ownergroupid, ownergroupidn, ownerid, owneridn, parent, parentn, parentid, parentidn, q, slug, slugempty, slugic, slugie, slugiew, slugiregex, slugisw, slugn, slugnic, slugnie, slugniew, slugnisw, slugregex, tag, tagany, tagn, tagid, tagidany, tag_id_*n, vm*role. 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
GetDeviceRolesDeviceRole
- Color
Hex string - RGB color in hex (e.g. ff0000). Defaults to 9e9e9e.
- Comments string
- Config
Template doubleId - Id of the config template devices of this role render by default.
- 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
Count double - Number of devices with the role.
- Id double
- NetBox id.
- Last
Updated string - Name string
- Owner
Id double - Id of the owner the object is assigned to.
- Parent
Id double - Id of the parent device role.
- Slug string
- URL-friendly unique shorthand; derived from name when not set.
- 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
- Virtual
Machine doubleCount - Number of virtual machines with the role.
- Vm
Role bool - Whether virtual machines may be assigned this role.
- Color
Hex string - RGB color in hex (e.g. ff0000). Defaults to 9e9e9e.
- Comments string
- Config
Template float64Id - Id of the config template devices of this role render by default.
- 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
Count float64 - Number of devices with the role.
- Id float64
- NetBox id.
- Last
Updated string - Name string
- Owner
Id float64 - Id of the owner the object is assigned to.
- Parent
Id float64 - Id of the parent device role.
- Slug string
- URL-friendly unique shorthand; derived from name when not set.
- []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
- Virtual
Machine float64Count - Number of virtual machines with the role.
- Vm
Role bool - Whether virtual machines may be assigned this role.
- color_
hex string - RGB color in hex (e.g. ff0000). Defaults to 9e9e9e.
- comments string
- config_
template_ numberid - Id of the config template devices of this role render by default.
- 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_
count number - Number of devices with the role.
- id number
- NetBox id.
- last_
updated string - name string
- owner_
id number - Id of the owner the object is assigned to.
- parent_
id number - Id of the parent device role.
- slug string
- URL-friendly unique shorthand; derived from name when not set.
- 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
- virtual_
machine_ numbercount - Number of virtual machines with the role.
- vm_
role bool - Whether virtual machines may be assigned this role.
- color
Hex String - RGB color in hex (e.g. ff0000). Defaults to 9e9e9e.
- comments String
- config
Template DoubleId - Id of the config template devices of this role render by default.
- 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
Count Double - Number of devices with the role.
- id Double
- NetBox id.
- last
Updated String - name String
- owner
Id Double - Id of the owner the object is assigned to.
- parent
Id Double - Id of the parent device role.
- slug String
- URL-friendly unique shorthand; derived from name when not set.
- 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
- virtual
Machine DoubleCount - Number of virtual machines with the role.
- vm
Role Boolean - Whether virtual machines may be assigned this role.
- color
Hex string - RGB color in hex (e.g. ff0000). Defaults to 9e9e9e.
- comments string
- config
Template numberId - Id of the config template devices of this role render by default.
- 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
Count number - Number of devices with the role.
- id number
- NetBox id.
- last
Updated string - name string
- owner
Id number - Id of the owner the object is assigned to.
- parent
Id number - Id of the parent device role.
- slug string
- URL-friendly unique shorthand; derived from name when not set.
- 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
- virtual
Machine numberCount - Number of virtual machines with the role.
- vm
Role boolean - Whether virtual machines may be assigned this role.
- color_
hex str - RGB color in hex (e.g. ff0000). Defaults to 9e9e9e.
- comments str
- config_
template_ floatid - Id of the config template devices of this role render by default.
- 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_
count float - Number of devices with the role.
- id float
- NetBox id.
- last_
updated str - name str
- owner_
id float - Id of the owner the object is assigned to.
- parent_
id float - Id of the parent device role.
- slug str
- URL-friendly unique shorthand; derived from name when not set.
- 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
- virtual_
machine_ floatcount - Number of virtual machines with the role.
- vm_
role bool - Whether virtual machines may be assigned this role.
- color
Hex String - RGB color in hex (e.g. ff0000). Defaults to 9e9e9e.
- comments String
- config
Template NumberId - Id of the config template devices of this role render by default.
- 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
Count Number - Number of devices with the role.
- id Number
- NetBox id.
- last
Updated String - name String
- owner
Id Number - Id of the owner the object is assigned to.
- parent
Id Number - Id of the parent device role.
- slug String
- URL-friendly unique shorthand; derived from name when not set.
- 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
- virtual
Machine NumberCount - Number of virtual machines with the role.
- vm
Role Boolean - Whether virtual machines may be assigned this role.
GetDeviceRolesFilter
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.1
published on Monday, Nov 16, 2026 by e-breuninger
published on Monday, Nov 16, 2026 by e-breuninger