1. Registry
  2. Packages
  3. Netbox Provider
  4. API Docs
  5. getCustomFieldChoiceSet
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

    A NetBox custom field choice set (extras.customfieldchoiceset).

    From the official documentation:

    Single- and multi-selection custom fields must define a set of valid choices from which the user may choose when defining the field value. These choices are defined as sets that may be reused among multiple custom fields.

    A choice set must define a base choice set and/or a set of arbitrary extra choices.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as netbox from "@pulumi/netbox";
    
    const test = netbox.getCustomFieldChoiceSet({
        id: 123,
    });
    
    import pulumi
    import pulumi_netbox as netbox
    
    test = netbox.get_custom_field_choice_set(id=123)
    
    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.LookupCustomFieldChoiceSet(ctx, &netbox.LookupCustomFieldChoiceSetArgs{
    			Id: pulumi.Float64Ref(123),
    		}, 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.GetCustomFieldChoiceSet.Invoke(new()
        {
            Id = 123,
        });
    
    });
    
    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.GetCustomFieldChoiceSetArgs;
    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.getCustomFieldChoiceSet(GetCustomFieldChoiceSetArgs.builder()
                .id(123)
                .build());
    
        }
    }
    
    variables:
      test:
        fn::invoke:
          function: netbox:getCustomFieldChoiceSet
          arguments:
            id: 123
    
    Example coming soon!
    

    Using getCustomFieldChoiceSet

    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 getCustomFieldChoiceSet(args: GetCustomFieldChoiceSetArgs, opts?: InvokeOptions): Promise<GetCustomFieldChoiceSetResult>
    function getCustomFieldChoiceSetOutput(args: GetCustomFieldChoiceSetOutputArgs, opts?: InvokeOutputOptions): Output<GetCustomFieldChoiceSetResult>
    def get_custom_field_choice_set(id: Optional[float] = None,
                                    owner_id: Optional[float] = None,
                                    opts: Optional[InvokeOptions] = None) -> GetCustomFieldChoiceSetResult
    def get_custom_field_choice_set_output(id: pulumi.Input[Optional[float]] = None,
                                    owner_id: pulumi.Input[Optional[float]] = None,
                                    opts: Optional[InvokeOutputOptions] = None) -> Output[GetCustomFieldChoiceSetResult]
    func LookupCustomFieldChoiceSet(ctx *Context, args *LookupCustomFieldChoiceSetArgs, opts ...InvokeOption) (*LookupCustomFieldChoiceSetResult, error)
    func LookupCustomFieldChoiceSetOutput(ctx *Context, args *LookupCustomFieldChoiceSetOutputArgs, opts ...InvokeOption) LookupCustomFieldChoiceSetResultOutput

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

    public static class GetCustomFieldChoiceSet 
    {
        public static Task<GetCustomFieldChoiceSetResult> InvokeAsync(GetCustomFieldChoiceSetArgs args, InvokeOptions? opts = null)
        public static Output<GetCustomFieldChoiceSetResult> Invoke(GetCustomFieldChoiceSetInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetCustomFieldChoiceSetResult> Invoke(GetCustomFieldChoiceSetInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetCustomFieldChoiceSetResult> getCustomFieldChoiceSet(GetCustomFieldChoiceSetArgs args, InvokeOptions options)
    public static Output<GetCustomFieldChoiceSetResult> getCustomFieldChoiceSet(GetCustomFieldChoiceSetArgs args, InvokeOptions options)
    public static Output<GetCustomFieldChoiceSetResult> getCustomFieldChoiceSet(GetCustomFieldChoiceSetArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: netbox:index/getCustomFieldChoiceSet:getCustomFieldChoiceSet
      arguments:
        # arguments dictionary
    data "netbox_get_custom_field_choice_set" "name" {
        # arguments
    }

    The following arguments are supported:

    Id double
    NetBox id of the choice set.
    OwnerId double
    Id of the owner the object is assigned to.
    Id float64
    NetBox id of the choice set.
    OwnerId float64
    Id of the owner the object is assigned to.
    id number
    NetBox id of the choice set.
    owner_id number
    Id of the owner the object is assigned to.
    id Double
    NetBox id of the choice set.
    ownerId Double
    Id of the owner the object is assigned to.
    id number
    NetBox id of the choice set.
    ownerId number
    Id of the owner the object is assigned to.
    id float
    NetBox id of the choice set.
    owner_id float
    Id of the owner the object is assigned to.
    id Number
    NetBox id of the choice set.
    ownerId Number
    Id of the owner the object is assigned to.

    getCustomFieldChoiceSet Result

    The following output properties are available:

    BaseChoices string
    Predefined set of choices to start from. One of: IATA, ISO3166, UNLOCODE.
    ChoiceColors Dictionary<string, string>
    Colors of choices, by choice value. One of blue, indigo, purple, pink, red, orange, yellow, green, teal, cyan, gray, black or white each.
    ChoicesCount double
    Created string
    Description string
    ExtraChoices List<GetCustomFieldChoiceSetExtraChoice>
    Additional choices as value/label pairs.
    Id double
    NetBox id of the choice set.
    LastUpdated string
    Name string
    OrderAlphabetically bool
    Sort choices alphabetically instead of by definition order.
    OwnerId double
    Id of the owner the object is assigned to.
    Url string
    BaseChoices string
    Predefined set of choices to start from. One of: IATA, ISO3166, UNLOCODE.
    ChoiceColors map[string]string
    Colors of choices, by choice value. One of blue, indigo, purple, pink, red, orange, yellow, green, teal, cyan, gray, black or white each.
    ChoicesCount float64
    Created string
    Description string
    ExtraChoices []GetCustomFieldChoiceSetExtraChoice
    Additional choices as value/label pairs.
    Id float64
    NetBox id of the choice set.
    LastUpdated string
    Name string
    OrderAlphabetically bool
    Sort choices alphabetically instead of by definition order.
    OwnerId float64
    Id of the owner the object is assigned to.
    Url string
    base_choices string
    Predefined set of choices to start from. One of: IATA, ISO3166, UNLOCODE.
    choice_colors map(string)
    Colors of choices, by choice value. One of blue, indigo, purple, pink, red, orange, yellow, green, teal, cyan, gray, black or white each.
    choices_count number
    created string
    description string
    extra_choices list(object)
    Additional choices as value/label pairs.
    id number
    NetBox id of the choice set.
    last_updated string
    name string
    order_alphabetically bool
    Sort choices alphabetically instead of by definition order.
    owner_id number
    Id of the owner the object is assigned to.
    url string
    baseChoices String
    Predefined set of choices to start from. One of: IATA, ISO3166, UNLOCODE.
    choiceColors Map<String,String>
    Colors of choices, by choice value. One of blue, indigo, purple, pink, red, orange, yellow, green, teal, cyan, gray, black or white each.
    choicesCount Double
    created String
    description String
    extraChoices List<GetCustomFieldChoiceSetExtraChoice>
    Additional choices as value/label pairs.
    id Double
    NetBox id of the choice set.
    lastUpdated String
    name String
    orderAlphabetically Boolean
    Sort choices alphabetically instead of by definition order.
    ownerId Double
    Id of the owner the object is assigned to.
    url String
    baseChoices string
    Predefined set of choices to start from. One of: IATA, ISO3166, UNLOCODE.
    choiceColors {[key: string]: string}
    Colors of choices, by choice value. One of blue, indigo, purple, pink, red, orange, yellow, green, teal, cyan, gray, black or white each.
    choicesCount number
    created string
    description string
    extraChoices GetCustomFieldChoiceSetExtraChoice[]
    Additional choices as value/label pairs.
    id number
    NetBox id of the choice set.
    lastUpdated string
    name string
    orderAlphabetically boolean
    Sort choices alphabetically instead of by definition order.
    ownerId number
    Id of the owner the object is assigned to.
    url string
    base_choices str
    Predefined set of choices to start from. One of: IATA, ISO3166, UNLOCODE.
    choice_colors Mapping[str, str]
    Colors of choices, by choice value. One of blue, indigo, purple, pink, red, orange, yellow, green, teal, cyan, gray, black or white each.
    choices_count float
    created str
    description str
    extra_choices Sequence[GetCustomFieldChoiceSetExtraChoice]
    Additional choices as value/label pairs.
    id float
    NetBox id of the choice set.
    last_updated str
    name str
    order_alphabetically bool
    Sort choices alphabetically instead of by definition order.
    owner_id float
    Id of the owner the object is assigned to.
    url str
    baseChoices String
    Predefined set of choices to start from. One of: IATA, ISO3166, UNLOCODE.
    choiceColors Map<String>
    Colors of choices, by choice value. One of blue, indigo, purple, pink, red, orange, yellow, green, teal, cyan, gray, black or white each.
    choicesCount Number
    created String
    description String
    extraChoices List<Property Map>
    Additional choices as value/label pairs.
    id Number
    NetBox id of the choice set.
    lastUpdated String
    name String
    orderAlphabetically Boolean
    Sort choices alphabetically instead of by definition order.
    ownerId Number
    Id of the owner the object is assigned to.
    url String

    Supporting Types

    GetCustomFieldChoiceSetExtraChoice

    Label string
    Value string
    Label string
    Value string
    label string
    value string
    label String
    value String
    label string
    value string
    label str
    value str
    label String
    value String

    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