Viewing docs for Nutanix v0.11.0
published on Monday, Nov 24, 2025 by Piers Karsenbarg
published on Monday, Nov 24, 2025 by Piers Karsenbarg
Viewing docs for Nutanix v0.11.0
published on Monday, Nov 24, 2025 by Piers Karsenbarg
published on Monday, Nov 24, 2025 by Piers Karsenbarg
Provides a datasource to retrieve a user based on the input parameters.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as nutanix from "@pierskarsenbarg/nutanix";
const userUser = new nutanix.User("user", {directoryServiceUser: {
userPrincipalName: "test-user@ntnxlab.local",
directoryServiceReference: {
uuid: "<directory-service-uuid>",
},
}});
//Retrieve by UUID
const user = nutanix.getUserOutput({
userId: userUser.id,
});
//Retrieve by Name
const userbyname = nutanix.getUserOutput({
userName: userUser.name,
});
import pulumi
import pulumi_nutanix as nutanix
user_user = nutanix.User("user", directory_service_user={
"user_principal_name": "test-user@ntnxlab.local",
"directory_service_reference": {
"uuid": "<directory-service-uuid>",
},
})
#Retrieve by UUID
user = nutanix.get_user_output(user_id=user_user.id)
#Retrieve by Name
userbyname = nutanix.get_user_output(user_name=user_user.name)
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 {
userUser, err := nutanix.NewUser(ctx, "user", &nutanix.UserArgs{
DirectoryServiceUser: &nutanix.UserDirectoryServiceUserArgs{
UserPrincipalName: pulumi.String("test-user@ntnxlab.local"),
DirectoryServiceReference: &nutanix.UserDirectoryServiceUserDirectoryServiceReferenceArgs{
Uuid: pulumi.String("<directory-service-uuid>"),
},
},
})
if err != nil {
return err
}
// Retrieve by UUID
_ = nutanix.LookupUserOutput(ctx, nutanix.GetUserOutputArgs{
UserId: userUser.ID(),
}, nil)
// Retrieve by Name
_ = nutanix.LookupUserOutput(ctx, nutanix.GetUserOutputArgs{
UserName: userUser.Name,
}, nil)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nutanix = PiersKarsenbarg.Nutanix;
using Nutanix = Pulumi.Nutanix;
return await Deployment.RunAsync(() =>
{
var userUser = new Nutanix.User("user", new()
{
DirectoryServiceUser = new Nutanix.Inputs.UserDirectoryServiceUserArgs
{
UserPrincipalName = "test-user@ntnxlab.local",
DirectoryServiceReference = new Nutanix.Inputs.UserDirectoryServiceUserDirectoryServiceReferenceArgs
{
Uuid = "<directory-service-uuid>",
},
},
});
//Retrieve by UUID
var user = Nutanix.GetUser.Invoke(new()
{
UserId = userUser.Id,
});
//Retrieve by Name
var userbyname = Nutanix.GetUser.Invoke(new()
{
UserName = userUser.Name,
});
});
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 userUser = new User("userUser", UserArgs.builder()
.directoryServiceUser(UserDirectoryServiceUserArgs.builder()
.userPrincipalName("test-user@ntnxlab.local")
.directoryServiceReference(UserDirectoryServiceUserDirectoryServiceReferenceArgs.builder()
.uuid("<directory-service-uuid>")
.build())
.build())
.build());
//Retrieve by UUID
final var user = NutanixFunctions.getUser(GetUserArgs.builder()
.userId(userUser.id())
.build());
//Retrieve by Name
final var userbyname = NutanixFunctions.getUser(GetUserArgs.builder()
.userName(userUser.name())
.build());
}
}
resources:
userUser:
type: nutanix:User
name: user
properties:
directoryServiceUser:
userPrincipalName: test-user@ntnxlab.local
directoryServiceReference:
uuid: <directory-service-uuid>
variables:
# Retrieve by UUID
user:
fn::invoke:
function: nutanix:getUser
arguments:
userId: ${userUser.id}
# Retrieve by Name
userbyname:
fn::invoke:
function: nutanix:getUser
arguments:
userName: ${userUser.name}
Using getUser
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 getUser(args: GetUserArgs, opts?: InvokeOptions): Promise<GetUserResult>
function getUserOutput(args: GetUserOutputArgs, opts?: InvokeOptions): Output<GetUserResult>def get_user(categories: Optional[Sequence[GetUserCategory]] = None,
owner_reference: Optional[Mapping[str, str]] = None,
project_reference: Optional[Mapping[str, str]] = None,
user_id: Optional[str] = None,
user_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetUserResult
def get_user_output(categories: Optional[pulumi.Input[Sequence[pulumi.Input[GetUserCategoryArgs]]]] = None,
owner_reference: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
project_reference: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
user_id: Optional[pulumi.Input[str]] = None,
user_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetUserResult]func LookupUser(ctx *Context, args *LookupUserArgs, opts ...InvokeOption) (*LookupUserResult, error)
func LookupUserOutput(ctx *Context, args *LookupUserOutputArgs, opts ...InvokeOption) LookupUserResultOutput> Note: This function is named LookupUser in the Go SDK.
public static class GetUser
{
public static Task<GetUserResult> InvokeAsync(GetUserArgs args, InvokeOptions? opts = null)
public static Output<GetUserResult> Invoke(GetUserInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetUserResult> getUser(GetUserArgs args, InvokeOptions options)
public static Output<GetUserResult> getUser(GetUserArgs args, InvokeOptions options)
fn::invoke:
function: nutanix:index/getUser:getUser
arguments:
# arguments dictionaryThe following arguments are supported:
- Categories
List<Piers
Karsenbarg. Nutanix. Inputs. Get User Category> - (Optional) Categories for the Access Control Policy.
- Owner
Reference Dictionary<string, string> - (Optional) The reference to a user.
- Project
Reference Dictionary<string, string> - (Optional) The reference to a project.
- User
Id string - User
Name string
- Categories
[]Get
User Category - (Optional) Categories for the Access Control Policy.
- Owner
Reference map[string]string - (Optional) The reference to a user.
- Project
Reference map[string]string - (Optional) The reference to a project.
- User
Id string - User
Name string
- categories
List<Get
User Category> - (Optional) Categories for the Access Control Policy.
- owner
Reference Map<String,String> - (Optional) The reference to a user.
- project
Reference Map<String,String> - (Optional) The reference to a project.
- user
Id String - user
Name String
- categories
Get
User Category[] - (Optional) Categories for the Access Control Policy.
- owner
Reference {[key: string]: string} - (Optional) The reference to a user.
- project
Reference {[key: string]: string} - (Optional) The reference to a project.
- user
Id string - user
Name string
- categories
Sequence[Get
User Category] - (Optional) Categories for the Access Control Policy.
- owner_
reference Mapping[str, str] - (Optional) The reference to a user.
- project_
reference Mapping[str, str] - (Optional) The reference to a project.
- user_
id str - user_
name str
- categories List<Property Map>
- (Optional) Categories for the Access Control Policy.
- owner
Reference Map<String> - (Optional) The reference to a user.
- project
Reference Map<String> - (Optional) The reference to a project.
- user
Id String - user
Name String
getUser Result
The following output properties are available:
- Access
Control List<PiersPolicy Reference Lists Karsenbarg. Nutanix. Outputs. Get User 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 Category> - (Optional) Categories for the Access Control Policy.
- Directory
Service List<PiersUsers Karsenbarg. Nutanix. Outputs. Get User Directory Service User> - (Optional) The directory service user configuration. See below for more information.
- Display
Name string - The display name of the user (common name) provided by the directory service.
- Id string
- The provider-assigned unique ID for this managed resource.
- Identity
Provider List<PiersUsers Karsenbarg. Nutanix. Outputs. Get User Identity Provider User> - (Optional) (Optional) The identity provider user configuration. See below for more information.
- Metadata Dictionary<string, string>
- The user kind metadata.
- Owner
Reference Dictionary<string, string> - (Optional) The reference to a user.
- Project
Reference List<PiersLists Karsenbarg. Nutanix. Outputs. Get User 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
Type string - The name of the user.
- Project
Reference Dictionary<string, string> - (Optional) The reference to a project.
- User
Id string - User
Name string
- Access
Control []GetPolicy Reference Lists User 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 Category - (Optional) Categories for the Access Control Policy.
- Directory
Service []GetUsers User Directory Service User - (Optional) The directory service user configuration. See below for more information.
- Display
Name string - The display name of the user (common name) provided by the directory service.
- Id string
- The provider-assigned unique ID for this managed resource.
- Identity
Provider []GetUsers User Identity Provider User - (Optional) (Optional) The identity provider user configuration. See below for more information.
- Metadata map[string]string
- The user kind metadata.
- Owner
Reference map[string]string - (Optional) The reference to a user.
- Project
Reference []GetLists User 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
Type string - The name of the user.
- Project
Reference map[string]string - (Optional) The reference to a project.
- User
Id string - User
Name string
- access
Control List<GetPolicy Reference Lists User 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 Category> - (Optional) Categories for the Access Control Policy.
- directory
Service List<GetUsers User Directory Service User> - (Optional) The directory service user configuration. See below for more information.
- display
Name String - The display name of the user (common name) provided by the directory service.
- id String
- The provider-assigned unique ID for this managed resource.
- identity
Provider List<GetUsers User Identity Provider User> - (Optional) (Optional) The identity provider user configuration. See below for more information.
- metadata Map<String,String>
- The user kind metadata.
- owner
Reference Map<String,String> - (Optional) The reference to a user.
- project
Reference List<GetLists User 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
Type String - The name of the user.
- project
Reference Map<String,String> - (Optional) The reference to a project.
- user
Id String - user
Name String
- access
Control GetPolicy Reference Lists User 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 Category[] - (Optional) Categories for the Access Control Policy.
- directory
Service GetUsers User Directory Service User[] - (Optional) The directory service user configuration. See below for more information.
- display
Name string - The display name of the user (common name) provided by the directory service.
- id string
- The provider-assigned unique ID for this managed resource.
- identity
Provider GetUsers User Identity Provider User[] - (Optional) (Optional) The identity provider user configuration. See below for more information.
- metadata {[key: string]: string}
- The user kind metadata.
- owner
Reference {[key: string]: string} - (Optional) The reference to a user.
- project
Reference GetLists User 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
Type string - The name of the user.
- project
Reference {[key: string]: string} - (Optional) The reference to a project.
- user
Id string - user
Name string
- access_
control_ Sequence[Getpolicy_ reference_ lists User 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 Category] - (Optional) Categories for the Access Control Policy.
- directory_
service_ Sequence[Getusers User Directory Service User] - (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.
- id str
- The provider-assigned unique ID for this managed resource.
- identity_
provider_ Sequence[Getusers User Identity Provider User] - (Optional) (Optional) The identity provider user configuration. See below for more information.
- metadata Mapping[str, str]
- The user kind metadata.
- owner_
reference Mapping[str, str] - (Optional) The reference to a user.
- project_
reference_ Sequence[Getlists User 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_
type str - The name of the user.
- project_
reference Mapping[str, str] - (Optional) The reference to a project.
- user_
id str - user_
name str
- 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>
- (Optional) Categories for the Access Control Policy.
- directory
Service List<Property Map>Users - (Optional) The directory service user configuration. See below for more information.
- display
Name String - The display name of the user (common name) provided by the directory service.
- id String
- The provider-assigned unique ID for this managed resource.
- identity
Provider List<Property Map>Users - (Optional) (Optional) The identity provider user configuration. See below for more information.
- metadata Map<String>
- The user kind metadata.
- owner
Reference Map<String> - (Optional) 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
Type String - The name of the user.
- project
Reference Map<String> - (Optional) The reference to a project.
- user
Id String - user
Name String
Supporting Types
GetUserAccessControlPolicyReferenceList
GetUserCategory
GetUserDirectoryServiceUser
- Default
User stringPrincipal Name - Directory
Service List<PiersReferences Karsenbarg. Nutanix. Inputs. Get User Directory Service User Directory Service Reference> - (Optional) The reference to a directory service. See #reference for to look the supported attributes.
- User
Principal stringName - (Optional) The UserPrincipalName of the user from the directory service.
- Default
User stringPrincipal Name - Directory
Service []GetReferences User Directory Service User Directory Service Reference - (Optional) The reference to a directory service. See #reference for to look the supported attributes.
- User
Principal stringName - (Optional) The UserPrincipalName of the user from the directory service.
- default
User StringPrincipal Name - directory
Service List<GetReferences User Directory Service User Directory Service Reference> - (Optional) The reference to a directory service. See #reference for to look the supported attributes.
- user
Principal StringName - (Optional) The UserPrincipalName of the user from the directory service.
- default
User stringPrincipal Name - directory
Service GetReferences User Directory Service User Directory Service Reference[] - (Optional) The reference to a directory service. See #reference for to look the supported attributes.
- user
Principal stringName - (Optional) The UserPrincipalName of the user from the directory service.
- default_
user_ strprincipal_ name - directory_
service_ Sequence[Getreferences User Directory Service User Directory Service Reference] - (Optional) The reference to a directory service. See #reference for to look the supported attributes.
- user_
principal_ strname - (Optional) The UserPrincipalName of the user from the directory service.
- default
User StringPrincipal Name - directory
Service List<Property Map>References - (Optional) The reference to a directory service. See #reference for to look the supported attributes.
- user
Principal StringName - (Optional) The UserPrincipalName of the user from the directory service.
GetUserDirectoryServiceUserDirectoryServiceReference
GetUserIdentityProviderUser
- Identity
Provider List<PiersReferences Karsenbarg. Nutanix. Inputs. Get User Identity Provider User Identity Provider Reference> - (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 []GetReferences User Identity Provider User Identity Provider Reference - (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 List<GetReferences User Identity Provider User Identity Provider Reference> - (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 GetReferences User Identity Provider User Identity Provider Reference[] - (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_ Sequence[Getreferences User Identity Provider User Identity Provider Reference] - (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.
- identity
Provider List<Property Map>References - (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.
GetUserIdentityProviderUserIdentityProviderReference
GetUserProjectReferenceList
Package Details
- Repository
- nutanix pierskarsenbarg/pulumi-nutanix
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
nutanixTerraform Provider.
Viewing docs for Nutanix v0.11.0
published on Monday, Nov 24, 2025 by Piers Karsenbarg
published on Monday, Nov 24, 2025 by Piers Karsenbarg
