1. Registry
  2. Packages
  3. Netbox Provider
  4. API Docs
  5. getRearPortTemplate
Viewing docs for netbox 6.0.1
published on Monday, Nov 16, 2026 by e-breuninger

netbox.getRearPortTemplate

netbox
Viewing docs for netbox 6.0.1
published on Monday, Nov 16, 2026 by e-breuninger

    A rear port template of a device type or module type (dcim.rearporttemplate).

    From the official documentation:

    A template for a rear port that will be created on all instantiations of the parent device type. See the rear port documentation for more detail.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as netbox from "@pulumi/netbox";
    
    const test = netbox.getRearPortTemplate({
        name: "test-rear_port_template",
    });
    
    import pulumi
    import pulumi_netbox as netbox
    
    test = netbox.get_rear_port_template(name="test-rear_port_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.LookupRearPortTemplate(ctx, &netbox.LookupRearPortTemplateArgs{
    			Name: pulumi.StringRef("test-rear_port_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.GetRearPortTemplate.Invoke(new()
        {
            Name = "test-rear_port_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.GetRearPortTemplateArgs;
    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.getRearPortTemplate(GetRearPortTemplateArgs.builder()
                .name("test-rear_port_template")
                .build());
    
        }
    }
    
    variables:
      test:
        fn::invoke:
          function: netbox:getRearPortTemplate
          arguments:
            name: test-rear_port_template
    
    Example coming soon!
    

    Using getRearPortTemplate

    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 getRearPortTemplate(args: GetRearPortTemplateArgs, opts?: InvokeOptions): Promise<GetRearPortTemplateResult>
    function getRearPortTemplateOutput(args: GetRearPortTemplateOutputArgs, opts?: InvokeOutputOptions): Output<GetRearPortTemplateResult>
    def get_rear_port_template(color: Optional[str] = None,
                               created: Optional[str] = None,
                               description: Optional[str] = None,
                               device_type_id: Optional[float] = None,
                               front_port_id: Optional[float] = None,
                               id: Optional[float] = None,
                               label: Optional[str] = None,
                               last_updated: Optional[str] = None,
                               module_type_id: Optional[float] = None,
                               name: Optional[str] = None,
                               positions: Optional[float] = None,
                               q: Optional[str] = None,
                               type: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetRearPortTemplateResult
    def get_rear_port_template_output(color: pulumi.Input[Optional[str]] = None,
                               created: pulumi.Input[Optional[str]] = None,
                               description: pulumi.Input[Optional[str]] = None,
                               device_type_id: pulumi.Input[Optional[float]] = None,
                               front_port_id: pulumi.Input[Optional[float]] = None,
                               id: pulumi.Input[Optional[float]] = None,
                               label: pulumi.Input[Optional[str]] = None,
                               last_updated: pulumi.Input[Optional[str]] = None,
                               module_type_id: pulumi.Input[Optional[float]] = None,
                               name: pulumi.Input[Optional[str]] = None,
                               positions: pulumi.Input[Optional[float]] = None,
                               q: pulumi.Input[Optional[str]] = None,
                               type: pulumi.Input[Optional[str]] = None,
                               opts: Optional[InvokeOutputOptions] = None) -> Output[GetRearPortTemplateResult]
    func LookupRearPortTemplate(ctx *Context, args *LookupRearPortTemplateArgs, opts ...InvokeOption) (*LookupRearPortTemplateResult, error)
    func LookupRearPortTemplateOutput(ctx *Context, args *LookupRearPortTemplateOutputArgs, opts ...InvokeOption) LookupRearPortTemplateResultOutput

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

    public static class GetRearPortTemplate 
    {
        public static Task<GetRearPortTemplateResult> InvokeAsync(GetRearPortTemplateArgs args, InvokeOptions? opts = null)
        public static Output<GetRearPortTemplateResult> Invoke(GetRearPortTemplateInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetRearPortTemplateResult> Invoke(GetRearPortTemplateInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetRearPortTemplateResult> getRearPortTemplate(GetRearPortTemplateArgs args, InvokeOptions options)
    public static Output<GetRearPortTemplateResult> getRearPortTemplate(GetRearPortTemplateArgs args, InvokeOptions options)
    public static Output<GetRearPortTemplateResult> getRearPortTemplate(GetRearPortTemplateArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: netbox:index/getRearPortTemplate:getRearPortTemplate
      arguments:
        # arguments dictionary
    data "netbox_get_rear_port_template" "name" {
        # arguments
    }

    The following arguments are supported:

    Color string
    Color to match.
    Created string
    Description string
    DeviceTypeId double
    Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    FrontPortId double
    Id of the front port.
    Id double
    NetBox id.
    Label string
    Physical label.
    LastUpdated string
    ModuleTypeId double
    Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    Name string
    Positions double
    Number of front ports that can map to this rear port. Must be a whole number.
    Q string
    Search term, matched against the fields NetBox searches for this object type.
    Type string
    Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
    Color string
    Color to match.
    Created string
    Description string
    DeviceTypeId float64
    Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    FrontPortId float64
    Id of the front port.
    Id float64
    NetBox id.
    Label string
    Physical label.
    LastUpdated string
    ModuleTypeId float64
    Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    Name string
    Positions float64
    Number of front ports that can map to this rear port. Must be a whole number.
    Q string
    Search term, matched against the fields NetBox searches for this object type.
    Type string
    Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
    color string
    Color to match.
    created string
    description string
    device_type_id number
    Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    front_port_id number
    Id of the front port.
    id number
    NetBox id.
    label string
    Physical label.
    last_updated string
    module_type_id number
    Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    name string
    positions number
    Number of front ports that can map to this rear port. Must be a whole number.
    q string
    Search term, matched against the fields NetBox searches for this object type.
    type string
    Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
    color String
    Color to match.
    created String
    description String
    deviceTypeId Double
    Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    frontPortId Double
    Id of the front port.
    id Double
    NetBox id.
    label String
    Physical label.
    lastUpdated String
    moduleTypeId Double
    Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    name String
    positions Double
    Number of front ports that can map to this rear port. Must be a whole number.
    q String
    Search term, matched against the fields NetBox searches for this object type.
    type String
    Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
    color string
    Color to match.
    created string
    description string
    deviceTypeId number
    Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    frontPortId number
    Id of the front port.
    id number
    NetBox id.
    label string
    Physical label.
    lastUpdated string
    moduleTypeId number
    Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    name string
    positions number
    Number of front ports that can map to this rear port. Must be a whole number.
    q string
    Search term, matched against the fields NetBox searches for this object type.
    type string
    Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
    color str
    Color to match.
    created str
    description str
    device_type_id float
    Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    front_port_id float
    Id of the front port.
    id float
    NetBox id.
    label str
    Physical label.
    last_updated str
    module_type_id float
    Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    name str
    positions float
    Number of front ports that can map to this rear port. Must be a whole number.
    q str
    Search term, matched against the fields NetBox searches for this object type.
    type str
    Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
    color String
    Color to match.
    created String
    description String
    deviceTypeId Number
    Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    frontPortId Number
    Id of the front port.
    id Number
    NetBox id.
    label String
    Physical label.
    lastUpdated String
    moduleTypeId Number
    Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    name String
    positions Number
    Number of front ports that can map to this rear port. Must be a whole number.
    q String
    Search term, matched against the fields NetBox searches for this object type.
    type String
    Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).

    getRearPortTemplate Result

    The following output properties are available:

    ColorHex string
    RGB color in hex (e.g. ff0000).
    Created string
    Description string
    DeviceTypeId double
    Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    Id double
    NetBox id.
    Label string
    Physical label.
    LastUpdated string
    ModuleTypeId double
    Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    Name string
    Positions double
    Number of front ports that can map to this rear port. Must be a whole number.
    Type string
    Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
    Url string
    Color string
    Color to match.
    FrontPortId double
    Id of the front port.
    Q string
    Search term, matched against the fields NetBox searches for this object type.
    ColorHex string
    RGB color in hex (e.g. ff0000).
    Created string
    Description string
    DeviceTypeId float64
    Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    Id float64
    NetBox id.
    Label string
    Physical label.
    LastUpdated string
    ModuleTypeId float64
    Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    Name string
    Positions float64
    Number of front ports that can map to this rear port. Must be a whole number.
    Type string
    Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
    Url string
    Color string
    Color to match.
    FrontPortId float64
    Id of the front port.
    Q string
    Search term, matched against the fields NetBox searches for this object type.
    color_hex string
    RGB color in hex (e.g. ff0000).
    created string
    description string
    device_type_id number
    Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    id number
    NetBox id.
    label string
    Physical label.
    last_updated string
    module_type_id number
    Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    name string
    positions number
    Number of front ports that can map to this rear port. Must be a whole number.
    type string
    Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
    url string
    color string
    Color to match.
    front_port_id number
    Id of the front port.
    q string
    Search term, matched against the fields NetBox searches for this object type.
    colorHex String
    RGB color in hex (e.g. ff0000).
    created String
    description String
    deviceTypeId Double
    Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    id Double
    NetBox id.
    label String
    Physical label.
    lastUpdated String
    moduleTypeId Double
    Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    name String
    positions Double
    Number of front ports that can map to this rear port. Must be a whole number.
    type String
    Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
    url String
    color String
    Color to match.
    frontPortId Double
    Id of the front port.
    q String
    Search term, matched against the fields NetBox searches for this object type.
    colorHex string
    RGB color in hex (e.g. ff0000).
    created string
    description string
    deviceTypeId number
    Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    id number
    NetBox id.
    label string
    Physical label.
    lastUpdated string
    moduleTypeId number
    Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    name string
    positions number
    Number of front ports that can map to this rear port. Must be a whole number.
    type string
    Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
    url string
    color string
    Color to match.
    frontPortId number
    Id of the front port.
    q string
    Search term, matched against the fields NetBox searches for this object type.
    color_hex str
    RGB color in hex (e.g. ff0000).
    created str
    description str
    device_type_id float
    Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    id float
    NetBox id.
    label str
    Physical label.
    last_updated str
    module_type_id float
    Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    name str
    positions float
    Number of front ports that can map to this rear port. Must be a whole number.
    type str
    Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
    url str
    color str
    Color to match.
    front_port_id float
    Id of the front port.
    q str
    Search term, matched against the fields NetBox searches for this object type.
    colorHex String
    RGB color in hex (e.g. ff0000).
    created String
    description String
    deviceTypeId Number
    Id of the device type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    id Number
    NetBox id.
    label String
    Physical label.
    lastUpdated String
    moduleTypeId Number
    Id of the module type. Set exactly one of devicetypeid and moduletypeid; NetBox rejects both and neither.
    name String
    positions Number
    Number of front ports that can map to this rear port. Must be a whole number.
    type String
    Port type as its NetBox slug, e.g. 8p8c, lc, mpo (any of NetBox's port type choices).
    url String
    color String
    Color to match.
    frontPortId Number
    Id of the front port.
    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