1. Packages
  2. Nutanix
  3. API Docs
  4. getUserGroup
Nutanix v0.1.0 published on Tuesday, Sep 24, 2024 by Piers Karsenbarg

nutanix.getUserGroup

Explore with Pulumi AI

nutanix logo
Nutanix v0.1.0 published on Tuesday, Sep 24, 2024 by Piers Karsenbarg

    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<PiersKarsenbarg.Nutanix.Inputs.GetUserGroupCategory>
    • The Distinguished Categories for the user group.
    OwnerReference Dictionary<string, string>
    • The reference to a user.
    ProjectReference Dictionary<string, string>
    • The Distinguished The reference to a project.
    UserGroupDistinguishedName string
    The distinguished name for the user group
    UserGroupId string
    • (Optional) The UUID for the user group
    UserGroupName string
    • (Optional) The name for the user group
    Categories []GetUserGroupCategory
    • The Distinguished Categories for the user group.
    OwnerReference map[string]string
    • The reference to a user.
    ProjectReference map[string]string
    • The Distinguished The reference to a project.
    UserGroupDistinguishedName string
    The distinguished name for the user group
    UserGroupId string
    • (Optional) The UUID for the user group
    UserGroupName string
    • (Optional) The name for the user group
    categories List<GetUserGroupCategory>
    • The Distinguished Categories for the user group.
    ownerReference Map<String,String>
    • The reference to a user.
    projectReference Map<String,String>
    • The Distinguished The reference to a project.
    userGroupDistinguishedName String
    The distinguished name for the user group
    userGroupId String
    • (Optional) The UUID for the user group
    userGroupName String
    • (Optional) The name for the user group
    categories GetUserGroupCategory[]
    • The Distinguished Categories for the user group.
    ownerReference {[key: string]: string}
    • The reference to a user.
    projectReference {[key: string]: string}
    • The Distinguished The reference to a project.
    userGroupDistinguishedName string
    The distinguished name for the user group
    userGroupId string
    • (Optional) The UUID for the user group
    userGroupName string
    • (Optional) The name for the user group
    categories Sequence[GetUserGroupCategory]
    • 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_distinguished_name str
    The distinguished name for the user group
    user_group_id str
    • (Optional) The UUID for the user group
    user_group_name str
    • (Optional) The name for the user group
    categories List<Property Map>
    • The Distinguished Categories for the user group.
    ownerReference Map<String>
    • The reference to a user.
    projectReference Map<String>
    • The Distinguished The reference to a project.
    userGroupDistinguishedName String
    The distinguished name for the user group
    userGroupId String
    • (Optional) The UUID for the user group
    userGroupName String
    • (Optional) The name for the user group

    getUserGroup Result

    The following output properties are available:

    AccessControlPolicyReferenceLists List<PiersKarsenbarg.Nutanix.Outputs.GetUserGroupAccessControlPolicyReferenceList>
    • List of ACP references. See #reference for more details.
    ApiVersion string
    The version of the API.
    Categories List<PiersKarsenbarg.Nutanix.Outputs.GetUserGroupCategory>
    • The Distinguished Categories for the user group.
    DirectoryServiceUserGroups List<PiersKarsenbarg.Nutanix.Outputs.GetUserGroupDirectoryServiceUserGroup>
    • A Directory Service User Group.
    DisplayName 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.
    OwnerReference Dictionary<string, string>
    • The reference to a user.
    ProjectReferenceLists List<PiersKarsenbarg.Nutanix.Outputs.GetUserGroupProjectReferenceList>
    • A list of projects the user is part of. See #reference for more details.
    State string
    • The state of the entity.
    UserGroupType string
    • The type of the user group.
    ProjectReference Dictionary<string, string>
    • The Distinguished The reference to a project.
    UserGroupDistinguishedName string
    UserGroupId string
    UserGroupName string
    AccessControlPolicyReferenceLists []GetUserGroupAccessControlPolicyReferenceList
    • List of ACP references. See #reference for more details.
    ApiVersion string
    The version of the API.
    Categories []GetUserGroupCategory
    • The Distinguished Categories for the user group.
    DirectoryServiceUserGroups []GetUserGroupDirectoryServiceUserGroup
    • A Directory Service User Group.
    DisplayName 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.
    OwnerReference map[string]string
    • The reference to a user.
    ProjectReferenceLists []GetUserGroupProjectReferenceList
    • A list of projects the user is part of. See #reference for more details.
    State string
    • The state of the entity.
    UserGroupType string
    • The type of the user group.
    ProjectReference map[string]string
    • The Distinguished The reference to a project.
    UserGroupDistinguishedName string
    UserGroupId string
    UserGroupName string
    accessControlPolicyReferenceLists List<GetUserGroupAccessControlPolicyReferenceList>
    • List of ACP references. See #reference for more details.
    apiVersion String
    The version of the API.
    categories List<GetUserGroupCategory>
    • The Distinguished Categories for the user group.
    directoryServiceUserGroups List<GetUserGroupDirectoryServiceUserGroup>
    • A Directory Service User Group.
    displayName 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.
    ownerReference Map<String,String>
    • The reference to a user.
    projectReferenceLists List<GetUserGroupProjectReferenceList>
    • A list of projects the user is part of. See #reference for more details.
    state String
    • The state of the entity.
    userGroupType String
    • The type of the user group.
    projectReference Map<String,String>
    • The Distinguished The reference to a project.
    userGroupDistinguishedName String
    userGroupId String
    userGroupName String
    accessControlPolicyReferenceLists GetUserGroupAccessControlPolicyReferenceList[]
    • List of ACP references. See #reference for more details.
    apiVersion string
    The version of the API.
    categories GetUserGroupCategory[]
    • The Distinguished Categories for the user group.
    directoryServiceUserGroups GetUserGroupDirectoryServiceUserGroup[]
    • A Directory Service User Group.
    displayName 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.
    ownerReference {[key: string]: string}
    • The reference to a user.
    projectReferenceLists GetUserGroupProjectReferenceList[]
    • A list of projects the user is part of. See #reference for more details.
    state string
    • The state of the entity.
    userGroupType string
    • The type of the user group.
    projectReference {[key: string]: string}
    • The Distinguished The reference to a project.
    userGroupDistinguishedName string
    userGroupId string
    userGroupName string
    access_control_policy_reference_lists Sequence[GetUserGroupAccessControlPolicyReferenceList]
    • List of ACP references. See #reference for more details.
    api_version str
    The version of the API.
    categories Sequence[GetUserGroupCategory]
    • The Distinguished Categories for the user group.
    directory_service_user_groups Sequence[GetUserGroupDirectoryServiceUserGroup]
    • 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_lists Sequence[GetUserGroupProjectReferenceList]
    • A list of projects the user is part of. See #reference for more details.
    state str
    • The state of the entity.
    user_group_type str
    • The type of the user group.
    project_reference Mapping[str, str]
    • The Distinguished The reference to a project.
    user_group_distinguished_name str
    user_group_id str
    user_group_name str
    accessControlPolicyReferenceLists List<Property Map>
    • List of ACP references. See #reference for more details.
    apiVersion String
    The version of the API.
    categories List<Property Map>
    • The Distinguished Categories for the user group.
    directoryServiceUserGroups List<Property Map>
    • A Directory Service User Group.
    displayName 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.
    ownerReference Map<String>
    • The reference to a user.
    projectReferenceLists List<Property Map>
    • A list of projects the user is part of. See #reference for more details.
    state String
    • The state of the entity.
    userGroupType String
    • The type of the user group.
    projectReference Map<String>
    • The Distinguished The reference to a project.
    userGroupDistinguishedName String
    userGroupId String
    userGroupName String

    Supporting Types

    GetUserGroupAccessControlPolicyReferenceList

    Kind string
    • The kind name. (Default depends on the resource you are referencing)
    Name string
    • the name(Optional).
    Uuid string
    • the UUID(Required).
    Kind string
    • The kind name. (Default depends on the resource you are referencing)
    Name string
    • the name(Optional).
    Uuid string
    • the UUID(Required).
    kind String
    • The kind name. (Default depends on the resource you are referencing)
    name String
    • the name(Optional).
    uuid String
    • the UUID(Required).
    kind string
    • The kind name. (Default depends on the resource you are referencing)
    name string
    • the name(Optional).
    uuid string
    • the UUID(Required).
    kind str
    • The kind name. (Default depends on the resource you are referencing)
    name str
    • the name(Optional).
    uuid str
    • the UUID(Required).
    kind String
    • The kind name. (Default depends on the resource you are referencing)
    name String
    • the name(Optional).
    uuid String
    • the UUID(Required).

    GetUserGroupCategory

    Name string
    • the name(Optional).
    Value string
    • value of the key.
    Name string
    • the name(Optional).
    Value string
    • value of the key.
    name String
    • the name(Optional).
    value String
    • value of the key.
    name string
    • the name(Optional).
    value string
    • value of the key.
    name str
    • the name(Optional).
    value str
    • value of the key.
    name String
    • the name(Optional).
    value String
    • value of the key.

    GetUserGroupDirectoryServiceUserGroup

    DefaultUserPrincipalName string
    DirectoryServiceReferences List<PiersKarsenbarg.Nutanix.Inputs.GetUserGroupDirectoryServiceUserGroupDirectoryServiceReference>
    • The reference to a directory service. See #reference for to look the supported attributes.
    DistinguishedName string
    • The Distinguished name for the user group
    DefaultUserPrincipalName string
    DirectoryServiceReferences []GetUserGroupDirectoryServiceUserGroupDirectoryServiceReference
    • The reference to a directory service. See #reference for to look the supported attributes.
    DistinguishedName string
    • The Distinguished name for the user group
    defaultUserPrincipalName String
    directoryServiceReferences List<GetUserGroupDirectoryServiceUserGroupDirectoryServiceReference>
    • The reference to a directory service. See #reference for to look the supported attributes.
    distinguishedName String
    • The Distinguished name for the user group
    defaultUserPrincipalName string
    directoryServiceReferences GetUserGroupDirectoryServiceUserGroupDirectoryServiceReference[]
    • The reference to a directory service. See #reference for to look the supported attributes.
    distinguishedName string
    • The Distinguished name for the user group
    default_user_principal_name str
    directory_service_references Sequence[GetUserGroupDirectoryServiceUserGroupDirectoryServiceReference]
    • The reference to a directory service. See #reference for to look the supported attributes.
    distinguished_name str
    • The Distinguished name for the user group
    defaultUserPrincipalName String
    directoryServiceReferences List<Property Map>
    • The reference to a directory service. See #reference for to look the supported attributes.
    distinguishedName String
    • The Distinguished name for the user group

    GetUserGroupDirectoryServiceUserGroupDirectoryServiceReference

    Kind string
    • The kind name. (Default depends on the resource you are referencing)
    Name string
    • the name(Optional).
    Uuid string
    • the UUID(Required).
    Kind string
    • The kind name. (Default depends on the resource you are referencing)
    Name string
    • the name(Optional).
    Uuid string
    • the UUID(Required).
    kind String
    • The kind name. (Default depends on the resource you are referencing)
    name String
    • the name(Optional).
    uuid String
    • the UUID(Required).
    kind string
    • The kind name. (Default depends on the resource you are referencing)
    name string
    • the name(Optional).
    uuid string
    • the UUID(Required).
    kind str
    • The kind name. (Default depends on the resource you are referencing)
    name str
    • the name(Optional).
    uuid str
    • the UUID(Required).
    kind String
    • The kind name. (Default depends on the resource you are referencing)
    name String
    • the name(Optional).
    uuid String
    • the UUID(Required).

    GetUserGroupProjectReferenceList

    Kind string
    • The kind name. (Default depends on the resource you are referencing)
    Name string
    • the name(Optional).
    Uuid string
    • the UUID(Required).
    Kind string
    • The kind name. (Default depends on the resource you are referencing)
    Name string
    • the name(Optional).
    Uuid string
    • the UUID(Required).
    kind String
    • The kind name. (Default depends on the resource you are referencing)
    name String
    • the name(Optional).
    uuid String
    • the UUID(Required).
    kind string
    • The kind name. (Default depends on the resource you are referencing)
    name string
    • the name(Optional).
    uuid string
    • the UUID(Required).
    kind str
    • The kind name. (Default depends on the resource you are referencing)
    name str
    • the name(Optional).
    uuid str
    • the UUID(Required).
    kind String
    • The kind name. (Default depends on the resource you are referencing)
    name String
    • the name(Optional).
    uuid String
    • the UUID(Required).

    Package Details

    Repository
    nutanix pierskarsenbarg/pulumi-nutanix
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the nutanix Terraform Provider.
    nutanix logo
    Nutanix v0.1.0 published on Tuesday, Sep 24, 2024 by Piers Karsenbarg