vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware
vcd.getNsxtAppPortProfile
Explore with Pulumi AI
Supported in provider v3.3+ and VCD 10.1+ with NSX-T backed VDCs.
Provides a data source to read NSX-T Application Port Profiles. Application Port Profiles include a combination of a protocol and a port, or a group of ports, that is used for Firewall and NAT services on the Edge Gateway.
Example Usage
1 (Find An Application Port Profile Defined By Provider)
import * as pulumi from "@pulumi/pulumi";
import * as vcd from "@pulumi/vcd";
const custom = vcd.getNsxtAppPortProfile({
org: "System",
contextId: data.vcd_nsxt_manager.first.id,
name: "WINS",
scope: "PROVIDER",
});
import pulumi
import pulumi_vcd as vcd
custom = vcd.get_nsxt_app_port_profile(org="System",
context_id=data["vcd_nsxt_manager"]["first"]["id"],
name="WINS",
scope="PROVIDER")
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.LookupNsxtAppPortProfile(ctx, &vcd.LookupNsxtAppPortProfileArgs{
Org: pulumi.StringRef("System"),
ContextId: pulumi.StringRef(data.Vcd_nsxt_manager.First.Id),
Name: "WINS",
Scope: "PROVIDER",
}, 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 custom = Vcd.GetNsxtAppPortProfile.Invoke(new()
{
Org = "System",
ContextId = data.Vcd_nsxt_manager.First.Id,
Name = "WINS",
Scope = "PROVIDER",
});
});
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.GetNsxtAppPortProfileArgs;
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 custom = VcdFunctions.getNsxtAppPortProfile(GetNsxtAppPortProfileArgs.builder()
.org("System")
.contextId(data.vcd_nsxt_manager().first().id())
.name("WINS")
.scope("PROVIDER")
.build());
}
}
variables:
custom:
fn::invoke:
function: vcd:getNsxtAppPortProfile
arguments:
org: System
contextId: ${data.vcd_nsxt_manager.first.id}
name: WINS
scope: PROVIDER
2 (Find An Application Port Profile Defined By Tenant In A VDC Group)
import * as pulumi from "@pulumi/pulumi";
import * as vcd from "@pulumi/vcd";
const g1 = vcd.getVdcGroup({
org: "myOrg",
name: "myVDC",
});
const custom = g1.then(g1 => vcd.getNsxtAppPortProfile({
org: "my-org",
contextId: g1.id,
name: "SSH-custom",
scope: "TENANT",
}));
import pulumi
import pulumi_vcd as vcd
g1 = vcd.get_vdc_group(org="myOrg",
name="myVDC")
custom = vcd.get_nsxt_app_port_profile(org="my-org",
context_id=g1.id,
name="SSH-custom",
scope="TENANT")
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 {
g1, err := vcd.LookupVdcGroup(ctx, &vcd.LookupVdcGroupArgs{
Org: pulumi.StringRef("myOrg"),
Name: pulumi.StringRef("myVDC"),
}, nil)
if err != nil {
return err
}
_, err = vcd.LookupNsxtAppPortProfile(ctx, &vcd.LookupNsxtAppPortProfileArgs{
Org: pulumi.StringRef("my-org"),
ContextId: pulumi.StringRef(g1.Id),
Name: "SSH-custom",
Scope: "TENANT",
}, 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 g1 = Vcd.GetVdcGroup.Invoke(new()
{
Org = "myOrg",
Name = "myVDC",
});
var custom = Vcd.GetNsxtAppPortProfile.Invoke(new()
{
Org = "my-org",
ContextId = g1.Apply(getVdcGroupResult => getVdcGroupResult.Id),
Name = "SSH-custom",
Scope = "TENANT",
});
});
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.GetVdcGroupArgs;
import com.pulumi.vcd.inputs.GetNsxtAppPortProfileArgs;
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 g1 = VcdFunctions.getVdcGroup(GetVdcGroupArgs.builder()
.org("myOrg")
.name("myVDC")
.build());
final var custom = VcdFunctions.getNsxtAppPortProfile(GetNsxtAppPortProfileArgs.builder()
.org("my-org")
.contextId(g1.applyValue(getVdcGroupResult -> getVdcGroupResult.id()))
.name("SSH-custom")
.scope("TENANT")
.build());
}
}
variables:
g1:
fn::invoke:
function: vcd:getVdcGroup
arguments:
org: myOrg
name: myVDC
custom:
fn::invoke:
function: vcd:getNsxtAppPortProfile
arguments:
org: my-org
contextId: ${g1.id}
name: SSH-custom
scope: TENANT
3 (Find A System Defined Application Port Profile)
import * as pulumi from "@pulumi/pulumi";
import * as vcd from "@pulumi/vcd";
const vdc1 = vcd.getOrgVdc({
org: "myOrg",
name: "myVDC",
});
const custom = vdc1.then(vdc1 => vcd.getNsxtAppPortProfile({
contextId: vdc1.id,
scope: "SYSTEM",
name: "SSH",
}));
import pulumi
import pulumi_vcd as vcd
vdc1 = vcd.get_org_vdc(org="myOrg",
name="myVDC")
custom = vcd.get_nsxt_app_port_profile(context_id=vdc1.id,
scope="SYSTEM",
name="SSH")
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 {
vdc1, err := vcd.LookupOrgVdc(ctx, &vcd.LookupOrgVdcArgs{
Org: pulumi.StringRef("myOrg"),
Name: "myVDC",
}, nil)
if err != nil {
return err
}
_, err = vcd.LookupNsxtAppPortProfile(ctx, &vcd.LookupNsxtAppPortProfileArgs{
ContextId: pulumi.StringRef(vdc1.Id),
Scope: "SYSTEM",
Name: "SSH",
}, 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 vdc1 = Vcd.GetOrgVdc.Invoke(new()
{
Org = "myOrg",
Name = "myVDC",
});
var custom = Vcd.GetNsxtAppPortProfile.Invoke(new()
{
ContextId = vdc1.Apply(getOrgVdcResult => getOrgVdcResult.Id),
Scope = "SYSTEM",
Name = "SSH",
});
});
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.GetOrgVdcArgs;
import com.pulumi.vcd.inputs.GetNsxtAppPortProfileArgs;
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 vdc1 = VcdFunctions.getOrgVdc(GetOrgVdcArgs.builder()
.org("myOrg")
.name("myVDC")
.build());
final var custom = VcdFunctions.getNsxtAppPortProfile(GetNsxtAppPortProfileArgs.builder()
.contextId(vdc1.applyValue(getOrgVdcResult -> getOrgVdcResult.id()))
.scope("SYSTEM")
.name("SSH")
.build());
}
}
variables:
vdc1:
fn::invoke:
function: vcd:getOrgVdc
arguments:
org: myOrg
name: myVDC
custom:
fn::invoke:
function: vcd:getNsxtAppPortProfile
arguments:
contextId: ${vdc1.id}
scope: SYSTEM
name: SSH
Using getNsxtAppPortProfile
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 getNsxtAppPortProfile(args: GetNsxtAppPortProfileArgs, opts?: InvokeOptions): Promise<GetNsxtAppPortProfileResult>
function getNsxtAppPortProfileOutput(args: GetNsxtAppPortProfileOutputArgs, opts?: InvokeOptions): Output<GetNsxtAppPortProfileResult>
def get_nsxt_app_port_profile(context_id: Optional[str] = None,
id: Optional[str] = None,
name: Optional[str] = None,
nsxt_manager_id: Optional[str] = None,
org: Optional[str] = None,
scope: Optional[str] = None,
vdc: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetNsxtAppPortProfileResult
def get_nsxt_app_port_profile_output(context_id: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
nsxt_manager_id: Optional[pulumi.Input[str]] = None,
org: Optional[pulumi.Input[str]] = None,
scope: Optional[pulumi.Input[str]] = None,
vdc: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetNsxtAppPortProfileResult]
func LookupNsxtAppPortProfile(ctx *Context, args *LookupNsxtAppPortProfileArgs, opts ...InvokeOption) (*LookupNsxtAppPortProfileResult, error)
func LookupNsxtAppPortProfileOutput(ctx *Context, args *LookupNsxtAppPortProfileOutputArgs, opts ...InvokeOption) LookupNsxtAppPortProfileResultOutput
> Note: This function is named LookupNsxtAppPortProfile
in the Go SDK.
public static class GetNsxtAppPortProfile
{
public static Task<GetNsxtAppPortProfileResult> InvokeAsync(GetNsxtAppPortProfileArgs args, InvokeOptions? opts = null)
public static Output<GetNsxtAppPortProfileResult> Invoke(GetNsxtAppPortProfileInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetNsxtAppPortProfileResult> getNsxtAppPortProfile(GetNsxtAppPortProfileArgs args, InvokeOptions options)
public static Output<GetNsxtAppPortProfileResult> getNsxtAppPortProfile(GetNsxtAppPortProfileArgs args, InvokeOptions options)
fn::invoke:
function: vcd:index/getNsxtAppPortProfile:getNsxtAppPortProfile
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
- Unique name of existing Security Group.
- Scope string
SYSTEM
,PROVIDER
, orTENANT
.- Context
Id string - ID of NSX-T Manager, VDC or VDC Group. Replaces deprecated field
vdc
. Required if using more than one NSX-T Manager. - Id string
- Nsxt
Manager stringId - Org string
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- Vdc string
- The name of VDC to use, optional if defined at provider level.
Deprecated and replaced by
context_id
- Name string
- Unique name of existing Security Group.
- Scope string
SYSTEM
,PROVIDER
, orTENANT
.- Context
Id string - ID of NSX-T Manager, VDC or VDC Group. Replaces deprecated field
vdc
. Required if using more than one NSX-T Manager. - Id string
- Nsxt
Manager stringId - Org string
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- Vdc string
- The name of VDC to use, optional if defined at provider level.
Deprecated and replaced by
context_id
- name String
- Unique name of existing Security Group.
- scope String
SYSTEM
,PROVIDER
, orTENANT
.- context
Id String - ID of NSX-T Manager, VDC or VDC Group. Replaces deprecated field
vdc
. Required if using more than one NSX-T Manager. - id String
- nsxt
Manager StringId - org String
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- vdc String
- The name of VDC to use, optional if defined at provider level.
Deprecated and replaced by
context_id
- name string
- Unique name of existing Security Group.
- scope string
SYSTEM
,PROVIDER
, orTENANT
.- context
Id string - ID of NSX-T Manager, VDC or VDC Group. Replaces deprecated field
vdc
. Required if using more than one NSX-T Manager. - id string
- nsxt
Manager stringId - org string
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- vdc string
- The name of VDC to use, optional if defined at provider level.
Deprecated and replaced by
context_id
- name str
- Unique name of existing Security Group.
- scope str
SYSTEM
,PROVIDER
, orTENANT
.- context_
id str - ID of NSX-T Manager, VDC or VDC Group. Replaces deprecated field
vdc
. Required if using more than one NSX-T Manager. - id str
- nsxt_
manager_ strid - org str
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- vdc str
- The name of VDC to use, optional if defined at provider level.
Deprecated and replaced by
context_id
- name String
- Unique name of existing Security Group.
- scope String
SYSTEM
,PROVIDER
, orTENANT
.- context
Id String - ID of NSX-T Manager, VDC or VDC Group. Replaces deprecated field
vdc
. Required if using more than one NSX-T Manager. - id String
- nsxt
Manager StringId - org String
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- vdc String
- The name of VDC to use, optional if defined at provider level.
Deprecated and replaced by
context_id
getNsxtAppPortProfile Result
The following output properties are available:
- App
Ports List<GetNsxt App Port Profile App Port> - Context
Id string - Description string
- Id string
- Name string
- Scope string
- Nsxt
Manager stringId - Org string
- Vdc string
- App
Ports []GetNsxt App Port Profile App Port - Context
Id string - Description string
- Id string
- Name string
- Scope string
- Nsxt
Manager stringId - Org string
- Vdc string
- app
Ports List<GetNsxt App Port Profile App Port> - context
Id String - description String
- id String
- name String
- scope String
- nsxt
Manager StringId - org String
- vdc String
- app
Ports GetNsxt App Port Profile App Port[] - context
Id string - description string
- id string
- name string
- scope string
- nsxt
Manager stringId - org string
- vdc string
- app_
ports Sequence[GetNsxt App Port Profile App Port] - context_
id str - description str
- id str
- name str
- scope str
- nsxt_
manager_ strid - org str
- vdc str
- app
Ports List<Property Map> - context
Id String - description String
- id String
- name String
- scope String
- nsxt
Manager StringId - org String
- vdc String
Supporting Types
GetNsxtAppPortProfileAppPort
Package Details
- Repository
- vcd vmware/terraform-provider-vcd
- License
- Notes
- This Pulumi package is based on the
vcd
Terraform Provider.