vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware
vcd.getNsxtNetworkContextProfile
Explore with Pulumi AI
Provides a data source for NSX-T Network Context Profile lookup to later be used in Distributed Firewall.
Example Usage
SYSTEM Scope Network Context Profile Lookup In A VDC Group)
import * as pulumi from "@pulumi/pulumi";
import * as vcd from "@pulumi/vcd";
const existing = vcd.getVdcGroup({
org: "my-org",
name: "main-vdc-group",
});
const cp1 = existing.then(existing => vcd.getNsxtNetworkContextProfile({
contextId: existing.id,
name: "CTRXICA",
scope: "SYSTEM",
}));
import pulumi
import pulumi_vcd as vcd
existing = vcd.get_vdc_group(org="my-org",
name="main-vdc-group")
cp1 = vcd.get_nsxt_network_context_profile(context_id=existing.id,
name="CTRXICA",
scope="SYSTEM")
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 {
existing, err := vcd.LookupVdcGroup(ctx, &vcd.LookupVdcGroupArgs{
Org: pulumi.StringRef("my-org"),
Name: pulumi.StringRef("main-vdc-group"),
}, nil)
if err != nil {
return err
}
_, err = vcd.GetNsxtNetworkContextProfile(ctx, &vcd.GetNsxtNetworkContextProfileArgs{
ContextId: existing.Id,
Name: "CTRXICA",
Scope: pulumi.StringRef("SYSTEM"),
}, 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 existing = Vcd.GetVdcGroup.Invoke(new()
{
Org = "my-org",
Name = "main-vdc-group",
});
var cp1 = Vcd.GetNsxtNetworkContextProfile.Invoke(new()
{
ContextId = existing.Apply(getVdcGroupResult => getVdcGroupResult.Id),
Name = "CTRXICA",
Scope = "SYSTEM",
});
});
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.GetNsxtNetworkContextProfileArgs;
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 existing = VcdFunctions.getVdcGroup(GetVdcGroupArgs.builder()
.org("my-org")
.name("main-vdc-group")
.build());
final var cp1 = VcdFunctions.getNsxtNetworkContextProfile(GetNsxtNetworkContextProfileArgs.builder()
.contextId(existing.applyValue(getVdcGroupResult -> getVdcGroupResult.id()))
.name("CTRXICA")
.scope("SYSTEM")
.build());
}
}
variables:
existing:
fn::invoke:
function: vcd:getVdcGroup
arguments:
org: my-org
name: main-vdc-group
cp1:
fn::invoke:
function: vcd:getNsxtNetworkContextProfile
arguments:
contextId: ${existing.id}
name: CTRXICA
scope: SYSTEM
SYSTEM Profile Lookup In An NSX-T Manager)
import * as pulumi from "@pulumi/pulumi";
import * as vcd from "@pulumi/vcd";
const main = vcd.getNsxtManager({
name: "first-nsxt-manager",
});
const nsxtNetworkContextProfile = main.then(main => vcd.getNsxtNetworkContextProfile({
contextId: main.id,
name: "CTRXICA",
scope: "SYSTEM",
}));
import pulumi
import pulumi_vcd as vcd
main = vcd.get_nsxt_manager(name="first-nsxt-manager")
nsxt_network_context_profile = vcd.get_nsxt_network_context_profile(context_id=main.id,
name="CTRXICA",
scope="SYSTEM")
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 {
main, err := vcd.GetNsxtManager(ctx, &vcd.GetNsxtManagerArgs{
Name: "first-nsxt-manager",
}, nil)
if err != nil {
return err
}
_, err = vcd.GetNsxtNetworkContextProfile(ctx, &vcd.GetNsxtNetworkContextProfileArgs{
ContextId: main.Id,
Name: "CTRXICA",
Scope: pulumi.StringRef("SYSTEM"),
}, 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 main = Vcd.GetNsxtManager.Invoke(new()
{
Name = "first-nsxt-manager",
});
var nsxtNetworkContextProfile = Vcd.GetNsxtNetworkContextProfile.Invoke(new()
{
ContextId = main.Apply(getNsxtManagerResult => getNsxtManagerResult.Id),
Name = "CTRXICA",
Scope = "SYSTEM",
});
});
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.GetNsxtManagerArgs;
import com.pulumi.vcd.inputs.GetNsxtNetworkContextProfileArgs;
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 main = VcdFunctions.getNsxtManager(GetNsxtManagerArgs.builder()
.name("first-nsxt-manager")
.build());
final var nsxtNetworkContextProfile = VcdFunctions.getNsxtNetworkContextProfile(GetNsxtNetworkContextProfileArgs.builder()
.contextId(main.applyValue(getNsxtManagerResult -> getNsxtManagerResult.id()))
.name("CTRXICA")
.scope("SYSTEM")
.build());
}
}
variables:
main:
fn::invoke:
function: vcd:getNsxtManager
arguments:
name: first-nsxt-manager
nsxtNetworkContextProfile:
fn::invoke:
function: vcd:getNsxtNetworkContextProfile
arguments:
contextId: ${main.id}
name: CTRXICA
scope: SYSTEM
Using getNsxtNetworkContextProfile
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 getNsxtNetworkContextProfile(args: GetNsxtNetworkContextProfileArgs, opts?: InvokeOptions): Promise<GetNsxtNetworkContextProfileResult>
function getNsxtNetworkContextProfileOutput(args: GetNsxtNetworkContextProfileOutputArgs, opts?: InvokeOptions): Output<GetNsxtNetworkContextProfileResult>
def get_nsxt_network_context_profile(context_id: Optional[str] = None,
id: Optional[str] = None,
name: Optional[str] = None,
scope: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetNsxtNetworkContextProfileResult
def get_nsxt_network_context_profile_output(context_id: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
scope: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetNsxtNetworkContextProfileResult]
func GetNsxtNetworkContextProfile(ctx *Context, args *GetNsxtNetworkContextProfileArgs, opts ...InvokeOption) (*GetNsxtNetworkContextProfileResult, error)
func GetNsxtNetworkContextProfileOutput(ctx *Context, args *GetNsxtNetworkContextProfileOutputArgs, opts ...InvokeOption) GetNsxtNetworkContextProfileResultOutput
> Note: This function is named GetNsxtNetworkContextProfile
in the Go SDK.
public static class GetNsxtNetworkContextProfile
{
public static Task<GetNsxtNetworkContextProfileResult> InvokeAsync(GetNsxtNetworkContextProfileArgs args, InvokeOptions? opts = null)
public static Output<GetNsxtNetworkContextProfileResult> Invoke(GetNsxtNetworkContextProfileInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetNsxtNetworkContextProfileResult> getNsxtNetworkContextProfile(GetNsxtNetworkContextProfileArgs args, InvokeOptions options)
public static Output<GetNsxtNetworkContextProfileResult> getNsxtNetworkContextProfile(GetNsxtNetworkContextProfileArgs args, InvokeOptions options)
fn::invoke:
function: vcd:index/getNsxtNetworkContextProfile:getNsxtNetworkContextProfile
arguments:
# arguments dictionary
The following arguments are supported:
- Context
Id string - Context ID specifies the context for Network Context Profile look up.
This ID can be one of
VDC Group ID
(data sourcevcd.VdcGroup
),Org VDC ID
(data sourcevcd.OrgVdc
), orNSX-T Manager ID
(data sourcevcd.getNsxtManager
) - Name string
- Name of Network Context Profile
- Id string
- Scope string
- Can be one of
SYSTEM
,TENANT
,PROVIDER
. (defaultSYSTEM
)
- Context
Id string - Context ID specifies the context for Network Context Profile look up.
This ID can be one of
VDC Group ID
(data sourcevcd.VdcGroup
),Org VDC ID
(data sourcevcd.OrgVdc
), orNSX-T Manager ID
(data sourcevcd.getNsxtManager
) - Name string
- Name of Network Context Profile
- Id string
- Scope string
- Can be one of
SYSTEM
,TENANT
,PROVIDER
. (defaultSYSTEM
)
- context
Id String - Context ID specifies the context for Network Context Profile look up.
This ID can be one of
VDC Group ID
(data sourcevcd.VdcGroup
),Org VDC ID
(data sourcevcd.OrgVdc
), orNSX-T Manager ID
(data sourcevcd.getNsxtManager
) - name String
- Name of Network Context Profile
- id String
- scope String
- Can be one of
SYSTEM
,TENANT
,PROVIDER
. (defaultSYSTEM
)
- context
Id string - Context ID specifies the context for Network Context Profile look up.
This ID can be one of
VDC Group ID
(data sourcevcd.VdcGroup
),Org VDC ID
(data sourcevcd.OrgVdc
), orNSX-T Manager ID
(data sourcevcd.getNsxtManager
) - name string
- Name of Network Context Profile
- id string
- scope string
- Can be one of
SYSTEM
,TENANT
,PROVIDER
. (defaultSYSTEM
)
- context_
id str - Context ID specifies the context for Network Context Profile look up.
This ID can be one of
VDC Group ID
(data sourcevcd.VdcGroup
),Org VDC ID
(data sourcevcd.OrgVdc
), orNSX-T Manager ID
(data sourcevcd.getNsxtManager
) - name str
- Name of Network Context Profile
- id str
- scope str
- Can be one of
SYSTEM
,TENANT
,PROVIDER
. (defaultSYSTEM
)
- context
Id String - Context ID specifies the context for Network Context Profile look up.
This ID can be one of
VDC Group ID
(data sourcevcd.VdcGroup
),Org VDC ID
(data sourcevcd.OrgVdc
), orNSX-T Manager ID
(data sourcevcd.getNsxtManager
) - name String
- Name of Network Context Profile
- id String
- scope String
- Can be one of
SYSTEM
,TENANT
,PROVIDER
. (defaultSYSTEM
)
getNsxtNetworkContextProfile Result
The following output properties are available:
- context_
id str - id str
- name str
- scope str
Package Details
- Repository
- vcd vmware/terraform-provider-vcd
- License
- Notes
- This Pulumi package is based on the
vcd
Terraform Provider.