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

    Lists token objects matching the given filters.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as netbox from "@pulumi/netbox";
    
    const test = netbox.getTokens({
        limit: 10,
    });
    
    import pulumi
    import pulumi_netbox as netbox
    
    test = netbox.get_tokens(limit=10)
    
    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.GetTokens(ctx, &netbox.GetTokensArgs{
    			Limit: pulumi.Float64Ref(10),
    		}, 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.GetTokens.Invoke(new()
        {
            Limit = 10,
        });
    
    });
    
    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.GetTokensArgs;
    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.getTokens(GetTokensArgs.builder()
                .limit(10)
                .build());
    
        }
    }
    
    variables:
      test:
        fn::invoke:
          function: netbox:getTokens
          arguments:
            limit: 10
    
    Example coming soon!
    

    Using getTokens

    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 getTokens(args: GetTokensArgs, opts?: InvokeOptions): Promise<GetTokensResult>
    function getTokensOutput(args: GetTokensOutputArgs, opts?: InvokeOutputOptions): Output<GetTokensResult>
    def get_tokens(filters: Optional[Sequence[GetTokensFilter]] = None,
                   limit: Optional[float] = None,
                   opts: Optional[InvokeOptions] = None) -> GetTokensResult
    def get_tokens_output(filters: pulumi.Input[Optional[Sequence[pulumi.Input[GetTokensFilterArgs]]]] = None,
                   limit: pulumi.Input[Optional[float]] = None,
                   opts: Optional[InvokeOutputOptions] = None) -> Output[GetTokensResult]
    func GetTokens(ctx *Context, args *GetTokensArgs, opts ...InvokeOption) (*GetTokensResult, error)
    func GetTokensOutput(ctx *Context, args *GetTokensOutputArgs, opts ...InvokeOption) GetTokensResultOutput

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

    public static class GetTokens 
    {
        public static Task<GetTokensResult> InvokeAsync(GetTokensArgs args, InvokeOptions? opts = null)
        public static Output<GetTokensResult> Invoke(GetTokensInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetTokensResult> Invoke(GetTokensInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetTokensResult> getTokens(GetTokensArgs args, InvokeOptions options)
    public static Output<GetTokensResult> getTokens(GetTokensArgs args, InvokeOptions options)
    public static Output<GetTokensResult> getTokens(GetTokensArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: netbox:index/getTokens:getTokens
      arguments:
        # arguments dictionary
    data "netbox_get_tokens" "name" {
        # arguments
    }

    The following arguments are supported:

    Filters List<GetTokensFilter>
    Query filters, sent as API list parameters. Supported names: id, idempty, idgt, idgte, idlt, idlte, idn, userid, userid__n. Repeating a name sends that parameter once per value.
    Limit double
    The maximum number of objects to return from the API lookup. Defaults to 1000.
    Filters []GetTokensFilter
    Query filters, sent as API list parameters. Supported names: id, idempty, idgt, idgte, idlt, idlte, idn, userid, userid__n. Repeating a name sends that parameter once per value.
    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: id, idempty, idgt, idgte, idlt, idlte, idn, userid, userid__n. Repeating a name sends that parameter once per value.
    limit number
    The maximum number of objects to return from the API lookup. Defaults to 1000.
    filters List<GetTokensFilter>
    Query filters, sent as API list parameters. Supported names: id, idempty, idgt, idgte, idlt, idlte, idn, userid, userid__n. Repeating a name sends that parameter once per value.
    limit Double
    The maximum number of objects to return from the API lookup. Defaults to 1000.
    filters GetTokensFilter[]
    Query filters, sent as API list parameters. Supported names: id, idempty, idgt, idgte, idlt, idlte, idn, userid, userid__n. Repeating a name sends that parameter once per value.
    limit number
    The maximum number of objects to return from the API lookup. Defaults to 1000.
    filters Sequence[GetTokensFilter]
    Query filters, sent as API list parameters. Supported names: id, idempty, idgt, idgte, idlt, idlte, idn, userid, userid__n. Repeating a name sends that parameter once per value.
    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: id, idempty, idgt, idgte, idlt, idlte, idn, userid, userid__n. Repeating a name sends that parameter once per value.
    limit Number
    The maximum number of objects to return from the API lookup. Defaults to 1000.

    getTokens Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Tokens List<GetTokensToken>
    The matching tokens.
    Filters List<GetTokensFilter>
    Query filters, sent as API list parameters. Supported names: id, idempty, idgt, idgte, idlt, idlte, idn, userid, userid__n. Repeating a name sends that parameter once per value.
    Limit double
    The maximum number of objects to return from the API lookup. Defaults to 1000.
    Id string
    The provider-assigned unique ID for this managed resource.
    Tokens []GetTokensToken
    The matching tokens.
    Filters []GetTokensFilter
    Query filters, sent as API list parameters. Supported names: id, idempty, idgt, idgte, idlt, idlte, idn, userid, userid__n. Repeating a name sends that parameter once per value.
    Limit float64
    The maximum number of objects to return from the API lookup. Defaults to 1000.
    id string
    The provider-assigned unique ID for this managed resource.
    tokens list(object)
    The matching tokens.
    filters list(object)
    Query filters, sent as API list parameters. Supported names: id, idempty, idgt, idgte, idlt, idlte, idn, userid, userid__n. Repeating a name sends that parameter once per value.
    limit number
    The maximum number of objects to return from the API lookup. Defaults to 1000.
    id String
    The provider-assigned unique ID for this managed resource.
    tokens List<GetTokensToken>
    The matching tokens.
    filters List<GetTokensFilter>
    Query filters, sent as API list parameters. Supported names: id, idempty, idgt, idgte, idlt, idlte, idn, userid, userid__n. Repeating a name sends that parameter once per value.
    limit Double
    The maximum number of objects to return from the API lookup. Defaults to 1000.
    id string
    The provider-assigned unique ID for this managed resource.
    tokens GetTokensToken[]
    The matching tokens.
    filters GetTokensFilter[]
    Query filters, sent as API list parameters. Supported names: id, idempty, idgt, idgte, idlt, idlte, idn, userid, userid__n. Repeating a name sends that parameter once per value.
    limit number
    The maximum number of objects to return from the API lookup. Defaults to 1000.
    id str
    The provider-assigned unique ID for this managed resource.
    tokens Sequence[GetTokensToken]
    The matching tokens.
    filters Sequence[GetTokensFilter]
    Query filters, sent as API list parameters. Supported names: id, idempty, idgt, idgte, idlt, idlte, idn, userid, userid__n. Repeating a name sends that parameter once per value.
    limit float
    The maximum number of objects to return from the API lookup. Defaults to 1000.
    id String
    The provider-assigned unique ID for this managed resource.
    tokens List<Property Map>
    The matching tokens.
    filters List<Property Map>
    Query filters, sent as API list parameters. Supported names: id, idempty, idgt, idgte, idlt, idlte, idn, userid, userid__n. Repeating a name sends that parameter once per value.
    limit Number
    The maximum number of objects to return from the API lookup. Defaults to 1000.

    Supporting Types

    GetTokensFilter

    Name string
    Name of the query filter (the API list parameter).
    Value string
    Value to filter by.
    Name string
    Name of the query filter (the API list parameter).
    Value string
    Value to filter by.
    name string
    Name of the query filter (the API list parameter).
    value string
    Value to filter by.
    name String
    Name of the query filter (the API list parameter).
    value String
    Value to filter by.
    name string
    Name of the query filter (the API list parameter).
    value string
    Value to filter by.
    name str
    Name of the query filter (the API list parameter).
    value str
    Value to filter by.
    name String
    Name of the query filter (the API list parameter).
    value String
    Value to filter by.

    GetTokensToken

    Created string
    Description string
    Enabled bool
    Whether the token can authenticate; disabling keeps the token but rejects its use.
    Expires string
    Expiry as an RFC 3339 timestamp with milliseconds (2030-01-01T00:00:00.000Z); never expires when unset.
    Id double
    NetBox id.
    Key string
    Identification key NetBox generated for the token; not the secret.
    LastUsed string
    When the token was last used.
    PepperId double
    Id of the pepper the secret was hashed with.
    Token string
    Url string
    UserId double
    Id of the user the token belongs to.
    Version double
    Token format version (1 legacy plaintext, 2 hashed). Defaults to 2. Changing it replaces the token. One of: 1, 2.
    WriteEnabled bool
    Whether the token permits write operations.
    Created string
    Description string
    Enabled bool
    Whether the token can authenticate; disabling keeps the token but rejects its use.
    Expires string
    Expiry as an RFC 3339 timestamp with milliseconds (2030-01-01T00:00:00.000Z); never expires when unset.
    Id float64
    NetBox id.
    Key string
    Identification key NetBox generated for the token; not the secret.
    LastUsed string
    When the token was last used.
    PepperId float64
    Id of the pepper the secret was hashed with.
    Token string
    Url string
    UserId float64
    Id of the user the token belongs to.
    Version float64
    Token format version (1 legacy plaintext, 2 hashed). Defaults to 2. Changing it replaces the token. One of: 1, 2.
    WriteEnabled bool
    Whether the token permits write operations.
    created string
    description string
    enabled bool
    Whether the token can authenticate; disabling keeps the token but rejects its use.
    expires string
    Expiry as an RFC 3339 timestamp with milliseconds (2030-01-01T00:00:00.000Z); never expires when unset.
    id number
    NetBox id.
    key string
    Identification key NetBox generated for the token; not the secret.
    last_used string
    When the token was last used.
    pepper_id number
    Id of the pepper the secret was hashed with.
    token string
    url string
    user_id number
    Id of the user the token belongs to.
    version number
    Token format version (1 legacy plaintext, 2 hashed). Defaults to 2. Changing it replaces the token. One of: 1, 2.
    write_enabled bool
    Whether the token permits write operations.
    created String
    description String
    enabled Boolean
    Whether the token can authenticate; disabling keeps the token but rejects its use.
    expires String
    Expiry as an RFC 3339 timestamp with milliseconds (2030-01-01T00:00:00.000Z); never expires when unset.
    id Double
    NetBox id.
    key String
    Identification key NetBox generated for the token; not the secret.
    lastUsed String
    When the token was last used.
    pepperId Double
    Id of the pepper the secret was hashed with.
    token String
    url String
    userId Double
    Id of the user the token belongs to.
    version Double
    Token format version (1 legacy plaintext, 2 hashed). Defaults to 2. Changing it replaces the token. One of: 1, 2.
    writeEnabled Boolean
    Whether the token permits write operations.
    created string
    description string
    enabled boolean
    Whether the token can authenticate; disabling keeps the token but rejects its use.
    expires string
    Expiry as an RFC 3339 timestamp with milliseconds (2030-01-01T00:00:00.000Z); never expires when unset.
    id number
    NetBox id.
    key string
    Identification key NetBox generated for the token; not the secret.
    lastUsed string
    When the token was last used.
    pepperId number
    Id of the pepper the secret was hashed with.
    token string
    url string
    userId number
    Id of the user the token belongs to.
    version number
    Token format version (1 legacy plaintext, 2 hashed). Defaults to 2. Changing it replaces the token. One of: 1, 2.
    writeEnabled boolean
    Whether the token permits write operations.
    created str
    description str
    enabled bool
    Whether the token can authenticate; disabling keeps the token but rejects its use.
    expires str
    Expiry as an RFC 3339 timestamp with milliseconds (2030-01-01T00:00:00.000Z); never expires when unset.
    id float
    NetBox id.
    key str
    Identification key NetBox generated for the token; not the secret.
    last_used str
    When the token was last used.
    pepper_id float
    Id of the pepper the secret was hashed with.
    token str
    url str
    user_id float
    Id of the user the token belongs to.
    version float
    Token format version (1 legacy plaintext, 2 hashed). Defaults to 2. Changing it replaces the token. One of: 1, 2.
    write_enabled bool
    Whether the token permits write operations.
    created String
    description String
    enabled Boolean
    Whether the token can authenticate; disabling keeps the token but rejects its use.
    expires String
    Expiry as an RFC 3339 timestamp with milliseconds (2030-01-01T00:00:00.000Z); never expires when unset.
    id Number
    NetBox id.
    key String
    Identification key NetBox generated for the token; not the secret.
    lastUsed String
    When the token was last used.
    pepperId Number
    Id of the pepper the secret was hashed with.
    token String
    url String
    userId Number
    Id of the user the token belongs to.
    version Number
    Token format version (1 legacy plaintext, 2 hashed). Defaults to 2. Changing it replaces the token. One of: 1, 2.
    writeEnabled Boolean
    Whether the token permits write operations.

    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.0
    published on Wednesday, Nov 4, 2026 by e-breuninger

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial