1. Packages
  2. Nsxt Provider
  3. API Docs
  4. getPolicyGatewayLocaleService
nsxt 3.8.1 published on Wednesday, Apr 30, 2025 by vmware

nsxt.getPolicyGatewayLocaleService

Explore with Pulumi AI

nsxt logo
nsxt 3.8.1 published on Wednesday, Apr 30, 2025 by vmware

    This data source provides information about certain locale service for Tier-0 or Tier-1 gateway configured on NSX.

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nsxt from "@pulumi/nsxt";
    
    const test = nsxt.getPolicyGatewayLocaleService({
        gatewayPath: data.nsxt_policy_tier0_gateway.path,
        displayName: "london",
    });
    
    import pulumi
    import pulumi_nsxt as nsxt
    
    test = nsxt.get_policy_gateway_locale_service(gateway_path=data["nsxt_policy_tier0_gateway"]["path"],
        display_name="london")
    
    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 {
    		_, err := nsxt.GetPolicyGatewayLocaleService(ctx, &nsxt.GetPolicyGatewayLocaleServiceArgs{
    			GatewayPath: data.Nsxt_policy_tier0_gateway.Path,
    			DisplayName: pulumi.StringRef("london"),
    		}, 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 test = Nsxt.GetPolicyGatewayLocaleService.Invoke(new()
        {
            GatewayPath = data.Nsxt_policy_tier0_gateway.Path,
            DisplayName = "london",
        });
    
    });
    
    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.GetPolicyGatewayLocaleServiceArgs;
    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 = NsxtFunctions.getPolicyGatewayLocaleService(GetPolicyGatewayLocaleServiceArgs.builder()
                .gatewayPath(data.nsxt_policy_tier0_gateway().path())
                .displayName("london")
                .build());
    
        }
    }
    
    variables:
      test:
        fn::invoke:
          function: nsxt:getPolicyGatewayLocaleService
          arguments:
            gatewayPath: ${data.nsxt_policy_tier0_gateway.path}
            displayName: london
    

    Multi-Tenancy

    import * as pulumi from "@pulumi/pulumi";
    import * as nsxt from "@pulumi/nsxt";
    
    const demoproj = nsxt.getPolicyProject({
        displayName: "demoproj",
    });
    const demoserv = demoproj.then(demoproj => nsxt.getPolicyGatewayLocaleService({
        context: {
            projectId: demoproj.id,
        },
        gatewayPath: data.nsxt_policy_tier1_gateway.path,
        displayName: "demoserv",
    }));
    
    import pulumi
    import pulumi_nsxt as nsxt
    
    demoproj = nsxt.get_policy_project(display_name="demoproj")
    demoserv = nsxt.get_policy_gateway_locale_service(context={
            "project_id": demoproj.id,
        },
        gateway_path=data["nsxt_policy_tier1_gateway"]["path"],
        display_name="demoserv")
    
    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 {
    		demoproj, err := nsxt.LookupPolicyProject(ctx, &nsxt.LookupPolicyProjectArgs{
    			DisplayName: pulumi.StringRef("demoproj"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = nsxt.GetPolicyGatewayLocaleService(ctx, &nsxt.GetPolicyGatewayLocaleServiceArgs{
    			Context: nsxt.GetPolicyGatewayLocaleServiceContext{
    				ProjectId: demoproj.Id,
    			},
    			GatewayPath: data.Nsxt_policy_tier1_gateway.Path,
    			DisplayName: pulumi.StringRef("demoserv"),
    		}, 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 demoproj = Nsxt.GetPolicyProject.Invoke(new()
        {
            DisplayName = "demoproj",
        });
    
        var demoserv = Nsxt.GetPolicyGatewayLocaleService.Invoke(new()
        {
            Context = new Nsxt.Inputs.GetPolicyGatewayLocaleServiceContextInputArgs
            {
                ProjectId = demoproj.Apply(getPolicyProjectResult => getPolicyProjectResult.Id),
            },
            GatewayPath = data.Nsxt_policy_tier1_gateway.Path,
            DisplayName = "demoserv",
        });
    
    });
    
    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.GetPolicyProjectArgs;
    import com.pulumi.nsxt.inputs.GetPolicyGatewayLocaleServiceArgs;
    import com.pulumi.nsxt.inputs.GetPolicyGatewayLocaleServiceContextArgs;
    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 demoproj = NsxtFunctions.getPolicyProject(GetPolicyProjectArgs.builder()
                .displayName("demoproj")
                .build());
    
            final var demoserv = NsxtFunctions.getPolicyGatewayLocaleService(GetPolicyGatewayLocaleServiceArgs.builder()
                .context(GetPolicyGatewayLocaleServiceContextArgs.builder()
                    .projectId(demoproj.applyValue(getPolicyProjectResult -> getPolicyProjectResult.id()))
                    .build())
                .gatewayPath(data.nsxt_policy_tier1_gateway().path())
                .displayName("demoserv")
                .build());
    
        }
    }
    
    variables:
      demoproj:
        fn::invoke:
          function: nsxt:getPolicyProject
          arguments:
            displayName: demoproj
      demoserv:
        fn::invoke:
          function: nsxt:getPolicyGatewayLocaleService
          arguments:
            context:
              projectId: ${demoproj.id}
            gatewayPath: ${data.nsxt_policy_tier1_gateway.path}
            displayName: demoserv
    

    Using getPolicyGatewayLocaleService

    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 getPolicyGatewayLocaleService(args: GetPolicyGatewayLocaleServiceArgs, opts?: InvokeOptions): Promise<GetPolicyGatewayLocaleServiceResult>
    function getPolicyGatewayLocaleServiceOutput(args: GetPolicyGatewayLocaleServiceOutputArgs, opts?: InvokeOptions): Output<GetPolicyGatewayLocaleServiceResult>
    def get_policy_gateway_locale_service(bgp_path: Optional[str] = None,
                                          context: Optional[GetPolicyGatewayLocaleServiceContext] = None,
                                          description: Optional[str] = None,
                                          display_name: Optional[str] = None,
                                          edge_cluster_path: Optional[str] = None,
                                          gateway_path: Optional[str] = None,
                                          id: Optional[str] = None,
                                          opts: Optional[InvokeOptions] = None) -> GetPolicyGatewayLocaleServiceResult
    def get_policy_gateway_locale_service_output(bgp_path: Optional[pulumi.Input[str]] = None,
                                          context: Optional[pulumi.Input[GetPolicyGatewayLocaleServiceContextArgs]] = None,
                                          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,
                                          opts: Optional[InvokeOptions] = None) -> Output[GetPolicyGatewayLocaleServiceResult]
    func GetPolicyGatewayLocaleService(ctx *Context, args *GetPolicyGatewayLocaleServiceArgs, opts ...InvokeOption) (*GetPolicyGatewayLocaleServiceResult, error)
    func GetPolicyGatewayLocaleServiceOutput(ctx *Context, args *GetPolicyGatewayLocaleServiceOutputArgs, opts ...InvokeOption) GetPolicyGatewayLocaleServiceResultOutput

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

    public static class GetPolicyGatewayLocaleService 
    {
        public static Task<GetPolicyGatewayLocaleServiceResult> InvokeAsync(GetPolicyGatewayLocaleServiceArgs args, InvokeOptions? opts = null)
        public static Output<GetPolicyGatewayLocaleServiceResult> Invoke(GetPolicyGatewayLocaleServiceInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPolicyGatewayLocaleServiceResult> getPolicyGatewayLocaleService(GetPolicyGatewayLocaleServiceArgs args, InvokeOptions options)
    public static Output<GetPolicyGatewayLocaleServiceResult> getPolicyGatewayLocaleService(GetPolicyGatewayLocaleServiceArgs args, InvokeOptions options)
    
    fn::invoke:
      function: nsxt:index/getPolicyGatewayLocaleService:getPolicyGatewayLocaleService
      arguments:
        # arguments dictionary

    The following arguments are supported:

    GatewayPath string
    Path for the gateway.
    BgpPath string
    Path for BGP configuration configured on this service.
    Context GetPolicyGatewayLocaleServiceContext
    The context which the object belongs to
    Description string
    The description of the resource.
    DisplayName string
    The Display Name or prefix of locale service to retrieve.
    EdgeClusterPath string
    The path of the Edge cluster configured on this service.
    Id string
    The ID of locale service gateway to retrieve.
    GatewayPath string
    Path for the gateway.
    BgpPath string
    Path for BGP configuration configured on this service.
    Context GetPolicyGatewayLocaleServiceContext
    The context which the object belongs to
    Description string
    The description of the resource.
    DisplayName string
    The Display Name or prefix of locale service to retrieve.
    EdgeClusterPath string
    The path of the Edge cluster configured on this service.
    Id string
    The ID of locale service gateway to retrieve.
    gatewayPath String
    Path for the gateway.
    bgpPath String
    Path for BGP configuration configured on this service.
    context GetPolicyGatewayLocaleServiceContext
    The context which the object belongs to
    description String
    The description of the resource.
    displayName String
    The Display Name or prefix of locale service to retrieve.
    edgeClusterPath String
    The path of the Edge cluster configured on this service.
    id String
    The ID of locale service gateway to retrieve.
    gatewayPath string
    Path for the gateway.
    bgpPath string
    Path for BGP configuration configured on this service.
    context GetPolicyGatewayLocaleServiceContext
    The context which the object belongs to
    description string
    The description of the resource.
    displayName string
    The Display Name or prefix of locale service to retrieve.
    edgeClusterPath string
    The path of the Edge cluster configured on this service.
    id string
    The ID of locale service gateway to retrieve.
    gateway_path str
    Path for the gateway.
    bgp_path str
    Path for BGP configuration configured on this service.
    context GetPolicyGatewayLocaleServiceContext
    The context which the object belongs to
    description str
    The description of the resource.
    display_name str
    The Display Name or prefix of locale service to retrieve.
    edge_cluster_path str
    The path of the Edge cluster configured on this service.
    id str
    The ID of locale service gateway to retrieve.
    gatewayPath String
    Path for the gateway.
    bgpPath String
    Path for BGP configuration configured on this service.
    context Property Map
    The context which the object belongs to
    description String
    The description of the resource.
    displayName String
    The Display Name or prefix of locale service to retrieve.
    edgeClusterPath String
    The path of the Edge cluster configured on this service.
    id String
    The ID of locale service gateway to retrieve.

    getPolicyGatewayLocaleService Result

    The following output properties are available:

    BgpPath string
    Path for BGP configuration configured on this service.
    Description string
    The description of the resource.
    DisplayName string
    EdgeClusterPath string
    The path of the Edge cluster configured on this service.
    GatewayPath string
    Id string
    Path string
    The NSX path of the policy resource.
    Context GetPolicyGatewayLocaleServiceContext
    BgpPath string
    Path for BGP configuration configured on this service.
    Description string
    The description of the resource.
    DisplayName string
    EdgeClusterPath string
    The path of the Edge cluster configured on this service.
    GatewayPath string
    Id string
    Path string
    The NSX path of the policy resource.
    Context GetPolicyGatewayLocaleServiceContext
    bgpPath String
    Path for BGP configuration configured on this service.
    description String
    The description of the resource.
    displayName String
    edgeClusterPath String
    The path of the Edge cluster configured on this service.
    gatewayPath String
    id String
    path String
    The NSX path of the policy resource.
    context GetPolicyGatewayLocaleServiceContext
    bgpPath string
    Path for BGP configuration configured on this service.
    description string
    The description of the resource.
    displayName string
    edgeClusterPath string
    The path of the Edge cluster configured on this service.
    gatewayPath string
    id string
    path string
    The NSX path of the policy resource.
    context GetPolicyGatewayLocaleServiceContext
    bgp_path str
    Path for BGP configuration configured on this service.
    description str
    The description of the resource.
    display_name str
    edge_cluster_path str
    The path of the Edge cluster configured on this service.
    gateway_path str
    id str
    path str
    The NSX path of the policy resource.
    context GetPolicyGatewayLocaleServiceContext
    bgpPath String
    Path for BGP configuration configured on this service.
    description String
    The description of the resource.
    displayName String
    edgeClusterPath String
    The path of the Edge cluster configured on this service.
    gatewayPath String
    id String
    path String
    The NSX path of the policy resource.
    context Property Map

    Supporting Types

    GetPolicyGatewayLocaleServiceContext

    ProjectId string
    The ID of the project which the object belongs to
    ProjectId string
    The ID of the project which the object belongs to
    projectId String
    The ID of the project which the object belongs to
    projectId string
    The ID of the project which the object belongs to
    project_id str
    The ID of the project which the object belongs to
    projectId String
    The ID of the project which the object belongs to

    Package Details

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