1. Registry
  2. Packages
  3. Netbox Provider
  4. API Docs
  5. getVlanTranslationRule
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 single VLAN id mapping inside a translation policy (ipam.vlantranslationrule).

    From the official documentation:

    A VLAN translation rule represents a one-to-one mapping of a local VLAN ID (VID) to a remote VID. Many rules can belong to a single policy.

    See VLAN translation policies for an overview of the VLAN Translation feature.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as netbox from "@pulumi/netbox";
    
    const test = netbox.getVlanTranslationRule({
        id: 123,
    });
    
    import pulumi
    import pulumi_netbox as netbox
    
    test = netbox.get_vlan_translation_rule(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.LookupVlanTranslationRule(ctx, &netbox.LookupVlanTranslationRuleArgs{
    			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.GetVlanTranslationRule.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.GetVlanTranslationRuleArgs;
    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.getVlanTranslationRule(GetVlanTranslationRuleArgs.builder()
                .id(123)
                .build());
    
        }
    }
    
    variables:
      test:
        fn::invoke:
          function: netbox:getVlanTranslationRule
          arguments:
            id: 123
    
    Example coming soon!
    

    Using getVlanTranslationRule

    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 getVlanTranslationRule(args: GetVlanTranslationRuleArgs, opts?: InvokeOptions): Promise<GetVlanTranslationRuleResult>
    function getVlanTranslationRuleOutput(args: GetVlanTranslationRuleOutputArgs, opts?: InvokeOutputOptions): Output<GetVlanTranslationRuleResult>
    def get_vlan_translation_rule(created: Optional[str] = None,
                                  description: Optional[str] = None,
                                  id: Optional[float] = None,
                                  last_updated: Optional[str] = None,
                                  local_vid: Optional[float] = None,
                                  policy_name: Optional[str] = None,
                                  q: Optional[str] = None,
                                  remote_vid: Optional[float] = None,
                                  tag: Optional[str] = None,
                                  tag_id: Optional[float] = None,
                                  vlan_translation_policy_id: Optional[float] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetVlanTranslationRuleResult
    def get_vlan_translation_rule_output(created: pulumi.Input[Optional[str]] = None,
                                  description: pulumi.Input[Optional[str]] = None,
                                  id: pulumi.Input[Optional[float]] = None,
                                  last_updated: pulumi.Input[Optional[str]] = None,
                                  local_vid: pulumi.Input[Optional[float]] = None,
                                  policy_name: pulumi.Input[Optional[str]] = None,
                                  q: pulumi.Input[Optional[str]] = None,
                                  remote_vid: pulumi.Input[Optional[float]] = None,
                                  tag: pulumi.Input[Optional[str]] = None,
                                  tag_id: pulumi.Input[Optional[float]] = None,
                                  vlan_translation_policy_id: pulumi.Input[Optional[float]] = None,
                                  opts: Optional[InvokeOutputOptions] = None) -> Output[GetVlanTranslationRuleResult]
    func LookupVlanTranslationRule(ctx *Context, args *LookupVlanTranslationRuleArgs, opts ...InvokeOption) (*LookupVlanTranslationRuleResult, error)
    func LookupVlanTranslationRuleOutput(ctx *Context, args *LookupVlanTranslationRuleOutputArgs, opts ...InvokeOption) LookupVlanTranslationRuleResultOutput

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

    public static class GetVlanTranslationRule 
    {
        public static Task<GetVlanTranslationRuleResult> InvokeAsync(GetVlanTranslationRuleArgs args, InvokeOptions? opts = null)
        public static Output<GetVlanTranslationRuleResult> Invoke(GetVlanTranslationRuleInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetVlanTranslationRuleResult> Invoke(GetVlanTranslationRuleInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetVlanTranslationRuleResult> getVlanTranslationRule(GetVlanTranslationRuleArgs args, InvokeOptions options)
    public static Output<GetVlanTranslationRuleResult> getVlanTranslationRule(GetVlanTranslationRuleArgs args, InvokeOptions options)
    public static Output<GetVlanTranslationRuleResult> getVlanTranslationRule(GetVlanTranslationRuleArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: netbox:index/getVlanTranslationRule:getVlanTranslationRule
      arguments:
        # arguments dictionary
    data "netbox_get_vlan_translation_rule" "name" {
        # arguments
    }

    The following arguments are supported:

    Created string
    Creation time of the object.
    Description string
    Id double
    NetBox id.
    LastUpdated string
    Last update time of the object.
    LocalVid double
    VLAN id on the local side (1-4094). Must be a whole number.
    PolicyName string
    Name of the VLAN translation policy.
    Q string
    Search term, matched against the fields NetBox searches for this object type.
    RemoteVid double
    VLAN id on the remote side (1-4094). Must be a whole number.
    Tag string
    Slug of a tag the object carries.
    TagId double
    Id of a tag the object carries.
    VlanTranslationPolicyId double
    Id of the translation policy the rule belongs to.
    Created string
    Creation time of the object.
    Description string
    Id float64
    NetBox id.
    LastUpdated string
    Last update time of the object.
    LocalVid float64
    VLAN id on the local side (1-4094). Must be a whole number.
    PolicyName string
    Name of the VLAN translation policy.
    Q string
    Search term, matched against the fields NetBox searches for this object type.
    RemoteVid float64
    VLAN id on the remote side (1-4094). Must be a whole number.
    Tag string
    Slug of a tag the object carries.
    TagId float64
    Id of a tag the object carries.
    VlanTranslationPolicyId float64
    Id of the translation policy the rule belongs to.
    created string
    Creation time of the object.
    description string
    id number
    NetBox id.
    last_updated string
    Last update time of the object.
    local_vid number
    VLAN id on the local side (1-4094). Must be a whole number.
    policy_name string
    Name of the VLAN translation policy.
    q string
    Search term, matched against the fields NetBox searches for this object type.
    remote_vid number
    VLAN id on the remote side (1-4094). Must be a whole number.
    tag string
    Slug of a tag the object carries.
    tag_id number
    Id of a tag the object carries.
    vlan_translation_policy_id number
    Id of the translation policy the rule belongs to.
    created String
    Creation time of the object.
    description String
    id Double
    NetBox id.
    lastUpdated String
    Last update time of the object.
    localVid Double
    VLAN id on the local side (1-4094). Must be a whole number.
    policyName String
    Name of the VLAN translation policy.
    q String
    Search term, matched against the fields NetBox searches for this object type.
    remoteVid Double
    VLAN id on the remote side (1-4094). Must be a whole number.
    tag String
    Slug of a tag the object carries.
    tagId Double
    Id of a tag the object carries.
    vlanTranslationPolicyId Double
    Id of the translation policy the rule belongs to.
    created string
    Creation time of the object.
    description string
    id number
    NetBox id.
    lastUpdated string
    Last update time of the object.
    localVid number
    VLAN id on the local side (1-4094). Must be a whole number.
    policyName string
    Name of the VLAN translation policy.
    q string
    Search term, matched against the fields NetBox searches for this object type.
    remoteVid number
    VLAN id on the remote side (1-4094). Must be a whole number.
    tag string
    Slug of a tag the object carries.
    tagId number
    Id of a tag the object carries.
    vlanTranslationPolicyId number
    Id of the translation policy the rule belongs to.
    created str
    Creation time of the object.
    description str
    id float
    NetBox id.
    last_updated str
    Last update time of the object.
    local_vid float
    VLAN id on the local side (1-4094). Must be a whole number.
    policy_name str
    Name of the VLAN translation policy.
    q str
    Search term, matched against the fields NetBox searches for this object type.
    remote_vid float
    VLAN id on the remote side (1-4094). Must be a whole number.
    tag str
    Slug of a tag the object carries.
    tag_id float
    Id of a tag the object carries.
    vlan_translation_policy_id float
    Id of the translation policy the rule belongs to.
    created String
    Creation time of the object.
    description String
    id Number
    NetBox id.
    lastUpdated String
    Last update time of the object.
    localVid Number
    VLAN id on the local side (1-4094). Must be a whole number.
    policyName String
    Name of the VLAN translation policy.
    q String
    Search term, matched against the fields NetBox searches for this object type.
    remoteVid Number
    VLAN id on the remote side (1-4094). Must be a whole number.
    tag String
    Slug of a tag the object carries.
    tagId Number
    Id of a tag the object carries.
    vlanTranslationPolicyId Number
    Id of the translation policy the rule belongs to.

    getVlanTranslationRule Result

    The following output properties are available:

    Description string
    Id double
    NetBox id.
    LocalVid double
    VLAN id on the local side (1-4094). Must be a whole number.
    RemoteVid double
    VLAN id on the remote side (1-4094). Must be a whole number.
    Url string
    VlanTranslationPolicyId double
    Id of the translation policy the rule belongs to.
    Created string
    Creation time of the object.
    LastUpdated string
    Last update time of the object.
    PolicyName string
    Name of the VLAN translation policy.
    Q string
    Search term, matched against the fields NetBox searches for this object type.
    Tag string
    Slug of a tag the object carries.
    TagId double
    Id of a tag the object carries.
    Description string
    Id float64
    NetBox id.
    LocalVid float64
    VLAN id on the local side (1-4094). Must be a whole number.
    RemoteVid float64
    VLAN id on the remote side (1-4094). Must be a whole number.
    Url string
    VlanTranslationPolicyId float64
    Id of the translation policy the rule belongs to.
    Created string
    Creation time of the object.
    LastUpdated string
    Last update time of the object.
    PolicyName string
    Name of the VLAN translation policy.
    Q string
    Search term, matched against the fields NetBox searches for this object type.
    Tag string
    Slug of a tag the object carries.
    TagId float64
    Id of a tag the object carries.
    description string
    id number
    NetBox id.
    local_vid number
    VLAN id on the local side (1-4094). Must be a whole number.
    remote_vid number
    VLAN id on the remote side (1-4094). Must be a whole number.
    url string
    vlan_translation_policy_id number
    Id of the translation policy the rule belongs to.
    created string
    Creation time of the object.
    last_updated string
    Last update time of the object.
    policy_name string
    Name of the VLAN translation policy.
    q string
    Search term, matched against the fields NetBox searches for this object type.
    tag string
    Slug of a tag the object carries.
    tag_id number
    Id of a tag the object carries.
    description String
    id Double
    NetBox id.
    localVid Double
    VLAN id on the local side (1-4094). Must be a whole number.
    remoteVid Double
    VLAN id on the remote side (1-4094). Must be a whole number.
    url String
    vlanTranslationPolicyId Double
    Id of the translation policy the rule belongs to.
    created String
    Creation time of the object.
    lastUpdated String
    Last update time of the object.
    policyName String
    Name of the VLAN translation policy.
    q String
    Search term, matched against the fields NetBox searches for this object type.
    tag String
    Slug of a tag the object carries.
    tagId Double
    Id of a tag the object carries.
    description string
    id number
    NetBox id.
    localVid number
    VLAN id on the local side (1-4094). Must be a whole number.
    remoteVid number
    VLAN id on the remote side (1-4094). Must be a whole number.
    url string
    vlanTranslationPolicyId number
    Id of the translation policy the rule belongs to.
    created string
    Creation time of the object.
    lastUpdated string
    Last update time of the object.
    policyName string
    Name of the VLAN translation policy.
    q string
    Search term, matched against the fields NetBox searches for this object type.
    tag string
    Slug of a tag the object carries.
    tagId number
    Id of a tag the object carries.
    description str
    id float
    NetBox id.
    local_vid float
    VLAN id on the local side (1-4094). Must be a whole number.
    remote_vid float
    VLAN id on the remote side (1-4094). Must be a whole number.
    url str
    vlan_translation_policy_id float
    Id of the translation policy the rule belongs to.
    created str
    Creation time of the object.
    last_updated str
    Last update time of the object.
    policy_name str
    Name of the VLAN translation policy.
    q str
    Search term, matched against the fields NetBox searches for this object type.
    tag str
    Slug of a tag the object carries.
    tag_id float
    Id of a tag the object carries.
    description String
    id Number
    NetBox id.
    localVid Number
    VLAN id on the local side (1-4094). Must be a whole number.
    remoteVid Number
    VLAN id on the remote side (1-4094). Must be a whole number.
    url String
    vlanTranslationPolicyId Number
    Id of the translation policy the rule belongs to.
    created String
    Creation time of the object.
    lastUpdated String
    Last update time of the object.
    policyName String
    Name of the VLAN translation policy.
    q String
    Search term, matched against the fields NetBox searches for this object type.
    tag String
    Slug of a tag the object carries.
    tagId Number
    Id 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.1
    published on Monday, Nov 16, 2026 by e-breuninger

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial