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

nsxt.getPolicyProject

Explore with Pulumi AI

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

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nsxt from "@pulumi/nsxt";
    
    const test = nsxt.getPolicyProject({
        displayName: "project1",
    });
    
    import pulumi
    import pulumi_nsxt as nsxt
    
    test = nsxt.get_policy_project(display_name="project1")
    
    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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      test:
        fn::invoke:
          function: nsxt:getPolicyProject
          arguments:
            displayName: project1
    

    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>
    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,
                           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,
                           opts: Optional[InvokeOptions] = None) -> Output[GetPolicyProjectResult]
    func LookupPolicyProject(ctx *Context, args *LookupPolicyProjectArgs, opts ...InvokeOption) (*LookupPolicyProjectResult, error)
    func LookupPolicyProjectOutput(ctx *Context, args *LookupPolicyProjectOutputArgs, opts ...InvokeOption) LookupPolicyProjectResultOutput

    > 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)
    }
    public static CompletableFuture<GetPolicyProjectResult> getPolicyProject(GetPolicyProjectArgs args, InvokeOptions options)
    public static Output<GetPolicyProjectResult> getPolicyProject(GetPolicyProjectArgs args, InvokeOptions options)
    
    fn::invoke:
      function: nsxt:index/getPolicyProject:getPolicyProject
      arguments:
        # arguments dictionary

    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
    Unique ID used for logging.
    SiteInfos List<GetPolicyProjectSiteInfo>
    Information related to sites applicable for given Project.
    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
    Unique ID used for logging.
    SiteInfos []GetPolicyProjectSiteInfo
    Information related to sites applicable for given Project.
    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
    Unique ID used for logging.
    siteInfos List<GetPolicyProjectSiteInfo>
    Information related to sites applicable for given Project.
    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
    Unique ID used for logging.
    siteInfos GetPolicyProjectSiteInfo[]
    Information related to sites applicable for given Project.
    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
    Unique ID used for logging.
    site_infos Sequence[GetPolicyProjectSiteInfo]
    Information related to sites applicable for given Project.
    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
    Unique ID used for logging.
    siteInfos List<Property Map>
    Information related to sites applicable for given Project.

    getPolicyProject Result

    The following output properties are available:

    Description string
    The description of the resource.
    DisplayName string
    ExternalIpv4Blocks List<string>
    Policy paths of IPv4 blocks associated with the project.
    Id string
    Path string
    The NSX path of the policy resource.
    Tier0GatewayPaths List<string>
    Policy paths of Tier0 gateways associated with the project.
    ShortId string
    Unique ID used for logging.
    SiteInfos List<GetPolicyProjectSiteInfo>
    Information related to sites applicable for given Project.
    Description string
    The description of the resource.
    DisplayName string
    ExternalIpv4Blocks []string
    Policy paths of IPv4 blocks associated with the project.
    Id string
    Path string
    The NSX path of the policy resource.
    Tier0GatewayPaths []string
    Policy paths of Tier0 gateways associated with the project.
    ShortId string
    Unique ID used for logging.
    SiteInfos []GetPolicyProjectSiteInfo
    Information related to sites applicable for given Project.
    description String
    The description of the resource.
    displayName String
    externalIpv4Blocks List<String>
    Policy paths of IPv4 blocks associated with the project.
    id String
    path String
    The NSX path of the policy resource.
    tier0GatewayPaths List<String>
    Policy paths of Tier0 gateways associated with the project.
    shortId String
    Unique ID used for logging.
    siteInfos List<GetPolicyProjectSiteInfo>
    Information related to sites applicable for given Project.
    description string
    The description of the resource.
    displayName string
    externalIpv4Blocks string[]
    Policy paths of IPv4 blocks associated with the project.
    id string
    path string
    The NSX path of the policy resource.
    tier0GatewayPaths string[]
    Policy paths of Tier0 gateways associated with the project.
    shortId string
    Unique ID used for logging.
    siteInfos GetPolicyProjectSiteInfo[]
    Information related to sites applicable for given Project.
    description str
    The description of the resource.
    display_name str
    external_ipv4_blocks Sequence[str]
    Policy paths of IPv4 blocks associated with the project.
    id str
    path str
    The NSX path of the policy resource.
    tier0_gateway_paths Sequence[str]
    Policy paths of Tier0 gateways associated with the project.
    short_id str
    Unique ID used for logging.
    site_infos Sequence[GetPolicyProjectSiteInfo]
    Information related to sites applicable for given Project.
    description String
    The description of the resource.
    displayName String
    externalIpv4Blocks List<String>
    Policy paths of IPv4 blocks associated with the project.
    id String
    path String
    The NSX path of the policy resource.
    tier0GatewayPaths List<String>
    Policy paths of Tier0 gateways associated with the project.
    shortId String
    Unique ID used for logging.
    siteInfos List<Property Map>
    Information related to sites applicable for given Project.

    Supporting Types

    GetPolicyProjectSiteInfo

    EdgeClusterPaths List<string>
    The edge cluster on which the networking elements for the Org are be created.
    SitePath string
    This represents the path of the site which is managed by Global Manager. For the local manager the value would be 'default'.
    EdgeClusterPaths []string
    The edge cluster on which the networking elements for the Org are be created.
    SitePath string
    This represents the path of the site which is managed by Global Manager. For the local manager the value would be 'default'.
    edgeClusterPaths List<String>
    The edge cluster on which the networking elements for the Org are be created.
    sitePath String
    This represents the path of the site which is managed by Global Manager. For the local manager the value would be 'default'.
    edgeClusterPaths string[]
    The edge cluster on which the networking elements for the Org are be created.
    sitePath string
    This represents the path of the site which is managed by Global Manager. For the local manager the value would be 'default'.
    edge_cluster_paths Sequence[str]
    The edge cluster on which the networking elements for the Org are be created.
    site_path str
    This represents the path of the site which is managed by Global Manager. For the local manager the value would be 'default'.
    edgeClusterPaths List<String>
    The edge cluster on which the networking elements for the Org are be created.
    sitePath String
    This represents the path of the site which is managed by Global Manager. For the local manager the value would be 'default'.

    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