1. Packages
  2. Nsxt Provider
  3. API Docs
  4. getPolicyProject
nsxt 3.8.0 published on Monday, Apr 14, 2025 by vmware

nsxt.getPolicyProject

Explore with Pulumi AI

This data source provides information about policy Project configured on NSX. This data source is applicable to NSX Policy Manager and VMC.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as nsxt from "@pulumi/nsxt";

const test = nsxt.getPolicyProject({
    displayName: "project1",
});
Copy
import pulumi
import pulumi_nsxt as nsxt

test = nsxt.get_policy_project(display_name="project1")
Copy
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.LookupPolicyProject(ctx, &nsxt.LookupPolicyProjectArgs{
			DisplayName: pulumi.StringRef("project1"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nsxt = Pulumi.Nsxt;

return await Deployment.RunAsync(() => 
{
    var test = Nsxt.GetPolicyProject.Invoke(new()
    {
        DisplayName = "project1",
    });

});
Copy
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 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.getPolicyProject(GetPolicyProjectArgs.builder()
            .displayName("project1")
            .build());

    }
}
Copy
variables:
  test:
    fn::invoke:
      function: nsxt:getPolicyProject
      arguments:
        displayName: project1
Copy

Using getPolicyProject

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 getPolicyProject(args: GetPolicyProjectArgs, opts?: InvokeOptions): Promise<GetPolicyProjectResult>
function getPolicyProjectOutput(args: GetPolicyProjectOutputArgs, opts?: InvokeOptions): Output<GetPolicyProjectResult>
Copy
def get_policy_project(description: Optional[str] = None,
                       display_name: Optional[str] = None,
                       id: Optional[str] = None,
                       short_id: Optional[str] = None,
                       site_infos: Optional[Sequence[GetPolicyProjectSiteInfo]] = None,
                       tier0_gateway_paths: Optional[Sequence[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> GetPolicyProjectResult
def get_policy_project_output(description: Optional[pulumi.Input[str]] = None,
                       display_name: Optional[pulumi.Input[str]] = None,
                       id: Optional[pulumi.Input[str]] = None,
                       short_id: Optional[pulumi.Input[str]] = None,
                       site_infos: Optional[pulumi.Input[Sequence[pulumi.Input[GetPolicyProjectSiteInfoArgs]]]] = None,
                       tier0_gateway_paths: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetPolicyProjectResult]
Copy
func LookupPolicyProject(ctx *Context, args *LookupPolicyProjectArgs, opts ...InvokeOption) (*LookupPolicyProjectResult, error)
func LookupPolicyProjectOutput(ctx *Context, args *LookupPolicyProjectOutputArgs, opts ...InvokeOption) LookupPolicyProjectResultOutput
Copy

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

public static class GetPolicyProject 
{
    public static Task<GetPolicyProjectResult> InvokeAsync(GetPolicyProjectArgs args, InvokeOptions? opts = null)
    public static Output<GetPolicyProjectResult> Invoke(GetPolicyProjectInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetPolicyProjectResult> getPolicyProject(GetPolicyProjectArgs args, InvokeOptions options)
public static Output<GetPolicyProjectResult> getPolicyProject(GetPolicyProjectArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: nsxt:index/getPolicyProject:getPolicyProject
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Description string
The description of the resource.
DisplayName string
The Display Name prefix of the Project to retrieve.
Id string
The ID of Project to retrieve. If ID is specified, no additional argument should be configured.
ShortId string
Defaults to id if id is less than equal to 8 characters or defaults to random generated id if not set.
SiteInfos List<GetPolicyProjectSiteInfo>
Information related to sites applicable for given Project.
Tier0GatewayPaths List<string>
The tier 0 has to be pre-created before Project is created.
Description string
The description of the resource.
DisplayName string
The Display Name prefix of the Project to retrieve.
Id string
The ID of Project to retrieve. If ID is specified, no additional argument should be configured.
ShortId string
Defaults to id if id is less than equal to 8 characters or defaults to random generated id if not set.
SiteInfos []GetPolicyProjectSiteInfo
Information related to sites applicable for given Project.
Tier0GatewayPaths []string
The tier 0 has to be pre-created before Project is created.
description String
The description of the resource.
displayName String
The Display Name prefix of the Project to retrieve.
id String
The ID of Project to retrieve. If ID is specified, no additional argument should be configured.
shortId String
Defaults to id if id is less than equal to 8 characters or defaults to random generated id if not set.
siteInfos List<GetPolicyProjectSiteInfo>
Information related to sites applicable for given Project.
tier0GatewayPaths List<String>
The tier 0 has to be pre-created before Project is created.
description string
The description of the resource.
displayName string
The Display Name prefix of the Project to retrieve.
id string
The ID of Project to retrieve. If ID is specified, no additional argument should be configured.
shortId string
Defaults to id if id is less than equal to 8 characters or defaults to random generated id if not set.
siteInfos GetPolicyProjectSiteInfo[]
Information related to sites applicable for given Project.
tier0GatewayPaths string[]
The tier 0 has to be pre-created before Project is created.
description str
The description of the resource.
display_name str
The Display Name prefix of the Project to retrieve.
id str
The ID of Project to retrieve. If ID is specified, no additional argument should be configured.
short_id str
Defaults to id if id is less than equal to 8 characters or defaults to random generated id if not set.
site_infos Sequence[GetPolicyProjectSiteInfo]
Information related to sites applicable for given Project.
tier0_gateway_paths Sequence[str]
The tier 0 has to be pre-created before Project is created.
description String
The description of the resource.
displayName String
The Display Name prefix of the Project to retrieve.
id String
The ID of Project to retrieve. If ID is specified, no additional argument should be configured.
shortId String
Defaults to id if id is less than equal to 8 characters or defaults to random generated id if not set.
siteInfos List<Property Map>
Information related to sites applicable for given Project.
tier0GatewayPaths List<String>
The tier 0 has to be pre-created before Project is created.

getPolicyProject Result

The following output properties are available:

Description string
The description of the resource.
DisplayName string
Id string
Path string
The NSX path of the policy resource.
ShortId string
Defaults to id if id is less than equal to 8 characters or defaults to random generated id if not set.
SiteInfos List<GetPolicyProjectSiteInfo>
Information related to sites applicable for given Project.
Tier0GatewayPaths List<string>
The tier 0 has to be pre-created before Project is created.
Description string
The description of the resource.
DisplayName string
Id string
Path string
The NSX path of the policy resource.
ShortId string
Defaults to id if id is less than equal to 8 characters or defaults to random generated id if not set.
SiteInfos []GetPolicyProjectSiteInfo
Information related to sites applicable for given Project.
Tier0GatewayPaths []string
The tier 0 has to be pre-created before Project is created.
description String
The description of the resource.
displayName String
id String
path String
The NSX path of the policy resource.
shortId String
Defaults to id if id is less than equal to 8 characters or defaults to random generated id if not set.
siteInfos List<GetPolicyProjectSiteInfo>
Information related to sites applicable for given Project.
tier0GatewayPaths List<String>
The tier 0 has to be pre-created before Project is created.
description string
The description of the resource.
displayName string
id string
path string
The NSX path of the policy resource.
shortId string
Defaults to id if id is less than equal to 8 characters or defaults to random generated id if not set.
siteInfos GetPolicyProjectSiteInfo[]
Information related to sites applicable for given Project.
tier0GatewayPaths string[]
The tier 0 has to be pre-created before Project is created.
description str
The description of the resource.
display_name str
id str
path str
The NSX path of the policy resource.
short_id str
Defaults to id if id is less than equal to 8 characters or defaults to random generated id if not set.
site_infos Sequence[GetPolicyProjectSiteInfo]
Information related to sites applicable for given Project.
tier0_gateway_paths Sequence[str]
The tier 0 has to be pre-created before Project is created.
description String
The description of the resource.
displayName String
id String
path String
The NSX path of the policy resource.
shortId String
Defaults to id if id is less than equal to 8 characters or defaults to random generated id if not set.
siteInfos List<Property Map>
Information related to sites applicable for given Project.
tier0GatewayPaths List<String>
The tier 0 has to be pre-created before Project is created.

Supporting Types

GetPolicyProjectSiteInfo

EdgeClusterPaths List<string>
The edge cluster on which the networking elements for the Org will be created.
SitePath string
This represents the path of the site which is managed by Global Manager. For the local manager, if set, this needs to point to 'default'.
EdgeClusterPaths []string
The edge cluster on which the networking elements for the Org will be created.
SitePath string
This represents the path of the site which is managed by Global Manager. For the local manager, if set, this needs to point to 'default'.
edgeClusterPaths List<String>
The edge cluster on which the networking elements for the Org will be created.
sitePath String
This represents the path of the site which is managed by Global Manager. For the local manager, if set, this needs to point to 'default'.
edgeClusterPaths string[]
The edge cluster on which the networking elements for the Org will be created.
sitePath string
This represents the path of the site which is managed by Global Manager. For the local manager, if set, this needs to point to 'default'.
edge_cluster_paths Sequence[str]
The edge cluster on which the networking elements for the Org will be created.
site_path str
This represents the path of the site which is managed by Global Manager. For the local manager, if set, this needs to point to 'default'.
edgeClusterPaths List<String>
The edge cluster on which the networking elements for the Org will be created.
sitePath String
This represents the path of the site which is managed by Global Manager. For the local manager, if set, this needs to point to 'default'.

Package Details

Repository
nsxt vmware/terraform-provider-nsxt
License
Notes
This Pulumi package is based on the nsxt Terraform Provider.