1. Registry
  2. Packages
  3. Nsxt Provider
  4. API Docs
  5. getPolicyGroupBaremetalServerMembers
Viewing docs for nsxt 3.12.1
published on Friday, Sep 11, 2026 by vmware
Viewing docs for nsxt 3.12.1
published on Friday, Sep 11, 2026 by vmware

    This data source provides a way to list effective bare metal server members that belong to a specific NSX-T policy group. This API is applicable only for groups containing BMS member type. For groups containing other member types, it returns an empty list.

    This data source is applicable to NSX Policy Manager and requires NSX-T version 9.0.0 or higher (Bare Metal Server support)

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nsxt from "@pulumi/nsxt";
    
    const example = nsxt.getPolicyGroupBaremetalServerMembers({
        domain: "default",
        groupId: "bms-group-id",
    });
    export const bmsMembers = example.then(example => example.items);
    
    import pulumi
    import pulumi_nsxt as nsxt
    
    example = nsxt.get_policy_group_baremetal_server_members(domain="default",
        group_id="bms-group-id")
    pulumi.export("bmsMembers", example.items)
    
    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 {
    		example, err := nsxt.GetPolicyGroupBaremetalServerMembers(ctx, &nsxt.GetPolicyGroupBaremetalServerMembersArgs{
    			Domain:  pulumi.StringRef("default"),
    			GroupId: "bms-group-id",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("bmsMembers", example.Items)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nsxt = Pulumi.Nsxt;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Nsxt.GetPolicyGroupBaremetalServerMembers.Invoke(new()
        {
            Domain = "default",
            GroupId = "bms-group-id",
        });
    
        return new Dictionary<string, object?>
        {
            ["bmsMembers"] = example.Apply(getPolicyGroupBaremetalServerMembersResult => getPolicyGroupBaremetalServerMembersResult.Items),
        };
    });
    
    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.GetPolicyGroupBaremetalServerMembersArgs;
    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 example = NsxtFunctions.getPolicyGroupBaremetalServerMembers(GetPolicyGroupBaremetalServerMembersArgs.builder()
                .domain("default")
                .groupId("bms-group-id")
                .build());
    
            ctx.export("bmsMembers", example.items());
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: nsxt:getPolicyGroupBaremetalServerMembers
          arguments:
            domain: default
            groupId: bms-group-id
    outputs:
      bmsMembers: ${example.items}
    
    Example coming soon!
    

    With Group Reference

    import * as pulumi from "@pulumi/pulumi";
    import * as nsxt from "@pulumi/nsxt";
    
    const bmsGroup = new nsxt.PolicyGroup("bms_group", {
        displayName: "bms-static-group",
        description: "Group for bare metal servers",
        groupType: "BareMetalServer",
        criterias: [{
            externalIdExpressions: [{
                memberType: "BareMetalServer",
                externalIds: ["71be0142-2ed1-1d53-9c60-5564cf4b7e2e"],
            }],
        }],
    });
    const bmsMembers = nsxt.getPolicyGroupBaremetalServerMembersOutput({
        domain: "default",
        groupId: bmsGroup.policyGroupId,
    });
    
    import pulumi
    import pulumi_nsxt as nsxt
    
    bms_group = nsxt.PolicyGroup("bms_group",
        display_name="bms-static-group",
        description="Group for bare metal servers",
        group_type="BareMetalServer",
        criterias=[{
            "external_id_expressions": [{
                "member_type": "BareMetalServer",
                "external_ids": ["71be0142-2ed1-1d53-9c60-5564cf4b7e2e"],
            }],
        }])
    bms_members = nsxt.get_policy_group_baremetal_server_members_output(domain="default",
        group_id=bms_group.policy_group_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 {
    		bmsGroup, err := nsxt.NewPolicyGroup(ctx, "bms_group", &nsxt.PolicyGroupArgs{
    			DisplayName: pulumi.String("bms-static-group"),
    			Description: pulumi.String("Group for bare metal servers"),
    			GroupType:   pulumi.String("BareMetalServer"),
    			Criterias: nsxt.PolicyGroupCriteriaArray{
    				&nsxt.PolicyGroupCriteriaArgs{
    					ExternalIdExpressions: nsxt.PolicyGroupCriteriaExternalIdExpressionArray{
    						&nsxt.PolicyGroupCriteriaExternalIdExpressionArgs{
    							MemberType: pulumi.String("BareMetalServer"),
    							ExternalIds: pulumi.StringArray{
    								pulumi.String("71be0142-2ed1-1d53-9c60-5564cf4b7e2e"),
    							},
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_ = nsxt.GetPolicyGroupBaremetalServerMembersOutput(ctx, nsxt.GetPolicyGroupBaremetalServerMembersOutputArgs{
    			Domain:  pulumi.String("default"),
    			GroupId: bmsGroup.PolicyGroupId,
    		}, nil)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nsxt = Pulumi.Nsxt;
    
    return await Deployment.RunAsync(() => 
    {
        var bmsGroup = new Nsxt.PolicyGroup("bms_group", new()
        {
            DisplayName = "bms-static-group",
            Description = "Group for bare metal servers",
            GroupType = "BareMetalServer",
            Criterias = new[]
            {
                new Nsxt.Inputs.PolicyGroupCriteriaArgs
                {
                    ExternalIdExpressions = new[]
                    {
                        new Nsxt.Inputs.PolicyGroupCriteriaExternalIdExpressionArgs
                        {
                            MemberType = "BareMetalServer",
                            ExternalIds = new[]
                            {
                                "71be0142-2ed1-1d53-9c60-5564cf4b7e2e",
                            },
                        },
                    },
                },
            },
        });
    
        var bmsMembers = Nsxt.GetPolicyGroupBaremetalServerMembers.Invoke(new()
        {
            Domain = "default",
            GroupId = bmsGroup.PolicyGroupId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.nsxt.PolicyGroup;
    import com.pulumi.nsxt.PolicyGroupArgs;
    import com.pulumi.nsxt.inputs.PolicyGroupCriteriaArgs;
    import com.pulumi.nsxt.NsxtFunctions;
    import com.pulumi.nsxt.inputs.GetPolicyGroupBaremetalServerMembersArgs;
    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) {
            var bmsGroup = new PolicyGroup("bmsGroup", PolicyGroupArgs.builder()
                .displayName("bms-static-group")
                .description("Group for bare metal servers")
                .groupType("BareMetalServer")
                .criterias(PolicyGroupCriteriaArgs.builder()
                    .externalIdExpressions(PolicyGroupCriteriaExternalIdExpressionArgs.builder()
                        .memberType("BareMetalServer")
                        .externalIds("71be0142-2ed1-1d53-9c60-5564cf4b7e2e")
                        .build())
                    .build())
                .build());
    
            final var bmsMembers = NsxtFunctions.getPolicyGroupBaremetalServerMembers(GetPolicyGroupBaremetalServerMembersArgs.builder()
                .domain("default")
                .groupId(bmsGroup.policyGroupId())
                .build());
    
        }
    }
    
    resources:
      bmsGroup:
        type: nsxt:PolicyGroup
        name: bms_group
        properties:
          displayName: bms-static-group
          description: Group for bare metal servers
          groupType: BareMetalServer
          criterias:
            - externalIdExpressions:
                - memberType: BareMetalServer
                  externalIds:
                    - 71be0142-2ed1-1d53-9c60-5564cf4b7e2e
    variables:
      bmsMembers:
        fn::invoke:
          function: nsxt:getPolicyGroupBaremetalServerMembers
          arguments:
            domain: default
            groupId: ${bmsGroup.policyGroupId}
    
    Example coming soon!
    

    Using getPolicyGroupBaremetalServerMembers

    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 getPolicyGroupBaremetalServerMembers(args: GetPolicyGroupBaremetalServerMembersArgs, opts?: InvokeOptions): Promise<GetPolicyGroupBaremetalServerMembersResult>
    function getPolicyGroupBaremetalServerMembersOutput(args: GetPolicyGroupBaremetalServerMembersOutputArgs, opts?: InvokeOutputOptions): Output<GetPolicyGroupBaremetalServerMembersResult>
    def get_policy_group_baremetal_server_members(domain: Optional[str] = None,
                                                  enforcement_point_path: Optional[str] = None,
                                                  group_id: Optional[str] = None,
                                                  id: Optional[str] = None,
                                                  opts: Optional[InvokeOptions] = None) -> GetPolicyGroupBaremetalServerMembersResult
    def get_policy_group_baremetal_server_members_output(domain: pulumi.Input[Optional[str]] = None,
                                                  enforcement_point_path: pulumi.Input[Optional[str]] = None,
                                                  group_id: pulumi.Input[Optional[str]] = None,
                                                  id: pulumi.Input[Optional[str]] = None,
                                                  opts: Optional[InvokeOutputOptions] = None) -> Output[GetPolicyGroupBaremetalServerMembersResult]
    func GetPolicyGroupBaremetalServerMembers(ctx *Context, args *GetPolicyGroupBaremetalServerMembersArgs, opts ...InvokeOption) (*GetPolicyGroupBaremetalServerMembersResult, error)
    func GetPolicyGroupBaremetalServerMembersOutput(ctx *Context, args *GetPolicyGroupBaremetalServerMembersOutputArgs, opts ...InvokeOption) GetPolicyGroupBaremetalServerMembersResultOutput

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

    public static class GetPolicyGroupBaremetalServerMembers 
    {
        public static Task<GetPolicyGroupBaremetalServerMembersResult> InvokeAsync(GetPolicyGroupBaremetalServerMembersArgs args, InvokeOptions? opts = null)
        public static Output<GetPolicyGroupBaremetalServerMembersResult> Invoke(GetPolicyGroupBaremetalServerMembersInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetPolicyGroupBaremetalServerMembersResult> Invoke(GetPolicyGroupBaremetalServerMembersInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetPolicyGroupBaremetalServerMembersResult> getPolicyGroupBaremetalServerMembers(GetPolicyGroupBaremetalServerMembersArgs args, InvokeOptions options)
    public static Output<GetPolicyGroupBaremetalServerMembersResult> getPolicyGroupBaremetalServerMembers(GetPolicyGroupBaremetalServerMembersArgs args, InvokeOptions options)
    public static Output<GetPolicyGroupBaremetalServerMembersResult> getPolicyGroupBaremetalServerMembers(GetPolicyGroupBaremetalServerMembersArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: nsxt:index/getPolicyGroupBaremetalServerMembers:getPolicyGroupBaremetalServerMembers
      arguments:
        # arguments dictionary
    data "nsxt_get_policy_group_baremetal_server_members" "name" {
        # arguments
    }

    The following arguments are supported:

    GroupId string
    ID of the group to read effective bare metal server members.
    Domain string
    Domain ID for the group. Defaults to "default".
    EnforcementPointPath string
    The path of the enforcement point from which the list of members needs to be fetched.
    Id string
    ID of the group.
    GroupId string
    ID of the group to read effective bare metal server members.
    Domain string
    Domain ID for the group. Defaults to "default".
    EnforcementPointPath string
    The path of the enforcement point from which the list of members needs to be fetched.
    Id string
    ID of the group.
    group_id string
    ID of the group to read effective bare metal server members.
    domain string
    Domain ID for the group. Defaults to "default".
    enforcement_point_path string
    The path of the enforcement point from which the list of members needs to be fetched.
    id string
    ID of the group.
    groupId String
    ID of the group to read effective bare metal server members.
    domain String
    Domain ID for the group. Defaults to "default".
    enforcementPointPath String
    The path of the enforcement point from which the list of members needs to be fetched.
    id String
    ID of the group.
    groupId string
    ID of the group to read effective bare metal server members.
    domain string
    Domain ID for the group. Defaults to "default".
    enforcementPointPath string
    The path of the enforcement point from which the list of members needs to be fetched.
    id string
    ID of the group.
    group_id str
    ID of the group to read effective bare metal server members.
    domain str
    Domain ID for the group. Defaults to "default".
    enforcement_point_path str
    The path of the enforcement point from which the list of members needs to be fetched.
    id str
    ID of the group.
    groupId String
    ID of the group to read effective bare metal server members.
    domain String
    Domain ID for the group. Defaults to "default".
    enforcementPointPath String
    The path of the enforcement point from which the list of members needs to be fetched.
    id String
    ID of the group.

    getPolicyGroupBaremetalServerMembers Result

    The following output properties are available:

    GroupId string
    Id string
    ID of the group.
    Items List<GetPolicyGroupBaremetalServerMembersItem>
    List of bare metal server members in the group.
    Domain string
    EnforcementPointPath string
    GroupId string
    Id string
    ID of the group.
    Items []GetPolicyGroupBaremetalServerMembersItem
    List of bare metal server members in the group.
    Domain string
    EnforcementPointPath string
    group_id string
    id string
    ID of the group.
    items list(object)
    List of bare metal server members in the group.
    domain string
    enforcement_point_path string
    groupId String
    id String
    ID of the group.
    items List<GetPolicyGroupBaremetalServerMembersItem>
    List of bare metal server members in the group.
    domain String
    enforcementPointPath String
    groupId string
    id string
    ID of the group.
    items GetPolicyGroupBaremetalServerMembersItem[]
    List of bare metal server members in the group.
    domain string
    enforcementPointPath string
    group_id str
    id str
    ID of the group.
    items Sequence[GetPolicyGroupBaremetalServerMembersItem]
    List of bare metal server members in the group.
    domain str
    enforcement_point_path str
    groupId String
    id String
    ID of the group.
    items List<Property Map>
    List of bare metal server members in the group.
    domain String
    enforcementPointPath String

    Supporting Types

    GetPolicyGroupBaremetalServerMembersItem

    CpuCores double
    Number of CPU cores on the bare metal server.
    DisplayName string
    Display name of the bare metal server.
    ExternalId string
    External ID of the bare metal server.
    LastSyncTime double
    Last synchronization time.
    OsName string
    Operating system name.
    OsVersion string
    Operating system version.
    SourceId string
    Source ID of the bare metal server.
    CpuCores float64
    Number of CPU cores on the bare metal server.
    DisplayName string
    Display name of the bare metal server.
    ExternalId string
    External ID of the bare metal server.
    LastSyncTime float64
    Last synchronization time.
    OsName string
    Operating system name.
    OsVersion string
    Operating system version.
    SourceId string
    Source ID of the bare metal server.
    cpu_cores number
    Number of CPU cores on the bare metal server.
    display_name string
    Display name of the bare metal server.
    external_id string
    External ID of the bare metal server.
    last_sync_time number
    Last synchronization time.
    os_name string
    Operating system name.
    os_version string
    Operating system version.
    source_id string
    Source ID of the bare metal server.
    cpuCores Double
    Number of CPU cores on the bare metal server.
    displayName String
    Display name of the bare metal server.
    externalId String
    External ID of the bare metal server.
    lastSyncTime Double
    Last synchronization time.
    osName String
    Operating system name.
    osVersion String
    Operating system version.
    sourceId String
    Source ID of the bare metal server.
    cpuCores number
    Number of CPU cores on the bare metal server.
    displayName string
    Display name of the bare metal server.
    externalId string
    External ID of the bare metal server.
    lastSyncTime number
    Last synchronization time.
    osName string
    Operating system name.
    osVersion string
    Operating system version.
    sourceId string
    Source ID of the bare metal server.
    cpu_cores float
    Number of CPU cores on the bare metal server.
    display_name str
    Display name of the bare metal server.
    external_id str
    External ID of the bare metal server.
    last_sync_time float
    Last synchronization time.
    os_name str
    Operating system name.
    os_version str
    Operating system version.
    source_id str
    Source ID of the bare metal server.
    cpuCores Number
    Number of CPU cores on the bare metal server.
    displayName String
    Display name of the bare metal server.
    externalId String
    External ID of the bare metal server.
    lastSyncTime Number
    Last synchronization time.
    osName String
    Operating system name.
    osVersion String
    Operating system version.
    sourceId String
    Source ID of the bare metal server.

    Package Details

    Repository
    nsxt vmware/terraform-provider-nsxt
    License
    Notes
    This Pulumi package is based on the nsxt Terraform Provider.
    Viewing docs for nsxt 3.12.1
    published on Friday, Sep 11, 2026 by vmware

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial