Viewing docs for netbox 6.0.1
published on Monday, Nov 16, 2026 by e-breuninger
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
published on Monday, Nov 16, 2026 by e-breuninger
A NetBox contact assignment (tenancy.contactassignment): a contact attached to an object in a role.
From the official documentation:
Much like tenancy, contact assignment enables you to track ownership of resources modeled in NetBox.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as netbox from "@pulumi/netbox";
const test = netbox.getContactAssignment({
id: 123,
});
import pulumi
import pulumi_netbox as netbox
test = netbox.get_contact_assignment(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.LookupContactAssignment(ctx, &netbox.LookupContactAssignmentArgs{
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.GetContactAssignment.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.GetContactAssignmentArgs;
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.getContactAssignment(GetContactAssignmentArgs.builder()
.id(123)
.build());
}
}
variables:
test:
fn::invoke:
function: netbox:getContactAssignment
arguments:
id: 123
Example coming soon!
Using getContactAssignment
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 getContactAssignment(args: GetContactAssignmentArgs, opts?: InvokeOptions): Promise<GetContactAssignmentResult>
function getContactAssignmentOutput(args: GetContactAssignmentOutputArgs, opts?: InvokeOutputOptions): Output<GetContactAssignmentResult>def get_contact_assignment(contact_id: Optional[float] = None,
created: Optional[str] = None,
custom_field_filters: Optional[Mapping[str, str]] = None,
group: Optional[str] = None,
group_id: Optional[str] = None,
id: Optional[float] = None,
last_updated: Optional[str] = None,
object_id: Optional[float] = None,
object_type: Optional[str] = None,
object_type_id: Optional[float] = None,
priority: Optional[str] = None,
q: Optional[str] = None,
role_id: Optional[float] = None,
role_slug: Optional[str] = None,
tag_id: Optional[float] = None,
tag_slug: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetContactAssignmentResult
def get_contact_assignment_output(contact_id: pulumi.Input[Optional[float]] = None,
created: pulumi.Input[Optional[str]] = None,
custom_field_filters: pulumi.Input[Optional[Mapping[str, pulumi.Input[str]]]] = None,
group: pulumi.Input[Optional[str]] = None,
group_id: pulumi.Input[Optional[str]] = None,
id: pulumi.Input[Optional[float]] = None,
last_updated: pulumi.Input[Optional[str]] = None,
object_id: pulumi.Input[Optional[float]] = None,
object_type: pulumi.Input[Optional[str]] = None,
object_type_id: pulumi.Input[Optional[float]] = None,
priority: pulumi.Input[Optional[str]] = None,
q: pulumi.Input[Optional[str]] = None,
role_id: pulumi.Input[Optional[float]] = None,
role_slug: pulumi.Input[Optional[str]] = None,
tag_id: pulumi.Input[Optional[float]] = None,
tag_slug: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetContactAssignmentResult]func LookupContactAssignment(ctx *Context, args *LookupContactAssignmentArgs, opts ...InvokeOption) (*LookupContactAssignmentResult, error)
func LookupContactAssignmentOutput(ctx *Context, args *LookupContactAssignmentOutputArgs, opts ...InvokeOption) LookupContactAssignmentResultOutput> Note: This function is named LookupContactAssignment in the Go SDK.
public static class GetContactAssignment
{
public static Task<GetContactAssignmentResult> InvokeAsync(GetContactAssignmentArgs args, InvokeOptions? opts = null)
public static Output<GetContactAssignmentResult> Invoke(GetContactAssignmentInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetContactAssignmentResult> Invoke(GetContactAssignmentInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetContactAssignmentResult> getContactAssignment(GetContactAssignmentArgs args, InvokeOptions options)
public static Output<GetContactAssignmentResult> getContactAssignment(GetContactAssignmentArgs args, InvokeOptions options)
public static Output<GetContactAssignmentResult> getContactAssignment(GetContactAssignmentArgs args, InvokeOutputOptions options)
fn::invoke:
function: netbox:index/getContactAssignment:getContactAssignment
arguments:
# arguments dictionarydata "netbox_get_contact_assignment" "name" {
# arguments
}The following arguments are supported:
- Contact
Id double - Id of the contact.
- Created string
- Custom
Field Dictionary<string, string>Filters - 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.
- Group string
- Group to match.
- Group
Id string - Id of the group.
- Id double
- NetBox id.
- Last
Updated string - Object
Id double - Id of the object the contact is assigned to.
- Object
Type string - Content type of the object the contact is assigned to (dcim.site, dcim.device, tenancy.tenant, ...).
- Object
Type doubleId - Id of the object type.
- Priority string
- Priority of the contact for this object. One of: primary, secondary, tertiary, inactive.
- Q string
- Search term, matched against the fields NetBox searches for this object type.
- Role
Id double - Id of the contact role. Once set it cannot be removed, only changed: NetBox rejects a null. If you drop it from the config, keep a depends_on on the role so it is destroyed after the assignment.
- Role
Slug string - Slug of the contact role.
- Tag
Id double - Id of a tag the object carries.
- string
- Slug of a tag the object carries.
- Contact
Id float64 - Id of the contact.
- Created string
- Custom
Field map[string]stringFilters - 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.
- Group string
- Group to match.
- Group
Id string - Id of the group.
- Id float64
- NetBox id.
- Last
Updated string - Object
Id float64 - Id of the object the contact is assigned to.
- Object
Type string - Content type of the object the contact is assigned to (dcim.site, dcim.device, tenancy.tenant, ...).
- Object
Type float64Id - Id of the object type.
- Priority string
- Priority of the contact for this object. One of: primary, secondary, tertiary, inactive.
- Q string
- Search term, matched against the fields NetBox searches for this object type.
- Role
Id float64 - Id of the contact role. Once set it cannot be removed, only changed: NetBox rejects a null. If you drop it from the config, keep a depends_on on the role so it is destroyed after the assignment.
- Role
Slug string - Slug of the contact role.
- Tag
Id float64 - Id of a tag the object carries.
- string
- Slug of a tag the object carries.
- contact_
id number - Id of the contact.
- created string
- custom_
field_ map(string)filters - 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.
- group string
- Group to match.
- group_
id string - Id of the group.
- id number
- NetBox id.
- last_
updated string - object_
id number - Id of the object the contact is assigned to.
- object_
type string - Content type of the object the contact is assigned to (dcim.site, dcim.device, tenancy.tenant, ...).
- object_
type_ numberid - Id of the object type.
- priority string
- Priority of the contact for this object. One of: primary, secondary, tertiary, inactive.
- q string
- Search term, matched against the fields NetBox searches for this object type.
- role_
id number - Id of the contact role. Once set it cannot be removed, only changed: NetBox rejects a null. If you drop it from the config, keep a depends_on on the role so it is destroyed after the assignment.
- role_
slug string - Slug of the contact role.
- tag_
id number - Id of a tag the object carries.
- tag_
slug string - Slug of a tag the object carries.
- contact
Id Double - Id of the contact.
- created String
- custom
Field Map<String,String>Filters - 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.
- group String
- Group to match.
- group
Id String - Id of the group.
- id Double
- NetBox id.
- last
Updated String - object
Id Double - Id of the object the contact is assigned to.
- object
Type String - Content type of the object the contact is assigned to (dcim.site, dcim.device, tenancy.tenant, ...).
- object
Type DoubleId - Id of the object type.
- priority String
- Priority of the contact for this object. One of: primary, secondary, tertiary, inactive.
- q String
- Search term, matched against the fields NetBox searches for this object type.
- role
Id Double - Id of the contact role. Once set it cannot be removed, only changed: NetBox rejects a null. If you drop it from the config, keep a depends_on on the role so it is destroyed after the assignment.
- role
Slug String - Slug of the contact role.
- tag
Id Double - Id of a tag the object carries.
- String
- Slug of a tag the object carries.
- contact
Id number - Id of the contact.
- created string
- custom
Field {[key: string]: string}Filters - 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.
- group string
- Group to match.
- group
Id string - Id of the group.
- id number
- NetBox id.
- last
Updated string - object
Id number - Id of the object the contact is assigned to.
- object
Type string - Content type of the object the contact is assigned to (dcim.site, dcim.device, tenancy.tenant, ...).
- object
Type numberId - Id of the object type.
- priority string
- Priority of the contact for this object. One of: primary, secondary, tertiary, inactive.
- q string
- Search term, matched against the fields NetBox searches for this object type.
- role
Id number - Id of the contact role. Once set it cannot be removed, only changed: NetBox rejects a null. If you drop it from the config, keep a depends_on on the role so it is destroyed after the assignment.
- role
Slug string - Slug of the contact role.
- tag
Id number - Id of a tag the object carries.
- string
- Slug of a tag the object carries.
- contact_
id float - Id of the contact.
- created str
- custom_
field_ Mapping[str, str]filters - 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.
- group str
- Group to match.
- group_
id str - Id of the group.
- id float
- NetBox id.
- last_
updated str - object_
id float - Id of the object the contact is assigned to.
- object_
type str - Content type of the object the contact is assigned to (dcim.site, dcim.device, tenancy.tenant, ...).
- object_
type_ floatid - Id of the object type.
- priority str
- Priority of the contact for this object. One of: primary, secondary, tertiary, inactive.
- q str
- Search term, matched against the fields NetBox searches for this object type.
- role_
id float - Id of the contact role. Once set it cannot be removed, only changed: NetBox rejects a null. If you drop it from the config, keep a depends_on on the role so it is destroyed after the assignment.
- role_
slug str - Slug of the contact role.
- tag_
id float - Id of a tag the object carries.
- tag_
slug str - Slug of a tag the object carries.
- contact
Id Number - Id of the contact.
- created String
- custom
Field Map<String>Filters - 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.
- group String
- Group to match.
- group
Id String - Id of the group.
- id Number
- NetBox id.
- last
Updated String - object
Id Number - Id of the object the contact is assigned to.
- object
Type String - Content type of the object the contact is assigned to (dcim.site, dcim.device, tenancy.tenant, ...).
- object
Type NumberId - Id of the object type.
- priority String
- Priority of the contact for this object. One of: primary, secondary, tertiary, inactive.
- q String
- Search term, matched against the fields NetBox searches for this object type.
- role
Id Number - Id of the contact role. Once set it cannot be removed, only changed: NetBox rejects a null. If you drop it from the config, keep a depends_on on the role so it is destroyed after the assignment.
- role
Slug String - Slug of the contact role.
- tag
Id Number - Id of a tag the object carries.
- String
- Slug of a tag the object carries.
getContactAssignment Result
The following output properties are available:
- Contact
Id double - Id of the contact.
- Created string
- Custom
Fields 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).
- Id double
- NetBox id.
- Last
Updated string - Object
Id double - Id of the object the contact is assigned to.
- Object
Type string - Content type of the object the contact is assigned to (dcim.site, dcim.device, tenancy.tenant, ...).
- Priority string
- Priority of the contact for this object. One of: primary, secondary, tertiary, inactive.
- Role
Id double - Id of the contact role. Once set it cannot be removed, only changed: NetBox rejects a null. If you drop it from the config, keep a depends_on on the role so it is destroyed after the assignment.
- List<string>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- List<string>
- Slugs of all tags on the object, including the provider's default_tags.
- Url string
- Custom
Field Dictionary<string, string>Filters - 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.
- Group string
- Group to match.
- Group
Id string - Id of the group.
- Object
Type doubleId - Id of the object type.
- Q string
- Search term, matched against the fields NetBox searches for this object type.
- Role
Slug string - Slug of the contact role.
- Tag
Id double - Id of a tag the object carries.
- string
- Slug of a tag the object carries.
- Contact
Id float64 - Id of the contact.
- Created string
- Custom
Fields 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).
- Id float64
- NetBox id.
- Last
Updated string - Object
Id float64 - Id of the object the contact is assigned to.
- Object
Type string - Content type of the object the contact is assigned to (dcim.site, dcim.device, tenancy.tenant, ...).
- Priority string
- Priority of the contact for this object. One of: primary, secondary, tertiary, inactive.
- Role
Id float64 - Id of the contact role. Once set it cannot be removed, only changed: NetBox rejects a null. If you drop it from the config, keep a depends_on on the role so it is destroyed after the assignment.
- []string
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- []string
- Slugs of all tags on the object, including the provider's default_tags.
- Url string
- Custom
Field map[string]stringFilters - 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.
- Group string
- Group to match.
- Group
Id string - Id of the group.
- Object
Type float64Id - Id of the object type.
- Q string
- Search term, matched against the fields NetBox searches for this object type.
- Role
Slug string - Slug of the contact role.
- Tag
Id float64 - Id of a tag the object carries.
- string
- Slug of a tag the object carries.
- contact_
id number - Id of the contact.
- 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).
- id number
- NetBox id.
- last_
updated string - object_
id number - Id of the object the contact is assigned to.
- object_
type string - Content type of the object the contact is assigned to (dcim.site, dcim.device, tenancy.tenant, ...).
- priority string
- Priority of the contact for this object. One of: primary, secondary, tertiary, inactive.
- role_
id number - Id of the contact role. Once set it cannot be removed, only changed: NetBox rejects a null. If you drop it from the config, keep a depends_on on the role so it is destroyed after the assignment.
- list(string)
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- list(string)
- Slugs of all tags on the object, including the provider's default_tags.
- url string
- custom_
field_ map(string)filters - 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.
- group string
- Group to match.
- group_
id string - Id of the group.
- object_
type_ numberid - Id of the object type.
- q string
- Search term, matched against the fields NetBox searches for this object type.
- role_
slug string - Slug of the contact role.
- tag_
id number - Id of a tag the object carries.
- tag_
slug string - Slug of a tag the object carries.
- contact
Id Double - Id of the contact.
- created String
- custom
Fields 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).
- id Double
- NetBox id.
- last
Updated String - object
Id Double - Id of the object the contact is assigned to.
- object
Type String - Content type of the object the contact is assigned to (dcim.site, dcim.device, tenancy.tenant, ...).
- priority String
- Priority of the contact for this object. One of: primary, secondary, tertiary, inactive.
- role
Id Double - Id of the contact role. Once set it cannot be removed, only changed: NetBox rejects a null. If you drop it from the config, keep a depends_on on the role so it is destroyed after the assignment.
- List<String>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- List<String>
- Slugs of all tags on the object, including the provider's default_tags.
- url String
- custom
Field Map<String,String>Filters - 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.
- group String
- Group to match.
- group
Id String - Id of the group.
- object
Type DoubleId - Id of the object type.
- q String
- Search term, matched against the fields NetBox searches for this object type.
- role
Slug String - Slug of the contact role.
- tag
Id Double - Id of a tag the object carries.
- String
- Slug of a tag the object carries.
- contact
Id number - Id of the contact.
- created string
- custom
Fields {[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).
- id number
- NetBox id.
- last
Updated string - object
Id number - Id of the object the contact is assigned to.
- object
Type string - Content type of the object the contact is assigned to (dcim.site, dcim.device, tenancy.tenant, ...).
- priority string
- Priority of the contact for this object. One of: primary, secondary, tertiary, inactive.
- role
Id number - Id of the contact role. Once set it cannot be removed, only changed: NetBox rejects a null. If you drop it from the config, keep a depends_on on the role so it is destroyed after the assignment.
- string[]
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- string[]
- Slugs of all tags on the object, including the provider's default_tags.
- url string
- custom
Field {[key: string]: string}Filters - 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.
- group string
- Group to match.
- group
Id string - Id of the group.
- object
Type numberId - Id of the object type.
- q string
- Search term, matched against the fields NetBox searches for this object type.
- role
Slug string - Slug of the contact role.
- tag
Id number - Id of a tag the object carries.
- string
- Slug of a tag the object carries.
- contact_
id float - Id of the contact.
- 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).
- id float
- NetBox id.
- last_
updated str - object_
id float - Id of the object the contact is assigned to.
- object_
type str - Content type of the object the contact is assigned to (dcim.site, dcim.device, tenancy.tenant, ...).
- priority str
- Priority of the contact for this object. One of: primary, secondary, tertiary, inactive.
- role_
id float - Id of the contact role. Once set it cannot be removed, only changed: NetBox rejects a null. If you drop it from the config, keep a depends_on on the role so it is destroyed after the assignment.
- Sequence[str]
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- Sequence[str]
- Slugs of all tags on the object, including the provider's default_tags.
- url str
- custom_
field_ Mapping[str, str]filters - 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.
- group str
- Group to match.
- group_
id str - Id of the group.
- object_
type_ floatid - Id of the object type.
- q str
- Search term, matched against the fields NetBox searches for this object type.
- role_
slug str - Slug of the contact role.
- tag_
id float - Id of a tag the object carries.
- tag_
slug str - Slug of a tag the object carries.
- contact
Id Number - Id of the contact.
- 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).
- id Number
- NetBox id.
- last
Updated String - object
Id Number - Id of the object the contact is assigned to.
- object
Type String - Content type of the object the contact is assigned to (dcim.site, dcim.device, tenancy.tenant, ...).
- priority String
- Priority of the contact for this object. One of: primary, secondary, tertiary, inactive.
- role
Id Number - Id of the contact role. Once set it cannot be removed, only changed: NetBox rejects a null. If you drop it from the config, keep a depends_on on the role so it is destroyed after the assignment.
- List<String>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- List<String>
- Slugs of all tags on the object, including the provider's default_tags.
- url String
- custom
Field Map<String>Filters - 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.
- group String
- Group to match.
- group
Id String - Id of the group.
- object
Type NumberId - Id of the object type.
- q String
- Search term, matched against the fields NetBox searches for this object type.
- role
Slug String - Slug of the contact role.
- tag
Id Number - Id of a tag the object carries.
- 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
netboxTerraform Provider.
netbox
Viewing docs for netbox 6.0.1
published on Monday, Nov 16, 2026 by e-breuninger
published on Monday, Nov 16, 2026 by e-breuninger