1. Registry
  2. Packages
  3. Netbox Provider
  4. API Docs
  5. getTag
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 NetBox tag (extras.tag). go-netbox has no Writable variant for tags.

    From the official documentation:

    Tags are user-defined labels which can be applied to a variety of objects within NetBox. They can be used to establish dimensions of organization beyond the relationships built into NetBox. For example, you might create a tag to identify a particular ownership or condition across several types of objects.

    Each tag has a label, color, and a URL-friendly slug. For example, the slug for a tag named “Dunder Mifflin, Inc.” would be dunder-mifflin-inc. The slug is generated automatically and makes tags easier to work with as URL parameters. Each tag can also be assigned a description indicating its purpose.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as netbox from "@pulumi/netbox";
    
    const test = netbox.getTag({
        name: "test-tag",
    });
    
    import pulumi
    import pulumi_netbox as netbox
    
    test = netbox.get_tag(name="test-tag")
    
    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.LookupTag(ctx, &netbox.LookupTagArgs{
    			Name: pulumi.StringRef("test-tag"),
    		}, 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.GetTag.Invoke(new()
        {
            Name = "test-tag",
        });
    
    });
    
    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.GetTagArgs;
    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.getTag(GetTagArgs.builder()
                .name("test-tag")
                .build());
    
        }
    }
    
    variables:
      test:
        fn::invoke:
          function: netbox:getTag
          arguments:
            name: test-tag
    
    Example coming soon!
    

    Using getTag

    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 getTag(args: GetTagArgs, opts?: InvokeOptions): Promise<GetTagResult>
    function getTagOutput(args: GetTagOutputArgs, opts?: InvokeOutputOptions): Output<GetTagResult>
    def get_tag(color: Optional[str] = None,
                content_type: Optional[str] = None,
                content_type_id: Optional[float] = None,
                created: Optional[str] = None,
                description: Optional[str] = None,
                for_object_type_id: Optional[float] = None,
                id: Optional[float] = None,
                last_updated: Optional[str] = None,
                name: Optional[str] = None,
                object_type_name: Optional[float] = None,
                owner_group_id: Optional[float] = None,
                owner_group_name: Optional[str] = None,
                owner_id: Optional[float] = None,
                owner_name: Optional[str] = None,
                q: Optional[str] = None,
                slug: Optional[str] = None,
                weight: Optional[float] = None,
                opts: Optional[InvokeOptions] = None) -> GetTagResult
    def get_tag_output(color: pulumi.Input[Optional[str]] = None,
                content_type: pulumi.Input[Optional[str]] = None,
                content_type_id: pulumi.Input[Optional[float]] = None,
                created: pulumi.Input[Optional[str]] = None,
                description: pulumi.Input[Optional[str]] = None,
                for_object_type_id: pulumi.Input[Optional[float]] = None,
                id: pulumi.Input[Optional[float]] = None,
                last_updated: pulumi.Input[Optional[str]] = None,
                name: pulumi.Input[Optional[str]] = None,
                object_type_name: pulumi.Input[Optional[float]] = None,
                owner_group_id: pulumi.Input[Optional[float]] = None,
                owner_group_name: pulumi.Input[Optional[str]] = None,
                owner_id: pulumi.Input[Optional[float]] = None,
                owner_name: pulumi.Input[Optional[str]] = None,
                q: pulumi.Input[Optional[str]] = None,
                slug: pulumi.Input[Optional[str]] = None,
                weight: pulumi.Input[Optional[float]] = None,
                opts: Optional[InvokeOutputOptions] = None) -> Output[GetTagResult]
    func LookupTag(ctx *Context, args *LookupTagArgs, opts ...InvokeOption) (*LookupTagResult, error)
    func LookupTagOutput(ctx *Context, args *LookupTagOutputArgs, opts ...InvokeOption) LookupTagResultOutput

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

    public static class GetTag 
    {
        public static Task<GetTagResult> InvokeAsync(GetTagArgs args, InvokeOptions? opts = null)
        public static Output<GetTagResult> Invoke(GetTagInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetTagResult> Invoke(GetTagInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetTagResult> getTag(GetTagArgs args, InvokeOptions options)
    public static Output<GetTagResult> getTag(GetTagArgs args, InvokeOptions options)
    public static Output<GetTagResult> getTag(GetTagArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: netbox:index/getTag:getTag
      arguments:
        # arguments dictionary
    data "netbox_get_tag" "name" {
        # arguments
    }

    The following arguments are supported:

    Color string
    Color to match.
    ContentType string
    Content type to match.
    ContentTypeId double
    Id of the content type.
    Created string
    Description string
    ForObjectTypeId double
    Id of the for object type.
    Id double
    NetBox id of the tag.
    LastUpdated string
    Name string
    ObjectTypeName double
    Name of the object types.
    OwnerGroupId double
    Id of the owner group.
    OwnerGroupName string
    Name of the owner group.
    OwnerId double
    Id of the owner.
    OwnerName string
    Name of the owner.
    Q string
    Search term, matched against the fields NetBox searches for this object type.
    Slug string
    URL-friendly unique shorthand; derived from name when not set.
    Weight double
    Sort weight; tags with a lower weight are listed first. Must be a whole number.
    Color string
    Color to match.
    ContentType string
    Content type to match.
    ContentTypeId float64
    Id of the content type.
    Created string
    Description string
    ForObjectTypeId float64
    Id of the for object type.
    Id float64
    NetBox id of the tag.
    LastUpdated string
    Name string
    ObjectTypeName float64
    Name of the object types.
    OwnerGroupId float64
    Id of the owner group.
    OwnerGroupName string
    Name of the owner group.
    OwnerId float64
    Id of the owner.
    OwnerName string
    Name of the owner.
    Q string
    Search term, matched against the fields NetBox searches for this object type.
    Slug string
    URL-friendly unique shorthand; derived from name when not set.
    Weight float64
    Sort weight; tags with a lower weight are listed first. Must be a whole number.
    color string
    Color to match.
    content_type string
    Content type to match.
    content_type_id number
    Id of the content type.
    created string
    description string
    for_object_type_id number
    Id of the for object type.
    id number
    NetBox id of the tag.
    last_updated string
    name string
    object_type_name number
    Name of the object types.
    owner_group_id number
    Id of the owner group.
    owner_group_name string
    Name of the owner group.
    owner_id number
    Id of the owner.
    owner_name string
    Name of the owner.
    q string
    Search term, matched against the fields NetBox searches for this object type.
    slug string
    URL-friendly unique shorthand; derived from name when not set.
    weight number
    Sort weight; tags with a lower weight are listed first. Must be a whole number.
    color String
    Color to match.
    contentType String
    Content type to match.
    contentTypeId Double
    Id of the content type.
    created String
    description String
    forObjectTypeId Double
    Id of the for object type.
    id Double
    NetBox id of the tag.
    lastUpdated String
    name String
    objectTypeName Double
    Name of the object types.
    ownerGroupId Double
    Id of the owner group.
    ownerGroupName String
    Name of the owner group.
    ownerId Double
    Id of the owner.
    ownerName String
    Name of the owner.
    q String
    Search term, matched against the fields NetBox searches for this object type.
    slug String
    URL-friendly unique shorthand; derived from name when not set.
    weight Double
    Sort weight; tags with a lower weight are listed first. Must be a whole number.
    color string
    Color to match.
    contentType string
    Content type to match.
    contentTypeId number
    Id of the content type.
    created string
    description string
    forObjectTypeId number
    Id of the for object type.
    id number
    NetBox id of the tag.
    lastUpdated string
    name string
    objectTypeName number
    Name of the object types.
    ownerGroupId number
    Id of the owner group.
    ownerGroupName string
    Name of the owner group.
    ownerId number
    Id of the owner.
    ownerName string
    Name of the owner.
    q string
    Search term, matched against the fields NetBox searches for this object type.
    slug string
    URL-friendly unique shorthand; derived from name when not set.
    weight number
    Sort weight; tags with a lower weight are listed first. Must be a whole number.
    color str
    Color to match.
    content_type str
    Content type to match.
    content_type_id float
    Id of the content type.
    created str
    description str
    for_object_type_id float
    Id of the for object type.
    id float
    NetBox id of the tag.
    last_updated str
    name str
    object_type_name float
    Name of the object types.
    owner_group_id float
    Id of the owner group.
    owner_group_name str
    Name of the owner group.
    owner_id float
    Id of the owner.
    owner_name str
    Name of the owner.
    q str
    Search term, matched against the fields NetBox searches for this object type.
    slug str
    URL-friendly unique shorthand; derived from name when not set.
    weight float
    Sort weight; tags with a lower weight are listed first. Must be a whole number.
    color String
    Color to match.
    contentType String
    Content type to match.
    contentTypeId Number
    Id of the content type.
    created String
    description String
    forObjectTypeId Number
    Id of the for object type.
    id Number
    NetBox id of the tag.
    lastUpdated String
    name String
    objectTypeName Number
    Name of the object types.
    ownerGroupId Number
    Id of the owner group.
    ownerGroupName String
    Name of the owner group.
    ownerId Number
    Id of the owner.
    ownerName String
    Name of the owner.
    q String
    Search term, matched against the fields NetBox searches for this object type.
    slug String
    URL-friendly unique shorthand; derived from name when not set.
    weight Number
    Sort weight; tags with a lower weight are listed first. Must be a whole number.

    getTag Result

    The following output properties are available:

    ColorHex string
    Hex color without the leading #. Defaults to 9e9e9e.
    Created string
    Description string
    Id double
    NetBox id of the tag.
    LastUpdated string
    Name string
    ObjectTypes List<string>
    Object types the tag can be assigned to, e.g. dcim.site.
    Slug string
    URL-friendly unique shorthand; derived from name when not set.
    Url string
    Weight double
    Sort weight; tags with a lower weight are listed first. Must be a whole number.
    Color string
    Color to match.
    ContentType string
    Content type to match.
    ContentTypeId double
    Id of the content type.
    ForObjectTypeId double
    Id of the for object type.
    ObjectTypeName double
    Name of the object types.
    OwnerGroupId double
    Id of the owner group.
    OwnerGroupName string
    Name of the owner group.
    OwnerId double
    Id of the owner.
    OwnerName string
    Name of the owner.
    Q string
    Search term, matched against the fields NetBox searches for this object type.
    ColorHex string
    Hex color without the leading #. Defaults to 9e9e9e.
    Created string
    Description string
    Id float64
    NetBox id of the tag.
    LastUpdated string
    Name string
    ObjectTypes []string
    Object types the tag can be assigned to, e.g. dcim.site.
    Slug string
    URL-friendly unique shorthand; derived from name when not set.
    Url string
    Weight float64
    Sort weight; tags with a lower weight are listed first. Must be a whole number.
    Color string
    Color to match.
    ContentType string
    Content type to match.
    ContentTypeId float64
    Id of the content type.
    ForObjectTypeId float64
    Id of the for object type.
    ObjectTypeName float64
    Name of the object types.
    OwnerGroupId float64
    Id of the owner group.
    OwnerGroupName string
    Name of the owner group.
    OwnerId float64
    Id of the owner.
    OwnerName string
    Name of the owner.
    Q string
    Search term, matched against the fields NetBox searches for this object type.
    color_hex string
    Hex color without the leading #. Defaults to 9e9e9e.
    created string
    description string
    id number
    NetBox id of the tag.
    last_updated string
    name string
    object_types list(string)
    Object types the tag can be assigned to, e.g. dcim.site.
    slug string
    URL-friendly unique shorthand; derived from name when not set.
    url string
    weight number
    Sort weight; tags with a lower weight are listed first. Must be a whole number.
    color string
    Color to match.
    content_type string
    Content type to match.
    content_type_id number
    Id of the content type.
    for_object_type_id number
    Id of the for object type.
    object_type_name number
    Name of the object types.
    owner_group_id number
    Id of the owner group.
    owner_group_name string
    Name of the owner group.
    owner_id number
    Id of the owner.
    owner_name string
    Name of the owner.
    q string
    Search term, matched against the fields NetBox searches for this object type.
    colorHex String
    Hex color without the leading #. Defaults to 9e9e9e.
    created String
    description String
    id Double
    NetBox id of the tag.
    lastUpdated String
    name String
    objectTypes List<String>
    Object types the tag can be assigned to, e.g. dcim.site.
    slug String
    URL-friendly unique shorthand; derived from name when not set.
    url String
    weight Double
    Sort weight; tags with a lower weight are listed first. Must be a whole number.
    color String
    Color to match.
    contentType String
    Content type to match.
    contentTypeId Double
    Id of the content type.
    forObjectTypeId Double
    Id of the for object type.
    objectTypeName Double
    Name of the object types.
    ownerGroupId Double
    Id of the owner group.
    ownerGroupName String
    Name of the owner group.
    ownerId Double
    Id of the owner.
    ownerName String
    Name of the owner.
    q String
    Search term, matched against the fields NetBox searches for this object type.
    colorHex string
    Hex color without the leading #. Defaults to 9e9e9e.
    created string
    description string
    id number
    NetBox id of the tag.
    lastUpdated string
    name string
    objectTypes string[]
    Object types the tag can be assigned to, e.g. dcim.site.
    slug string
    URL-friendly unique shorthand; derived from name when not set.
    url string
    weight number
    Sort weight; tags with a lower weight are listed first. Must be a whole number.
    color string
    Color to match.
    contentType string
    Content type to match.
    contentTypeId number
    Id of the content type.
    forObjectTypeId number
    Id of the for object type.
    objectTypeName number
    Name of the object types.
    ownerGroupId number
    Id of the owner group.
    ownerGroupName string
    Name of the owner group.
    ownerId number
    Id of the owner.
    ownerName string
    Name of the owner.
    q string
    Search term, matched against the fields NetBox searches for this object type.
    color_hex str
    Hex color without the leading #. Defaults to 9e9e9e.
    created str
    description str
    id float
    NetBox id of the tag.
    last_updated str
    name str
    object_types Sequence[str]
    Object types the tag can be assigned to, e.g. dcim.site.
    slug str
    URL-friendly unique shorthand; derived from name when not set.
    url str
    weight float
    Sort weight; tags with a lower weight are listed first. Must be a whole number.
    color str
    Color to match.
    content_type str
    Content type to match.
    content_type_id float
    Id of the content type.
    for_object_type_id float
    Id of the for object type.
    object_type_name float
    Name of the object types.
    owner_group_id float
    Id of the owner group.
    owner_group_name str
    Name of the owner group.
    owner_id float
    Id of the owner.
    owner_name str
    Name of the owner.
    q str
    Search term, matched against the fields NetBox searches for this object type.
    colorHex String
    Hex color without the leading #. Defaults to 9e9e9e.
    created String
    description String
    id Number
    NetBox id of the tag.
    lastUpdated String
    name String
    objectTypes List<String>
    Object types the tag can be assigned to, e.g. dcim.site.
    slug String
    URL-friendly unique shorthand; derived from name when not set.
    url String
    weight Number
    Sort weight; tags with a lower weight are listed first. Must be a whole number.
    color String
    Color to match.
    contentType String
    Content type to match.
    contentTypeId Number
    Id of the content type.
    forObjectTypeId Number
    Id of the for object type.
    objectTypeName Number
    Name of the object types.
    ownerGroupId Number
    Id of the owner group.
    ownerGroupName String
    Name of the owner group.
    ownerId Number
    Id of the owner.
    ownerName String
    Name of the owner.
    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