1. Packages
  2. Nutanix
  3. API Docs
  4. getUserGroupsV2
Nutanix v0.7.4 published on Friday, Mar 21, 2025 by Piers Karsenbarg

nutanix.getUserGroupsV2

Explore with Pulumi AI

Provides a datasource to retrieve all the user groups.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as nutanix from "@pulumi/nutanix";

const user_groups = nutanix.getUserGroupsV2({});
Copy
import pulumi
import pulumi_nutanix as nutanix

user_groups = nutanix.get_user_groups_v2()
Copy
package main

import (
	"github.com/pierskarsenbarg/pulumi-nutanix/sdk/go/nutanix"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := nutanix.LookupUserGroupsV2(ctx, &nutanix.LookupUserGroupsV2Args{}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nutanix = Pulumi.Nutanix;

return await Deployment.RunAsync(() => 
{
    var user_groups = Nutanix.GetUserGroupsV2.Invoke();

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nutanix.NutanixFunctions;
import com.pulumi.nutanix.inputs.GetUserGroupsV2Args;
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 user-groups = NutanixFunctions.getUserGroupsV2();

    }
}
Copy
variables:
  user-groups:
    fn::invoke:
      function: nutanix:getUserGroupsV2
      arguments: {}
Copy

Argument Reference

The following arguments are supported:

  • page: - A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results.
  • limit : A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set.
  • filter :A URL query parameter that allows clients to filter a collection of resources. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Expression specified with the $filter must conform to the OData V4.01 URL conventions. For example, filter ‘$filter=name eq ‘karbon-ntnx-1.0’ would filter the result on cluster name ‘karbon-ntnx1.0’, filter ‘$filter=startswith(name, ‘C’)’ would filter on cluster name starting with ‘C’. The filter can be applied to the following fields: createdBy, distinguishedName, extId, groupType, idpId, name.
  • orderby : A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default. For example, ‘$orderby=templateName desc’ would get all templates sorted by templateName in descending order. The orderby can be applied to the following fields: createdTime, distinguishedName, groupType, lastUpdatedTime, name.
  • select : A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the OData V4.01 URL conventions. If a $select expression consists of a single select item that is an asterisk (i.e., *), then all properties on the matching resource will be returned. following fields: createdBy, createdTime, distinguishedName, extId, groupType, idpId, lastUpdatedTime, links, name, tenantId.

Using getUserGroupsV2

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 getUserGroupsV2(args: GetUserGroupsV2Args, opts?: InvokeOptions): Promise<GetUserGroupsV2Result>
function getUserGroupsV2Output(args: GetUserGroupsV2OutputArgs, opts?: InvokeOptions): Output<GetUserGroupsV2Result>
Copy
def get_user_groups_v2(filter: Optional[str] = None,
                       limit: Optional[int] = None,
                       order_by: Optional[str] = None,
                       page: Optional[int] = None,
                       select: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetUserGroupsV2Result
def get_user_groups_v2_output(filter: Optional[pulumi.Input[str]] = None,
                       limit: Optional[pulumi.Input[int]] = None,
                       order_by: Optional[pulumi.Input[str]] = None,
                       page: Optional[pulumi.Input[int]] = None,
                       select: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetUserGroupsV2Result]
Copy
func LookupUserGroupsV2(ctx *Context, args *LookupUserGroupsV2Args, opts ...InvokeOption) (*LookupUserGroupsV2Result, error)
func LookupUserGroupsV2Output(ctx *Context, args *LookupUserGroupsV2OutputArgs, opts ...InvokeOption) LookupUserGroupsV2ResultOutput
Copy

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

public static class GetUserGroupsV2 
{
    public static Task<GetUserGroupsV2Result> InvokeAsync(GetUserGroupsV2Args args, InvokeOptions? opts = null)
    public static Output<GetUserGroupsV2Result> Invoke(GetUserGroupsV2InvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetUserGroupsV2Result> getUserGroupsV2(GetUserGroupsV2Args args, InvokeOptions options)
public static Output<GetUserGroupsV2Result> getUserGroupsV2(GetUserGroupsV2Args args, InvokeOptions options)
Copy
fn::invoke:
  function: nutanix:index/getUserGroupsV2:getUserGroupsV2
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Filter string
Limit int
OrderBy string
Page int
Select string
Filter string
Limit int
OrderBy string
Page int
Select string
filter String
limit Integer
orderBy String
page Integer
select String
filter string
limit number
orderBy string
page number
select string
filter str
limit int
order_by str
page int
select str
filter String
limit Number
orderBy String
page Number
select String

getUserGroupsV2 Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
UserGroups List<PiersKarsenbarg.Nutanix.Outputs.GetUserGroupsV2UserGroup>
List all User Group(s).
Filter string
Limit int
OrderBy string
Page int
Select string
Id string
The provider-assigned unique ID for this managed resource.
UserGroups []GetUserGroupsV2UserGroup
List all User Group(s).
Filter string
Limit int
OrderBy string
Page int
Select string
id String
The provider-assigned unique ID for this managed resource.
userGroups List<GetUserGroupsV2UserGroup>
List all User Group(s).
filter String
limit Integer
orderBy String
page Integer
select String
id string
The provider-assigned unique ID for this managed resource.
userGroups GetUserGroupsV2UserGroup[]
List all User Group(s).
filter string
limit number
orderBy string
page number
select string
id str
The provider-assigned unique ID for this managed resource.
user_groups Sequence[GetUserGroupsV2UserGroup]
List all User Group(s).
filter str
limit int
order_by str
page int
select str
id String
The provider-assigned unique ID for this managed resource.
userGroups List<Property Map>
List all User Group(s).
filter String
limit Number
orderBy String
page Number
select String

Supporting Types

GetUserGroupsV2UserGroup

CreatedBy This property is required. string
  • User or Service who created the User Group.
CreatedTime This property is required. string
  • Creation time of the User Group.
DistinguishedName This property is required. string
  • Identifier for the User Group in the form of a distinguished name.
ExtId This property is required. string
The External Identifier of the User Group.
GroupType This property is required. string
  • Type of the User Group. LDAP (User Group belonging to a Directory Service (Open LDAP/AD)), SAML (User Group belonging to a SAML IDP.)
IdpId This property is required. string
  • Identifier of the IDP for the User Group.
LastUpdatedTime This property is required. string
  • Last updated time of the User Group.
Name This property is required. string
  • Common Name of the User Group.
CreatedBy This property is required. string
  • User or Service who created the User Group.
CreatedTime This property is required. string
  • Creation time of the User Group.
DistinguishedName This property is required. string
  • Identifier for the User Group in the form of a distinguished name.
ExtId This property is required. string
The External Identifier of the User Group.
GroupType This property is required. string
  • Type of the User Group. LDAP (User Group belonging to a Directory Service (Open LDAP/AD)), SAML (User Group belonging to a SAML IDP.)
IdpId This property is required. string
  • Identifier of the IDP for the User Group.
LastUpdatedTime This property is required. string
  • Last updated time of the User Group.
Name This property is required. string
  • Common Name of the User Group.
createdBy This property is required. String
  • User or Service who created the User Group.
createdTime This property is required. String
  • Creation time of the User Group.
distinguishedName This property is required. String
  • Identifier for the User Group in the form of a distinguished name.
extId This property is required. String
The External Identifier of the User Group.
groupType This property is required. String
  • Type of the User Group. LDAP (User Group belonging to a Directory Service (Open LDAP/AD)), SAML (User Group belonging to a SAML IDP.)
idpId This property is required. String
  • Identifier of the IDP for the User Group.
lastUpdatedTime This property is required. String
  • Last updated time of the User Group.
name This property is required. String
  • Common Name of the User Group.
createdBy This property is required. string
  • User or Service who created the User Group.
createdTime This property is required. string
  • Creation time of the User Group.
distinguishedName This property is required. string
  • Identifier for the User Group in the form of a distinguished name.
extId This property is required. string
The External Identifier of the User Group.
groupType This property is required. string
  • Type of the User Group. LDAP (User Group belonging to a Directory Service (Open LDAP/AD)), SAML (User Group belonging to a SAML IDP.)
idpId This property is required. string
  • Identifier of the IDP for the User Group.
lastUpdatedTime This property is required. string
  • Last updated time of the User Group.
name This property is required. string
  • Common Name of the User Group.
created_by This property is required. str
  • User or Service who created the User Group.
created_time This property is required. str
  • Creation time of the User Group.
distinguished_name This property is required. str
  • Identifier for the User Group in the form of a distinguished name.
ext_id This property is required. str
The External Identifier of the User Group.
group_type This property is required. str
  • Type of the User Group. LDAP (User Group belonging to a Directory Service (Open LDAP/AD)), SAML (User Group belonging to a SAML IDP.)
idp_id This property is required. str
  • Identifier of the IDP for the User Group.
last_updated_time This property is required. str
  • Last updated time of the User Group.
name This property is required. str
  • Common Name of the User Group.
createdBy This property is required. String
  • User or Service who created the User Group.
createdTime This property is required. String
  • Creation time of the User Group.
distinguishedName This property is required. String
  • Identifier for the User Group in the form of a distinguished name.
extId This property is required. String
The External Identifier of the User Group.
groupType This property is required. String
  • Type of the User Group. LDAP (User Group belonging to a Directory Service (Open LDAP/AD)), SAML (User Group belonging to a SAML IDP.)
idpId This property is required. String
  • Identifier of the IDP for the User Group.
lastUpdatedTime This property is required. String
  • Last updated time of the User Group.
name This property is required. String
  • Common Name of the User Group.

Package Details

Repository
nutanix pierskarsenbarg/pulumi-nutanix
License
Apache-2.0
Notes
This Pulumi package is based on the nutanix Terraform Provider.