1. Packages
  2. Googleworkspace Provider
  3. API Docs
  4. getUser
googleworkspace 0.7.0 published on Wednesday, Jan 15, 2025 by hashicorp

googleworkspace.getUser

Explore with Pulumi AI

googleworkspace 0.7.0 published on Wednesday, Jan 15, 2025 by hashicorp

Example Usage

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

const dwight = googleworkspace.getUser({
    primaryEmail: "dwight.schrute@example.com",
});
export const isUserAdmin = dwight.then(dwight => dwight.isAdmin);
Copy
import pulumi
import pulumi_googleworkspace as googleworkspace

dwight = googleworkspace.get_user(primary_email="dwight.schrute@example.com")
pulumi.export("isUserAdmin", dwight.is_admin)
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/googleworkspace/googleworkspace"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		dwight, err := googleworkspace.LookupUser(ctx, &googleworkspace.LookupUserArgs{
			PrimaryEmail: pulumi.StringRef("dwight.schrute@example.com"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("isUserAdmin", dwight.IsAdmin)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Googleworkspace = Pulumi.Googleworkspace;

return await Deployment.RunAsync(() => 
{
    var dwight = Googleworkspace.GetUser.Invoke(new()
    {
        PrimaryEmail = "dwight.schrute@example.com",
    });

    return new Dictionary<string, object?>
    {
        ["isUserAdmin"] = dwight.Apply(getUserResult => getUserResult.IsAdmin),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.googleworkspace.GoogleworkspaceFunctions;
import com.pulumi.googleworkspace.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) {
        final var dwight = GoogleworkspaceFunctions.getUser(GetUserArgs.builder()
            .primaryEmail("dwight.schrute@example.com")
            .build());

        ctx.export("isUserAdmin", dwight.applyValue(getUserResult -> getUserResult.isAdmin()));
    }
}
Copy
variables:
  dwight:
    fn::invoke:
      function: googleworkspace:getUser
      arguments:
        primaryEmail: dwight.schrute@example.com
outputs:
  isUserAdmin: ${dwight.isAdmin}
Copy

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>
Copy
def get_user(id: Optional[str] = None,
             primary_email: Optional[str] = None,
             opts: Optional[InvokeOptions] = None) -> GetUserResult
def get_user_output(id: Optional[pulumi.Input[str]] = None,
             primary_email: Optional[pulumi.Input[str]] = None,
             opts: Optional[InvokeOptions] = None) -> Output[GetUserResult]
Copy
func LookupUser(ctx *Context, args *LookupUserArgs, opts ...InvokeOption) (*LookupUserResult, error)
func LookupUserOutput(ctx *Context, args *LookupUserOutputArgs, opts ...InvokeOption) LookupUserResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetUserResult> getUser(GetUserArgs args, InvokeOptions options)
public static Output<GetUserResult> getUser(GetUserArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: googleworkspace:index/getUser:getUser
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Id string
The unique ID for the user.
PrimaryEmail string
The user's primary email address. The primaryEmail must be unique and cannot be an alias of another user.
Id string
The unique ID for the user.
PrimaryEmail string
The user's primary email address. The primaryEmail must be unique and cannot be an alias of another user.
id String
The unique ID for the user.
primaryEmail String
The user's primary email address. The primaryEmail must be unique and cannot be an alias of another user.
id string
The unique ID for the user.
primaryEmail string
The user's primary email address. The primaryEmail must be unique and cannot be an alias of another user.
id str
The unique ID for the user.
primary_email str
The user's primary email address. The primaryEmail must be unique and cannot be an alias of another user.
id String
The unique ID for the user.
primaryEmail String
The user's primary email address. The primaryEmail must be unique and cannot be an alias of another user.

getUser Result

The following output properties are available:

Addresses List<GetUserAddress>
A list of the user's addresses. The maximum allowed data size is 10Kb.
AgreedToTerms bool
This property is true if the user has completed an initial login and accepted the Terms of Service agreement.
Aliases List<string>
asps.list of the user's alias email addresses.
Archived bool
Indicates if user is archived.
ChangePasswordAtNextLogin bool
Indicates if the user is forced to change their password at next login. This setting doesn't apply when the user signs in via a third-party identity provider.
CreationTime string
The time the user's account was created. The value is in ISO 8601 date and time format. The time is the complete date plus hours, minutes, and seconds in the form YYYY-MM-DDThh:mm:ssTZD. For example, 2010-04-05T17:30:04+01:00.
CustomSchemas List<GetUserCustomSchema>
Custom fields of the user.
CustomerId string
The customer ID to retrieve all account users. You can use the alias my_customer to represent your account's customerId. As a reseller administrator, you can use the resold customer account's customerId. To get a customerId, use the account's primary domain in the domain parameter of a users.list request.
DeletionTime string
The time the user's account was deleted. The value is in ISO 8601 date and time format The time is the complete date plus hours, minutes, and seconds in the form YYYY-MM-DDThh:mm:ssTZD. For example 2010-04-05T17:30:04+01:00.
Emails List<GetUserEmail>
A list of the user's email addresses. The maximum allowed data size is 10Kb.
Etag string
ETag of the resource.
ExternalIds List<GetUserExternalId>
A list of external IDs for the user, such as an employee or network ID. The maximum allowed data size is 2Kb.
HashFunction string
Stores the hash format of the password property. We recommend sending the password property value as a base 16 bit hexadecimal-encoded hash value. Set the hashFunction values as either the SHA-1, MD5, or crypt hash format.
Id string
The unique ID for the user.
Ims List<GetUserIm>
The user's Instant Messenger (IM) accounts. A user account can have multiple ims properties. But, only one of these ims properties can be the primary IM contact. The maximum allowed data size is 2Kb.
IncludeInGlobalAddressList bool
Indicates if the user's profile is visible in the Google Workspace global address list when the contact sharing feature is enabled for the domain.
IpAllowlist bool
If true, the user's IP address is added to the allow list.
IsAdmin bool
Indicates a user with super admininistrator privileges.
IsDelegatedAdmin bool
Indicates if the user is a delegated administrator.
IsEnforcedIn2StepVerification bool
Is 2-step verification enforced.
IsEnrolledIn2StepVerification bool
Is enrolled in 2-step verification.
IsMailboxSetup bool
Indicates if the user's Google mailbox is created. This property is only applicable if the user has been assigned a Gmail license.
Keywords List<GetUserKeyword>
A list of the user's keywords. The maximum allowed data size is 1Kb.
Languages List<GetUserLanguage>
A list of the user's languages. The maximum allowed data size is 1Kb.
LastLoginTime string
The last time the user logged into the user's account. The value is in ISO 8601 date and time format. The time is the complete date plus hours, minutes, and seconds in the form YYYY-MM-DDThh:mm:ssTZD. For example, 2010-04-05T17:30:04+01:00.
Locations List<GetUserLocation>
A list of the user's locations. The maximum allowed data size is 10Kb.
Names List<GetUserName>
Holds the given and family names of the user, and the read-only fullName value. The maximum number of characters in the givenName and in the familyName values is 60. In addition, name values support unicode/UTF-8 characters, and can contain spaces, letters (a-z), numbers (0-9), dashes (-), forward slashes (/), and periods (.). Maximum allowed data size for this field is 1Kb.
NonEditableAliases List<string>
asps.list of the user's non-editable alias email addresses. These are typically outside the account's primary domain or sub-domain.
OrgUnitPath string
The full path of the parent organization associated with the user. If the parent organization is the top-level, it is represented as a forward slash (/).
Organizations List<GetUserOrganization>
A list of organizations the user belongs to. The maximum allowed data size is 10Kb.
Password string
Stores the password for the user account. A password can contain any combination of ASCII characters. A minimum of 8 characters is required. The maximum length is 100 characters. As the API does not return the value of password, this field is write-only, and the value stored in the state will be what is provided in the configuration. The field is required on create and will be empty on import.
Phones List<GetUserPhone>
A list of the user's phone numbers. The maximum allowed data size is 1Kb.
PosixAccounts List<GetUserPosixAccount>
A list of POSIX account information for the user.
PrimaryEmail string
The user's primary email address. The primaryEmail must be unique and cannot be an alias of another user.
RecoveryEmail string
Recovery email of the user.
RecoveryPhone string
Recovery phone of the user. The phone number must be in the E.164 format, starting with the plus sign (+). Example: +16506661212.
Relations List<GetUserRelation>
A list of the user's relationships to other users. The maximum allowed data size for this field is 2Kb.
SshPublicKeys List<GetUserSshPublicKey>
A list of SSH public keys. The maximum allowed data size is 10Kb.
Suspended bool
Indicates if user is suspended.
SuspensionReason string
Has the reason a user account is suspended either by the administrator or by Google at the time of suspension. The property is returned only if the suspended property is true.
ThumbnailPhotoEtag string
ETag of the user's photo
ThumbnailPhotoUrl string
Photo Url of the user.
Websites List<GetUserWebsite>
A list of the user's websites. The maximum allowed data size is 2Kb.
Addresses []GetUserAddress
A list of the user's addresses. The maximum allowed data size is 10Kb.
AgreedToTerms bool
This property is true if the user has completed an initial login and accepted the Terms of Service agreement.
Aliases []string
asps.list of the user's alias email addresses.
Archived bool
Indicates if user is archived.
ChangePasswordAtNextLogin bool
Indicates if the user is forced to change their password at next login. This setting doesn't apply when the user signs in via a third-party identity provider.
CreationTime string
The time the user's account was created. The value is in ISO 8601 date and time format. The time is the complete date plus hours, minutes, and seconds in the form YYYY-MM-DDThh:mm:ssTZD. For example, 2010-04-05T17:30:04+01:00.
CustomSchemas []GetUserCustomSchema
Custom fields of the user.
CustomerId string
The customer ID to retrieve all account users. You can use the alias my_customer to represent your account's customerId. As a reseller administrator, you can use the resold customer account's customerId. To get a customerId, use the account's primary domain in the domain parameter of a users.list request.
DeletionTime string
The time the user's account was deleted. The value is in ISO 8601 date and time format The time is the complete date plus hours, minutes, and seconds in the form YYYY-MM-DDThh:mm:ssTZD. For example 2010-04-05T17:30:04+01:00.
Emails []GetUserEmail
A list of the user's email addresses. The maximum allowed data size is 10Kb.
Etag string
ETag of the resource.
ExternalIds []GetUserExternalId
A list of external IDs for the user, such as an employee or network ID. The maximum allowed data size is 2Kb.
HashFunction string
Stores the hash format of the password property. We recommend sending the password property value as a base 16 bit hexadecimal-encoded hash value. Set the hashFunction values as either the SHA-1, MD5, or crypt hash format.
Id string
The unique ID for the user.
Ims []GetUserIm
The user's Instant Messenger (IM) accounts. A user account can have multiple ims properties. But, only one of these ims properties can be the primary IM contact. The maximum allowed data size is 2Kb.
IncludeInGlobalAddressList bool
Indicates if the user's profile is visible in the Google Workspace global address list when the contact sharing feature is enabled for the domain.
IpAllowlist bool
If true, the user's IP address is added to the allow list.
IsAdmin bool
Indicates a user with super admininistrator privileges.
IsDelegatedAdmin bool
Indicates if the user is a delegated administrator.
IsEnforcedIn2StepVerification bool
Is 2-step verification enforced.
IsEnrolledIn2StepVerification bool
Is enrolled in 2-step verification.
IsMailboxSetup bool
Indicates if the user's Google mailbox is created. This property is only applicable if the user has been assigned a Gmail license.
Keywords []GetUserKeyword
A list of the user's keywords. The maximum allowed data size is 1Kb.
Languages []GetUserLanguage
A list of the user's languages. The maximum allowed data size is 1Kb.
LastLoginTime string
The last time the user logged into the user's account. The value is in ISO 8601 date and time format. The time is the complete date plus hours, minutes, and seconds in the form YYYY-MM-DDThh:mm:ssTZD. For example, 2010-04-05T17:30:04+01:00.
Locations []GetUserLocation
A list of the user's locations. The maximum allowed data size is 10Kb.
Names []GetUserName
Holds the given and family names of the user, and the read-only fullName value. The maximum number of characters in the givenName and in the familyName values is 60. In addition, name values support unicode/UTF-8 characters, and can contain spaces, letters (a-z), numbers (0-9), dashes (-), forward slashes (/), and periods (.). Maximum allowed data size for this field is 1Kb.
NonEditableAliases []string
asps.list of the user's non-editable alias email addresses. These are typically outside the account's primary domain or sub-domain.
OrgUnitPath string
The full path of the parent organization associated with the user. If the parent organization is the top-level, it is represented as a forward slash (/).
Organizations []GetUserOrganization
A list of organizations the user belongs to. The maximum allowed data size is 10Kb.
Password string
Stores the password for the user account. A password can contain any combination of ASCII characters. A minimum of 8 characters is required. The maximum length is 100 characters. As the API does not return the value of password, this field is write-only, and the value stored in the state will be what is provided in the configuration. The field is required on create and will be empty on import.
Phones []GetUserPhone
A list of the user's phone numbers. The maximum allowed data size is 1Kb.
PosixAccounts []GetUserPosixAccount
A list of POSIX account information for the user.
PrimaryEmail string
The user's primary email address. The primaryEmail must be unique and cannot be an alias of another user.
RecoveryEmail string
Recovery email of the user.
RecoveryPhone string
Recovery phone of the user. The phone number must be in the E.164 format, starting with the plus sign (+). Example: +16506661212.
Relations []GetUserRelation
A list of the user's relationships to other users. The maximum allowed data size for this field is 2Kb.
SshPublicKeys []GetUserSshPublicKey
A list of SSH public keys. The maximum allowed data size is 10Kb.
Suspended bool
Indicates if user is suspended.
SuspensionReason string
Has the reason a user account is suspended either by the administrator or by Google at the time of suspension. The property is returned only if the suspended property is true.
ThumbnailPhotoEtag string
ETag of the user's photo
ThumbnailPhotoUrl string
Photo Url of the user.
Websites []GetUserWebsite
A list of the user's websites. The maximum allowed data size is 2Kb.
addresses List<GetUserAddress>
A list of the user's addresses. The maximum allowed data size is 10Kb.
agreedToTerms Boolean
This property is true if the user has completed an initial login and accepted the Terms of Service agreement.
aliases List<String>
asps.list of the user's alias email addresses.
archived Boolean
Indicates if user is archived.
changePasswordAtNextLogin Boolean
Indicates if the user is forced to change their password at next login. This setting doesn't apply when the user signs in via a third-party identity provider.
creationTime String
The time the user's account was created. The value is in ISO 8601 date and time format. The time is the complete date plus hours, minutes, and seconds in the form YYYY-MM-DDThh:mm:ssTZD. For example, 2010-04-05T17:30:04+01:00.
customSchemas List<GetUserCustomSchema>
Custom fields of the user.
customerId String
The customer ID to retrieve all account users. You can use the alias my_customer to represent your account's customerId. As a reseller administrator, you can use the resold customer account's customerId. To get a customerId, use the account's primary domain in the domain parameter of a users.list request.
deletionTime String
The time the user's account was deleted. The value is in ISO 8601 date and time format The time is the complete date plus hours, minutes, and seconds in the form YYYY-MM-DDThh:mm:ssTZD. For example 2010-04-05T17:30:04+01:00.
emails List<GetUserEmail>
A list of the user's email addresses. The maximum allowed data size is 10Kb.
etag String
ETag of the resource.
externalIds List<GetUserExternalId>
A list of external IDs for the user, such as an employee or network ID. The maximum allowed data size is 2Kb.
hashFunction String
Stores the hash format of the password property. We recommend sending the password property value as a base 16 bit hexadecimal-encoded hash value. Set the hashFunction values as either the SHA-1, MD5, or crypt hash format.
id String
The unique ID for the user.
ims List<GetUserIm>
The user's Instant Messenger (IM) accounts. A user account can have multiple ims properties. But, only one of these ims properties can be the primary IM contact. The maximum allowed data size is 2Kb.
includeInGlobalAddressList Boolean
Indicates if the user's profile is visible in the Google Workspace global address list when the contact sharing feature is enabled for the domain.
ipAllowlist Boolean
If true, the user's IP address is added to the allow list.
isAdmin Boolean
Indicates a user with super admininistrator privileges.
isDelegatedAdmin Boolean
Indicates if the user is a delegated administrator.
isEnforcedIn2StepVerification Boolean
Is 2-step verification enforced.
isEnrolledIn2StepVerification Boolean
Is enrolled in 2-step verification.
isMailboxSetup Boolean
Indicates if the user's Google mailbox is created. This property is only applicable if the user has been assigned a Gmail license.
keywords List<GetUserKeyword>
A list of the user's keywords. The maximum allowed data size is 1Kb.
languages List<GetUserLanguage>
A list of the user's languages. The maximum allowed data size is 1Kb.
lastLoginTime String
The last time the user logged into the user's account. The value is in ISO 8601 date and time format. The time is the complete date plus hours, minutes, and seconds in the form YYYY-MM-DDThh:mm:ssTZD. For example, 2010-04-05T17:30:04+01:00.
locations List<GetUserLocation>
A list of the user's locations. The maximum allowed data size is 10Kb.
names List<GetUserName>
Holds the given and family names of the user, and the read-only fullName value. The maximum number of characters in the givenName and in the familyName values is 60. In addition, name values support unicode/UTF-8 characters, and can contain spaces, letters (a-z), numbers (0-9), dashes (-), forward slashes (/), and periods (.). Maximum allowed data size for this field is 1Kb.
nonEditableAliases List<String>
asps.list of the user's non-editable alias email addresses. These are typically outside the account's primary domain or sub-domain.
orgUnitPath String
The full path of the parent organization associated with the user. If the parent organization is the top-level, it is represented as a forward slash (/).
organizations List<GetUserOrganization>
A list of organizations the user belongs to. The maximum allowed data size is 10Kb.
password String
Stores the password for the user account. A password can contain any combination of ASCII characters. A minimum of 8 characters is required. The maximum length is 100 characters. As the API does not return the value of password, this field is write-only, and the value stored in the state will be what is provided in the configuration. The field is required on create and will be empty on import.
phones List<GetUserPhone>
A list of the user's phone numbers. The maximum allowed data size is 1Kb.
posixAccounts List<GetUserPosixAccount>
A list of POSIX account information for the user.
primaryEmail String
The user's primary email address. The primaryEmail must be unique and cannot be an alias of another user.
recoveryEmail String
Recovery email of the user.
recoveryPhone String
Recovery phone of the user. The phone number must be in the E.164 format, starting with the plus sign (+). Example: +16506661212.
relations List<GetUserRelation>
A list of the user's relationships to other users. The maximum allowed data size for this field is 2Kb.
sshPublicKeys List<GetUserSshPublicKey>
A list of SSH public keys. The maximum allowed data size is 10Kb.
suspended Boolean
Indicates if user is suspended.
suspensionReason String
Has the reason a user account is suspended either by the administrator or by Google at the time of suspension. The property is returned only if the suspended property is true.
thumbnailPhotoEtag String
ETag of the user's photo
thumbnailPhotoUrl String
Photo Url of the user.
websites List<GetUserWebsite>
A list of the user's websites. The maximum allowed data size is 2Kb.
addresses GetUserAddress[]
A list of the user's addresses. The maximum allowed data size is 10Kb.
agreedToTerms boolean
This property is true if the user has completed an initial login and accepted the Terms of Service agreement.
aliases string[]
asps.list of the user's alias email addresses.
archived boolean
Indicates if user is archived.
changePasswordAtNextLogin boolean
Indicates if the user is forced to change their password at next login. This setting doesn't apply when the user signs in via a third-party identity provider.
creationTime string
The time the user's account was created. The value is in ISO 8601 date and time format. The time is the complete date plus hours, minutes, and seconds in the form YYYY-MM-DDThh:mm:ssTZD. For example, 2010-04-05T17:30:04+01:00.
customSchemas GetUserCustomSchema[]
Custom fields of the user.
customerId string
The customer ID to retrieve all account users. You can use the alias my_customer to represent your account's customerId. As a reseller administrator, you can use the resold customer account's customerId. To get a customerId, use the account's primary domain in the domain parameter of a users.list request.
deletionTime string
The time the user's account was deleted. The value is in ISO 8601 date and time format The time is the complete date plus hours, minutes, and seconds in the form YYYY-MM-DDThh:mm:ssTZD. For example 2010-04-05T17:30:04+01:00.
emails GetUserEmail[]
A list of the user's email addresses. The maximum allowed data size is 10Kb.
etag string
ETag of the resource.
externalIds GetUserExternalId[]
A list of external IDs for the user, such as an employee or network ID. The maximum allowed data size is 2Kb.
hashFunction string
Stores the hash format of the password property. We recommend sending the password property value as a base 16 bit hexadecimal-encoded hash value. Set the hashFunction values as either the SHA-1, MD5, or crypt hash format.
id string
The unique ID for the user.
ims GetUserIm[]
The user's Instant Messenger (IM) accounts. A user account can have multiple ims properties. But, only one of these ims properties can be the primary IM contact. The maximum allowed data size is 2Kb.
includeInGlobalAddressList boolean
Indicates if the user's profile is visible in the Google Workspace global address list when the contact sharing feature is enabled for the domain.
ipAllowlist boolean
If true, the user's IP address is added to the allow list.
isAdmin boolean
Indicates a user with super admininistrator privileges.
isDelegatedAdmin boolean
Indicates if the user is a delegated administrator.
isEnforcedIn2StepVerification boolean
Is 2-step verification enforced.
isEnrolledIn2StepVerification boolean
Is enrolled in 2-step verification.
isMailboxSetup boolean
Indicates if the user's Google mailbox is created. This property is only applicable if the user has been assigned a Gmail license.
keywords GetUserKeyword[]
A list of the user's keywords. The maximum allowed data size is 1Kb.
languages GetUserLanguage[]
A list of the user's languages. The maximum allowed data size is 1Kb.
lastLoginTime string
The last time the user logged into the user's account. The value is in ISO 8601 date and time format. The time is the complete date plus hours, minutes, and seconds in the form YYYY-MM-DDThh:mm:ssTZD. For example, 2010-04-05T17:30:04+01:00.
locations GetUserLocation[]
A list of the user's locations. The maximum allowed data size is 10Kb.
names GetUserName[]
Holds the given and family names of the user, and the read-only fullName value. The maximum number of characters in the givenName and in the familyName values is 60. In addition, name values support unicode/UTF-8 characters, and can contain spaces, letters (a-z), numbers (0-9), dashes (-), forward slashes (/), and periods (.). Maximum allowed data size for this field is 1Kb.
nonEditableAliases string[]
asps.list of the user's non-editable alias email addresses. These are typically outside the account's primary domain or sub-domain.
orgUnitPath string
The full path of the parent organization associated with the user. If the parent organization is the top-level, it is represented as a forward slash (/).
organizations GetUserOrganization[]
A list of organizations the user belongs to. The maximum allowed data size is 10Kb.
password string
Stores the password for the user account. A password can contain any combination of ASCII characters. A minimum of 8 characters is required. The maximum length is 100 characters. As the API does not return the value of password, this field is write-only, and the value stored in the state will be what is provided in the configuration. The field is required on create and will be empty on import.
phones GetUserPhone[]
A list of the user's phone numbers. The maximum allowed data size is 1Kb.
posixAccounts GetUserPosixAccount[]
A list of POSIX account information for the user.
primaryEmail string
The user's primary email address. The primaryEmail must be unique and cannot be an alias of another user.
recoveryEmail string
Recovery email of the user.
recoveryPhone string
Recovery phone of the user. The phone number must be in the E.164 format, starting with the plus sign (+). Example: +16506661212.
relations GetUserRelation[]
A list of the user's relationships to other users. The maximum allowed data size for this field is 2Kb.
sshPublicKeys GetUserSshPublicKey[]
A list of SSH public keys. The maximum allowed data size is 10Kb.
suspended boolean
Indicates if user is suspended.
suspensionReason string
Has the reason a user account is suspended either by the administrator or by Google at the time of suspension. The property is returned only if the suspended property is true.
thumbnailPhotoEtag string
ETag of the user's photo
thumbnailPhotoUrl string
Photo Url of the user.
websites GetUserWebsite[]
A list of the user's websites. The maximum allowed data size is 2Kb.
addresses Sequence[GetUserAddress]
A list of the user's addresses. The maximum allowed data size is 10Kb.
agreed_to_terms bool
This property is true if the user has completed an initial login and accepted the Terms of Service agreement.
aliases Sequence[str]
asps.list of the user's alias email addresses.
archived bool
Indicates if user is archived.
change_password_at_next_login bool
Indicates if the user is forced to change their password at next login. This setting doesn't apply when the user signs in via a third-party identity provider.
creation_time str
The time the user's account was created. The value is in ISO 8601 date and time format. The time is the complete date plus hours, minutes, and seconds in the form YYYY-MM-DDThh:mm:ssTZD. For example, 2010-04-05T17:30:04+01:00.
custom_schemas Sequence[GetUserCustomSchema]
Custom fields of the user.
customer_id str
The customer ID to retrieve all account users. You can use the alias my_customer to represent your account's customerId. As a reseller administrator, you can use the resold customer account's customerId. To get a customerId, use the account's primary domain in the domain parameter of a users.list request.
deletion_time str
The time the user's account was deleted. The value is in ISO 8601 date and time format The time is the complete date plus hours, minutes, and seconds in the form YYYY-MM-DDThh:mm:ssTZD. For example 2010-04-05T17:30:04+01:00.
emails Sequence[GetUserEmail]
A list of the user's email addresses. The maximum allowed data size is 10Kb.
etag str
ETag of the resource.
external_ids Sequence[GetUserExternalId]
A list of external IDs for the user, such as an employee or network ID. The maximum allowed data size is 2Kb.
hash_function str
Stores the hash format of the password property. We recommend sending the password property value as a base 16 bit hexadecimal-encoded hash value. Set the hashFunction values as either the SHA-1, MD5, or crypt hash format.
id str
The unique ID for the user.
ims Sequence[GetUserIm]
The user's Instant Messenger (IM) accounts. A user account can have multiple ims properties. But, only one of these ims properties can be the primary IM contact. The maximum allowed data size is 2Kb.
include_in_global_address_list bool
Indicates if the user's profile is visible in the Google Workspace global address list when the contact sharing feature is enabled for the domain.
ip_allowlist bool
If true, the user's IP address is added to the allow list.
is_admin bool
Indicates a user with super admininistrator privileges.
is_delegated_admin bool
Indicates if the user is a delegated administrator.
is_enforced_in2_step_verification bool
Is 2-step verification enforced.
is_enrolled_in2_step_verification bool
Is enrolled in 2-step verification.
is_mailbox_setup bool
Indicates if the user's Google mailbox is created. This property is only applicable if the user has been assigned a Gmail license.
keywords Sequence[GetUserKeyword]
A list of the user's keywords. The maximum allowed data size is 1Kb.
languages Sequence[GetUserLanguage]
A list of the user's languages. The maximum allowed data size is 1Kb.
last_login_time str
The last time the user logged into the user's account. The value is in ISO 8601 date and time format. The time is the complete date plus hours, minutes, and seconds in the form YYYY-MM-DDThh:mm:ssTZD. For example, 2010-04-05T17:30:04+01:00.
locations Sequence[GetUserLocation]
A list of the user's locations. The maximum allowed data size is 10Kb.
names Sequence[GetUserName]
Holds the given and family names of the user, and the read-only fullName value. The maximum number of characters in the givenName and in the familyName values is 60. In addition, name values support unicode/UTF-8 characters, and can contain spaces, letters (a-z), numbers (0-9), dashes (-), forward slashes (/), and periods (.). Maximum allowed data size for this field is 1Kb.
non_editable_aliases Sequence[str]
asps.list of the user's non-editable alias email addresses. These are typically outside the account's primary domain or sub-domain.
org_unit_path str
The full path of the parent organization associated with the user. If the parent organization is the top-level, it is represented as a forward slash (/).
organizations Sequence[GetUserOrganization]
A list of organizations the user belongs to. The maximum allowed data size is 10Kb.
password str
Stores the password for the user account. A password can contain any combination of ASCII characters. A minimum of 8 characters is required. The maximum length is 100 characters. As the API does not return the value of password, this field is write-only, and the value stored in the state will be what is provided in the configuration. The field is required on create and will be empty on import.
phones Sequence[GetUserPhone]
A list of the user's phone numbers. The maximum allowed data size is 1Kb.
posix_accounts Sequence[GetUserPosixAccount]
A list of POSIX account information for the user.
primary_email str
The user's primary email address. The primaryEmail must be unique and cannot be an alias of another user.
recovery_email str
Recovery email of the user.
recovery_phone str
Recovery phone of the user. The phone number must be in the E.164 format, starting with the plus sign (+). Example: +16506661212.
relations Sequence[GetUserRelation]
A list of the user's relationships to other users. The maximum allowed data size for this field is 2Kb.
ssh_public_keys Sequence[GetUserSshPublicKey]
A list of SSH public keys. The maximum allowed data size is 10Kb.
suspended bool
Indicates if user is suspended.
suspension_reason str
Has the reason a user account is suspended either by the administrator or by Google at the time of suspension. The property is returned only if the suspended property is true.
thumbnail_photo_etag str
ETag of the user's photo
thumbnail_photo_url str
Photo Url of the user.
websites Sequence[GetUserWebsite]
A list of the user's websites. The maximum allowed data size is 2Kb.
addresses List<Property Map>
A list of the user's addresses. The maximum allowed data size is 10Kb.
agreedToTerms Boolean
This property is true if the user has completed an initial login and accepted the Terms of Service agreement.
aliases List<String>
asps.list of the user's alias email addresses.
archived Boolean
Indicates if user is archived.
changePasswordAtNextLogin Boolean
Indicates if the user is forced to change their password at next login. This setting doesn't apply when the user signs in via a third-party identity provider.
creationTime String
The time the user's account was created. The value is in ISO 8601 date and time format. The time is the complete date plus hours, minutes, and seconds in the form YYYY-MM-DDThh:mm:ssTZD. For example, 2010-04-05T17:30:04+01:00.
customSchemas List<Property Map>
Custom fields of the user.
customerId String
The customer ID to retrieve all account users. You can use the alias my_customer to represent your account's customerId. As a reseller administrator, you can use the resold customer account's customerId. To get a customerId, use the account's primary domain in the domain parameter of a users.list request.
deletionTime String
The time the user's account was deleted. The value is in ISO 8601 date and time format The time is the complete date plus hours, minutes, and seconds in the form YYYY-MM-DDThh:mm:ssTZD. For example 2010-04-05T17:30:04+01:00.
emails List<Property Map>
A list of the user's email addresses. The maximum allowed data size is 10Kb.
etag String
ETag of the resource.
externalIds List<Property Map>
A list of external IDs for the user, such as an employee or network ID. The maximum allowed data size is 2Kb.
hashFunction String
Stores the hash format of the password property. We recommend sending the password property value as a base 16 bit hexadecimal-encoded hash value. Set the hashFunction values as either the SHA-1, MD5, or crypt hash format.
id String
The unique ID for the user.
ims List<Property Map>
The user's Instant Messenger (IM) accounts. A user account can have multiple ims properties. But, only one of these ims properties can be the primary IM contact. The maximum allowed data size is 2Kb.
includeInGlobalAddressList Boolean
Indicates if the user's profile is visible in the Google Workspace global address list when the contact sharing feature is enabled for the domain.
ipAllowlist Boolean
If true, the user's IP address is added to the allow list.
isAdmin Boolean
Indicates a user with super admininistrator privileges.
isDelegatedAdmin Boolean
Indicates if the user is a delegated administrator.
isEnforcedIn2StepVerification Boolean
Is 2-step verification enforced.
isEnrolledIn2StepVerification Boolean
Is enrolled in 2-step verification.
isMailboxSetup Boolean
Indicates if the user's Google mailbox is created. This property is only applicable if the user has been assigned a Gmail license.
keywords List<Property Map>
A list of the user's keywords. The maximum allowed data size is 1Kb.
languages List<Property Map>
A list of the user's languages. The maximum allowed data size is 1Kb.
lastLoginTime String
The last time the user logged into the user's account. The value is in ISO 8601 date and time format. The time is the complete date plus hours, minutes, and seconds in the form YYYY-MM-DDThh:mm:ssTZD. For example, 2010-04-05T17:30:04+01:00.
locations List<Property Map>
A list of the user's locations. The maximum allowed data size is 10Kb.
names List<Property Map>
Holds the given and family names of the user, and the read-only fullName value. The maximum number of characters in the givenName and in the familyName values is 60. In addition, name values support unicode/UTF-8 characters, and can contain spaces, letters (a-z), numbers (0-9), dashes (-), forward slashes (/), and periods (.). Maximum allowed data size for this field is 1Kb.
nonEditableAliases List<String>
asps.list of the user's non-editable alias email addresses. These are typically outside the account's primary domain or sub-domain.
orgUnitPath String
The full path of the parent organization associated with the user. If the parent organization is the top-level, it is represented as a forward slash (/).
organizations List<Property Map>
A list of organizations the user belongs to. The maximum allowed data size is 10Kb.
password String
Stores the password for the user account. A password can contain any combination of ASCII characters. A minimum of 8 characters is required. The maximum length is 100 characters. As the API does not return the value of password, this field is write-only, and the value stored in the state will be what is provided in the configuration. The field is required on create and will be empty on import.
phones List<Property Map>
A list of the user's phone numbers. The maximum allowed data size is 1Kb.
posixAccounts List<Property Map>
A list of POSIX account information for the user.
primaryEmail String
The user's primary email address. The primaryEmail must be unique and cannot be an alias of another user.
recoveryEmail String
Recovery email of the user.
recoveryPhone String
Recovery phone of the user. The phone number must be in the E.164 format, starting with the plus sign (+). Example: +16506661212.
relations List<Property Map>
A list of the user's relationships to other users. The maximum allowed data size for this field is 2Kb.
sshPublicKeys List<Property Map>
A list of SSH public keys. The maximum allowed data size is 10Kb.
suspended Boolean
Indicates if user is suspended.
suspensionReason String
Has the reason a user account is suspended either by the administrator or by Google at the time of suspension. The property is returned only if the suspended property is true.
thumbnailPhotoEtag String
ETag of the user's photo
thumbnailPhotoUrl String
Photo Url of the user.
websites List<Property Map>
A list of the user's websites. The maximum allowed data size is 2Kb.

Supporting Types

GetUserAddress

Country This property is required. string
CountryCode This property is required. string
CustomType This property is required. string
ExtendedAddress This property is required. string
Formatted This property is required. string
Locality This property is required. string
PoBox This property is required. string
PostalCode This property is required. string
Primary This property is required. bool
Region This property is required. string
SourceIsStructured This property is required. bool
StreetAddress This property is required. string
Type This property is required. string
Country This property is required. string
CountryCode This property is required. string
CustomType This property is required. string
ExtendedAddress This property is required. string
Formatted This property is required. string
Locality This property is required. string
PoBox This property is required. string
PostalCode This property is required. string
Primary This property is required. bool
Region This property is required. string
SourceIsStructured This property is required. bool
StreetAddress This property is required. string
Type This property is required. string
country This property is required. String
countryCode This property is required. String
customType This property is required. String
extendedAddress This property is required. String
formatted This property is required. String
locality This property is required. String
poBox This property is required. String
postalCode This property is required. String
primary This property is required. Boolean
region This property is required. String
sourceIsStructured This property is required. Boolean
streetAddress This property is required. String
type This property is required. String
country This property is required. string
countryCode This property is required. string
customType This property is required. string
extendedAddress This property is required. string
formatted This property is required. string
locality This property is required. string
poBox This property is required. string
postalCode This property is required. string
primary This property is required. boolean
region This property is required. string
sourceIsStructured This property is required. boolean
streetAddress This property is required. string
type This property is required. string
country This property is required. str
country_code This property is required. str
custom_type This property is required. str
extended_address This property is required. str
formatted This property is required. str
locality This property is required. str
po_box This property is required. str
postal_code This property is required. str
primary This property is required. bool
region This property is required. str
source_is_structured This property is required. bool
street_address This property is required. str
type This property is required. str
country This property is required. String
countryCode This property is required. String
customType This property is required. String
extendedAddress This property is required. String
formatted This property is required. String
locality This property is required. String
poBox This property is required. String
postalCode This property is required. String
primary This property is required. Boolean
region This property is required. String
sourceIsStructured This property is required. Boolean
streetAddress This property is required. String
type This property is required. String

GetUserCustomSchema

SchemaName This property is required. string
SchemaValues This property is required. Dictionary<string, string>
SchemaName This property is required. string
SchemaValues This property is required. map[string]string
schemaName This property is required. String
schemaValues This property is required. Map<String,String>
schemaName This property is required. string
schemaValues This property is required. {[key: string]: string}
schema_name This property is required. str
schema_values This property is required. Mapping[str, str]
schemaName This property is required. String
schemaValues This property is required. Map<String>

GetUserEmail

Address This property is required. string
CustomType This property is required. string
Primary This property is required. bool
Type This property is required. string
Address This property is required. string
CustomType This property is required. string
Primary This property is required. bool
Type This property is required. string
address This property is required. String
customType This property is required. String
primary This property is required. Boolean
type This property is required. String
address This property is required. string
customType This property is required. string
primary This property is required. boolean
type This property is required. string
address This property is required. str
custom_type This property is required. str
primary This property is required. bool
type This property is required. str
address This property is required. String
customType This property is required. String
primary This property is required. Boolean
type This property is required. String

GetUserExternalId

CustomType This property is required. string
Type This property is required. string
Value This property is required. string
CustomType This property is required. string
Type This property is required. string
Value This property is required. string
customType This property is required. String
type This property is required. String
value This property is required. String
customType This property is required. string
type This property is required. string
value This property is required. string
custom_type This property is required. str
type This property is required. str
value This property is required. str
customType This property is required. String
type This property is required. String
value This property is required. String

GetUserIm

CustomProtocol This property is required. string
CustomType This property is required. string
Im This property is required. string
Primary This property is required. bool
Protocol This property is required. string
Type This property is required. string
CustomProtocol This property is required. string
CustomType This property is required. string
Im This property is required. string
Primary This property is required. bool
Protocol This property is required. string
Type This property is required. string
customProtocol This property is required. String
customType This property is required. String
im This property is required. String
primary This property is required. Boolean
protocol This property is required. String
type This property is required. String
customProtocol This property is required. string
customType This property is required. string
im This property is required. string
primary This property is required. boolean
protocol This property is required. string
type This property is required. string
custom_protocol This property is required. str
custom_type This property is required. str
im This property is required. str
primary This property is required. bool
protocol This property is required. str
type This property is required. str
customProtocol This property is required. String
customType This property is required. String
im This property is required. String
primary This property is required. Boolean
protocol This property is required. String
type This property is required. String

GetUserKeyword

CustomType This property is required. string
Type This property is required. string
Value This property is required. string
CustomType This property is required. string
Type This property is required. string
Value This property is required. string
customType This property is required. String
type This property is required. String
value This property is required. String
customType This property is required. string
type This property is required. string
value This property is required. string
custom_type This property is required. str
type This property is required. str
value This property is required. str
customType This property is required. String
type This property is required. String
value This property is required. String

GetUserLanguage

CustomLanguage This property is required. string
LanguageCode This property is required. string
Preference This property is required. string
CustomLanguage This property is required. string
LanguageCode This property is required. string
Preference This property is required. string
customLanguage This property is required. String
languageCode This property is required. String
preference This property is required. String
customLanguage This property is required. string
languageCode This property is required. string
preference This property is required. string
custom_language This property is required. str
language_code This property is required. str
preference This property is required. str
customLanguage This property is required. String
languageCode This property is required. String
preference This property is required. String

GetUserLocation

Area This property is required. string
BuildingId This property is required. string
CustomType This property is required. string
DeskCode This property is required. string
FloorName This property is required. string
FloorSection This property is required. string
Type This property is required. string
Area This property is required. string
BuildingId This property is required. string
CustomType This property is required. string
DeskCode This property is required. string
FloorName This property is required. string
FloorSection This property is required. string
Type This property is required. string
area This property is required. String
buildingId This property is required. String
customType This property is required. String
deskCode This property is required. String
floorName This property is required. String
floorSection This property is required. String
type This property is required. String
area This property is required. string
buildingId This property is required. string
customType This property is required. string
deskCode This property is required. string
floorName This property is required. string
floorSection This property is required. string
type This property is required. string
area This property is required. str
building_id This property is required. str
custom_type This property is required. str
desk_code This property is required. str
floor_name This property is required. str
floor_section This property is required. str
type This property is required. str
area This property is required. String
buildingId This property is required. String
customType This property is required. String
deskCode This property is required. String
floorName This property is required. String
floorSection This property is required. String
type This property is required. String

GetUserName

FamilyName This property is required. string
FullName This property is required. string
GivenName This property is required. string
FamilyName This property is required. string
FullName This property is required. string
GivenName This property is required. string
familyName This property is required. String
fullName This property is required. String
givenName This property is required. String
familyName This property is required. string
fullName This property is required. string
givenName This property is required. string
family_name This property is required. str
full_name This property is required. str
given_name This property is required. str
familyName This property is required. String
fullName This property is required. String
givenName This property is required. String

GetUserOrganization

CostCenter This property is required. string
CustomType This property is required. string
Department This property is required. string
Description This property is required. string
Domain This property is required. string
FullTimeEquivalent This property is required. double
Location This property is required. string
Name This property is required. string
Primary This property is required. bool
Symbol This property is required. string
Title This property is required. string
Type This property is required. string
CostCenter This property is required. string
CustomType This property is required. string
Department This property is required. string
Description This property is required. string
Domain This property is required. string
FullTimeEquivalent This property is required. float64
Location This property is required. string
Name This property is required. string
Primary This property is required. bool
Symbol This property is required. string
Title This property is required. string
Type This property is required. string
costCenter This property is required. String
customType This property is required. String
department This property is required. String
description This property is required. String
domain This property is required. String
fullTimeEquivalent This property is required. Double
location This property is required. String
name This property is required. String
primary This property is required. Boolean
symbol This property is required. String
title This property is required. String
type This property is required. String
costCenter This property is required. string
customType This property is required. string
department This property is required. string
description This property is required. string
domain This property is required. string
fullTimeEquivalent This property is required. number
location This property is required. string
name This property is required. string
primary This property is required. boolean
symbol This property is required. string
title This property is required. string
type This property is required. string
cost_center This property is required. str
custom_type This property is required. str
department This property is required. str
description This property is required. str
domain This property is required. str
full_time_equivalent This property is required. float
location This property is required. str
name This property is required. str
primary This property is required. bool
symbol This property is required. str
title This property is required. str
type This property is required. str
costCenter This property is required. String
customType This property is required. String
department This property is required. String
description This property is required. String
domain This property is required. String
fullTimeEquivalent This property is required. Number
location This property is required. String
name This property is required. String
primary This property is required. Boolean
symbol This property is required. String
title This property is required. String
type This property is required. String

GetUserPhone

CustomType This property is required. string
Primary This property is required. bool
Type This property is required. string
Value This property is required. string
CustomType This property is required. string
Primary This property is required. bool
Type This property is required. string
Value This property is required. string
customType This property is required. String
primary This property is required. Boolean
type This property is required. String
value This property is required. String
customType This property is required. string
primary This property is required. boolean
type This property is required. string
value This property is required. string
custom_type This property is required. str
primary This property is required. bool
type This property is required. str
value This property is required. str
customType This property is required. String
primary This property is required. Boolean
type This property is required. String
value This property is required. String

GetUserPosixAccount

AccountId This property is required. string
Gecos This property is required. string
Gid This property is required. string
HomeDirectory This property is required. string
OperatingSystemType This property is required. string
Primary This property is required. bool
Shell This property is required. string
SystemId This property is required. string
Uid This property is required. string
Username This property is required. string
AccountId This property is required. string
Gecos This property is required. string
Gid This property is required. string
HomeDirectory This property is required. string
OperatingSystemType This property is required. string
Primary This property is required. bool
Shell This property is required. string
SystemId This property is required. string
Uid This property is required. string
Username This property is required. string
accountId This property is required. String
gecos This property is required. String
gid This property is required. String
homeDirectory This property is required. String
operatingSystemType This property is required. String
primary This property is required. Boolean
shell This property is required. String
systemId This property is required. String
uid This property is required. String
username This property is required. String
accountId This property is required. string
gecos This property is required. string
gid This property is required. string
homeDirectory This property is required. string
operatingSystemType This property is required. string
primary This property is required. boolean
shell This property is required. string
systemId This property is required. string
uid This property is required. string
username This property is required. string
account_id This property is required. str
gecos This property is required. str
gid This property is required. str
home_directory This property is required. str
operating_system_type This property is required. str
primary This property is required. bool
shell This property is required. str
system_id This property is required. str
uid This property is required. str
username This property is required. str
accountId This property is required. String
gecos This property is required. String
gid This property is required. String
homeDirectory This property is required. String
operatingSystemType This property is required. String
primary This property is required. Boolean
shell This property is required. String
systemId This property is required. String
uid This property is required. String
username This property is required. String

GetUserRelation

CustomType This property is required. string
Type This property is required. string
Value This property is required. string
CustomType This property is required. string
Type This property is required. string
Value This property is required. string
customType This property is required. String
type This property is required. String
value This property is required. String
customType This property is required. string
type This property is required. string
value This property is required. string
custom_type This property is required. str
type This property is required. str
value This property is required. str
customType This property is required. String
type This property is required. String
value This property is required. String

GetUserSshPublicKey

ExpirationTimeUsec This property is required. string
Fingerprint This property is required. string
Key This property is required. string
ExpirationTimeUsec This property is required. string
Fingerprint This property is required. string
Key This property is required. string
expirationTimeUsec This property is required. String
fingerprint This property is required. String
key This property is required. String
expirationTimeUsec This property is required. string
fingerprint This property is required. string
key This property is required. string
expiration_time_usec This property is required. str
fingerprint This property is required. str
key This property is required. str
expirationTimeUsec This property is required. String
fingerprint This property is required. String
key This property is required. String

GetUserWebsite

CustomType This property is required. string
Primary This property is required. bool
Type This property is required. string
Value This property is required. string
CustomType This property is required. string
Primary This property is required. bool
Type This property is required. string
Value This property is required. string
customType This property is required. String
primary This property is required. Boolean
type This property is required. String
value This property is required. String
customType This property is required. string
primary This property is required. boolean
type This property is required. string
value This property is required. string
custom_type This property is required. str
primary This property is required. bool
type This property is required. str
value This property is required. str
customType This property is required. String
primary This property is required. Boolean
type This property is required. String
value This property is required. String

Package Details

Repository
googleworkspace hashicorp/terraform-provider-googleworkspace
License
Notes
This Pulumi package is based on the googleworkspace Terraform Provider.
googleworkspace 0.7.0 published on Wednesday, Jan 15, 2025 by hashicorp