1. Registry
  2. Packages
  3. Netbox Provider
  4. API Docs
  5. getVlanTranslationPolicy
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 VLAN translation policy (ipam.vlantranslationpolicy): a named set of VLAN translation rules.

    From the official documentation:

    VLAN translation is a feature that consists of VLAN translation policies and VLAN translation rules. Many rules can belong to a policy, and each rule defines a mapping of a local to remote VLAN ID (VID). A policy can then be assigned to an Interface or VMInterface, and all VLAN translation rules associated with that policy will be visible in the interface details.

    There are uniqueness constraints on (policy, local_vid) and on (policy, remote_vid) in the VLANTranslationRule model. Thus, you cannot have multiple rules linked to the same policy that have the same local VID or the same remote VID. A set of policies and rules might look like this:

    Policy 1:

    • Rule: 100 > 200
    • Rule: 101 > 201

    Policy 2:

    • Rule: 100 > 300
    • Rule: 101 > 301

    However this is not allowed:

    Policy 3:

    • Rule: 100 > 200
    • Rule: 100 > 300

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as netbox from "@pulumi/netbox";
    
    const test = netbox.getVlanTranslationPolicy({
        name: "test-vlan_translation_policy",
    });
    
    import pulumi
    import pulumi_netbox as netbox
    
    test = netbox.get_vlan_translation_policy(name="test-vlan_translation_policy")
    
    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.LookupVlanTranslationPolicy(ctx, &netbox.LookupVlanTranslationPolicyArgs{
    			Name: pulumi.StringRef("test-vlan_translation_policy"),
    		}, 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.GetVlanTranslationPolicy.Invoke(new()
        {
            Name = "test-vlan_translation_policy",
        });
    
    });
    
    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.GetVlanTranslationPolicyArgs;
    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.getVlanTranslationPolicy(GetVlanTranslationPolicyArgs.builder()
                .name("test-vlan_translation_policy")
                .build());
    
        }
    }
    
    variables:
      test:
        fn::invoke:
          function: netbox:getVlanTranslationPolicy
          arguments:
            name: test-vlan_translation_policy
    
    Example coming soon!
    

    Using getVlanTranslationPolicy

    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 getVlanTranslationPolicy(args: GetVlanTranslationPolicyArgs, opts?: InvokeOptions): Promise<GetVlanTranslationPolicyResult>
    function getVlanTranslationPolicyOutput(args: GetVlanTranslationPolicyOutputArgs, opts?: InvokeOutputOptions): Output<GetVlanTranslationPolicyResult>
    def get_vlan_translation_policy(id: Optional[float] = None,
                                    name: Optional[str] = None,
                                    owner_id: Optional[float] = None,
                                    opts: Optional[InvokeOptions] = None) -> GetVlanTranslationPolicyResult
    def get_vlan_translation_policy_output(id: pulumi.Input[Optional[float]] = None,
                                    name: pulumi.Input[Optional[str]] = None,
                                    owner_id: pulumi.Input[Optional[float]] = None,
                                    opts: Optional[InvokeOutputOptions] = None) -> Output[GetVlanTranslationPolicyResult]
    func LookupVlanTranslationPolicy(ctx *Context, args *LookupVlanTranslationPolicyArgs, opts ...InvokeOption) (*LookupVlanTranslationPolicyResult, error)
    func LookupVlanTranslationPolicyOutput(ctx *Context, args *LookupVlanTranslationPolicyOutputArgs, opts ...InvokeOption) LookupVlanTranslationPolicyResultOutput

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

    public static class GetVlanTranslationPolicy 
    {
        public static Task<GetVlanTranslationPolicyResult> InvokeAsync(GetVlanTranslationPolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetVlanTranslationPolicyResult> Invoke(GetVlanTranslationPolicyInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetVlanTranslationPolicyResult> Invoke(GetVlanTranslationPolicyInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetVlanTranslationPolicyResult> getVlanTranslationPolicy(GetVlanTranslationPolicyArgs args, InvokeOptions options)
    public static Output<GetVlanTranslationPolicyResult> getVlanTranslationPolicy(GetVlanTranslationPolicyArgs args, InvokeOptions options)
    public static Output<GetVlanTranslationPolicyResult> getVlanTranslationPolicy(GetVlanTranslationPolicyArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: netbox:index/getVlanTranslationPolicy:getVlanTranslationPolicy
      arguments:
        # arguments dictionary
    data "netbox_get_vlan_translation_policy" "name" {
        # arguments
    }

    The following arguments are supported:

    Id double
    NetBox id.
    Name string
    OwnerId double
    Id of the owner the object is assigned to.
    Id float64
    NetBox id.
    Name string
    OwnerId float64
    Id of the owner the object is assigned to.
    id number
    NetBox id.
    name string
    owner_id number
    Id of the owner the object is assigned to.
    id Double
    NetBox id.
    name String
    ownerId Double
    Id of the owner the object is assigned to.
    id number
    NetBox id.
    name string
    ownerId number
    Id of the owner the object is assigned to.
    id float
    NetBox id.
    name str
    owner_id float
    Id of the owner the object is assigned to.
    id Number
    NetBox id.
    name String
    ownerId Number
    Id of the owner the object is assigned to.

    getVlanTranslationPolicy Result

    The following output properties are available:

    Comments string
    Description string
    Id double
    NetBox id.
    Name string
    OwnerId double
    Id of the owner the object is assigned to.
    Url string
    Comments string
    Description string
    Id float64
    NetBox id.
    Name string
    OwnerId float64
    Id of the owner the object is assigned to.
    Url string
    comments string
    description string
    id number
    NetBox id.
    name string
    owner_id number
    Id of the owner the object is assigned to.
    url string
    comments String
    description String
    id Double
    NetBox id.
    name String
    ownerId Double
    Id of the owner the object is assigned to.
    url String
    comments string
    description string
    id number
    NetBox id.
    name string
    ownerId number
    Id of the owner the object is assigned to.
    url string
    comments str
    description str
    id float
    NetBox id.
    name str
    owner_id float
    Id of the owner the object is assigned to.
    url str
    comments String
    description String
    id Number
    NetBox id.
    name String
    ownerId Number
    Id of the owner the object is assigned to.
    url 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