1. Registry
  2. Packages
  3. Netbox Provider
  4. API Docs
  5. getDeviceBayTemplate
Viewing docs for netbox 6.0.1
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

    A device bay template of a device type (dcim.devicebaytemplate).

    From the official documentation:

    A template for a device bay that will be created on all instantiations of the parent device type.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as netbox from "@pulumi/netbox";
    
    const test = netbox.getDeviceBayTemplate({
        name: "test-device_bay_template",
    });
    
    import pulumi
    import pulumi_netbox as netbox
    
    test = netbox.get_device_bay_template(name="test-device_bay_template")
    
    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.LookupDeviceBayTemplate(ctx, &netbox.LookupDeviceBayTemplateArgs{
    			Name: pulumi.StringRef("test-device_bay_template"),
    		}, 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.GetDeviceBayTemplate.Invoke(new()
        {
            Name = "test-device_bay_template",
        });
    
    });
    
    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.GetDeviceBayTemplateArgs;
    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.getDeviceBayTemplate(GetDeviceBayTemplateArgs.builder()
                .name("test-device_bay_template")
                .build());
    
        }
    }
    
    variables:
      test:
        fn::invoke:
          function: netbox:getDeviceBayTemplate
          arguments:
            name: test-device_bay_template
    
    Example coming soon!
    

    Using getDeviceBayTemplate

    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 getDeviceBayTemplate(args: GetDeviceBayTemplateArgs, opts?: InvokeOptions): Promise<GetDeviceBayTemplateResult>
    function getDeviceBayTemplateOutput(args: GetDeviceBayTemplateOutputArgs, opts?: InvokeOutputOptions): Output<GetDeviceBayTemplateResult>
    def get_device_bay_template(created: Optional[str] = None,
                                description: Optional[str] = None,
                                device_type_id: Optional[float] = None,
                                enabled: Optional[bool] = None,
                                id: Optional[float] = None,
                                label: Optional[str] = None,
                                last_updated: Optional[str] = None,
                                name: Optional[str] = None,
                                q: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetDeviceBayTemplateResult
    def get_device_bay_template_output(created: pulumi.Input[Optional[str]] = None,
                                description: pulumi.Input[Optional[str]] = None,
                                device_type_id: pulumi.Input[Optional[float]] = None,
                                enabled: pulumi.Input[Optional[bool]] = None,
                                id: pulumi.Input[Optional[float]] = None,
                                label: pulumi.Input[Optional[str]] = None,
                                last_updated: pulumi.Input[Optional[str]] = None,
                                name: pulumi.Input[Optional[str]] = None,
                                q: pulumi.Input[Optional[str]] = None,
                                opts: Optional[InvokeOutputOptions] = None) -> Output[GetDeviceBayTemplateResult]
    func LookupDeviceBayTemplate(ctx *Context, args *LookupDeviceBayTemplateArgs, opts ...InvokeOption) (*LookupDeviceBayTemplateResult, error)
    func LookupDeviceBayTemplateOutput(ctx *Context, args *LookupDeviceBayTemplateOutputArgs, opts ...InvokeOption) LookupDeviceBayTemplateResultOutput

    > Note: This function is named LookupDeviceBayTemplate in the Go SDK.

    public static class GetDeviceBayTemplate 
    {
        public static Task<GetDeviceBayTemplateResult> InvokeAsync(GetDeviceBayTemplateArgs args, InvokeOptions? opts = null)
        public static Output<GetDeviceBayTemplateResult> Invoke(GetDeviceBayTemplateInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetDeviceBayTemplateResult> Invoke(GetDeviceBayTemplateInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetDeviceBayTemplateResult> getDeviceBayTemplate(GetDeviceBayTemplateArgs args, InvokeOptions options)
    public static Output<GetDeviceBayTemplateResult> getDeviceBayTemplate(GetDeviceBayTemplateArgs args, InvokeOptions options)
    public static Output<GetDeviceBayTemplateResult> getDeviceBayTemplate(GetDeviceBayTemplateArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: netbox:index/getDeviceBayTemplate:getDeviceBayTemplate
      arguments:
        # arguments dictionary
    data "netbox_get_device_bay_template" "name" {
        # arguments
    }

    The following arguments are supported:

    Created string
    Description string
    DeviceTypeId double
    Id of the device type. Device bays only exist on device types, not on module types.
    Enabled bool
    Whether the device bay is enabled.
    Id double
    NetBox id.
    Label string
    Physical label.
    LastUpdated string
    Name string
    Q string
    Search term, matched against the fields NetBox searches for this object type.
    Created string
    Description string
    DeviceTypeId float64
    Id of the device type. Device bays only exist on device types, not on module types.
    Enabled bool
    Whether the device bay is enabled.
    Id float64
    NetBox id.
    Label string
    Physical label.
    LastUpdated string
    Name string
    Q string
    Search term, matched against the fields NetBox searches for this object type.
    created string
    description string
    device_type_id number
    Id of the device type. Device bays only exist on device types, not on module types.
    enabled bool
    Whether the device bay is enabled.
    id number
    NetBox id.
    label string
    Physical label.
    last_updated string
    name string
    q string
    Search term, matched against the fields NetBox searches for this object type.
    created String
    description String
    deviceTypeId Double
    Id of the device type. Device bays only exist on device types, not on module types.
    enabled Boolean
    Whether the device bay is enabled.
    id Double
    NetBox id.
    label String
    Physical label.
    lastUpdated String
    name String
    q String
    Search term, matched against the fields NetBox searches for this object type.
    created string
    description string
    deviceTypeId number
    Id of the device type. Device bays only exist on device types, not on module types.
    enabled boolean
    Whether the device bay is enabled.
    id number
    NetBox id.
    label string
    Physical label.
    lastUpdated string
    name string
    q string
    Search term, matched against the fields NetBox searches for this object type.
    created str
    description str
    device_type_id float
    Id of the device type. Device bays only exist on device types, not on module types.
    enabled bool
    Whether the device bay is enabled.
    id float
    NetBox id.
    label str
    Physical label.
    last_updated str
    name str
    q str
    Search term, matched against the fields NetBox searches for this object type.
    created String
    description String
    deviceTypeId Number
    Id of the device type. Device bays only exist on device types, not on module types.
    enabled Boolean
    Whether the device bay is enabled.
    id Number
    NetBox id.
    label String
    Physical label.
    lastUpdated String
    name String
    q String
    Search term, matched against the fields NetBox searches for this object type.

    getDeviceBayTemplate Result

    The following output properties are available:

    Created string
    Description string
    DeviceTypeId double
    Id of the device type. Device bays only exist on device types, not on module types.
    Enabled bool
    Whether the device bay is enabled.
    Id double
    NetBox id.
    Label string
    Physical label.
    LastUpdated string
    Name string
    Url string
    Q string
    Search term, matched against the fields NetBox searches for this object type.
    Created string
    Description string
    DeviceTypeId float64
    Id of the device type. Device bays only exist on device types, not on module types.
    Enabled bool
    Whether the device bay is enabled.
    Id float64
    NetBox id.
    Label string
    Physical label.
    LastUpdated string
    Name string
    Url string
    Q string
    Search term, matched against the fields NetBox searches for this object type.
    created string
    description string
    device_type_id number
    Id of the device type. Device bays only exist on device types, not on module types.
    enabled bool
    Whether the device bay is enabled.
    id number
    NetBox id.
    label string
    Physical label.
    last_updated string
    name string
    url string
    q string
    Search term, matched against the fields NetBox searches for this object type.
    created String
    description String
    deviceTypeId Double
    Id of the device type. Device bays only exist on device types, not on module types.
    enabled Boolean
    Whether the device bay is enabled.
    id Double
    NetBox id.
    label String
    Physical label.
    lastUpdated String
    name String
    url String
    q String
    Search term, matched against the fields NetBox searches for this object type.
    created string
    description string
    deviceTypeId number
    Id of the device type. Device bays only exist on device types, not on module types.
    enabled boolean
    Whether the device bay is enabled.
    id number
    NetBox id.
    label string
    Physical label.
    lastUpdated string
    name string
    url string
    q string
    Search term, matched against the fields NetBox searches for this object type.
    created str
    description str
    device_type_id float
    Id of the device type. Device bays only exist on device types, not on module types.
    enabled bool
    Whether the device bay is enabled.
    id float
    NetBox id.
    label str
    Physical label.
    last_updated str
    name str
    url str
    q str
    Search term, matched against the fields NetBox searches for this object type.
    created String
    description String
    deviceTypeId Number
    Id of the device type. Device bays only exist on device types, not on module types.
    enabled Boolean
    Whether the device bay is enabled.
    id Number
    NetBox id.
    label String
    Physical label.
    lastUpdated String
    name String
    url String
    q String
    Search term, matched against the fields NetBox searches for this object type.

    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.1
    published on Monday, Nov 16, 2026 by e-breuninger

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial