1. Packages
  2. Nsxt Provider
  3. API Docs
  4. NsGroup
nsxt 3.8.0 published on Monday, Apr 14, 2025 by vmware

nsxt.NsGroup

Explore with Pulumi AI

Create NsGroup Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new NsGroup(name: string, args?: NsGroupArgs, opts?: CustomResourceOptions);
@overload
def NsGroup(resource_name: str,
            args: Optional[NsGroupArgs] = None,
            opts: Optional[ResourceOptions] = None)

@overload
def NsGroup(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            display_name: Optional[str] = None,
            members: Optional[Sequence[NsGroupMemberArgs]] = None,
            membership_criterias: Optional[Sequence[NsGroupMembershipCriteriaArgs]] = None,
            ns_group_id: Optional[str] = None,
            tags: Optional[Sequence[NsGroupTagArgs]] = None)
func NewNsGroup(ctx *Context, name string, args *NsGroupArgs, opts ...ResourceOption) (*NsGroup, error)
public NsGroup(string name, NsGroupArgs? args = null, CustomResourceOptions? opts = null)
public NsGroup(String name, NsGroupArgs args)
public NsGroup(String name, NsGroupArgs args, CustomResourceOptions options)
type: nsxt:NsGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args NsGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args NsGroupArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args NsGroupArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args NsGroupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. NsGroupArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var nsGroupResource = new Nsxt.NsGroup("nsGroupResource", new()
{
    Description = "string",
    DisplayName = "string",
    Members = new[]
    {
        new Nsxt.Inputs.NsGroupMemberArgs
        {
            TargetType = "string",
            Value = "string",
        },
    },
    MembershipCriterias = new[]
    {
        new Nsxt.Inputs.NsGroupMembershipCriteriaArgs
        {
            TargetType = "string",
            Scope = "string",
            ScopeOp = "string",
            Tag = "string",
            TagOp = "string",
        },
    },
    NsGroupId = "string",
    Tags = new[]
    {
        new Nsxt.Inputs.NsGroupTagArgs
        {
            Scope = "string",
            Tag = "string",
        },
    },
});
Copy
example, err := nsxt.NewNsGroup(ctx, "nsGroupResource", &nsxt.NsGroupArgs{
Description: pulumi.String("string"),
DisplayName: pulumi.String("string"),
Members: .NsGroupMemberArray{
&.NsGroupMemberArgs{
TargetType: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
MembershipCriterias: .NsGroupMembershipCriteriaArray{
&.NsGroupMembershipCriteriaArgs{
TargetType: pulumi.String("string"),
Scope: pulumi.String("string"),
ScopeOp: pulumi.String("string"),
Tag: pulumi.String("string"),
TagOp: pulumi.String("string"),
},
},
NsGroupId: pulumi.String("string"),
Tags: .NsGroupTagArray{
&.NsGroupTagArgs{
Scope: pulumi.String("string"),
Tag: pulumi.String("string"),
},
},
})
Copy
var nsGroupResource = new NsGroup("nsGroupResource", NsGroupArgs.builder()
    .description("string")
    .displayName("string")
    .members(NsGroupMemberArgs.builder()
        .targetType("string")
        .value("string")
        .build())
    .membershipCriterias(NsGroupMembershipCriteriaArgs.builder()
        .targetType("string")
        .scope("string")
        .scopeOp("string")
        .tag("string")
        .tagOp("string")
        .build())
    .nsGroupId("string")
    .tags(NsGroupTagArgs.builder()
        .scope("string")
        .tag("string")
        .build())
    .build());
Copy
ns_group_resource = nsxt.NsGroup("nsGroupResource",
    description="string",
    display_name="string",
    members=[{
        "target_type": "string",
        "value": "string",
    }],
    membership_criterias=[{
        "target_type": "string",
        "scope": "string",
        "scope_op": "string",
        "tag": "string",
        "tag_op": "string",
    }],
    ns_group_id="string",
    tags=[{
        "scope": "string",
        "tag": "string",
    }])
Copy
const nsGroupResource = new nsxt.NsGroup("nsGroupResource", {
    description: "string",
    displayName: "string",
    members: [{
        targetType: "string",
        value: "string",
    }],
    membershipCriterias: [{
        targetType: "string",
        scope: "string",
        scopeOp: "string",
        tag: "string",
        tagOp: "string",
    }],
    nsGroupId: "string",
    tags: [{
        scope: "string",
        tag: "string",
    }],
});
Copy
type: nsxt:NsGroup
properties:
    description: string
    displayName: string
    members:
        - targetType: string
          value: string
    membershipCriterias:
        - scope: string
          scopeOp: string
          tag: string
          tagOp: string
          targetType: string
    nsGroupId: string
    tags:
        - scope: string
          tag: string
Copy

NsGroup Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The NsGroup resource accepts the following input properties:

Description string
Description of this resource.
DisplayName string
The display name of this resource. Defaults to ID if not set.
Members List<NsGroupMember>
Reference to the direct/static members of the NSGroup. Can be ID based expressions only. VirtualMachine cannot be added as a static member.
MembershipCriterias List<NsGroupMembershipCriteria>
List of tag or ID expressions which define the membership criteria for this NSGroup. An object must satisfy at least one of these expressions to qualify as a member of this group.
NsGroupId string
ID of the NS group.
Tags List<NsGroupTag>
A list of scope + tag pairs to associate with this NS group.
Description string
Description of this resource.
DisplayName string
The display name of this resource. Defaults to ID if not set.
Members []NsGroupMemberArgs
Reference to the direct/static members of the NSGroup. Can be ID based expressions only. VirtualMachine cannot be added as a static member.
MembershipCriterias []NsGroupMembershipCriteriaArgs
List of tag or ID expressions which define the membership criteria for this NSGroup. An object must satisfy at least one of these expressions to qualify as a member of this group.
NsGroupId string
ID of the NS group.
Tags []NsGroupTagArgs
A list of scope + tag pairs to associate with this NS group.
description String
Description of this resource.
displayName String
The display name of this resource. Defaults to ID if not set.
members List<NsGroupMember>
Reference to the direct/static members of the NSGroup. Can be ID based expressions only. VirtualMachine cannot be added as a static member.
membershipCriterias List<NsGroupMembershipCriteria>
List of tag or ID expressions which define the membership criteria for this NSGroup. An object must satisfy at least one of these expressions to qualify as a member of this group.
nsGroupId String
ID of the NS group.
tags List<NsGroupTag>
A list of scope + tag pairs to associate with this NS group.
description string
Description of this resource.
displayName string
The display name of this resource. Defaults to ID if not set.
members NsGroupMember[]
Reference to the direct/static members of the NSGroup. Can be ID based expressions only. VirtualMachine cannot be added as a static member.
membershipCriterias NsGroupMembershipCriteria[]
List of tag or ID expressions which define the membership criteria for this NSGroup. An object must satisfy at least one of these expressions to qualify as a member of this group.
nsGroupId string
ID of the NS group.
tags NsGroupTag[]
A list of scope + tag pairs to associate with this NS group.
description str
Description of this resource.
display_name str
The display name of this resource. Defaults to ID if not set.
members Sequence[NsGroupMemberArgs]
Reference to the direct/static members of the NSGroup. Can be ID based expressions only. VirtualMachine cannot be added as a static member.
membership_criterias Sequence[NsGroupMembershipCriteriaArgs]
List of tag or ID expressions which define the membership criteria for this NSGroup. An object must satisfy at least one of these expressions to qualify as a member of this group.
ns_group_id str
ID of the NS group.
tags Sequence[NsGroupTagArgs]
A list of scope + tag pairs to associate with this NS group.
description String
Description of this resource.
displayName String
The display name of this resource. Defaults to ID if not set.
members List<Property Map>
Reference to the direct/static members of the NSGroup. Can be ID based expressions only. VirtualMachine cannot be added as a static member.
membershipCriterias List<Property Map>
List of tag or ID expressions which define the membership criteria for this NSGroup. An object must satisfy at least one of these expressions to qualify as a member of this group.
nsGroupId String
ID of the NS group.
tags List<Property Map>
A list of scope + tag pairs to associate with this NS group.

Outputs

All input properties are implicitly available as output properties. Additionally, the NsGroup resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Revision double
Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
Id string
The provider-assigned unique ID for this managed resource.
Revision float64
Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
id String
The provider-assigned unique ID for this managed resource.
revision Double
Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
id string
The provider-assigned unique ID for this managed resource.
revision number
Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
id str
The provider-assigned unique ID for this managed resource.
revision float
Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
id String
The provider-assigned unique ID for this managed resource.
revision Number
Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.

Look up Existing NsGroup Resource

Get an existing NsGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: NsGroupState, opts?: CustomResourceOptions): NsGroup
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        display_name: Optional[str] = None,
        members: Optional[Sequence[NsGroupMemberArgs]] = None,
        membership_criterias: Optional[Sequence[NsGroupMembershipCriteriaArgs]] = None,
        ns_group_id: Optional[str] = None,
        revision: Optional[float] = None,
        tags: Optional[Sequence[NsGroupTagArgs]] = None) -> NsGroup
