Nutanix v0.5.0 published on Monday, Nov 4, 2024 by Piers Karsenbarg
nutanix.getUserGroup
Explore with Pulumi AI
Provides a datasource to retrieve a user group based on the input parameters.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as nutanix from "@pulumi/nutanix";
const usergroup = nutanix.getUserGroup({
userGroupId: "dd30a856-8e72-4158-b716-98455ceda220",
});
const usergroupbyname = nutanix.getUserGroup({
userGroupName: "example-group-1",
});
const test = nutanix.getUserGroup({
userGroupDistinguishedName: "cn=example-group-1,cn=users,dc=ntnxlab,dc=local",
});
import pulumi
import pulumi_nutanix as nutanix
usergroup = nutanix.get_user_group(user_group_id="dd30a856-8e72-4158-b716-98455ceda220")
usergroupbyname = nutanix.get_user_group(user_group_name="example-group-1")
test = nutanix.get_user_group(user_group_distinguished_name="cn=example-group-1,cn=users,dc=ntnxlab,dc=local")
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.GetUserGroup(ctx, &nutanix.GetUserGroupArgs{
UserGroupId: pulumi.StringRef("dd30a856-8e72-4158-b716-98455ceda220"),
}, nil)
if err != nil {
return err
}
_, err = nutanix.GetUserGroup(ctx, &nutanix.GetUserGroupArgs{
UserGroupName: pulumi.StringRef("example-group-1"),
}, nil)
if err != nil {
return err
}
_, err = nutanix.GetUserGroup(ctx, &nutanix.GetUserGroupArgs{
UserGroupDistinguishedName: pulumi.StringRef("cn=example-group-1,cn=users,dc=ntnxlab,dc=local"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nutanix = Pulumi.Nutanix;
return await Deployment.RunAsync(() =>
{
var usergroup = Nutanix.GetUserGroup.Invoke(new()
{
UserGroupId = "dd30a856-8e72-4158-b716-98455ceda220",
});
var usergroupbyname = Nutanix.GetUserGroup.Invoke(new()
{
UserGroupName = "example-group-1",
});
var test = Nutanix.GetUserGroup.Invoke(new()
{
UserGroupDistinguishedName = "cn=example-group-1,cn=users,dc=ntnxlab,dc=local",
});
});
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.GetUserGroupArgs;
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 usergroup = NutanixFunctions.getUserGroup(GetUserGroupArgs.builder()
.userGroupId("dd30a856-8e72-4158-b716-98455ceda220")
.build());
final var usergroupbyname = NutanixFunctions.getUserGroup(GetUserGroupArgs.builder()
.userGroupName("example-group-1")
.build());
final var test = NutanixFunctions.getUserGroup(GetUserGroupArgs.builder()
.userGroupDistinguishedName("cn=example-group-1,cn=users,dc=ntnxlab,dc=local")
.build());
}
}
variables:
usergroup:
fn::invoke:
Function: nutanix:getUserGroup
Arguments:
userGroupId: dd30a856-8e72-4158-b716-98455ceda220
usergroupbyname:
fn::invoke:
Function: nutanix:getUserGroup
Arguments:
userGroupName: example-group-1
test:
fn::invoke:
Function: nutanix:getUserGroup
Arguments:
userGroupDistinguishedName: cn=example-group-1,cn=users,dc=ntnxlab,dc=local
Using getUserGroup
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 getUserGroup(args: GetUserGroupArgs, opts?: InvokeOptions): Promise<GetUserGroupResult>
function getUserGroupOutput(args: GetUserGroupOutputArgs, opts?: InvokeOptions): Output<GetUserGroupResult>
def get_user_group(categories: Optional[Sequence[GetUserGroupCategory]] = None,
owner_reference: Optional[Mapping[str, str]] = None,
project_reference: Optional[Mapping[str, str]] = None,
user_group_distinguished_name: Optional[str] = None,
user_group_id: Optional[str] = None,
user_group_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetUserGroupResult
def get_user_group_output(categories: Optional[pulumi.Input[Sequence[pulumi.Input[GetUserGroupCategoryArgs]]]] = None,
owner_reference: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
project_reference: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
user_group_distinguished_name: Optional[pulumi.Input[str]] = None,
user_group_id: Optional[pulumi.Input[str]] = None,
user_group_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetUserGroupResult]
func GetUserGroup(ctx *Context, args *GetUserGroupArgs, opts ...InvokeOption) (*GetUserGroupResult, error)
func GetUserGroupOutput(ctx *Context, args *GetUserGroupOutputArgs, opts ...InvokeOption) GetUserGroupResultOutput
> Note: This function is named GetUserGroup
in the Go SDK.
public static class GetUserGroup
{
public static Task<GetUserGroupResult> InvokeAsync(GetUserGroupArgs args, InvokeOptions? opts = null)
public static Output<GetUserGroupResult> Invoke(GetUserGroupInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetUserGroupResult> getUserGroup(GetUserGroupArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: nutanix:index/getUserGroup:getUserGroup
arguments:
# arguments dictionary
The following arguments are supported:
- Categories
List<Piers
Karsenbarg. Nutanix. Inputs. Get User Group Category> - The Distinguished Categories for the user group.
- Owner
Reference Dictionary<string, string> - The reference to a user.
- Project
Reference Dictionary<string, string> - The Distinguished The reference to a project.
- User
Group stringDistinguished Name - The distinguished name for the user group
- User
Group stringId - (Optional) The UUID for the user group
- User
Group stringName - (Optional) The name for the user group
- Categories
[]Get
User Group Category - The Distinguished Categories for the user group.
- Owner
Reference map[string]string - The reference to a user.
- Project
Reference map[string]string - The Distinguished The reference to a project.
- User
Group stringDistinguished Name - The distinguished name for the user group
- User
Group stringId - (Optional) The UUID for the user group
- User
Group stringName - (Optional) The name for the user group
- categories
List<Get
User Group Category> - The Distinguished Categories for the user group.
- owner
Reference Map<String,String> - The reference to a user.
- project
Reference Map<String,String> - The Distinguished The reference to a project.
- user
Group StringDistinguished Name - The distinguished name for the user group
- user
Group StringId - (Optional) The UUID for the user group
- user
Group StringName - (Optional) The name for the user group
- categories
Get
User Group Category[] - The Distinguished Categories for the user group.
- owner
Reference {[key: string]: string} - The reference to a user.
- project
Reference {[key: string]: string} - The Distinguished The reference to a project.
- user
Group stringDistinguished Name - The distinguished name for the user group
- user
Group stringId - (Optional) The UUID for the user group
- user
Group stringName - (Optional) The name for the user group
- categories
Sequence[Get
User Group Category] - The Distinguished Categories for the user group.
- owner_
reference Mapping[str, str] - The reference to a user.
- project_
reference Mapping[str, str] - The Distinguished The reference to a project.
- user_
group_ strdistinguished_ name - The distinguished name for the user group
- user_
group_ strid - (Optional) The UUID for the user group
- user_
group_ strname - (Optional) The name for the user group
- categories List<Property Map>
- The Distinguished Categories for the user group.
- owner
Reference Map<String> - The reference to a user.
- project
Reference Map<String> - The Distinguished The reference to a project.
- user
Group StringDistinguished Name - The distinguished name for the user group
- user
Group StringId - (Optional) The UUID for the user group
- user
Group StringName - (Optional) The name for the user group
getUserGroup Result
The following output properties are available:
- Access
Control List<PiersPolicy Reference Lists Karsenbarg. Nutanix. Outputs. Get User Group Access Control Policy Reference List> - List of ACP references. See #reference for more details.
- Api
Version string - The version of the API.
- Categories
List<Piers
Karsenbarg. Nutanix. Outputs. Get User Group Category> - The Distinguished Categories for the user group.
- Directory
Service List<PiersUser Groups Karsenbarg. Nutanix. Outputs. Get User Group Directory Service User Group> - A Directory Service User Group.
- Display
Name string - The display name of the user group.
- Id string
- The provider-assigned unique ID for this managed resource.
- Metadata Dictionary<string, string>
- The user group kind metadata.
- Owner
Reference Dictionary<string, string> - The reference to a user.
- Project
Reference List<PiersLists Karsenbarg. Nutanix. Outputs. Get User Group Project Reference List> - A list of projects the user is part of. See #reference for more details.
- State string
- The state of the entity.
- User
Group stringType - The type of the user group.
- Project
Reference Dictionary<string, string> - The Distinguished The reference to a project.
- User
Group stringDistinguished Name - User
Group stringId - User
Group stringName
- Access
Control []GetPolicy Reference Lists User Group Access Control Policy Reference List - List of ACP references. See #reference for more details.
- Api
Version string - The version of the API.
- Categories
[]Get
User Group Category - The Distinguished Categories for the user group.
- Directory
Service []GetUser Groups User Group Directory Service User Group - A Directory Service User Group.
- Display
Name string - The display name of the user group.
- Id string
- The provider-assigned unique ID for this managed resource.
- Metadata map[string]string
- The user group kind metadata.
- Owner
Reference map[string]string - The reference to a user.
- Project
Reference []GetLists User Group Project Reference List - A list of projects the user is part of. See #reference for more details.
- State string
- The state of the entity.
- User
Group stringType - The type of the user group.
- Project
Reference map[string]string - The Distinguished The reference to a project.
- User
Group stringDistinguished Name - User
Group stringId - User
Group stringName
- access
Control List<GetPolicy Reference Lists User Group Access Control Policy Reference List> - List of ACP references. See #reference for more details.
- api
Version String - The version of the API.
- categories
List<Get
User Group Category> - The Distinguished Categories for the user group.
- directory
Service List<GetUser Groups User Group Directory Service User Group> - A Directory Service User Group.
- display
Name String - The display name of the user group.
- id String
- The provider-assigned unique ID for this managed resource.
- metadata Map<String,String>
- The user group kind metadata.
- owner
Reference Map<String,String> - The reference to a user.
- project
Reference List<GetLists User Group Project Reference List> - A list of projects the user is part of. See #reference for more details.
- state String
- The state of the entity.
- user
Group StringType - The type of the user group.
- project
Reference Map<String,String> - The Distinguished The reference to a project.
- user
Group StringDistinguished Name - user
Group StringId - user
Group StringName
- access
Control GetPolicy Reference Lists User Group Access Control Policy Reference List[] - List of ACP references. See #reference for more details.
- api
Version string - The version of the API.
- categories
Get
User Group Category[] - The Distinguished Categories for the user group.
- directory
Service GetUser Groups User Group Directory Service User Group[] - A Directory Service User Group.
- display
Name string - The display name of the user group.
- id string
- The provider-assigned unique ID for this managed resource.
- metadata {[key: string]: string}
- The user group kind metadata.
- owner
Reference {[key: string]: string} - The reference to a user.
- project
Reference GetLists User Group Project Reference List[] - A list of projects the user is part of. See #reference for more details.
- state string
- The state of the entity.
- user
Group stringType - The type of the user group.
- project
Reference {[key: string]: string} - The Distinguished The reference to a project.
- user
Group stringDistinguished Name - user
Group stringId - user
Group stringName
- access_
control_ Sequence[Getpolicy_ reference_ lists User Group Access Control Policy Reference List] - List of ACP references. See #reference for more details.
- api_
version str - The version of the API.
- categories
Sequence[Get
User Group Category] - The Distinguished Categories for the user group.
- directory_
service_ Sequence[Getuser_ groups User Group Directory Service User Group] - A Directory Service User Group.
- display_
name str - The display name of the user group.
- id str
- The provider-assigned unique ID for this managed resource.
- metadata Mapping[str, str]
- The user group kind metadata.
- owner_
reference Mapping[str, str] - The reference to a user.
- project_
reference_ Sequence[Getlists User Group Project Reference List] - A list of projects the user is part of. See #reference for more details.
- state str
- The state of the entity.
- user_
group_ strtype - The type of the user group.
- project_
reference Mapping[str, str] - The Distinguished The reference to a project.
- user_
group_ strdistinguished_ name - user_
group_ strid - user_
group_ strname
- access
Control List<Property Map>Policy Reference Lists - List of ACP references. See #reference for more details.
- api
Version String - The version of the API.
- categories List<Property Map>
- The Distinguished Categories for the user group.
- directory
Service List<Property Map>User Groups - A Directory Service User Group.
- display
Name String - The display name of the user group.
- id String
- The provider-assigned unique ID for this managed resource.
- metadata Map<String>
- The user group kind metadata.
- owner
Reference Map<String> - The reference to a user.
- project
Reference List<Property Map>Lists - A list of projects the user is part of. See #reference for more details.
- state String
- The state of the entity.
- user
Group StringType - The type of the user group.
- project
Reference Map<String> - The Distinguished The reference to a project.
- user
Group StringDistinguished Name - user
Group StringId - user
Group StringName
Supporting Types
GetUserGroupAccessControlPolicyReferenceList
GetUserGroupCategory
GetUserGroupDirectoryServiceUserGroup
- Default
User stringPrincipal Name - Directory
Service List<PiersReferences Karsenbarg. Nutanix. Inputs. Get User Group Directory Service User Group Directory Service Reference> - The reference to a directory service. See #reference for to look the supported attributes.
- Distinguished
Name string - The Distinguished name for the user group
- Default
User stringPrincipal Name - Directory
Service []GetReferences User Group Directory Service User Group Directory Service Reference - The reference to a directory service. See #reference for to look the supported attributes.
- Distinguished
Name string - The Distinguished name for the user group
- default
User StringPrincipal Name - directory
Service List<GetReferences User Group Directory Service User Group Directory Service Reference> - The reference to a directory service. See #reference for to look the supported attributes.
- distinguished
Name String - The Distinguished name for the user group
- default
User stringPrincipal Name - directory
Service GetReferences User Group Directory Service User Group Directory Service Reference[] - The reference to a directory service. See #reference for to look the supported attributes.
- distinguished
Name string - The Distinguished name for the user group
- default_
user_ strprincipal_ name - directory_
service_ Sequence[Getreferences User Group Directory Service User Group Directory Service Reference] - The reference to a directory service. See #reference for to look the supported attributes.
- distinguished_
name str - The Distinguished name for the user group
- default
User StringPrincipal Name - directory
Service List<Property Map>References - The reference to a directory service. See #reference for to look the supported attributes.
- distinguished
Name String - The Distinguished name for the user group
GetUserGroupDirectoryServiceUserGroupDirectoryServiceReference
GetUserGroupProjectReferenceList
Package Details
- Repository
- nutanix pierskarsenbarg/pulumi-nutanix
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
nutanix
Terraform Provider.