1. Registry
  2. Packages
  3. Netbox Provider
  4. API Docs
  5. getVlanTranslationRule
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 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(id: Optional[float] = None,
                                  local_vid: Optional[float] = None,
                                  remote_vid: Optional[float] = None,
                                  vlan_translation_policy_id: Optional[float] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetVlanTranslationRuleResult
    def get_vlan_translation_rule_output(id: pulumi.Input[Optional[float]] = None,
                                  local_vid: pulumi.Input[Optional[float]] = None,
                                  remote_vid: 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:

    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.
    VlanTranslationPolicyId double
    Id of the translation policy the rule belongs to.
    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.
    VlanTranslationPolicyId float64
    Id of the translation policy the rule belongs to.
    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.
    vlan_translation_policy_id number
    Id of the translation policy the rule belongs to.
    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.
    vlanTranslationPolicyId Double
    Id of the translation policy the rule belongs to.
    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.
    vlanTranslationPolicyId number
    Id of the translation policy the rule belongs to.
    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.
    vlan_translation_policy_id float
    Id of the translation policy the rule belongs to.
    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.
    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.
    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.
    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.
    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.
    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.
    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.
    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.

    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