func GetNsGroup(ctx *Context, name string, id IDInput, state *NsGroupState, opts ...ResourceOption) (*NsGroup, error)
public static NsGroup Get(string name, Input<string> id, NsGroupState? state, CustomResourceOptions? opts = null)
public static NsGroup get(String name, Output<String> id, NsGroupState state, CustomResourceOptions options)
resources:  _:    type: nsxt:NsGroup    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Description string
Description of this resource.
DisplayName string
The display name of this resource. Defaults to ID if not set.
Members List<NsGroupMember>
Reference to the direct/static members of the NSGroup. Can be ID based expressions only. VirtualMachine cannot be added as a static member.
MembershipCriterias List<NsGroupMembershipCriteria>
List of tag or ID expressions which define the membership criteria for this NSGroup. An object must satisfy at least one of these expressions to qualify as a member of this group.
NsGroupId string
ID of the NS group.
Revision double
Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
Tags List<NsGroupTag>
A list of scope + tag pairs to associate with this NS group.
Description string
Description of this resource.
DisplayName string
The display name of this resource. Defaults to ID if not set.
Members []NsGroupMemberArgs
Reference to the direct/static members of the NSGroup. Can be ID based expressions only. VirtualMachine cannot be added as a static member.
MembershipCriterias []NsGroupMembershipCriteriaArgs
List of tag or ID expressions which define the membership criteria for this NSGroup. An object must satisfy at least one of these expressions to qualify as a member of this group.
NsGroupId string
ID of the NS group.
Revision float64
Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
Tags []NsGroupTagArgs
A list of scope + tag pairs to associate with this NS group.
description String
Description of this resource.
displayName String
The display name of this resource. Defaults to ID if not set.
members List<NsGroupMember>
Reference to the direct/static members of the NSGroup. Can be ID based expressions only. VirtualMachine cannot be added as a static member.
membershipCriterias List<NsGroupMembershipCriteria>
List of tag or ID expressions which define the membership criteria for this NSGroup. An object must satisfy at least one of these expressions to qualify as a member of this group.
nsGroupId String
ID of the NS group.
revision Double
Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
tags List<NsGroupTag>
A list of scope + tag pairs to associate with this NS group.
description string
Description of this resource.
displayName string
The display name of this resource. Defaults to ID if not set.
members NsGroupMember[]
Reference to the direct/static members of the NSGroup. Can be ID based expressions only. VirtualMachine cannot be added as a static member.
membershipCriterias NsGroupMembershipCriteria[]
List of tag or ID expressions which define the membership criteria for this NSGroup. An object must satisfy at least one of these expressions to qualify as a member of this group.
nsGroupId string
ID of the NS group.
revision number
Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
tags NsGroupTag[]
A list of scope + tag pairs to associate with this NS group.
description str
Description of this resource.
display_name str
The display name of this resource. Defaults to ID if not set.
members Sequence[NsGroupMemberArgs]
Reference to the direct/static members of the NSGroup. Can be ID based expressions only. VirtualMachine cannot be added as a static member.
membership_criterias Sequence[NsGroupMembershipCriteriaArgs]
List of tag or ID expressions which define the membership criteria for this NSGroup. An object must satisfy at least one of these expressions to qualify as a member of this group.
ns_group_id str
ID of the NS group.
revision float
Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
tags Sequence[NsGroupTagArgs]
A list of scope + tag pairs to associate with this NS group.
description String
Description of this resource.
displayName String
The display name of this resource. Defaults to ID if not set.
members List<Property Map>
Reference to the direct/static members of the NSGroup. Can be ID based expressions only. VirtualMachine cannot be added as a static member.
membershipCriterias List<Property Map>
List of tag or ID expressions which define the membership criteria for this NSGroup. An object must satisfy at least one of these expressions to qualify as a member of this group.
nsGroupId String
ID of the NS group.
revision Number
Indicates current revision number of the object as seen by NSX-T API server. This attribute can be useful for debugging.
tags List<Property Map>
A list of scope + tag pairs to associate with this NS group.

