vcd.getNsxvApplicationFinder
Explore with Pulumi AI
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:
- Search
Expression 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
- Vdc
Id string - The ID of VDC to use
- Case
Sensitive bool - Makes the search case-sensitive. By default, it is false
- Id string
- Search
Expression 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
- Vdc
Id string - The ID of VDC to use
- Case
Sensitive bool - Makes the search case-sensitive. By default, it is false
- Id string
- search
Expression 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
- vdc
Id String - The ID of VDC to use
- case
Sensitive Boolean - Makes the search case-sensitive. By default, it is false
- id String
- search
Expression 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
- vdc
Id string - The ID of VDC to use
- case
Sensitive 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
- search
Expression 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
- vdc
Id String - The ID of VDC to use
- case
Sensitive 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<Get
Nsxv Application Finder Object> - A list of objects found by the search expression. Each one contains the following properties:
- Search
Expression string - Type string
- the type of the object (
Application
orApplicationGroup
) - Vdc
Id string - Case
Sensitive bool
- Id string
- Objects
[]Get
Nsxv Application Finder Object - A list of objects found by the search expression. Each one contains the following properties:
- Search
Expression string - Type string
- the type of the object (
Application
orApplicationGroup
) - Vdc
Id string - Case
Sensitive bool
- id String
- objects
List<Get
Nsxv Application Finder Object> - A list of objects found by the search expression. Each one contains the following properties:
- search
Expression String - type String
- the type of the object (
Application
orApplicationGroup
) - vdc
Id String - case
Sensitive Boolean
- id string
- objects
Get
Nsxv Application Finder Object[] - A list of objects found by the search expression. Each one contains the following properties:
- search
Expression string - type string
- the type of the object (
Application
orApplicationGroup
) - vdc
Id string - case
Sensitive boolean
- id str
- objects
Sequence[Get
Nsxv Application Finder Object] - 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
orApplicationGroup
) - 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:
- search
Expression String - type String
- the type of the object (
Application
orApplicationGroup
) - vdc
Id String - case
Sensitive Boolean
Supporting Types
GetNsxvApplicationFinderObject
Package Details
- Repository
- vcd vmware/terraform-provider-vcd
- License
- Notes
- This Pulumi package is based on the
vcd
Terraform Provider.