1. Packages
  2. Nsxt Provider
  3. API Docs
  4. getPolicyGatewayInterface
nsxt 3.10.0 published on Wednesday, Sep 10, 2025 by vmware

nsxt.getPolicyGatewayInterface

Explore with Pulumi AI

nsxt logo
nsxt 3.10.0 published on Wednesday, Sep 10, 2025 by vmware

    This data source provides information about policy Tier-0 & Tier-1 gateway interface configured on NSX.

    This data source is applicable to NSX Policy Manager and NSX Global Manager.

    Tier0 gateway interface example

    import * as pulumi from "@pulumi/pulumi";
    import * as nsxt from "@pulumi/nsxt";
    
    const t0Gw = nsxt.getPolicyTier0Gateway({
        displayName: "t0Gateway",
    });
    const tier0GwInterface = t0Gw.then(t0Gw => nsxt.getPolicyGatewayInterface({
        displayName: "gw-interface1",
        gatewayPath: t0Gw.path,
    }));
    
    import pulumi
    import pulumi_nsxt as nsxt
    
    t0_gw = nsxt.get_policy_tier0_gateway(display_name="t0Gateway")
    tier0_gw_interface = nsxt.get_policy_gateway_interface(display_name="gw-interface1",
        gateway_path=t0_gw.path)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/nsxt/v3/nsxt"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		t0Gw, err := nsxt.LookupPolicyTier0Gateway(ctx, &nsxt.LookupPolicyTier0GatewayArgs{
    			DisplayName: pulumi.StringRef("t0Gateway"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = nsxt.GetPolicyGatewayInterface(ctx, &nsxt.GetPolicyGatewayInterfaceArgs{
    			DisplayName: pulumi.StringRef("gw-interface1"),
    			GatewayPath: pulumi.StringRef(t0Gw.Path),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nsxt = Pulumi.Nsxt;
    
    return await Deployment.RunAsync(() => 
    {
        var t0Gw = Nsxt.GetPolicyTier0Gateway.Invoke(new()
        {
            DisplayName = "t0Gateway",
        });
    
        var tier0GwInterface = Nsxt.GetPolicyGatewayInterface.Invoke(new()
        {
            DisplayName = "gw-interface1",
            GatewayPath = t0Gw.Apply(getPolicyTier0GatewayResult => getPolicyTier0GatewayResult.Path),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.nsxt.NsxtFunctions;
    import com.pulumi.nsxt.inputs.GetPolicyTier0GatewayArgs;
    import com.pulumi.nsxt.inputs.GetPolicyGatewayInterfaceArgs;
    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 t0Gw = NsxtFunctions.getPolicyTier0Gateway(GetPolicyTier0GatewayArgs.builder()
                .displayName("t0Gateway")
                .build());
    
            final var tier0GwInterface = NsxtFunctions.getPolicyGatewayInterface(GetPolicyGatewayInterfaceArgs.builder()
                .displayName("gw-interface1")
                .gatewayPath(t0Gw.applyValue(getPolicyTier0GatewayResult -> getPolicyTier0GatewayResult.path()))
                .build());
    
        }
    }
    
    variables:
      t0Gw:
        fn::invoke:
          function: nsxt:getPolicyTier0Gateway
          arguments:
            displayName: t0Gateway
      tier0GwInterface:
        fn::invoke:
          function: nsxt:getPolicyGatewayInterface
          arguments:
            displayName: gw-interface1
            gatewayPath: ${t0Gw.path}
    

    Tier0 gateway interface example with service path

    import * as pulumi from "@pulumi/pulumi";
    import * as nsxt from "@pulumi/nsxt";
    
    const t0Gw = nsxt.getPolicyTier0Gateway({
        displayName: "t0Gateway",
    });
    const test = t0Gw.then(t0Gw => nsxt.getPolicyGatewayLocaleService({
        gatewayPath: t0Gw.path,
    }));
    const tier0GwInterface = test.then(test => nsxt.getPolicyGatewayInterface({
        displayName: "gw-interface1",
        servicePath: test.path,
    }));
    
    import pulumi
    import pulumi_nsxt as nsxt
    
    t0_gw = nsxt.get_policy_tier0_gateway(display_name="t0Gateway")
    test = nsxt.get_policy_gateway_locale_service(gateway_path=t0_gw.path)
    tier0_gw_interface = nsxt.get_policy_gateway_interface(display_name="gw-interface1",
        service_path=test.path)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/nsxt/v3/nsxt"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		t0Gw, err := nsxt.LookupPolicyTier0Gateway(ctx, &nsxt.LookupPolicyTier0GatewayArgs{
    			DisplayName: pulumi.StringRef("t0Gateway"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		test, err := nsxt.GetPolicyGatewayLocaleService(ctx, &nsxt.GetPolicyGatewayLocaleServiceArgs{
    			GatewayPath: t0Gw.Path,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = nsxt.GetPolicyGatewayInterface(ctx, &nsxt.GetPolicyGatewayInterfaceArgs{
    			DisplayName: pulumi.StringRef("gw-interface1"),
    			ServicePath: pulumi.StringRef(test.Path),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nsxt = Pulumi.Nsxt;
    
    return await Deployment.RunAsync(() => 
    {
        var t0Gw = Nsxt.GetPolicyTier0Gateway.Invoke(new()
        {
            DisplayName = "t0Gateway",
        });
    
        var test = Nsxt.GetPolicyGatewayLocaleService.Invoke(new()
        {
            GatewayPath = t0Gw.Apply(getPolicyTier0GatewayResult => getPolicyTier0GatewayResult.Path),
        });
    
        var tier0GwInterface = Nsxt.GetPolicyGatewayInterface.Invoke(new()
        {
            DisplayName = "gw-interface1",
            ServicePath = test.Apply(getPolicyGatewayLocaleServiceResult => getPolicyGatewayLocaleServiceResult.Path),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.nsxt.NsxtFunctions;
    import com.pulumi.nsxt.inputs.GetPolicyTier0GatewayArgs;
    import com.pulumi.nsxt.inputs.GetPolicyGatewayLocaleServiceArgs;
    import com.pulumi.nsxt.inputs.GetPolicyGatewayInterfaceArgs;
    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 t0Gw = NsxtFunctions.getPolicyTier0Gateway(GetPolicyTier0GatewayArgs.builder()
                .displayName("t0Gateway")
                .build());
    
            final var test = NsxtFunctions.getPolicyGatewayLocaleService(GetPolicyGatewayLocaleServiceArgs.builder()
                .gatewayPath(t0Gw.applyValue(getPolicyTier0GatewayResult -> getPolicyTier0GatewayResult.path()))
                .build());
    
            final var tier0GwInterface = NsxtFunctions.getPolicyGatewayInterface(GetPolicyGatewayInterfaceArgs.builder()
                .displayName("gw-interface1")
                .servicePath(test.applyValue(getPolicyGatewayLocaleServiceResult -> getPolicyGatewayLocaleServiceResult.path()))
                .build());
    
        }
    }
    
    variables:
      t0Gw:
        fn::invoke:
          function: nsxt:getPolicyTier0Gateway
          arguments:
            displayName: t0Gateway
      test:
        fn::invoke:
          function: nsxt:getPolicyGatewayLocaleService
          arguments:
            gatewayPath: ${t0Gw.path}
      tier0GwInterface:
        fn::invoke:
          function: nsxt:getPolicyGatewayInterface
          arguments:
            displayName: gw-interface1
            servicePath: ${test.path}
    

    Tier1 gateway interface example

    import * as pulumi from "@pulumi/pulumi";
    import * as nsxt from "@pulumi/nsxt";
    
    const t1Gw = nsxt.getPolicyTier1Gateway({
        displayName: "t1Gateway",
    });
    const tier1GwInterface = t1Gw.then(t1Gw => nsxt.getPolicyGatewayInterface({
        displayName: "gw-interface2",
        gatewayPath: t1Gw.path,
    }));
    
    import pulumi
    import pulumi_nsxt as nsxt
    
    t1_gw = nsxt.get_policy_tier1_gateway(display_name="t1Gateway")
    tier1_gw_interface = nsxt.get_policy_gateway_interface(display_name="gw-interface2",
        gateway_path=t1_gw.path)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/nsxt/v3/nsxt"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		t1Gw, err := nsxt.LookupPolicyTier1Gateway(ctx, &nsxt.LookupPolicyTier1GatewayArgs{
    			DisplayName: pulumi.StringRef("t1Gateway"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = nsxt.GetPolicyGatewayInterface(ctx, &nsxt.GetPolicyGatewayInterfaceArgs{
    			DisplayName: pulumi.StringRef("gw-interface2"),
    			GatewayPath: pulumi.StringRef(t1Gw.Path),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nsxt = Pulumi.Nsxt;
    
    return await Deployment.RunAsync(() => 
    {
        var t1Gw = Nsxt.GetPolicyTier1Gateway.Invoke(new()
        {
            DisplayName = "t1Gateway",
        });
    
        var tier1GwInterface = Nsxt.GetPolicyGatewayInterface.Invoke(new()
        {
            DisplayName = "gw-interface2",
            GatewayPath = t1Gw.Apply(getPolicyTier1GatewayResult => getPolicyTier1GatewayResult.Path),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.nsxt.NsxtFunctions;
    import com.pulumi.nsxt.inputs.GetPolicyTier1GatewayArgs;
    import com.pulumi.nsxt.inputs.GetPolicyGatewayInterfaceArgs;
    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 t1Gw = NsxtFunctions.getPolicyTier1Gateway(GetPolicyTier1GatewayArgs.builder()
                .displayName("t1Gateway")
                .build());
    
            final var tier1GwInterface = NsxtFunctions.getPolicyGatewayInterface(GetPolicyGatewayInterfaceArgs.builder()
                .displayName("gw-interface2")
                .gatewayPath(t1Gw.applyValue(getPolicyTier1GatewayResult -> getPolicyTier1GatewayResult.path()))
                .build());
    
        }
    }
    
    variables:
      t1Gw:
        fn::invoke:
          function: nsxt:getPolicyTier1Gateway
          arguments:
            displayName: t1Gateway
      tier1GwInterface:
        fn::invoke:
          function: nsxt:getPolicyGatewayInterface
          arguments:
            displayName: gw-interface2
            gatewayPath: ${t1Gw.path}
    

    Using getPolicyGatewayInterface

    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 getPolicyGatewayInterface(args: GetPolicyGatewayInterfaceArgs, opts?: InvokeOptions): Promise<GetPolicyGatewayInterfaceResult>
    function getPolicyGatewayInterfaceOutput(args: GetPolicyGatewayInterfaceOutputArgs, opts?: InvokeOptions): Output<GetPolicyGatewayInterfaceResult>
    def get_policy_gateway_interface(description: Optional[str] = None,
                                     display_name: Optional[str] = None,
                                     edge_cluster_path: Optional[str] = None,
                                     gateway_path: Optional[str] = None,
                                     id: Optional[str] = None,
                                     segment_path: Optional[str] = None,
                                     service_path: Optional[str] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetPolicyGatewayInterfaceResult
    def get_policy_gateway_interface_output(description: Optional[pulumi.Input[str]] = None,
                                     display_name: Optional[pulumi.Input[str]] = None,
                                     edge_cluster_path: Optional[pulumi.Input[str]] = None,
                                     gateway_path: Optional[pulumi.Input[str]] = None,
                                     id: Optional[pulumi.Input[str]] = None,
                                     segment_path: Optional[pulumi.Input[str]] = None,
                                     service_path: Optional[pulumi.Input[str]] = None,
                                     opts: Optional[InvokeOptions] = None) -> Output[GetPolicyGatewayInterfaceResult]
    func GetPolicyGatewayInterface(ctx *Context, args *GetPolicyGatewayInterfaceArgs, opts ...InvokeOption) (*GetPolicyGatewayInterfaceResult, error)
    func GetPolicyGatewayInterfaceOutput(ctx *Context, args *GetPolicyGatewayInterfaceOutputArgs, opts ...InvokeOption) GetPolicyGatewayInterfaceResultOutput

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

    public static class GetPolicyGatewayInterface 
    {
        public static Task<GetPolicyGatewayInterfaceResult> InvokeAsync(GetPolicyGatewayInterfaceArgs args, InvokeOptions? opts = null)
        public static Output<GetPolicyGatewayInterfaceResult> Invoke(GetPolicyGatewayInterfaceInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPolicyGatewayInterfaceResult> getPolicyGatewayInterface(GetPolicyGatewayInterfaceArgs args, InvokeOptions options)
    public static Output<GetPolicyGatewayInterfaceResult> getPolicyGatewayInterface(GetPolicyGatewayInterfaceArgs args, InvokeOptions options)
    
    fn::invoke:
      function: nsxt:index/getPolicyGatewayInterface:getPolicyGatewayInterface
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Description string
    The description of the resource.
    DisplayName string
    The Display Name prefix of the gateway interface to retrieve.
    EdgeClusterPath string
    The path of the Edge cluster where this gateway is placed. This attribute is not set for NSX Global Manager, where gateway can span across multiple sites. This attribute is set only for Tier0 gateways.
    GatewayPath string
    The path of the gateway where the interface should be linked to.
    Id string
    ID of the interface.
    SegmentPath string
    Policy path for segment which is connected to this Tier0 Gateway
    ServicePath string
    The name of the locale service of the gateway to which interface is linked. Either service_path or gateway_path should be provided.
    Description string
    The description of the resource.
    DisplayName string
    The Display Name prefix of the gateway interface to retrieve.
    EdgeClusterPath string
    The path of the Edge cluster where this gateway is placed. This attribute is not set for NSX Global Manager, where gateway can span across multiple sites. This attribute is set only for Tier0 gateways.
    GatewayPath string
    The path of the gateway where the interface should be linked to.
    Id string
    ID of the interface.
    SegmentPath string
    Policy path for segment which is connected to this Tier0 Gateway
    ServicePath string
    The name of the locale service of the gateway to which interface is linked. Either service_path or gateway_path should be provided.
    description String
    The description of the resource.
    displayName String
    The Display Name prefix of the gateway interface to retrieve.
    edgeClusterPath String
    The path of the Edge cluster where this gateway is placed. This attribute is not set for NSX Global Manager, where gateway can span across multiple sites. This attribute is set only for Tier0 gateways.
    gatewayPath String
    The path of the gateway where the interface should be linked to.
    id String
    ID of the interface.
    segmentPath String
    Policy path for segment which is connected to this Tier0 Gateway
    servicePath String
    The name of the locale service of the gateway to which interface is linked. Either service_path or gateway_path should be provided.
    description string
    The description of the resource.
    displayName string
    The Display Name prefix of the gateway interface to retrieve.
    edgeClusterPath string
    The path of the Edge cluster where this gateway is placed. This attribute is not set for NSX Global Manager, where gateway can span across multiple sites. This attribute is set only for Tier0 gateways.
    gatewayPath string
    The path of the gateway where the interface should be linked to.
    id string
    ID of the interface.
    segmentPath string
    Policy path for segment which is connected to this Tier0 Gateway
    servicePath string
    The name of the locale service of the gateway to which interface is linked. Either service_path or gateway_path should be provided.
    description str
    The description of the resource.
    display_name str
    The Display Name prefix of the gateway interface to retrieve.
    edge_cluster_path str
    The path of the Edge cluster where this gateway is placed. This attribute is not set for NSX Global Manager, where gateway can span across multiple sites. This attribute is set only for Tier0 gateways.
    gateway_path str
    The path of the gateway where the interface should be linked to.
    id str
    ID of the interface.
    segment_path str
    Policy path for segment which is connected to this Tier0 Gateway
    service_path str
    The name of the locale service of the gateway to which interface is linked. Either service_path or gateway_path should be provided.
    description String
    The description of the resource.
    displayName String
    The Display Name prefix of the gateway interface to retrieve.
    edgeClusterPath String
    The path of the Edge cluster where this gateway is placed. This attribute is not set for NSX Global Manager, where gateway can span across multiple sites. This attribute is set only for Tier0 gateways.
    gatewayPath String
    The path of the gateway where the interface should be linked to.
    id String
    ID of the interface.
    segmentPath String
    Policy path for segment which is connected to this Tier0 Gateway
    servicePath String
    The name of the locale service of the gateway to which interface is linked. Either service_path or gateway_path should be provided.

    getPolicyGatewayInterface Result

    The following output properties are available:

    Description string
    The description of the resource.
    DisplayName string
    Id string
    ID of the interface.
    Path string
    The NSX path of the policy resource.
    EdgeClusterPath string
    The path of the Edge cluster where this gateway is placed. This attribute is not set for NSX Global Manager, where gateway can span across multiple sites. This attribute is set only for Tier0 gateways.
    GatewayPath string
    SegmentPath string
    Policy path for segment which is connected to this Tier0 Gateway
    ServicePath string
    Description string
    The description of the resource.
    DisplayName string
    Id string
    ID of the interface.
    Path string
    The NSX path of the policy resource.
    EdgeClusterPath string
    The path of the Edge cluster where this gateway is placed. This attribute is not set for NSX Global Manager, where gateway can span across multiple sites. This attribute is set only for Tier0 gateways.
    GatewayPath string
    SegmentPath string
    Policy path for segment which is connected to this Tier0 Gateway
    ServicePath string
    description String
    The description of the resource.
    displayName String
    id String
    ID of the interface.
    path String
    The NSX path of the policy resource.
    edgeClusterPath String
    The path of the Edge cluster where this gateway is placed. This attribute is not set for NSX Global Manager, where gateway can span across multiple sites. This attribute is set only for Tier0 gateways.
    gatewayPath String
    segmentPath String
    Policy path for segment which is connected to this Tier0 Gateway
    servicePath String
    description string
    The description of the resource.
    displayName string
    id string
    ID of the interface.
    path string
    The NSX path of the policy resource.
    edgeClusterPath string
    The path of the Edge cluster where this gateway is placed. This attribute is not set for NSX Global Manager, where gateway can span across multiple sites. This attribute is set only for Tier0 gateways.
    gatewayPath string
    segmentPath string
    Policy path for segment which is connected to this Tier0 Gateway
    servicePath string
    description str
    The description of the resource.
    display_name str
    id str
    ID of the interface.
    path str
    The NSX path of the policy resource.
    edge_cluster_path str
    The path of the Edge cluster where this gateway is placed. This attribute is not set for NSX Global Manager, where gateway can span across multiple sites. This attribute is set only for Tier0 gateways.
    gateway_path str
    segment_path str
    Policy path for segment which is connected to this Tier0 Gateway
    service_path str
    description String
    The description of the resource.
    displayName String
    id String
    ID of the interface.
    path String
    The NSX path of the policy resource.
    edgeClusterPath String
    The path of the Edge cluster where this gateway is placed. This attribute is not set for NSX Global Manager, where gateway can span across multiple sites. This attribute is set only for Tier0 gateways.
    gatewayPath String
    segmentPath String
    Policy path for segment which is connected to this Tier0 Gateway
    servicePath String

    Package Details

    Repository
    nsxt vmware/terraform-provider-nsxt
    License
    Notes
    This Pulumi package is based on the nsxt Terraform Provider.
    nsxt logo
    nsxt 3.10.0 published on Wednesday, Sep 10, 2025 by vmware