Class UsersResource
The "users" collection of methods.
Inherited Members
Namespace: Google.Apis.Admin.Directory.directory_v1
Assembly: Google.Apis.Admin.Directory.directory_v1.dll
Syntax
public class UsersResource
Constructors
UsersResource(IClientService)
Constructs a new resource.
Declaration
public UsersResource(IClientService service)
Parameters
| Type | Name | Description |
|---|---|---|
| IClientService | service |
Properties
Aliases
Gets the Aliases resource.
Declaration
public virtual UsersResource.AliasesResource Aliases { get; }
Property Value
| Type | Description |
|---|---|
| UsersResource.AliasesResource |
Photos
Gets the Photos resource.
Declaration
public virtual UsersResource.PhotosResource Photos { get; }
Property Value
| Type | Description |
|---|---|
| UsersResource.PhotosResource |
Methods
Delete(string)
Deletes a user.
Declaration
public virtual UsersResource.DeleteRequest Delete(string userKey)
Parameters
| Type | Name | Description |
|---|---|---|
| string | userKey | Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. |
Returns
| Type | Description |
|---|---|
| UsersResource.DeleteRequest |
Get(string)
Retrieves a user.
Declaration
public virtual UsersResource.GetRequest Get(string userKey)
Parameters
| Type | Name | Description |
|---|---|---|
| string | userKey | Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. |
Returns
| Type | Description |
|---|---|
| UsersResource.GetRequest |
Insert(User)
Creates a user. Mutate calls immediately following user creation might sometimes fail as the user isn't
fully created due to propagation delay in our backends. Check the error details for the "User creation is
not complete" message to see if this is the case. Retrying the calls after some time can help in this case.
If resolveConflictAccount is set to true, a 202 response code means that a conflicting unmanaged
account exists and was invited to join the organization. A 409 response code means that a conflicting
account exists so the user wasn't created based on the handling unmanaged user
accounts option selected.
Declaration
public virtual UsersResource.InsertRequest Insert(User body)
Parameters
| Type | Name | Description |
|---|---|---|
| User | body | The body of the request. |
Returns
| Type | Description |
|---|---|
| UsersResource.InsertRequest |
List()
Retrieves a paginated list of either deleted users or all users in a domain.
Declaration
public virtual UsersResource.ListRequest List()
Returns
| Type | Description |
|---|---|
| UsersResource.ListRequest |
MakeAdmin(UserMakeAdmin, string)
Makes a user a super administrator.
Declaration
public virtual UsersResource.MakeAdminRequest MakeAdmin(UserMakeAdmin body, string userKey)
Parameters
| Type | Name | Description |
|---|---|---|
| UserMakeAdmin | body | The body of the request. |
| string | userKey | Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. |
Returns
| Type | Description |
|---|---|
| UsersResource.MakeAdminRequest |
Patch(User, string)
Updates a user using patch semantics. The update method should be used instead, because it also supports
patch semantics and has better performance. If you're mapping an external identity to a Google identity, use
the update method instead
of the patch method. This method is unable to clear fields that contain repeated objects (addresses,
phones, etc). Use the update method instead.
Declaration
public virtual UsersResource.PatchRequest Patch(User body, string userKey)
Parameters
| Type | Name | Description |
|---|---|---|
| User | body | The body of the request. |
| string | userKey | Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. |
Returns
| Type | Description |
|---|---|
| UsersResource.PatchRequest |
SignOut(string)
Signs a user out of all web and device sessions and reset their sign-in cookies. User will have to sign in by authenticating again.
Declaration
public virtual UsersResource.SignOutRequest SignOut(string userKey)
Parameters
| Type | Name | Description |
|---|---|---|
| string | userKey | Identifies the target user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. |
Returns
| Type | Description |
|---|---|
| UsersResource.SignOutRequest |
Undelete(UserUndelete, string)
Undeletes a deleted user.
Declaration
public virtual UsersResource.UndeleteRequest Undelete(UserUndelete body, string userKey)
Parameters
| Type | Name | Description |
|---|---|---|
| UserUndelete | body | The body of the request. |
| string | userKey | The immutable id of the user |
Returns
| Type | Description |
|---|---|
| UsersResource.UndeleteRequest |
Update(User, string)
Updates a user. This method supports patch semantics, meaning that you only need to include the fields you
wish to update. Fields that are not present in the request will be preserved, and fields set to null will
be cleared. For repeating fields that contain arrays, individual items in the array can't be patched
piecemeal; they must be supplied in the request body with the desired values for all items. See the user
accounts guide for
more information.
Declaration
public virtual UsersResource.UpdateRequest Update(User body, string userKey)
Parameters
| Type | Name | Description |
|---|---|---|
| User | body | The body of the request. |
| string | userKey | Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID. |
Returns
| Type | Description |
|---|---|
| UsersResource.UpdateRequest |
Watch(Channel)
Watches for changes in users list.
Declaration
public virtual UsersResource.WatchRequest Watch(Channel body)
Parameters
| Type | Name | Description |
|---|---|---|
| Channel | body | The body of the request. |
Returns
| Type | Description |
|---|---|
| UsersResource.WatchRequest |