Class UsersResource
The "users" collection of methods.
Inheritance
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 |
|---|---|---|
| System.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 |
|---|---|---|
| System.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.
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. |
| System.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, since it also
supports patch semantics and has better performance. 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. |
| System.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)
Sign 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 |
|---|---|---|
| System.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. |
| System.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 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.
Declaration
public virtual UsersResource.UpdateRequest Update(User body, string userKey)
Parameters
| Type | Name | Description |
|---|---|---|
| User | body | The body of the request. |
| System.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)
Watch 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 |