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

nsxt.getPolicyEdgeCluster

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 edge cluster configured on NSX.

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nsxt from "@pulumi/nsxt";
    
    const ec = nsxt.getPolicyEdgeCluster({
        displayName: "ec",
    });
    
    import pulumi
    import pulumi_nsxt as nsxt
    
    ec = nsxt.get_policy_edge_cluster(display_name="ec")
    
    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.GetPolicyEdgeCluster(ctx, &nsxt.GetPolicyEdgeClusterArgs{
    			DisplayName: pulumi.StringRef("ec"),
    		}, 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 ec = Nsxt.GetPolicyEdgeCluster.Invoke(new()
        {
            DisplayName = "ec",
        });
    
    });
    
    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.GetPolicyEdgeClusterArgs;
    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 ec = NsxtFunctions.getPolicyEdgeCluster(GetPolicyEdgeClusterArgs.builder()
                .displayName("ec")
                .build());
    
        }
    }
    
    variables:
      ec:
        fn::invoke:
          function: nsxt:getPolicyEdgeCluster
          arguments:
            displayName: ec
    

    Note: This usage is for Global Manager only.

    import * as pulumi from "@pulumi/pulumi";
    import * as nsxt from "@pulumi/nsxt";
    
    const paris = nsxt.getPolicySite({
        displayName: "Paris",
    });
    const gmEc = paris.then(paris => nsxt.getPolicyEdgeCluster({
        displayName: "ec",
        sitePath: paris.path,
    }));
    
    import pulumi
    import pulumi_nsxt as nsxt
    
    paris = nsxt.get_policy_site(display_name="Paris")
    gm_ec = nsxt.get_policy_edge_cluster(display_name="ec",
        site_path=paris.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 {
    		paris, err := nsxt.LookupPolicySite(ctx, &nsxt.LookupPolicySiteArgs{
    			DisplayName: pulumi.StringRef("Paris"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = nsxt.GetPolicyEdgeCluster(ctx, &nsxt.GetPolicyEdgeClusterArgs{
    			DisplayName: pulumi.StringRef("ec"),
    			SitePath:    pulumi.StringRef(paris.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 paris = Nsxt.GetPolicySite.Invoke(new()
        {
            DisplayName = "Paris",
        });
    
        var gmEc = Nsxt.GetPolicyEdgeCluster.Invoke(new()
        {
            DisplayName = "ec",
            SitePath = paris.Apply(getPolicySiteResult => getPolicySiteResult.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.GetPolicySiteArgs;
    import com.pulumi.nsxt.inputs.GetPolicyEdgeClusterArgs;
    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 paris = NsxtFunctions.getPolicySite(GetPolicySiteArgs.builder()
                .displayName("Paris")
                .build());
    
            final var gmEc = NsxtFunctions.getPolicyEdgeCluster(GetPolicyEdgeClusterArgs.builder()
                .displayName("ec")
                .sitePath(paris.applyValue(getPolicySiteResult -> getPolicySiteResult.path()))
                .build());
    
        }
    }
    
    variables:
      paris:
        fn::invoke:
          function: nsxt:getPolicySite
          arguments:
            displayName: Paris
      gmEc:
        fn::invoke:
          function: nsxt:getPolicyEdgeCluster
          arguments:
            displayName: ec
            sitePath: ${paris.path}
    

    Using getPolicyEdgeCluster

    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 getPolicyEdgeCluster(args: GetPolicyEdgeClusterArgs, opts?: InvokeOptions): Promise<GetPolicyEdgeClusterResult>
    function getPolicyEdgeClusterOutput(args: GetPolicyEdgeClusterOutputArgs, opts?: InvokeOptions): Output<GetPolicyEdgeClusterResult>
    def get_policy_edge_cluster(description: Optional[str] = None,
                                display_name: Optional[str] = None,
                                id: Optional[str] = None,
                                site_path: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetPolicyEdgeClusterResult
    def get_policy_edge_cluster_output(description: Optional[pulumi.Input[str]] = None,
                                display_name: Optional[pulumi.Input[str]] = None,
                                id: Optional[pulumi.Input[str]] = None,
                                site_path: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetPolicyEdgeClusterResult]
    func GetPolicyEdgeCluster(ctx *Context, args *GetPolicyEdgeClusterArgs, opts ...InvokeOption) (*GetPolicyEdgeClusterResult, error)
    func GetPolicyEdgeClusterOutput(ctx *Context, args *GetPolicyEdgeClusterOutputArgs, opts ...InvokeOption) GetPolicyEdgeClusterResultOutput

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

    public static class GetPolicyEdgeCluster 
    {
        public static Task<GetPolicyEdgeClusterResult> InvokeAsync(GetPolicyEdgeClusterArgs args, InvokeOptions? opts = null)
        public static Output<GetPolicyEdgeClusterResult> Invoke(GetPolicyEdgeClusterInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPolicyEdgeClusterResult> getPolicyEdgeCluster(GetPolicyEdgeClusterArgs args, InvokeOptions options)
    public static Output<GetPolicyEdgeClusterResult> getPolicyEdgeCluster(GetPolicyEdgeClusterArgs args, InvokeOptions options)
    
    fn::invoke:
      function: nsxt:index/getPolicyEdgeCluster:getPolicyEdgeCluster
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Description string
    The description of the resource.
    DisplayName string
    The Display Name prefix of the edge cluster to retrieve.
    Id string
    The ID of the edge cluster to retrieve.
    SitePath string
    The path of the site which the Edge Cluster belongs to, this configuration is required for global manager only. path field of the existing nsxt.PolicySite can be used here. If a single edge cluster is configured on site, id and display_name can be omitted in configuration, otherwise either of these is required to specify the desired cluster.
    Description string
    The description of the resource.
    DisplayName string
    The Display Name prefix of the edge cluster to retrieve.
    Id string
    The ID of the edge cluster to retrieve.
    SitePath string
    The path of the site which the Edge Cluster belongs to, this configuration is required for global manager only. path field of the existing nsxt.PolicySite can be used here. If a single edge cluster is configured on site, id and display_name can be omitted in configuration, otherwise either of these is required to specify the desired cluster.
    description String
    The description of the resource.
    displayName String
    The Display Name prefix of the edge cluster to retrieve.
    id String
    The ID of the edge cluster to retrieve.
    sitePath String
    The path of the site which the Edge Cluster belongs to, this configuration is required for global manager only. path field of the existing nsxt.PolicySite can be used here. If a single edge cluster is configured on site, id and display_name can be omitted in configuration, otherwise either of these is required to specify the desired cluster.
    description string
    The description of the resource.
    displayName string
    The Display Name prefix of the edge cluster to retrieve.
    id string
    The ID of the edge cluster to retrieve.
    sitePath string
    The path of the site which the Edge Cluster belongs to, this configuration is required for global manager only. path field of the existing nsxt.PolicySite can be used here. If a single edge cluster is configured on site, id and display_name can be omitted in configuration, otherwise either of these is required to specify the desired cluster.
    description str
    The description of the resource.
    display_name str
    The Display Name prefix of the edge cluster to retrieve.
    id str
    The ID of the edge cluster to retrieve.
    site_path str
    The path of the site which the Edge Cluster belongs to, this configuration is required for global manager only. path field of the existing nsxt.PolicySite can be used here. If a single edge cluster is configured on site, id and display_name can be omitted in configuration, otherwise either of these is required to specify the desired cluster.
    description String
    The description of the resource.
    displayName String
    The Display Name prefix of the edge cluster to retrieve.
    id String
    The ID of the edge cluster to retrieve.
    sitePath String
    The path of the site which the Edge Cluster belongs to, this configuration is required for global manager only. path field of the existing nsxt.PolicySite can be used here. If a single edge cluster is configured on site, id and display_name can be omitted in configuration, otherwise either of these is required to specify the desired cluster.

    getPolicyEdgeCluster 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.
    SitePath string
    Description string
    The description of the resource.
    DisplayName string
    Id string
    Path string
    The NSX path of the policy resource.
    SitePath string
    description String
    The description of the resource.
    displayName String
    id String
    path String
    The NSX path of the policy resource.
    sitePath String
    description string
    The description of the resource.
    displayName string
    id string
    path string
    The NSX path of the policy resource.
    sitePath string
    description str
    The description of the resource.
    display_name str
    id str
    path str
    The NSX path of the policy resource.
    site_path str
    description String
    The description of the resource.
    displayName String
    id String
    path String
    The NSX path of the policy resource.
    sitePath 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.8.1 published on Wednesday, Apr 30, 2025 by vmware