1. Packages
  2. Vcd Provider
  3. API Docs
  4. getNsxvApplicationFinder
vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware

vcd.getNsxvApplicationFinder

Explore with Pulumi AI

vcd logo
vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware

    Provides a VMware Cloud Director NSX-V distributed firewall applications and application groups finder used to retrieve existing ones by regular expressions.

    Supported in provider v3.9+

    Example Usage

    2

    import * as pulumi from "@pulumi/pulumi";
    import * as vcd from "@pulumi/vcd";
    
    const applications = vcd.getNsxvApplicationFinder({
        vdcId: data.vcd_org_vdc["my-vdc"].id,
        searchExpression: "dns",
        caseSensitive: false,
        type: "application",
    });
    
    import pulumi
    import pulumi_vcd as vcd
    
    applications = vcd.get_nsxv_application_finder(vdc_id=data["vcd_org_vdc"]["my-vdc"]["id"],
        search_expression="dns",
        case_sensitive=False,
        type="application")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vcd/v3/vcd"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vcd.GetNsxvApplicationFinder(ctx, &vcd.GetNsxvApplicationFinderArgs{
    			VdcId:            data.Vcd_org_vdc.MyVdc.Id,
    			SearchExpression: "dns",
    			CaseSensitive:    pulumi.BoolRef(false),
    			Type:             "application",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vcd = Pulumi.Vcd;
    
    return await Deployment.RunAsync(() => 
    {
        var applications = Vcd.GetNsxvApplicationFinder.Invoke(new()
        {
            VdcId = data.Vcd_org_vdc.My_vdc.Id,
            SearchExpression = "dns",
            CaseSensitive = false,
            Type = "application",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vcd.VcdFunctions;
    import com.pulumi.vcd.inputs.GetNsxvApplicationFinderArgs;
    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 applications = VcdFunctions.getNsxvApplicationFinder(GetNsxvApplicationFinderArgs.builder()
                .vdcId(data.vcd_org_vdc().my-vdc().id())
                .searchExpression("dns")
                .caseSensitive(false)
                .type("application")
                .build());
    
        }
    }
    
    variables:
      applications:
        fn::invoke:
          function: vcd:getNsxvApplicationFinder
          arguments:
            vdcId: ${data.vcd_org_vdc"my-vdc"[%!s(MISSING)].id}
            searchExpression: dns
            caseSensitive: false
            type: application
    

    Sample output:

    applications = {
      "case_sensitive" = false
      "id" = "urn:vcloud:vdc:e5680ceb-1c15-48a8-9a54-e0bbc6fe909f"
      "objects" = toset([
        {
          "name" = "APP_DNS"
          "type" = "Application"
          "value" = "application-297"
        },
        {
          "name" = "DNS"
          "type" = "Application"
          "value" = "application-136"
        },
        {
          "name" = "DNS-UDP"
          "type" = "Application"
          "value" = "application-286"
        },
      ])
      "search_expression" = "dns"
      "type" = "application"
      "vdc_id" = "urn:vcloud:vdc:e5680ceb-1c15-48a8-9a54-e0bbc6fe909f"
    }
    

    Search expressions

    To search for an application or application group, we can use simple or complex regular expressions. The expressions in this data source follow the PCRE standard.

    A simple regular expression is a (short) text that we expect to find within the application name. For example, the expression sql will find, among others, Oracle i*SQLPlus and MSSQL Server Database Engine, because the search, by default, ignores the case of the searched text.

    A more complex regular expression could use meta-characters and regular expression directives to search more precisely. For example, the expression ^server tells the search to find a name that starts (^) with “server”, thus finding “Server Message Block (SMB)” (starts with server), but not “SAP MDM Server” (where server is not at the beginning of the name).

    If we want to search with even more accuracy, we could set the property case_sensitive = true, where the case of the text matters. Thus, searching for VMware would find VMware-SRM-Replication and VMware-VCO-Messaging, but not Vmware-VC-WebAccess (lowercase m after V).

    Using getNsxvApplicationFinder

    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 getNsxvApplicationFinder(args: GetNsxvApplicationFinderArgs, opts?: InvokeOptions): Promise<GetNsxvApplicationFinderResult>
    function getNsxvApplicationFinderOutput(args: GetNsxvApplicationFinderOutputArgs, opts?: InvokeOptions): Output<GetNsxvApplicationFinderResult>
    def get_nsxv_application_finder(case_sensitive: Optional[bool] = None,
                                    id: Optional[str] = None,
                                    search_expression: Optional[str] = None,
                                    type: Optional[str] = None,
                                    vdc_id: Optional[str] = None,
                                    opts: Optional[InvokeOptions] = None) -> GetNsxvApplicationFinderResult
    def get_nsxv_application_finder_output(case_sensitive: Optional[pulumi.Input[bool]] = None,
                                    id: Optional[pulumi.Input[str]] = None,
                                    search_expression: Optional[pulumi.Input[str]] = None,
                                    type: Optional[pulumi.Input[str]] = None,
                                    vdc_id: Optional[pulumi.Input[str]] = None,
                                    opts: Optional[InvokeOptions] = None) -> Output[GetNsxvApplicationFinderResult]
    func GetNsxvApplicationFinder(ctx *Context, args *GetNsxvApplicationFinderArgs, opts ...InvokeOption) (*GetNsxvApplicationFinderResult, error)
    func GetNsxvApplicationFinderOutput(ctx *Context, args *GetNsxvApplicationFinderOutputArgs, opts ...InvokeOption) GetNsxvApplicationFinderResultOutput

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

    public static class GetNsxvApplicationFinder 
    {
        public static Task<GetNsxvApplicationFinderResult> InvokeAsync(GetNsxvApplicationFinderArgs args, InvokeOptions? opts = null)
        public static Output<GetNsxvApplicationFinderResult> Invoke(GetNsxvApplicationFinderInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNsxvApplicationFinderResult> getNsxvApplicationFinder(GetNsxvApplicationFinderArgs args, InvokeOptions options)
    public static Output<GetNsxvApplicationFinderResult> getNsxvApplicationFinder(GetNsxvApplicationFinderArgs args, InvokeOptions options)
    
    fn::invoke:
      function: vcd:index/getNsxvApplicationFinder:getNsxvApplicationFinder
      arguments:
        # arguments dictionary

    The following arguments are supported:

    SearchExpression string
    The regular expression that will be used to search the applications. See Search Expressions below
    Type string
    What kind of application we seek. One of application, application_group
    VdcId string
    The ID of VDC to use
    CaseSensitive bool
    Makes the search case-sensitive. By default, it is false
    Id string
    SearchExpression string
    The regular expression that will be used to search the applications. See Search Expressions below
    Type string
    What kind of application we seek. One of application, application_group
    VdcId string
    The ID of VDC to use
    CaseSensitive bool
    Makes the search case-sensitive. By default, it is false
    Id string
    searchExpression String
    The regular expression that will be used to search the applications. See Search Expressions below
    type String
    What kind of application we seek. One of application, application_group
    vdcId String
    The ID of VDC to use
    caseSensitive Boolean
    Makes the search case-sensitive. By default, it is false
    id String
    searchExpression string
    The regular expression that will be used to search the applications. See Search Expressions below
    type string
    What kind of application we seek. One of application, application_group
    vdcId string
    The ID of VDC to use
    caseSensitive boolean
    Makes the search case-sensitive. By default, it is false
    id string
    search_expression str
    The regular expression that will be used to search the applications. See Search Expressions below
    type str
    What kind of application we seek. One of application, application_group
    vdc_id str
    The ID of VDC to use
    case_sensitive bool
    Makes the search case-sensitive. By default, it is false
    id str
    searchExpression String
    The regular expression that will be used to search the applications. See Search Expressions below
    type String
    What kind of application we seek. One of application, application_group
    vdcId String
    The ID of VDC to use
    caseSensitive Boolean
    Makes the search case-sensitive. By default, it is false
    id String

    getNsxvApplicationFinder Result

    The following output properties are available:

    Id string
    Objects List<GetNsxvApplicationFinderObject>
    A list of objects found by the search expression. Each one contains the following properties:
    SearchExpression string
    Type string
    the type of the object (Application or ApplicationGroup)
    VdcId string
    CaseSensitive bool
    Id string
    Objects []GetNsxvApplicationFinderObject
    A list of objects found by the search expression. Each one contains the following properties:
    SearchExpression string
    Type string
    the type of the object (Application or ApplicationGroup)
    VdcId string
    CaseSensitive bool
    id String
    objects List<GetNsxvApplicationFinderObject>
    A list of objects found by the search expression. Each one contains the following properties:
    searchExpression String
    type String
    the type of the object (Application or ApplicationGroup)
    vdcId String
    caseSensitive Boolean
    id string
    objects GetNsxvApplicationFinderObject[]
    A list of objects found by the search expression. Each one contains the following properties:
    searchExpression string
    type string
    the type of the object (Application or ApplicationGroup)
    vdcId string
    caseSensitive boolean
    id str
    objects Sequence[GetNsxvApplicationFinderObject]
    A list of objects found by the search expression. Each one contains the following properties:
    search_expression str
    type str
    the type of the object (Application or ApplicationGroup)
    vdc_id str
    case_sensitive bool
    id String
    objects List<Property Map>
    A list of objects found by the search expression. Each one contains the following properties:
    searchExpression String
    type String
    the type of the object (Application or ApplicationGroup)
    vdcId String
    caseSensitive Boolean

    Supporting Types

    GetNsxvApplicationFinderObject

    Name string
    The name of the object
    Type string
    What kind of application we seek. One of application, application_group
    Value string
    The identifier of the object
    Name string
    The name of the object
    Type string
    What kind of application we seek. One of application, application_group
    Value string
    The identifier of the object
    name String
    The name of the object
    type String
    What kind of application we seek. One of application, application_group
    value String
    The identifier of the object
    name string
    The name of the object
    type string
    What kind of application we seek. One of application, application_group
    value string
    The identifier of the object
    name str
    The name of the object
    type str
    What kind of application we seek. One of application, application_group
    value str
    The identifier of the object
    name String
    The name of the object
    type String
    What kind of application we seek. One of application, application_group
    value String
    The identifier of the object

    Package Details

    Repository
    vcd vmware/terraform-provider-vcd
    License
    Notes
    This Pulumi package is based on the vcd Terraform Provider.
    vcd logo
    vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware