published on Monday, May 18, 2026 by vmware
published on Monday, May 18, 2026 by vmware
This data source provides a method for retrieving multiple Segment Ports based on filter criteria. Unlike the singular nsxt.PolicySegmentPort data source, this returns a list of segment ports matching the specified filters.
Example Usage
Get all segment ports for a specific segment
import * as pulumi from "@pulumi/pulumi";
import * as nsxt from "@pulumi/nsxt";
const segment1 = nsxt.getPolicySegment({
displayName: "segment1",
});
const allPorts = segment1.then(segment1 => nsxt.getPolicySegmentPorts({
segmentPath: segment1.path,
}));
export const portCount = allPorts.then(allPorts => allPorts.items).length;
export const firstPortId = allPorts.then(allPorts => allPorts.items?.[0]?.id);
import pulumi
import pulumi_nsxt as nsxt
segment1 = nsxt.get_policy_segment(display_name="segment1")
all_ports = nsxt.get_policy_segment_ports(segment_path=segment1.path)
pulumi.export("portCount", len(all_ports.items))
pulumi.export("firstPortId", all_ports.items[0].id)
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 {
segment1, err := nsxt.LookupPolicySegment(ctx, &nsxt.LookupPolicySegmentArgs{
DisplayName: pulumi.StringRef("segment1"),
}, nil)
if err != nil {
return err
}
allPorts, err := nsxt.GetPolicySegmentPorts(ctx, &nsxt.GetPolicySegmentPortsArgs{
SegmentPath: pulumi.StringRef(segment1.Path),
}, nil)
if err != nil {
return err
}
ctx.Export("portCount", len(allPorts.Items))
ctx.Export("firstPortId", allPorts.Items[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nsxt = Pulumi.Nsxt;
return await Deployment.RunAsync(() =>
{
var segment1 = Nsxt.GetPolicySegment.Invoke(new()
{
DisplayName = "segment1",
});
var allPorts = Nsxt.GetPolicySegmentPorts.Invoke(new()
{
SegmentPath = segment1.Apply(getPolicySegmentResult => getPolicySegmentResult.Path),
});
return new Dictionary<string, object?>
{
["portCount"] = allPorts.Apply(getPolicySegmentPortsResult => getPolicySegmentPortsResult.Items).Length,
["firstPortId"] = allPorts.Apply(getPolicySegmentPortsResult => getPolicySegmentPortsResult.Items[0]?.Id),
};
});
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.GetPolicySegmentArgs;
import com.pulumi.nsxt.inputs.GetPolicySegmentPortsArgs;
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 segment1 = NsxtFunctions.getPolicySegment(GetPolicySegmentArgs.builder()
.displayName("segment1")
.build());
final var allPorts = NsxtFunctions.getPolicySegmentPorts(GetPolicySegmentPortsArgs.builder()
.segmentPath(segment1.path())
.build());
ctx.export("portCount", allPorts.items().length());
ctx.export("firstPortId", allPorts.items()[0].id());
}
}
Example coming soon!
Example coming soon!
Get segment ports by segment path and display name
import * as pulumi from "@pulumi/pulumi";
import * as nsxt from "@pulumi/nsxt";
const segment1 = nsxt.getPolicySegment({
displayName: "segment1",
});
const filteredPorts = segment1.then(segment1 => nsxt.getPolicySegmentPorts({
segmentPath: segment1.path,
displayName: "web-server-port",
}));
import pulumi
import pulumi_nsxt as nsxt
segment1 = nsxt.get_policy_segment(display_name="segment1")
filtered_ports = nsxt.get_policy_segment_ports(segment_path=segment1.path,
display_name="web-server-port")
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 {
segment1, err := nsxt.LookupPolicySegment(ctx, &nsxt.LookupPolicySegmentArgs{
DisplayName: pulumi.StringRef("segment1"),
}, nil)
if err != nil {
return err
}
_, err = nsxt.GetPolicySegmentPorts(ctx, &nsxt.GetPolicySegmentPortsArgs{
SegmentPath: pulumi.StringRef(segment1.Path),
DisplayName: pulumi.StringRef("web-server-port"),
}, 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 segment1 = Nsxt.GetPolicySegment.Invoke(new()
{
DisplayName = "segment1",
});
var filteredPorts = Nsxt.GetPolicySegmentPorts.Invoke(new()
{
SegmentPath = segment1.Apply(getPolicySegmentResult => getPolicySegmentResult.Path),
DisplayName = "web-server-port",
});
});
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.GetPolicySegmentArgs;
import com.pulumi.nsxt.inputs.GetPolicySegmentPortsArgs;
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 segment1 = NsxtFunctions.getPolicySegment(GetPolicySegmentArgs.builder()
.displayName("segment1")
.build());
final var filteredPorts = NsxtFunctions.getPolicySegmentPorts(GetPolicySegmentPortsArgs.builder()
.segmentPath(segment1.path())
.displayName("web-server-port")
.build());
}
}
variables:
segment1:
fn::invoke:
function: nsxt:getPolicySegment
arguments:
displayName: segment1
filteredPorts:
fn::invoke:
function: nsxt:getPolicySegmentPorts
arguments:
segmentPath: ${segment1.path}
displayName: web-server-port
Example coming soon!
Get segment ports by VIF ID
import * as pulumi from "@pulumi/pulumi";
import * as nsxt from "@pulumi/nsxt";
const byVif = nsxt.getPolicySegmentPorts({
vifId: "50234567-abcd-1234-5678-123456789abc",
});
import pulumi
import pulumi_nsxt as nsxt
by_vif = nsxt.get_policy_segment_ports(vif_id="50234567-abcd-1234-5678-123456789abc")
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.GetPolicySegmentPorts(ctx, &nsxt.GetPolicySegmentPortsArgs{
VifId: pulumi.StringRef("50234567-abcd-1234-5678-123456789abc"),
}, 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 byVif = Nsxt.GetPolicySegmentPorts.Invoke(new()
{
VifId = "50234567-abcd-1234-5678-123456789abc",
});
});
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.GetPolicySegmentPortsArgs;
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 byVif = NsxtFunctions.getPolicySegmentPorts(GetPolicySegmentPortsArgs.builder()
.vifId("50234567-abcd-1234-5678-123456789abc")
.build());
}
}
variables:
byVif:
fn::invoke:
function: nsxt:getPolicySegmentPorts
arguments:
vifId: 50234567-abcd-1234-5678-123456789abc
Example coming soon!
Get segment ports by VIF ID and display name
import * as pulumi from "@pulumi/pulumi";
import * as nsxt from "@pulumi/nsxt";
// This will first filter by VIF ID, then filter the results by display name
const byVifAndName = nsxt.getPolicySegmentPorts({
vifId: "50234567-abcd-1234-5678-123456789abc",
displayName: "web-server-port",
});
import pulumi
import pulumi_nsxt as nsxt
# This will first filter by VIF ID, then filter the results by display name
by_vif_and_name = nsxt.get_policy_segment_ports(vif_id="50234567-abcd-1234-5678-123456789abc",
display_name="web-server-port")
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 {
// This will first filter by VIF ID, then filter the results by display name
_, err := nsxt.GetPolicySegmentPorts(ctx, &nsxt.GetPolicySegmentPortsArgs{
VifId: pulumi.StringRef("50234567-abcd-1234-5678-123456789abc"),
DisplayName: pulumi.StringRef("web-server-port"),
}, 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(() =>
{
// This will first filter by VIF ID, then filter the results by display name
var byVifAndName = Nsxt.GetPolicySegmentPorts.Invoke(new()
{
VifId = "50234567-abcd-1234-5678-123456789abc",
DisplayName = "web-server-port",
});
});
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.GetPolicySegmentPortsArgs;
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) {
// This will first filter by VIF ID, then filter the results by display name
final var byVifAndName = NsxtFunctions.getPolicySegmentPorts(GetPolicySegmentPortsArgs.builder()
.vifId("50234567-abcd-1234-5678-123456789abc")
.displayName("web-server-port")
.build());
}
}
variables:
# This will first filter by VIF ID, then filter the results by display name
byVifAndName:
fn::invoke:
function: nsxt:getPolicySegmentPorts
arguments:
vifId: 50234567-abcd-1234-5678-123456789abc
displayName: web-server-port
Example coming soon!
Get segment ports by VIF ID and segment path
import * as pulumi from "@pulumi/pulumi";
import * as nsxt from "@pulumi/nsxt";
const segment1 = nsxt.getPolicySegment({
displayName: "segment1",
});
// This will filter by both VIF ID and segment path
const byVifAndSegment = segment1.then(segment1 => nsxt.getPolicySegmentPorts({
vifId: "50234567-abcd-1234-5678-123456789abc",
segmentPath: segment1.path,
}));
import pulumi
import pulumi_nsxt as nsxt
segment1 = nsxt.get_policy_segment(display_name="segment1")
# This will filter by both VIF ID and segment path
by_vif_and_segment = nsxt.get_policy_segment_ports(vif_id="50234567-abcd-1234-5678-123456789abc",
segment_path=segment1.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 {
segment1, err := nsxt.LookupPolicySegment(ctx, &nsxt.LookupPolicySegmentArgs{
DisplayName: pulumi.StringRef("segment1"),
}, nil)
if err != nil {
return err
}
// This will filter by both VIF ID and segment path
_, err = nsxt.GetPolicySegmentPorts(ctx, &nsxt.GetPolicySegmentPortsArgs{
VifId: pulumi.StringRef("50234567-abcd-1234-5678-123456789abc"),
SegmentPath: pulumi.StringRef(segment1.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 segment1 = Nsxt.GetPolicySegment.Invoke(new()
{
DisplayName = "segment1",
});
// This will filter by both VIF ID and segment path
var byVifAndSegment = Nsxt.GetPolicySegmentPorts.Invoke(new()
{
VifId = "50234567-abcd-1234-5678-123456789abc",
SegmentPath = segment1.Apply(getPolicySegmentResult => getPolicySegmentResult.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.GetPolicySegmentArgs;
import com.pulumi.nsxt.inputs.GetPolicySegmentPortsArgs;
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 segment1 = NsxtFunctions.getPolicySegment(GetPolicySegmentArgs.builder()
.displayName("segment1")
.build());
// This will filter by both VIF ID and segment path
final var byVifAndSegment = NsxtFunctions.getPolicySegmentPorts(GetPolicySegmentPortsArgs.builder()
.vifId("50234567-abcd-1234-5678-123456789abc")
.segmentPath(segment1.path())
.build());
}
}
variables:
segment1:
fn::invoke:
function: nsxt:getPolicySegment
arguments:
displayName: segment1
# This will filter by both VIF ID and segment path
byVifAndSegment:
fn::invoke:
function: nsxt:getPolicySegmentPorts
arguments:
vifId: 50234567-abcd-1234-5678-123456789abc
segmentPath: ${segment1.path}
Example coming soon!
Get segment ports by display name only
import * as pulumi from "@pulumi/pulumi";
import * as nsxt from "@pulumi/nsxt";
// When only display_name is provided, behaves like the singular data source
const byName = nsxt.getPolicySegmentPorts({
displayName: "web-server-port",
});
import pulumi
import pulumi_nsxt as nsxt
# When only display_name is provided, behaves like the singular data source
by_name = nsxt.get_policy_segment_ports(display_name="web-server-port")
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 {
// When only display_name is provided, behaves like the singular data source
_, err := nsxt.GetPolicySegmentPorts(ctx, &nsxt.GetPolicySegmentPortsArgs{
DisplayName: pulumi.StringRef("web-server-port"),
}, 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(() =>
{
// When only display_name is provided, behaves like the singular data source
var byName = Nsxt.GetPolicySegmentPorts.Invoke(new()
{
DisplayName = "web-server-port",
});
});
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.GetPolicySegmentPortsArgs;
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) {
// When only display_name is provided, behaves like the singular data source
final var byName = NsxtFunctions.getPolicySegmentPorts(GetPolicySegmentPortsArgs.builder()
.displayName("web-server-port")
.build());
}
}
variables:
# When only display_name is provided, behaves like the singular data source
byName:
fn::invoke:
function: nsxt:getPolicySegmentPorts
arguments:
displayName: web-server-port
Example coming soon!
Multi-Tenancy
import * as pulumi from "@pulumi/pulumi";
import * as nsxt from "@pulumi/nsxt";
const demoproj = nsxt.getPolicyProject({
displayName: "demoproj",
});
const segment1 = demoproj.then(demoproj => nsxt.getPolicySegment({
context: {
projectId: demoproj.id,
},
displayName: "segment1",
}));
const ports = Promise.all([demoproj, segment1]).then(([demoproj, segment1]) => nsxt.getPolicySegmentPorts({
context: {
projectId: demoproj.id,
},
segmentPath: segment1.path,
}));
import pulumi
import pulumi_nsxt as nsxt
demoproj = nsxt.get_policy_project(display_name="demoproj")
segment1 = nsxt.get_policy_segment(context={
"project_id": demoproj.id,
},
display_name="segment1")
ports = nsxt.get_policy_segment_ports(context={
"project_id": demoproj.id,
},
segment_path=segment1.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 {
demoproj, err := nsxt.LookupPolicyProject(ctx, &nsxt.LookupPolicyProjectArgs{
DisplayName: pulumi.StringRef("demoproj"),
}, nil)
if err != nil {
return err
}
segment1, err := nsxt.LookupPolicySegment(ctx, &nsxt.LookupPolicySegmentArgs{
Context: nsxt.GetPolicySegmentContext{
ProjectId: pulumi.StringRef(demoproj.Id),
},
DisplayName: pulumi.StringRef("segment1"),
}, nil)
if err != nil {
return err
}
_, err = nsxt.GetPolicySegmentPorts(ctx, &nsxt.GetPolicySegmentPortsArgs{
Context: nsxt.GetPolicySegmentPortsContext{
ProjectId: pulumi.StringRef(demoproj.Id),
},
SegmentPath: pulumi.StringRef(segment1.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 demoproj = Nsxt.GetPolicyProject.Invoke(new()
{
DisplayName = "demoproj",
});
var segment1 = Nsxt.GetPolicySegment.Invoke(new()
{
Context = new Nsxt.Inputs.GetPolicySegmentContextInputArgs
{
ProjectId = demoproj.Apply(getPolicyProjectResult => getPolicyProjectResult.Id),
},
DisplayName = "segment1",
});
var ports = Nsxt.GetPolicySegmentPorts.Invoke(new()
{
Context = new Nsxt.Inputs.GetPolicySegmentPortsContextInputArgs
{
ProjectId = demoproj.Apply(getPolicyProjectResult => getPolicyProjectResult.Id),
},
SegmentPath = segment1.Apply(getPolicySegmentResult => getPolicySegmentResult.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.GetPolicyProjectArgs;
import com.pulumi.nsxt.inputs.GetPolicySegmentArgs;
import com.pulumi.nsxt.inputs.GetPolicySegmentContextArgs;
import com.pulumi.nsxt.inputs.GetPolicySegmentPortsArgs;
import com.pulumi.nsxt.inputs.GetPolicySegmentPortsContextArgs;
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 demoproj = NsxtFunctions.getPolicyProject(GetPolicyProjectArgs.builder()
.displayName("demoproj")
.build());
final var segment1 = NsxtFunctions.getPolicySegment(GetPolicySegmentArgs.builder()
.context(GetPolicySegmentContextArgs.builder()
.projectId(demoproj.id())
.build())
.displayName("segment1")
.build());
final var ports = NsxtFunctions.getPolicySegmentPorts(GetPolicySegmentPortsArgs.builder()
.context(GetPolicySegmentPortsContextArgs.builder()
.projectId(demoproj.id())
.build())
.segmentPath(segment1.path())
.build());
}
}
variables:
demoproj:
fn::invoke:
function: nsxt:getPolicyProject
arguments:
displayName: demoproj
segment1:
fn::invoke:
function: nsxt:getPolicySegment
arguments:
context:
projectId: ${demoproj.id}
displayName: segment1
ports:
fn::invoke:
function: nsxt:getPolicySegmentPorts
arguments:
context:
projectId: ${demoproj.id}
segmentPath: ${segment1.path}
Example coming soon!
Filter Priority
The data source applies filters in the following priority order:
- VIF ID - If
vif_idis set, it’s used as the primary filter. Results can be further filtered bysegment_pathand/ordisplay_name. - Segment Path - If
segment_pathis set (withoutvif_id), it filters ports by parent segment. Can be combined withdisplay_name. - Display Name - If only
display_nameis set, it searches all segment ports by display name.
Using getPolicySegmentPorts
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 getPolicySegmentPorts(args: GetPolicySegmentPortsArgs, opts?: InvokeOptions): Promise<GetPolicySegmentPortsResult>
function getPolicySegmentPortsOutput(args: GetPolicySegmentPortsOutputArgs, opts?: InvokeOptions): Output<GetPolicySegmentPortsResult>def get_policy_segment_ports(context: Optional[GetPolicySegmentPortsContext] = None,
display_name: Optional[str] = None,
id: Optional[str] = None,
segment_path: Optional[str] = None,
vif_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPolicySegmentPortsResult
def get_policy_segment_ports_output(context: pulumi.Input[Optional[GetPolicySegmentPortsContextArgs]] = None,
display_name: pulumi.Input[Optional[str]] = None,
id: pulumi.Input[Optional[str]] = None,
segment_path: pulumi.Input[Optional[str]] = None,
vif_id: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPolicySegmentPortsResult]func GetPolicySegmentPorts(ctx *Context, args *GetPolicySegmentPortsArgs, opts ...InvokeOption) (*GetPolicySegmentPortsResult, error)
func GetPolicySegmentPortsOutput(ctx *Context, args *GetPolicySegmentPortsOutputArgs, opts ...InvokeOption) GetPolicySegmentPortsResultOutput> Note: This function is named GetPolicySegmentPorts in the Go SDK.
public static class GetPolicySegmentPorts
{
public static Task<GetPolicySegmentPortsResult> InvokeAsync(GetPolicySegmentPortsArgs args, InvokeOptions? opts = null)
public static Output<GetPolicySegmentPortsResult> Invoke(GetPolicySegmentPortsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetPolicySegmentPortsResult> getPolicySegmentPorts(GetPolicySegmentPortsArgs args, InvokeOptions options)
public static Output<GetPolicySegmentPortsResult> getPolicySegmentPorts(GetPolicySegmentPortsArgs args, InvokeOptions options)
fn::invoke:
function: nsxt:index/getPolicySegmentPorts:getPolicySegmentPorts
arguments:
# arguments dictionarydata "nsxt_getpolicysegmentports" "name" {
# arguments
}The following arguments are supported:
- Context
Get
Policy Segment Ports Context - The context which the object belongs to
- Display
Name string Display name to filter segment ports. When used with
vif_id, filters the VIF results by display name. When used withsegment_path, filters the segment's ports by display name. When used alone, searches all segment ports by display name.NOTE: At least one of
vif_id,segment_path, ordisplay_namemust be specified.- Id string
- Unique identifier of the segment port.
- Segment
Path string - Segment path to filter segment ports. Can be combined with
vif_idordisplay_name. - Vif
Id string - Segment Port attachment ID to filter segment ports. This takes priority over other filters.
- Context
Get
Policy Segment Ports Context - The context which the object belongs to
- Display
Name string Display name to filter segment ports. When used with
vif_id, filters the VIF results by display name. When used withsegment_path, filters the segment's ports by display name. When used alone, searches all segment ports by display name.NOTE: At least one of
vif_id,segment_path, ordisplay_namemust be specified.- Id string
- Unique identifier of the segment port.
- Segment
Path string - Segment path to filter segment ports. Can be combined with
vif_idordisplay_name. - Vif
Id string - Segment Port attachment ID to filter segment ports. This takes priority over other filters.
- context object
- The context which the object belongs to
- display_
name string Display name to filter segment ports. When used with
vif_id, filters the VIF results by display name. When used withsegment_path, filters the segment's ports by display name. When used alone, searches all segment ports by display name.NOTE: At least one of
vif_id,segment_path, ordisplay_namemust be specified.- id string
- Unique identifier of the segment port.
- segment_
path string - Segment path to filter segment ports. Can be combined with
vif_idordisplay_name. - vif_
id string - Segment Port attachment ID to filter segment ports. This takes priority over other filters.
- context
Get
Policy Segment Ports Context - The context which the object belongs to
- display
Name String Display name to filter segment ports. When used with
vif_id, filters the VIF results by display name. When used withsegment_path, filters the segment's ports by display name. When used alone, searches all segment ports by display name.NOTE: At least one of
vif_id,segment_path, ordisplay_namemust be specified.- id String
- Unique identifier of the segment port.
- segment
Path String - Segment path to filter segment ports. Can be combined with
vif_idordisplay_name. - vif
Id String - Segment Port attachment ID to filter segment ports. This takes priority over other filters.
- context
Get
Policy Segment Ports Context - The context which the object belongs to
- display
Name string Display name to filter segment ports. When used with
vif_id, filters the VIF results by display name. When used withsegment_path, filters the segment's ports by display name. When used alone, searches all segment ports by display name.NOTE: At least one of
vif_id,segment_path, ordisplay_namemust be specified.- id string
- Unique identifier of the segment port.
- segment
Path string - Segment path to filter segment ports. Can be combined with
vif_idordisplay_name. - vif
Id string - Segment Port attachment ID to filter segment ports. This takes priority over other filters.
- context
Get
Policy Segment Ports Context - The context which the object belongs to
- display_
name str Display name to filter segment ports. When used with
vif_id, filters the VIF results by display name. When used withsegment_path, filters the segment's ports by display name. When used alone, searches all segment ports by display name.NOTE: At least one of
vif_id,segment_path, ordisplay_namemust be specified.- id str
- Unique identifier of the segment port.
- segment_
path str - Segment path to filter segment ports. Can be combined with
vif_idordisplay_name. - vif_
id str - Segment Port attachment ID to filter segment ports. This takes priority over other filters.
- context Property Map
- The context which the object belongs to
- display
Name String Display name to filter segment ports. When used with
vif_id, filters the VIF results by display name. When used withsegment_path, filters the segment's ports by display name. When used alone, searches all segment ports by display name.NOTE: At least one of
vif_id,segment_path, ordisplay_namemust be specified.- id String
- Unique identifier of the segment port.
- segment
Path String - Segment path to filter segment ports. Can be combined with
vif_idordisplay_name. - vif
Id String - Segment Port attachment ID to filter segment ports. This takes priority over other filters.
getPolicySegmentPorts Result
The following output properties are available:
- Id string
- Unique identifier of the segment port.
- Items
List<Get
Policy Segment Ports Item> - List of segment ports matching the filter criteria. Each item contains:
- Context
Get
Policy Segment Ports Context - Display
Name string - Display name of the segment port.
- Segment
Path string - Parent segment path of the segment port.
- Vif
Id string - VIF attachment ID of the segment port (if attached).
- Id string
- Unique identifier of the segment port.
- Items
[]Get
Policy Segment Ports Item - List of segment ports matching the filter criteria. Each item contains:
- Context
Get
Policy Segment Ports Context - Display
Name string - Display name of the segment port.
- Segment
Path string - Parent segment path of the segment port.
- Vif
Id string - VIF attachment ID of the segment port (if attached).
- id string
- Unique identifier of the segment port.
- items list(object)
- List of segment ports matching the filter criteria. Each item contains:
- context object
- display_
name string - Display name of the segment port.
- segment_
path string - Parent segment path of the segment port.
- vif_
id string - VIF attachment ID of the segment port (if attached).
- id String
- Unique identifier of the segment port.
- items
List<Get
Policy Segment Ports Item> - List of segment ports matching the filter criteria. Each item contains:
- context
Get
Policy Segment Ports Context - display
Name String - Display name of the segment port.
- segment
Path String - Parent segment path of the segment port.
- vif
Id String - VIF attachment ID of the segment port (if attached).
- id string
- Unique identifier of the segment port.
- items
Get
Policy Segment Ports Item[] - List of segment ports matching the filter criteria. Each item contains:
- context
Get
Policy Segment Ports Context - display
Name string - Display name of the segment port.
- segment
Path string - Parent segment path of the segment port.
- vif
Id string - VIF attachment ID of the segment port (if attached).
- id str
- Unique identifier of the segment port.
- items
Sequence[Get
Policy Segment Ports Item] - List of segment ports matching the filter criteria. Each item contains:
- context
Get
Policy Segment Ports Context - display_
name str - Display name of the segment port.
- segment_
path str - Parent segment path of the segment port.
- vif_
id str - VIF attachment ID of the segment port (if attached).
- id String
- Unique identifier of the segment port.
- items List<Property Map>
- List of segment ports matching the filter criteria. Each item contains:
- context Property Map
- display
Name String - Display name of the segment port.
- segment
Path String - Parent segment path of the segment port.
- vif
Id String - VIF attachment ID of the segment port (if attached).
Supporting Types
GetPolicySegmentPortsContext
- From
Global bool - Search among global resource
- Project
Id string - The ID of the project which the object belongs to
- From
Global bool - Search among global resource
- Project
Id string - The ID of the project which the object belongs to
- from_
global bool - Search among global resource
- project_
id string - The ID of the project which the object belongs to
- from
Global Boolean - Search among global resource
- project
Id String - The ID of the project which the object belongs to
- from
Global boolean - Search among global resource
- project
Id string - The ID of the project which the object belongs to
- from_
global bool - Search among global resource
- project_
id str - The ID of the project which the object belongs to
- from
Global Boolean - Search among global resource
- project
Id String - The ID of the project which the object belongs to
GetPolicySegmentPortsItem
- Description string
- Description of the segment port.
- Display
Name string Display name to filter segment ports. When used with
vif_id, filters the VIF results by display name. When used withsegment_path, filters the segment's ports by display name. When used alone, searches all segment ports by display name.NOTE: At least one of
vif_id,segment_path, ordisplay_namemust be specified.- Id string
- Unique identifier of the segment port.
- Path string
- Policy path of the segment port.
- Segment
Path string - Segment path to filter segment ports. Can be combined with
vif_idordisplay_name. - Vif
Id string - Segment Port attachment ID to filter segment ports. This takes priority over other filters.
- Description string
- Description of the segment port.
- Display
Name string Display name to filter segment ports. When used with
vif_id, filters the VIF results by display name. When used withsegment_path, filters the segment's ports by display name. When used alone, searches all segment ports by display name.NOTE: At least one of
vif_id,segment_path, ordisplay_namemust be specified.- Id string
- Unique identifier of the segment port.
- Path string
- Policy path of the segment port.
- Segment
Path string - Segment path to filter segment ports. Can be combined with
vif_idordisplay_name. - Vif
Id string - Segment Port attachment ID to filter segment ports. This takes priority over other filters.
- description string
- Description of the segment port.
- display_
name string Display name to filter segment ports. When used with
vif_id, filters the VIF results by display name. When used withsegment_path, filters the segment's ports by display name. When used alone, searches all segment ports by display name.NOTE: At least one of
vif_id,segment_path, ordisplay_namemust be specified.- id string
- Unique identifier of the segment port.
- path string
- Policy path of the segment port.
- segment_
path string - Segment path to filter segment ports. Can be combined with
vif_idordisplay_name. - vif_
id string - Segment Port attachment ID to filter segment ports. This takes priority over other filters.
- description String
- Description of the segment port.
- display
Name String Display name to filter segment ports. When used with
vif_id, filters the VIF results by display name. When used withsegment_path, filters the segment's ports by display name. When used alone, searches all segment ports by display name.NOTE: At least one of
vif_id,segment_path, ordisplay_namemust be specified.- id String
- Unique identifier of the segment port.
- path String
- Policy path of the segment port.
- segment
Path String - Segment path to filter segment ports. Can be combined with
vif_idordisplay_name. - vif
Id String - Segment Port attachment ID to filter segment ports. This takes priority over other filters.
- description string
- Description of the segment port.
- display
Name string Display name to filter segment ports. When used with
vif_id, filters the VIF results by display name. When used withsegment_path, filters the segment's ports by display name. When used alone, searches all segment ports by display name.NOTE: At least one of
vif_id,segment_path, ordisplay_namemust be specified.- id string
- Unique identifier of the segment port.
- path string
- Policy path of the segment port.
- segment
Path string - Segment path to filter segment ports. Can be combined with
vif_idordisplay_name. - vif
Id string - Segment Port attachment ID to filter segment ports. This takes priority over other filters.
- description str
- Description of the segment port.
- display_
name str Display name to filter segment ports. When used with
vif_id, filters the VIF results by display name. When used withsegment_path, filters the segment's ports by display name. When used alone, searches all segment ports by display name.NOTE: At least one of
vif_id,segment_path, ordisplay_namemust be specified.- id str
- Unique identifier of the segment port.
- path str
- Policy path of the segment port.
- segment_
path str - Segment path to filter segment ports. Can be combined with
vif_idordisplay_name. - vif_
id str - Segment Port attachment ID to filter segment ports. This takes priority over other filters.
- description String
- Description of the segment port.
- display
Name String Display name to filter segment ports. When used with
vif_id, filters the VIF results by display name. When used withsegment_path, filters the segment's ports by display name. When used alone, searches all segment ports by display name.NOTE: At least one of
vif_id,segment_path, ordisplay_namemust be specified.- id String
- Unique identifier of the segment port.
- path String
- Policy path of the segment port.
- segment
Path String - Segment path to filter segment ports. Can be combined with
vif_idordisplay_name. - vif
Id String - Segment Port attachment ID to filter segment ports. This takes priority over other filters.
Package Details
- Repository
- nsxt vmware/terraform-provider-nsxt
- License
- Notes
- This Pulumi package is based on the
nsxtTerraform Provider.
published on Monday, May 18, 2026 by vmware