Supporting Types

NsGroupMember
, NsGroupMemberArgs

TargetType This property is required. string
Static member type, one of: NSGroup, IPSet, LogicalPort, LogicalSwitch, MACSet
Value This property is required. string
Member ID
TargetType This property is required. string
Static member type, one of: NSGroup, IPSet, LogicalPort, LogicalSwitch, MACSet
Value This property is required. string
Member ID
targetType This property is required. String
Static member type, one of: NSGroup, IPSet, LogicalPort, LogicalSwitch, MACSet
value This property is required. String
Member ID
targetType This property is required. string
Static member type, one of: NSGroup, IPSet, LogicalPort, LogicalSwitch, MACSet
value This property is required. string
Member ID
target_type This property is required. str
Static member type, one of: NSGroup, IPSet, LogicalPort, LogicalSwitch, MACSet
value This property is required. str
Member ID
targetType This property is required. String
Static member type, one of: NSGroup, IPSet, LogicalPort, LogicalSwitch, MACSet
value This property is required. String
Member ID

NsGroupMembershipCriteria
, NsGroupMembershipCriteriaArgs

TargetType This property is required. string
Dynamic member type, one of: LogicalPort, LogicalSwitch, VirtualMachine.
Scope string
Tag scope for matching dynamic members.
ScopeOp string
Tag string
Tag value for matching dynamic members.
TagOp string
TargetType This property is required. string
Dynamic member type, one of: LogicalPort, LogicalSwitch, VirtualMachine.
Scope string
Tag scope for matching dynamic members.
ScopeOp string
Tag string
Tag value for matching dynamic members.
TagOp string
targetType This property is required. String
Dynamic member type, one of: LogicalPort, LogicalSwitch, VirtualMachine.
scope String
Tag scope for matching dynamic members.
scopeOp String
tag String
Tag value for matching dynamic members.
tagOp String
targetType This property is required. string
Dynamic member type, one of: LogicalPort, LogicalSwitch, VirtualMachine.
scope string
Tag scope for matching dynamic members.
scopeOp string
tag string
Tag value for matching dynamic members.
tagOp string
target_type This property is required. str
Dynamic member type, one of: LogicalPort, LogicalSwitch, VirtualMachine.
scope str
Tag scope for matching dynamic members.
scope_op str
tag str
Tag value for matching dynamic members.
tag_op str
targetType This property is required. String
Dynamic member type, one of: LogicalPort, LogicalSwitch, VirtualMachine.
scope String
Tag scope for matching dynamic members.
scopeOp String
tag String
Tag value for matching dynamic members.
tagOp String

NsGroupTag
, NsGroupTagArgs

Scope string
Tag scope for matching dynamic members.
Tag string
A list of scope + tag pairs to associate with this NS group.
Scope string
Tag scope for matching dynamic members.
Tag string
A list of scope + tag pairs to associate with this NS group.
scope String
Tag scope for matching dynamic members.
tag String
A list of scope + tag pairs to associate with this NS group.
scope string
Tag scope for matching dynamic members.
tag string
A list of scope + tag pairs to associate with this NS group.
scope str
Tag scope for matching dynamic members.
tag str
A list of scope + tag pairs to associate with this NS group.
scope String
Tag scope for matching dynamic members.
tag String
A list of scope + tag pairs to associate with this NS group.

Package Details

Repository
nsxt vmware/terraform-provider-nsxt
License
Notes
This Pulumi package is based on the nsxt Terraform Provider.