1. Registry
  2. Packages
  3. Netbox Provider
  4. API Docs
  5. getService
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 service running on a device or virtual machine (ipam.service).

    From the official documentation:

    An application service represents a layer seven application available on a device or virtual machine. For example, a service might be created in NetBox to represent an HTTP server running on TCP/8000. Each service may optionally be further bound to one or more specific interfaces assigned to the selected device or virtual machine.

    To aid in the efficient creation of application services, users may opt to first create an application service template from which service definitions can be quickly replicated.

    Changed in NetBox v4.4: Previously, application services were referred to simply as “services”. The name has been changed in the UI to better reflect their intended use. There is no change to the name of the model or in any programmatic NetBox APIs.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as netbox from "@pulumi/netbox";
    
    const test = netbox.getService({
        name: "test-service",
    });
    
    import pulumi
    import pulumi_netbox as netbox
    
    test = netbox.get_service(name="test-service")
    
    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.LookupService(ctx, &netbox.LookupServiceArgs{
    			Name: pulumi.StringRef("test-service"),
    		}, 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.GetService.Invoke(new()
        {
            Name = "test-service",
        });
    
    });
    
    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.GetServiceArgs;
    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.getService(GetServiceArgs.builder()
                .name("test-service")
                .build());
    
        }
    }
    
    variables:
      test:
        fn::invoke:
          function: netbox:getService
          arguments:
            name: test-service
    
    Example coming soon!
    

    Using getService

    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 getService(args: GetServiceArgs, opts?: InvokeOptions): Promise<GetServiceResult>
    function getServiceOutput(args: GetServiceOutputArgs, opts?: InvokeOutputOptions): Output<GetServiceResult>
    def get_service(custom_field_filters: Optional[Mapping[str, str]] = None,
                    description: Optional[str] = None,
                    device_id: Optional[float] = None,
                    id: Optional[float] = None,
                    name: Optional[str] = None,
                    owner_id: Optional[float] = None,
                    protocol: Optional[str] = None,
                    tag_slug: Optional[str] = None,
                    virtual_machine_id: Optional[float] = None,
                    opts: Optional[InvokeOptions] = None) -> GetServiceResult
    def get_service_output(custom_field_filters: pulumi.Input[Optional[Mapping[str, pulumi.Input[str]]]] = None,
                    description: pulumi.Input[Optional[str]] = None,
                    device_id: pulumi.Input[Optional[float]] = None,
                    id: pulumi.Input[Optional[float]] = None,
                    name: pulumi.Input[Optional[str]] = None,
                    owner_id: pulumi.Input[Optional[float]] = None,
                    protocol: pulumi.Input[Optional[str]] = None,
                    tag_slug: pulumi.Input[Optional[str]] = None,
                    virtual_machine_id: pulumi.Input[Optional[float]] = None,
                    opts: Optional[InvokeOutputOptions] = None) -> Output[GetServiceResult]
    func LookupService(ctx *Context, args *LookupServiceArgs, opts ...InvokeOption) (*LookupServiceResult, error)
    func LookupServiceOutput(ctx *Context, args *LookupServiceOutputArgs, opts ...InvokeOption) LookupServiceResultOutput

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

    public static class GetService 
    {
        public static Task<GetServiceResult> InvokeAsync(GetServiceArgs args, InvokeOptions? opts = null)
        public static Output<GetServiceResult> Invoke(GetServiceInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetServiceResult> Invoke(GetServiceInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetServiceResult> getService(GetServiceArgs args, InvokeOptions options)
    public static Output<GetServiceResult> getService(GetServiceArgs args, InvokeOptions options)
    public static Output<GetServiceResult> getService(GetServiceArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: netbox:index/getService:getService
      arguments:
        # arguments dictionary
    data "netbox_get_service" "name" {
        # arguments
    }

    The following arguments are supported:

    CustomFieldFilters Dictionary<string, string>
    Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
    Description string
    DeviceId double
    Id of the device the service runs on (parentobjecttype dcim.device). Conflicts with virtualmachineid and with setting the parent*object** pair directly.
    Id double
    NetBox id.
    Name string
    OwnerId double
    Id of the owner the object is assigned to.
    Protocol string
    Transport protocol. One of: tcp, udp, sctp.
    TagSlug string
    Slug of a tag the object carries.
    VirtualMachineId double
    Id of the virtual machine the service runs on (parentobjecttype virtualization.virtualmachine). Conflicts with deviceid and with setting the parentobject_* pair directly.
    CustomFieldFilters map[string]string
    Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
    Description string
    DeviceId float64
    Id of the device the service runs on (parentobjecttype dcim.device). Conflicts with virtualmachineid and with setting the parent*object** pair directly.
    Id float64
    NetBox id.
    Name string
    OwnerId float64
    Id of the owner the object is assigned to.
    Protocol string
    Transport protocol. One of: tcp, udp, sctp.
    TagSlug string
    Slug of a tag the object carries.
    VirtualMachineId float64
    Id of the virtual machine the service runs on (parentobjecttype virtualization.virtualmachine). Conflicts with deviceid and with setting the parentobject_* pair directly.
    custom_field_filters map(string)
    Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
    description string
    device_id number
    Id of the device the service runs on (parentobjecttype dcim.device). Conflicts with virtualmachineid and with setting the parent*object** pair directly.
    id number
    NetBox id.
    name string
    owner_id number
    Id of the owner the object is assigned to.
    protocol string
    Transport protocol. One of: tcp, udp, sctp.
    tag_slug string
    Slug of a tag the object carries.
    virtual_machine_id number
    Id of the virtual machine the service runs on (parentobjecttype virtualization.virtualmachine). Conflicts with deviceid and with setting the parentobject_* pair directly.
    customFieldFilters Map<String,String>
    Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
    description String
    deviceId Double
    Id of the device the service runs on (parentobjecttype dcim.device). Conflicts with virtualmachineid and with setting the parent*object** pair directly.
    id Double
    NetBox id.
    name String
    ownerId Double
    Id of the owner the object is assigned to.
    protocol String
    Transport protocol. One of: tcp, udp, sctp.
    tagSlug String
    Slug of a tag the object carries.
    virtualMachineId Double
    Id of the virtual machine the service runs on (parentobjecttype virtualization.virtualmachine). Conflicts with deviceid and with setting the parentobject_* pair directly.
    customFieldFilters {[key: string]: string}
    Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
    description string
    deviceId number
    Id of the device the service runs on (parentobjecttype dcim.device). Conflicts with virtualmachineid and with setting the parent*object** pair directly.
    id number
    NetBox id.
    name string
    ownerId number
    Id of the owner the object is assigned to.
    protocol string
    Transport protocol. One of: tcp, udp, sctp.
    tagSlug string
    Slug of a tag the object carries.
    virtualMachineId number
    Id of the virtual machine the service runs on (parentobjecttype virtualization.virtualmachine). Conflicts with deviceid and with setting the parentobject_* pair directly.
    custom_field_filters Mapping[str, str]
    Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
    description str
    device_id float
    Id of the device the service runs on (parentobjecttype dcim.device). Conflicts with virtualmachineid and with setting the parent*object** pair directly.
    id float
    NetBox id.
    name str
    owner_id float
    Id of the owner the object is assigned to.
    protocol str
    Transport protocol. One of: tcp, udp, sctp.
    tag_slug str
    Slug of a tag the object carries.
    virtual_machine_id float
    Id of the virtual machine the service runs on (parentobjecttype virtualization.virtualmachine). Conflicts with deviceid and with setting the parentobject_* pair directly.
    customFieldFilters Map<String>
    Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
    description String
    deviceId Number
    Id of the device the service runs on (parentobjecttype dcim.device). Conflicts with virtualmachineid and with setting the parent*object** pair directly.
    id Number
    NetBox id.
    name String
    ownerId Number
    Id of the owner the object is assigned to.
    protocol String
    Transport protocol. One of: tcp, udp, sctp.
    tagSlug String
    Slug of a tag the object carries.
    virtualMachineId Number
    Id of the virtual machine the service runs on (parentobjecttype virtualization.virtualmachine). Conflicts with deviceid and with setting the parentobject_* pair directly.

    getService Result

    The following output properties are available:

    Comments string
    Created string
    CustomFields Dictionary<string, string>
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    Description string
    DeviceId double
    Id of the device the service runs on (parentobjecttype dcim.device). Conflicts with virtualmachineid and with setting the parent*object** pair directly.
    Id double
    NetBox id.
    IpAddressIds List<double>
    Ids of the IP addresses the service is bound to; all of the parent object's addresses when unset.
    LastUpdated string
    Name string
    OwnerId double
    Id of the owner the object is assigned to.
    ParentObjectId double
    Id of the object named by parentobjecttype.
    ParentObjectType string
    Content type of the object the service runs on. Derived from deviceid or virtualmachineid when one of those is set; set it together with parentobject_id to address the object directly. One of: dcim.device, virtualization.virtualmachine.
    Ports List<double>
    Port numbers the service listens on.
    Protocol string
    Transport protocol. One of: tcp, udp, sctp.
    Tags List<string>
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    TagsAlls List<string>
    Slugs of all tags on the object, including the provider's default_tags.
    Url string
    VirtualMachineId double
    Id of the virtual machine the service runs on (parentobjecttype virtualization.virtualmachine). Conflicts with deviceid and with setting the parentobject_* pair directly.
    CustomFieldFilters Dictionary<string, string>
    Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
    TagSlug string
    Slug of a tag the object carries.
    Comments string
    Created string
    CustomFields map[string]string
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    Description string
    DeviceId float64
    Id of the device the service runs on (parentobjecttype dcim.device). Conflicts with virtualmachineid and with setting the parent*object** pair directly.
    Id float64
    NetBox id.
    IpAddressIds []float64
    Ids of the IP addresses the service is bound to; all of the parent object's addresses when unset.
    LastUpdated string
    Name string
    OwnerId float64
    Id of the owner the object is assigned to.
    ParentObjectId float64
    Id of the object named by parentobjecttype.
    ParentObjectType string
    Content type of the object the service runs on. Derived from deviceid or virtualmachineid when one of those is set; set it together with parentobject_id to address the object directly. One of: dcim.device, virtualization.virtualmachine.
    Ports []float64
    Port numbers the service listens on.
    Protocol string
    Transport protocol. One of: tcp, udp, sctp.
    Tags []string
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    TagsAlls []string
    Slugs of all tags on the object, including the provider's default_tags.
    Url string
    VirtualMachineId float64
    Id of the virtual machine the service runs on (parentobjecttype virtualization.virtualmachine). Conflicts with deviceid and with setting the parentobject_* pair directly.
    CustomFieldFilters map[string]string
    Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
    TagSlug string
    Slug of a tag the object carries.
    comments string
    created string
    custom_fields map(string)
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    description string
    device_id number
    Id of the device the service runs on (parentobjecttype dcim.device). Conflicts with virtualmachineid and with setting the parent*object** pair directly.
    id number
    NetBox id.
    ip_address_ids list(number)
    Ids of the IP addresses the service is bound to; all of the parent object's addresses when unset.
    last_updated string
    name string
    owner_id number
    Id of the owner the object is assigned to.
    parent_object_id number
    Id of the object named by parentobjecttype.
    parent_object_type string
    Content type of the object the service runs on. Derived from deviceid or virtualmachineid when one of those is set; set it together with parentobject_id to address the object directly. One of: dcim.device, virtualization.virtualmachine.
    ports list(number)
    Port numbers the service listens on.
    protocol string
    Transport protocol. One of: tcp, udp, sctp.
    tags list(string)
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tags_alls list(string)
    Slugs of all tags on the object, including the provider's default_tags.
    url string
    virtual_machine_id number
    Id of the virtual machine the service runs on (parentobjecttype virtualization.virtualmachine). Conflicts with deviceid and with setting the parentobject_* pair directly.
    custom_field_filters map(string)
    Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
    tag_slug string
    Slug of a tag the object carries.
    comments String
    created String
    customFields Map<String,String>
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    description String
    deviceId Double
    Id of the device the service runs on (parentobjecttype dcim.device). Conflicts with virtualmachineid and with setting the parent*object** pair directly.
    id Double
    NetBox id.
    ipAddressIds List<Double>
    Ids of the IP addresses the service is bound to; all of the parent object's addresses when unset.
    lastUpdated String
    name String
    ownerId Double
    Id of the owner the object is assigned to.
    parentObjectId Double
    Id of the object named by parentobjecttype.
    parentObjectType String
    Content type of the object the service runs on. Derived from deviceid or virtualmachineid when one of those is set; set it together with parentobject_id to address the object directly. One of: dcim.device, virtualization.virtualmachine.
    ports List<Double>
    Port numbers the service listens on.
    protocol String
    Transport protocol. One of: tcp, udp, sctp.
    tags List<String>
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tagsAlls List<String>
    Slugs of all tags on the object, including the provider's default_tags.
    url String
    virtualMachineId Double
    Id of the virtual machine the service runs on (parentobjecttype virtualization.virtualmachine). Conflicts with deviceid and with setting the parentobject_* pair directly.
    customFieldFilters Map<String,String>
    Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
    tagSlug String
    Slug of a tag the object carries.
    comments string
    created string
    customFields {[key: string]: string}
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    description string
    deviceId number
    Id of the device the service runs on (parentobjecttype dcim.device). Conflicts with virtualmachineid and with setting the parent*object** pair directly.
    id number
    NetBox id.
    ipAddressIds number[]
    Ids of the IP addresses the service is bound to; all of the parent object's addresses when unset.
    lastUpdated string
    name string
    ownerId number
    Id of the owner the object is assigned to.
    parentObjectId number
    Id of the object named by parentobjecttype.
    parentObjectType string
    Content type of the object the service runs on. Derived from deviceid or virtualmachineid when one of those is set; set it together with parentobject_id to address the object directly. One of: dcim.device, virtualization.virtualmachine.
    ports number[]
    Port numbers the service listens on.
    protocol string
    Transport protocol. One of: tcp, udp, sctp.
    tags string[]
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tagsAlls string[]
    Slugs of all tags on the object, including the provider's default_tags.
    url string
    virtualMachineId number
    Id of the virtual machine the service runs on (parentobjecttype virtualization.virtualmachine). Conflicts with deviceid and with setting the parentobject_* pair directly.
    customFieldFilters {[key: string]: string}
    Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
    tagSlug string
    Slug of a tag the object carries.
    comments str
    created str
    custom_fields Mapping[str, str]
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    description str
    device_id float
    Id of the device the service runs on (parentobjecttype dcim.device). Conflicts with virtualmachineid and with setting the parent*object** pair directly.
    id float
    NetBox id.
    ip_address_ids Sequence[float]
    Ids of the IP addresses the service is bound to; all of the parent object's addresses when unset.
    last_updated str
    name str
    owner_id float
    Id of the owner the object is assigned to.
    parent_object_id float
    Id of the object named by parentobjecttype.
    parent_object_type str
    Content type of the object the service runs on. Derived from deviceid or virtualmachineid when one of those is set; set it together with parentobject_id to address the object directly. One of: dcim.device, virtualization.virtualmachine.
    ports Sequence[float]
    Port numbers the service listens on.
    protocol str
    Transport protocol. One of: tcp, udp, sctp.
    tags Sequence[str]
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tags_alls Sequence[str]
    Slugs of all tags on the object, including the provider's default_tags.
    url str
    virtual_machine_id float
    Id of the virtual machine the service runs on (parentobjecttype virtualization.virtualmachine). Conflicts with deviceid and with setting the parentobject_* pair directly.
    custom_field_filters Mapping[str, str]
    Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
    tag_slug str
    Slug of a tag the object carries.
    comments String
    created String
    customFields Map<String>
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    description String
    deviceId Number
    Id of the device the service runs on (parentobjecttype dcim.device). Conflicts with virtualmachineid and with setting the parent*object** pair directly.
    id Number
    NetBox id.
    ipAddressIds List<Number>
    Ids of the IP addresses the service is bound to; all of the parent object's addresses when unset.
    lastUpdated String
    name String
    ownerId Number
    Id of the owner the object is assigned to.
    parentObjectId Number
    Id of the object named by parentobjecttype.
    parentObjectType String
    Content type of the object the service runs on. Derived from deviceid or virtualmachineid when one of those is set; set it together with parentobject_id to address the object directly. One of: dcim.device, virtualization.virtualmachine.
    ports List<Number>
    Port numbers the service listens on.
    protocol String
    Transport protocol. One of: tcp, udp, sctp.
    tags List<String>
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tagsAlls List<String>
    Slugs of all tags on the object, including the provider's default_tags.
    url String
    virtualMachineId Number
    Id of the virtual machine the service runs on (parentobjecttype virtualization.virtualmachine). Conflicts with deviceid and with setting the parentobject_* pair directly.
    customFieldFilters Map<String>
    Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
    tagSlug String
    Slug of a tag the object carries.

    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