nsxt 3.8.1 published on Wednesday, Apr 30, 2025 by vmware
nsxt.getPolicyTier1Gateway
Explore with Pulumi AI
This data source provides information about policy Tier-1s 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 tier1Router = nsxt.getPolicyTier1Gateway({
displayName: "tier1_gw",
});
import pulumi
import pulumi_nsxt as nsxt
tier1_router = nsxt.get_policy_tier1_gateway(display_name="tier1_gw")
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.LookupPolicyTier1Gateway(ctx, &nsxt.LookupPolicyTier1GatewayArgs{
DisplayName: pulumi.StringRef("tier1_gw"),
}, 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 tier1Router = Nsxt.GetPolicyTier1Gateway.Invoke(new()
{
DisplayName = "tier1_gw",
});
});
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 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 tier1Router = NsxtFunctions.getPolicyTier1Gateway(GetPolicyTier1GatewayArgs.builder()
.displayName("tier1_gw")
.build());
}
}
variables:
tier1Router:
fn::invoke:
function: nsxt:getPolicyTier1Gateway
arguments:
displayName: tier1_gw
Multi-Tenancy
import * as pulumi from "@pulumi/pulumi";
import * as nsxt from "@pulumi/nsxt";
const demoproj = nsxt.getPolicyProject({
displayName: "demoproj",
});
const demotier1 = demoproj.then(demoproj => nsxt.getPolicyTier1Gateway({
context: {
projectId: demoproj.id,
},
displayName: "demotier1",
}));
import pulumi
import pulumi_nsxt as nsxt
demoproj = nsxt.get_policy_project(display_name="demoproj")
demotier1 = nsxt.get_policy_tier1_gateway(context={
"project_id": demoproj.id,
},
display_name="demotier1")
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.LookupPolicyTier1Gateway(ctx, &nsxt.LookupPolicyTier1GatewayArgs{
Context: nsxt.GetPolicyTier1GatewayContext{
ProjectId: demoproj.Id,
},
DisplayName: pulumi.StringRef("demotier1"),
}, 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 demotier1 = Nsxt.GetPolicyTier1Gateway.Invoke(new()
{
Context = new Nsxt.Inputs.GetPolicyTier1GatewayContextInputArgs
{
ProjectId = demoproj.Apply(getPolicyProjectResult => getPolicyProjectResult.Id),
},
DisplayName = "demotier1",
});
});
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.GetPolicyTier1GatewayArgs;
import com.pulumi.nsxt.inputs.GetPolicyTier1GatewayContextArgs;
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 demotier1 = NsxtFunctions.getPolicyTier1Gateway(GetPolicyTier1GatewayArgs.builder()
.context(GetPolicyTier1GatewayContextArgs.builder()
.projectId(demoproj.applyValue(getPolicyProjectResult -> getPolicyProjectResult.id()))
.build())
.displayName("demotier1")
.build());
}
}
variables:
demoproj:
fn::invoke:
function: nsxt:getPolicyProject
arguments:
displayName: demoproj
demotier1:
fn::invoke:
function: nsxt:getPolicyTier1Gateway
arguments:
context:
projectId: ${demoproj.id}
displayName: demotier1
Using getPolicyTier1Gateway
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 getPolicyTier1Gateway(args: GetPolicyTier1GatewayArgs, opts?: InvokeOptions): Promise<GetPolicyTier1GatewayResult>
function getPolicyTier1GatewayOutput(args: GetPolicyTier1GatewayOutputArgs, opts?: InvokeOptions): Output<GetPolicyTier1GatewayResult>
def get_policy_tier1_gateway(context: Optional[GetPolicyTier1GatewayContext] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
edge_cluster_path: Optional[str] = None,
id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPolicyTier1GatewayResult
def get_policy_tier1_gateway_output(context: Optional[pulumi.Input[GetPolicyTier1GatewayContextArgs]] = None,
description: Optional[pulumi.Input[str]] = None,
display_name: Optional[pulumi.Input[str]] = None,
edge_cluster_path: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPolicyTier1GatewayResult]
func LookupPolicyTier1Gateway(ctx *Context, args *LookupPolicyTier1GatewayArgs, opts ...InvokeOption) (*LookupPolicyTier1GatewayResult, error)
func LookupPolicyTier1GatewayOutput(ctx *Context, args *LookupPolicyTier1GatewayOutputArgs, opts ...InvokeOption) LookupPolicyTier1GatewayResultOutput
> Note: This function is named LookupPolicyTier1Gateway
in the Go SDK.
public static class GetPolicyTier1Gateway
{
public static Task<GetPolicyTier1GatewayResult> InvokeAsync(GetPolicyTier1GatewayArgs args, InvokeOptions? opts = null)
public static Output<GetPolicyTier1GatewayResult> Invoke(GetPolicyTier1GatewayInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetPolicyTier1GatewayResult> getPolicyTier1Gateway(GetPolicyTier1GatewayArgs args, InvokeOptions options)
public static Output<GetPolicyTier1GatewayResult> getPolicyTier1Gateway(GetPolicyTier1GatewayArgs args, InvokeOptions options)
fn::invoke:
function: nsxt:index/getPolicyTier1Gateway:getPolicyTier1Gateway
arguments:
# arguments dictionary
The following arguments are supported:
- Context
Get
Policy Tier1Gateway Context - The context which the object belongs to
- Description string
- The description of the resource.
- Display
Name string - The Display Name prefix of the Tier-1 gateway to retrieve.
- Edge
Cluster stringPath - The path of the Edge cluster where this Tier-1 gateway is placed.
- Id string
- The ID of Tier-1 gateway to retrieve.
- Context
Get
Policy Tier1Gateway Context - The context which the object belongs to
- Description string
- The description of the resource.
- Display
Name string - The Display Name prefix of the Tier-1 gateway to retrieve.
- Edge
Cluster stringPath - The path of the Edge cluster where this Tier-1 gateway is placed.
- Id string
- The ID of Tier-1 gateway to retrieve.
- context
Get
Policy Tier1Gateway Context - The context which the object belongs to
- description String
- The description of the resource.
- display
Name String - The Display Name prefix of the Tier-1 gateway to retrieve.
- edge
Cluster StringPath - The path of the Edge cluster where this Tier-1 gateway is placed.
- id String
- The ID of Tier-1 gateway to retrieve.
- context
Get
Policy Tier1Gateway Context - The context which the object belongs to
- description string
- The description of the resource.
- display
Name string - The Display Name prefix of the Tier-1 gateway to retrieve.
- edge
Cluster stringPath - The path of the Edge cluster where this Tier-1 gateway is placed.
- id string
- The ID of Tier-1 gateway to retrieve.
- context
Get
Policy Tier1Gateway Context - The context which the object belongs to
- description str
- The description of the resource.
- display_
name str - The Display Name prefix of the Tier-1 gateway to retrieve.
- edge_
cluster_ strpath - The path of the Edge cluster where this Tier-1 gateway is placed.
- id str
- The ID of Tier-1 gateway to retrieve.
- context Property Map
- The context which the object belongs to
- description String
- The description of the resource.
- display
Name String - The Display Name prefix of the Tier-1 gateway to retrieve.
- edge
Cluster StringPath - The path of the Edge cluster where this Tier-1 gateway is placed.
- id String
- The ID of Tier-1 gateway to retrieve.
getPolicyTier1Gateway Result
The following output properties are available:
- Description string
- The description of the resource.
- Display
Name string - Edge
Cluster stringPath - The path of the Edge cluster where this Tier-1 gateway is placed.
- Id string
- Path string
- The NSX path of the policy resource.
- Context
Get
Policy Tier1Gateway Context
- Description string
- The description of the resource.
- Display
Name string - Edge
Cluster stringPath - The path of the Edge cluster where this Tier-1 gateway is placed.
- Id string
- Path string
- The NSX path of the policy resource.
- Context
Get
Policy Tier1Gateway Context
- description String
- The description of the resource.
- display
Name String - edge
Cluster StringPath - The path of the Edge cluster where this Tier-1 gateway is placed.
- id String
- path String
- The NSX path of the policy resource.
- context
Get
Policy Tier1Gateway Context
- description string
- The description of the resource.
- display
Name string - edge
Cluster stringPath - The path of the Edge cluster where this Tier-1 gateway is placed.
- id string
- path string
- The NSX path of the policy resource.
- context
Get
Policy Tier1Gateway Context
- description str
- The description of the resource.
- display_
name str - edge_
cluster_ strpath - The path of the Edge cluster where this Tier-1 gateway is placed.
- id str
- path str
- The NSX path of the policy resource.
- context
Get
Policy Tier1Gateway Context
- description String
- The description of the resource.
- display
Name String - edge
Cluster StringPath - The path of the Edge cluster where this Tier-1 gateway is placed.
- id String
- path String
- The NSX path of the policy resource.
- context Property Map
Supporting Types
GetPolicyTier1GatewayContext
- Project
Id string - The ID of the project which the object belongs to
- Project
Id string - The ID of the project which the object belongs to
- project
Id String - The ID of the project which the object belongs to
- project
Id string - The ID of the project which the object belongs to
- project_
id str - The ID of the project which the object belongs to
- project
Id 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.