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

nutanix.getUsers

Explore with Pulumi AI

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

    Provides a datasource to retrieve all the users.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nutanix from "@pierskarsenbarg/nutanix";
    import * as nutanix from "@pulumi/nutanix";
    
    const user = new nutanix.User("user", {directoryServiceUser: {
        directoryServiceReference: {
            uuid: "<directory-service-uuid>",
        },
        userPrincipalName: "test-user@ntnxlab.local",
    }});
    const users = nutanix.getUser({});
    
    import pulumi
    import pulumi_nutanix as nutanix
    
    user = nutanix.User("user", directory_service_user={
        "directory_service_reference": {
            "uuid": "<directory-service-uuid>",
        },
        "user_principal_name": "test-user@ntnxlab.local",
    })
    users = nutanix.get_user()
    
    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.NewUser(ctx, "user", &nutanix.UserArgs{
    			DirectoryServiceUser: &nutanix.UserDirectoryServiceUserArgs{
    				DirectoryServiceReference: &nutanix.UserDirectoryServiceUserDirectoryServiceReferenceArgs{
    					Uuid: pulumi.String("<directory-service-uuid>"),
    				},
    				UserPrincipalName: pulumi.String("test-user@ntnxlab.local"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = nutanix.LookupUser(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nutanix = PiersKarsenbarg.Nutanix;
    using Nutanix = Pulumi.Nutanix;
    
    return await Deployment.RunAsync(() => 
    {
        var user = new Nutanix.User("user", new()
        {
            DirectoryServiceUser = new Nutanix.Inputs.UserDirectoryServiceUserArgs
            {
                DirectoryServiceReference = new Nutanix.Inputs.UserDirectoryServiceUserDirectoryServiceReferenceArgs
                {
                    Uuid = "<directory-service-uuid>",
                },
                UserPrincipalName = "test-user@ntnxlab.local",
            },
        });
    
        var users = Nutanix.GetUser.Invoke();
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.nutanix.User;
    import com.pulumi.nutanix.UserArgs;
    import com.pulumi.nutanix.inputs.UserDirectoryServiceUserArgs;
    import com.pulumi.nutanix.inputs.UserDirectoryServiceUserDirectoryServiceReferenceArgs;
    import com.pulumi.nutanix.NutanixFunctions;
    import com.pulumi.nutanix.inputs.GetUserArgs;
    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 user = new User("user", UserArgs.builder()
                .directoryServiceUser(UserDirectoryServiceUserArgs.builder()
                    .directoryServiceReference(UserDirectoryServiceUserDirectoryServiceReferenceArgs.builder()
                        .uuid("<directory-service-uuid>")
                        .build())
                    .userPrincipalName("test-user@ntnxlab.local")
                    .build())
                .build());
    
            final var users = NutanixFunctions.getUser();
    
        }
    }
    
    resources:
      user:
        type: nutanix:User
        properties:
          directoryServiceUser:
            directoryServiceReference:
              uuid: <directory-service-uuid>
            userPrincipalName: test-user@ntnxlab.local
    variables:
      users:
        fn::invoke:
          Function: nutanix:getUser
          Arguments: {}
    

    Using getUsers

    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 getUsers(args: GetUsersArgs, opts?: InvokeOptions): Promise<GetUsersResult>
    function getUsersOutput(args: GetUsersOutputArgs, opts?: InvokeOptions): Output<GetUsersResult>
    def get_users(metadatas: Optional[Sequence[GetUsersMetadata]] = None,
                  opts: Optional[InvokeOptions] = None) -> GetUsersResult
    def get_users_output(metadatas: Optional[pulumi.Input[Sequence[pulumi.Input[GetUsersMetadataArgs]]]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetUsersResult]
    func GetUsers(ctx *Context, args *GetUsersArgs, opts ...InvokeOption) (*GetUsersResult, error)
    func GetUsersOutput(ctx *Context, args *GetUsersOutputArgs, opts ...InvokeOption) GetUsersResultOutput

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

    public static class GetUsers 
    {
        public static Task<GetUsersResult> InvokeAsync(GetUsersArgs args, InvokeOptions? opts = null)
        public static Output<GetUsersResult> Invoke(GetUsersInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetUsersResult> getUsers(GetUsersArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: nutanix:index/getUsers:getUsers
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Metadatas []GetUsersMetadata
    • The user kind metadata.
    metadatas List<GetUsersMetadata>
    • The user kind metadata.
    metadatas GetUsersMetadata[]
    • The user kind metadata.
    metadatas Sequence[GetUsersMetadata]
    • The user kind metadata.
    metadatas List<Property Map>
    • The user kind metadata.

    getUsers Result

    The following output properties are available:

    ApiVersion string
    The version of the API.
    Entities List<PiersKarsenbarg.Nutanix.Outputs.GetUsersEntity>
    List of Users
    Id string
    The provider-assigned unique ID for this managed resource.
    Metadatas List<PiersKarsenbarg.Nutanix.Outputs.GetUsersMetadata>
    • The user kind metadata.
    ApiVersion string
    The version of the API.
    Entities []GetUsersEntity
    List of Users
    Id string
    The provider-assigned unique ID for this managed resource.
    Metadatas []GetUsersMetadata
    • The user kind metadata.
    apiVersion String
    The version of the API.
    entities List<GetUsersEntity>
    List of Users
    id String
    The provider-assigned unique ID for this managed resource.
    metadatas List<GetUsersMetadata>
    • The user kind metadata.
    apiVersion string
    The version of the API.
    entities GetUsersEntity[]
    List of Users
    id string
    The provider-assigned unique ID for this managed resource.
    metadatas GetUsersMetadata[]
    • The user kind metadata.
    api_version str
    The version of the API.
    entities Sequence[GetUsersEntity]
    List of Users
    id str
    The provider-assigned unique ID for this managed resource.
    metadatas Sequence[GetUsersMetadata]
    • The user kind metadata.
    apiVersion String
    The version of the API.
    entities List<Property Map>
    List of Users
    id String
    The provider-assigned unique ID for this managed resource.
    metadatas List<Property Map>
    • The user kind metadata.

    Supporting Types

    GetUsersEntity

    AccessControlPolicyReferenceLists List<PiersKarsenbarg.Nutanix.Inputs.GetUsersEntityAccessControlPolicyReferenceList>
    • List of ACP references. See #reference for more details.
    ApiVersion string
    The version of the API.
    Categories List<PiersKarsenbarg.Nutanix.Inputs.GetUsersEntityCategory>
    • (Optional) Categories for the user.
    DirectoryServiceUsers List<PiersKarsenbarg.Nutanix.Inputs.GetUsersEntityDirectoryServiceUser>
    • (Optional) The directory service user configuration. See below for more information.
    DisplayName string
    • The display name of the user (common name) provided by the directory service.
    IdentityProviderUsers List<PiersKarsenbarg.Nutanix.Inputs.GetUsersEntityIdentityProviderUser>
    • (Optional) (Optional) The identity provider user configuration. See below for more information.
    Metadata Dictionary<string, string>
    • The user kind metadata.
    Name string
    • the name(Optional).
    OwnerReference Dictionary<string, string>
    • (Optional) The reference to a user.
    ProjectReferenceLists List<PiersKarsenbarg.Nutanix.Inputs.GetUsersEntityProjectReferenceList>
    • A list of projects the user is part of. See #reference for more details.
    State string
    • The state of the entity.
    UserType string
    • The name of the user.
    ProjectReference Dictionary<string, string>
    • (Optional) The reference to a project.
    AccessControlPolicyReferenceLists []GetUsersEntityAccessControlPolicyReferenceList
    • List of ACP references. See #reference for more details.
    ApiVersion string
    The version of the API.
    Categories []GetUsersEntityCategory
    • (Optional) Categories for the user.
    DirectoryServiceUsers []GetUsersEntityDirectoryServiceUser
    • (Optional) The directory service user configuration. See below for more information.
    DisplayName string
    • The display name of the user (common name) provided by the directory service.
    IdentityProviderUsers []GetUsersEntityIdentityProviderUser
    • (Optional) (Optional) The identity provider user configuration. See below for more information.
    Metadata map[string]string
    • The user kind metadata.
    Name string
    • the name(Optional).
    OwnerReference map[string]string
    • (Optional) The reference to a user.
    ProjectReferenceLists []GetUsersEntityProjectReferenceList
    • A list of projects the user is part of. See #reference for more details.
    State string
    • The state of the entity.
    UserType string
    • The name of the user.
    ProjectReference map[string]string
    • (Optional) The reference to a project.
    accessControlPolicyReferenceLists List<GetUsersEntityAccessControlPolicyReferenceList>
    • List of ACP references. See #reference for more details.
    apiVersion String
    The version of the API.
    categories List<GetUsersEntityCategory>
    • (Optional) Categories for the user.
    directoryServiceUsers List<GetUsersEntityDirectoryServiceUser>
    • (Optional) The directory service user configuration. See below for more information.
    displayName String
    • The display name of the user (common name) provided by the directory service.
    identityProviderUsers List<GetUsersEntityIdentityProviderUser>
    • (Optional) (Optional) The identity provider user configuration. See below for more information.
    metadata Map<String,String>
    • The user kind metadata.
    name String
    • the name(Optional).
    ownerReference Map<String,String>
    • (Optional) The reference to a user.
    projectReferenceLists List<GetUsersEntityProjectReferenceList>
    • A list of projects the user is part of. See #reference for more details.
    state String
    • The state of the entity.
    userType String
    • The name of the user.
    projectReference Map<String,String>
    • (Optional) The reference to a project.
    accessControlPolicyReferenceLists GetUsersEntityAccessControlPolicyReferenceList[]
    • List of ACP references. See #reference for more details.
    apiVersion string
    The version of the API.
    categories GetUsersEntityCategory[]
    • (Optional) Categories for the user.
    directoryServiceUsers GetUsersEntityDirectoryServiceUser[]
    • (Optional) The directory service user configuration. See below for more information.
    displayName string
    • The display name of the user (common name) provided by the directory service.
    identityProviderUsers GetUsersEntityIdentityProviderUser[]
    • (Optional) (Optional) The identity provider user configuration. See below for more information.
    metadata {[key: string]: string}
    • The user kind metadata.
    name string
    • the name(Optional).
    ownerReference {[key: string]: string}
    • (Optional) The reference to a user.
    projectReferenceLists GetUsersEntityProjectReferenceList[]
    • A list of projects the user is part of. See #reference for more details.
    state string
    • The state of the entity.
    userType string
    • The name of the user.
    projectReference {[key: string]: string}
    • (Optional) The reference to a project.
    access_control_policy_reference_lists Sequence[GetUsersEntityAccessControlPolicyReferenceList]
    • List of ACP references. See #reference for more details.
    api_version str
    The version of the API.
    categories Sequence[GetUsersEntityCategory]
    • (Optional) Categories for the user.
    directory_service_users Sequence[GetUsersEntityDirectoryServiceUser]
    • (Optional) The directory service user configuration. See below for more information.
    display_name str
    • The display name of the user (common name) provided by the directory service.
    identity_provider_users Sequence[GetUsersEntityIdentityProviderUser]
    • (Optional) (Optional) The identity provider user configuration. See below for more information.
    metadata Mapping[str, str]
    • The user kind metadata.
    name str
    • the name(Optional).
    owner_reference Mapping[str, str]
    • (Optional) The reference to a user.
    project_reference_lists Sequence[GetUsersEntityProjectReferenceList]
    • A list of projects the user is part of. See #reference for more details.
    state str
    • The state of the entity.
    user_type str
    • The name of the user.
    project_reference Mapping[str, str]
    • (Optional) The reference to a project.
    accessControlPolicyReferenceLists List<Property Map>
    • List of ACP references. See #reference for more details.
    apiVersion String
    The version of the API.
    categories List<Property Map>
    • (Optional) Categories for the user.
    directoryServiceUsers List<Property Map>
    • (Optional) The directory service user configuration. See below for more information.
    displayName String
    • The display name of the user (common name) provided by the directory service.
    identityProviderUsers List<Property Map>
    • (Optional) (Optional) The identity provider user configuration. See below for more information.
    metadata Map<String>
    • The user kind metadata.
    name String
    • the name(Optional).
    ownerReference Map<String>
    • (Optional) 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.
    userType String
    • The name of the user.
    projectReference Map<String>
    • (Optional) The reference to a project.

    GetUsersEntityAccessControlPolicyReferenceList

    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).

    GetUsersEntityCategory

    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.

    GetUsersEntityDirectoryServiceUser

    DefaultUserPrincipalName string
    DirectoryServiceReferences List<PiersKarsenbarg.Nutanix.Inputs.GetUsersEntityDirectoryServiceUserDirectoryServiceReference>
    • (Optional) The reference to a directory service. See #reference for to look the supported attributes.
    UserPrincipalName string
    • (Optional) The UserPrincipalName of the user from the directory service.
    DefaultUserPrincipalName string
    DirectoryServiceReferences []GetUsersEntityDirectoryServiceUserDirectoryServiceReference
    • (Optional) The reference to a directory service. See #reference for to look the supported attributes.
    UserPrincipalName string
    • (Optional) The UserPrincipalName of the user from the directory service.
    defaultUserPrincipalName String
    directoryServiceReferences List<GetUsersEntityDirectoryServiceUserDirectoryServiceReference>
    • (Optional) The reference to a directory service. See #reference for to look the supported attributes.
    userPrincipalName String
    • (Optional) The UserPrincipalName of the user from the directory service.
    defaultUserPrincipalName string
    directoryServiceReferences GetUsersEntityDirectoryServiceUserDirectoryServiceReference[]
    • (Optional) The reference to a directory service. See #reference for to look the supported attributes.
    userPrincipalName string
    • (Optional) The UserPrincipalName of the user from the directory service.
    default_user_principal_name str
    directory_service_references Sequence[GetUsersEntityDirectoryServiceUserDirectoryServiceReference]
    • (Optional) The reference to a directory service. See #reference for to look the supported attributes.
    user_principal_name str
    • (Optional) The UserPrincipalName of the user from the directory service.
    defaultUserPrincipalName String
    directoryServiceReferences List<Property Map>
    • (Optional) The reference to a directory service. See #reference for to look the supported attributes.
    userPrincipalName String
    • (Optional) The UserPrincipalName of the user from the directory service.

    GetUsersEntityDirectoryServiceUserDirectoryServiceReference

    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).

    GetUsersEntityIdentityProviderUser

    IdentityProviderReferences List<PiersKarsenbarg.Nutanix.Inputs.GetUsersEntityIdentityProviderUserIdentityProviderReference>
    • (Optional) The reference to a identity provider. See #reference for to look the supported attributes.
    Username string
    • (Optional) The username from identity provider. Name ID for SAML Identity Provider.
    IdentityProviderReferences []GetUsersEntityIdentityProviderUserIdentityProviderReference
    • (Optional) The reference to a identity provider. See #reference for to look the supported attributes.
    Username string
    • (Optional) The username from identity provider. Name ID for SAML Identity Provider.
    identityProviderReferences List<GetUsersEntityIdentityProviderUserIdentityProviderReference>
    • (Optional) The reference to a identity provider. See #reference for to look the supported attributes.
    username String
    • (Optional) The username from identity provider. Name ID for SAML Identity Provider.
    identityProviderReferences GetUsersEntityIdentityProviderUserIdentityProviderReference[]
    • (Optional) The reference to a identity provider. See #reference for to look the supported attributes.
    username string
    • (Optional) The username from identity provider. Name ID for SAML Identity Provider.
    identity_provider_references Sequence[GetUsersEntityIdentityProviderUserIdentityProviderReference]
    • (Optional) The reference to a identity provider. See #reference for to look the supported attributes.
    username str
    • (Optional) The username from identity provider. Name ID for SAML Identity Provider.
    identityProviderReferences List<Property Map>
    • (Optional) The reference to a identity provider. See #reference for to look the supported attributes.
    username String
    • (Optional) The username from identity provider. Name ID for SAML Identity Provider.

    GetUsersEntityIdentityProviderUserIdentityProviderReference

    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).

    GetUsersEntityProjectReferenceList

    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).

    GetUsersMetadata

    Filter string
    Kind string
    • The kind name. (Default depends on the resource you are referencing)
    Length int
    Offset int
    SortAttribute string
    SortOrder string
    Filter string
    Kind string
    • The kind name. (Default depends on the resource you are referencing)
    Length int
    Offset int
    SortAttribute string
    SortOrder string
    filter String
    kind String
    • The kind name. (Default depends on the resource you are referencing)
    length Integer
    offset Integer
    sortAttribute String
    sortOrder String
    filter string
    kind string
    • The kind name. (Default depends on the resource you are referencing)
    length number
    offset number
    sortAttribute string
    sortOrder string
    filter str
    kind str
    • The kind name. (Default depends on the resource you are referencing)
    length int
    offset int
    sort_attribute str
    sort_order str
    filter String
    kind String
    • The kind name. (Default depends on the resource you are referencing)
    length Number
    offset Number
    sortAttribute String
    sortOrder String

    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