View Source GoogleApi.Admin.Directory_v1.Api.Users (google_api_admin v0.40.0)

API calls for all endpoints tagged Users.

Summary

Functions

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.

Retrieves a paginated list of either deleted users or all users in a domain.

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.

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.

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.

Functions

Link to this function

directory_users_aliases_delete(connection, user_key, alias, optional_params \\ [], opts \\ [])

View Source
@spec directory_users_aliases_delete(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, nil} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}

Removes an alias.

Parameters

  • connection (type: GoogleApi.Admin.Directory_v1.Connection.t) - Connection to server
  • user_key (type: String.t) - Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
  • alias (type: String.t) - The alias to be removed.
  • optional_params (type: keyword()) - Optional parameters
    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %{}} on success
  • {:error, info} on failure
Link to this function

directory_users_aliases_insert(connection, user_key, optional_params \\ [], opts \\ [])

View Source
@spec directory_users_aliases_insert(
  Tesla.Env.client(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.Admin.Directory_v1.Model.Alias.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Adds an alias.

Parameters

  • connection (type: GoogleApi.Admin.Directory_v1.Connection.t) - Connection to server
  • user_key (type: String.t) - Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
  • optional_params (type: keyword()) - Optional parameters
    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
    • :body (type: GoogleApi.Admin.Directory_v1.Model.Alias.t) -
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.Admin.Directory_v1.Model.Alias{}} on success
  • {:error, info} on failure
Link to this function

directory_users_aliases_list(connection, user_key, optional_params \\ [], opts \\ [])

View Source
@spec directory_users_aliases_list(
  Tesla.Env.client(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.Admin.Directory_v1.Model.Aliases.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Lists all aliases for a user.

Parameters

  • connection (type: GoogleApi.Admin.Directory_v1.Connection.t) - Connection to server
  • user_key (type: String.t) - Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
  • optional_params (type: keyword()) - Optional parameters
    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
    • :event (type: String.t) - Events to watch for.
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.Admin.Directory_v1.Model.Aliases{}} on success
  • {:error, info} on failure
Link to this function

directory_users_aliases_watch(connection, user_key, optional_params \\ [], opts \\ [])

View Source
@spec directory_users_aliases_watch(
  Tesla.Env.client(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.Admin.Directory_v1.Model.Channel.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Watches for changes in users list.

Parameters

  • connection (type: GoogleApi.Admin.Directory_v1.Connection.t) - Connection to server
  • user_key (type: String.t) - Email or immutable ID of the user
  • optional_params (type: keyword()) - Optional parameters
    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
    • :event (type: String.t) - Events to watch for.
    • :body (type: GoogleApi.Admin.Directory_v1.Model.Channel.t) -
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.Admin.Directory_v1.Model.Channel{}} on success
  • {:error, info} on failure
Link to this function

directory_users_delete(connection, user_key, optional_params \\ [], opts \\ [])

View Source
@spec directory_users_delete(Tesla.Env.client(), String.t(), keyword(), keyword()) ::
  {:ok, nil} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}

Deletes a user.

Parameters

  • connection (type: GoogleApi.Admin.Directory_v1.Connection.t) - Connection to server
  • user_key (type: String.t) - Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
  • optional_params (type: keyword()) - Optional parameters
    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %{}} on success
  • {:error, info} on failure
Link to this function

directory_users_get(connection, user_key, optional_params \\ [], opts \\ [])

View Source
@spec directory_users_get(Tesla.Env.client(), String.t(), keyword(), keyword()) ::
  {:ok, GoogleApi.Admin.Directory_v1.Model.User.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Retrieves a user.

Parameters

  • connection (type: GoogleApi.Admin.Directory_v1.Connection.t) - Connection to server
  • user_key (type: String.t) - Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
  • optional_params (type: keyword()) - Optional parameters
    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
    • :customFieldMask (type: String.t) - A comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom.
    • :projection (type: String.t) - What subset of fields to fetch for this user.
    • :viewType (type: String.t) - Whether to fetch the administrator-only or domain-wide public view of the user. For more information, see Retrieve a user as a non-administrator.
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.Admin.Directory_v1.Model.User{}} on success
  • {:error, info} on failure
Link to this function

directory_users_insert(connection, optional_params \\ [], opts \\ [])

View Source
@spec directory_users_insert(Tesla.Env.client(), keyword(), keyword()) ::
  {:ok, GoogleApi.Admin.Directory_v1.Model.User.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

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.

Parameters

  • connection (type: GoogleApi.Admin.Directory_v1.Connection.t) - Connection to server
  • optional_params (type: keyword()) - Optional parameters
    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
    • :resolveConflictAccount (type: boolean()) - Optional. If set to true, the option selected for handling unmanaged user accounts will apply. Default: false
    • :body (type: GoogleApi.Admin.Directory_v1.Model.User.t) -
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.Admin.Directory_v1.Model.User{}} on success
  • {:error, info} on failure
Link to this function

directory_users_list(connection, optional_params \\ [], opts \\ [])

View Source
@spec directory_users_list(Tesla.Env.client(), keyword(), keyword()) ::
  {:ok, GoogleApi.Admin.Directory_v1.Model.Users.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Retrieves a paginated list of either deleted users or all users in a domain.

Parameters

  • connection (type: GoogleApi.Admin.Directory_v1.Connection.t) - Connection to server
  • optional_params (type: keyword()) - Optional parameters
    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
    • :customFieldMask (type: String.t) - A comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom.
    • :customer (type: String.t) - The unique ID for the customer's Google Workspace account. In case of a multi-domain account, to fetch all groups for a customer, use this field instead of domain. You can also use the my_customer alias to represent your account's customerId. The customerId is also returned as part of the Users resource. You must provide either the customer or the domain parameter.
    • :domain (type: String.t) - The domain name. Use this field to get groups from only one domain. To return all domains for a customer account, use the customer query parameter instead. Either the customer or the domain parameter must be provided.
    • :event (type: String.t) - Event on which subscription is intended (if subscribing)
    • :maxResults (type: integer()) - Maximum number of results to return.
    • :orderBy (type: String.t) - Property to use for sorting results.
    • :pageToken (type: String.t) - Token to specify next page in the list
    • :projection (type: String.t) - What subset of fields to fetch for this user.
    • :query (type: String.t) - Query string for searching user fields. For more information on constructing user queries, see Search for Users.
    • :showDeleted (type: String.t) - If set to true, retrieves the list of deleted users. (Default: false)
    • :sortOrder (type: String.t) - Whether to return results in ascending or descending order, ignoring case.
    • :viewType (type: String.t) - Whether to fetch the administrator-only or domain-wide public view of the user. For more information, see Retrieve a user as a non-administrator.
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.Admin.Directory_v1.Model.Users{}} on success
  • {:error, info} on failure
Link to this function

directory_users_make_admin(connection, user_key, optional_params \\ [], opts \\ [])

View Source
@spec directory_users_make_admin(Tesla.Env.client(), String.t(), keyword(), keyword()) ::
  {:ok, nil} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}

Makes a user a super administrator.

Parameters

  • connection (type: GoogleApi.Admin.Directory_v1.Connection.t) - Connection to server
  • user_key (type: String.t) - Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
  • optional_params (type: keyword()) - Optional parameters
    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
    • :body (type: GoogleApi.Admin.Directory_v1.Model.UserMakeAdmin.t) -
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %{}} on success
  • {:error, info} on failure
Link to this function

directory_users_patch(connection, user_key, optional_params \\ [], opts \\ [])

View Source
@spec directory_users_patch(Tesla.Env.client(), String.t(), keyword(), keyword()) ::
  {:ok, GoogleApi.Admin.Directory_v1.Model.User.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

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.

Parameters

  • connection (type: GoogleApi.Admin.Directory_v1.Connection.t) - Connection to server
  • user_key (type: String.t) - Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
  • optional_params (type: keyword()) - Optional parameters
    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
    • :body (type: GoogleApi.Admin.Directory_v1.Model.User.t) -
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.Admin.Directory_v1.Model.User{}} on success
  • {:error, info} on failure
Link to this function

directory_users_photos_delete(connection, user_key, optional_params \\ [], opts \\ [])

View Source
@spec directory_users_photos_delete(
  Tesla.Env.client(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, nil} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}

Removes the user's photo.

Parameters

  • connection (type: GoogleApi.Admin.Directory_v1.Connection.t) - Connection to server
  • user_key (type: String.t) - Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
  • optional_params (type: keyword()) - Optional parameters
    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %{}} on success
  • {:error, info} on failure
Link to this function

directory_users_photos_get(connection, user_key, optional_params \\ [], opts \\ [])

View Source
@spec directory_users_photos_get(Tesla.Env.client(), String.t(), keyword(), keyword()) ::
  {:ok, GoogleApi.Admin.Directory_v1.Model.UserPhoto.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Retrieves the user's photo.

Parameters

  • connection (type: GoogleApi.Admin.Directory_v1.Connection.t) - Connection to server
  • user_key (type: String.t) - Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
  • optional_params (type: keyword()) - Optional parameters
    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.Admin.Directory_v1.Model.UserPhoto{}} on success
  • {:error, info} on failure
Link to this function

directory_users_photos_patch(connection, user_key, optional_params \\ [], opts \\ [])

View Source
@spec directory_users_photos_patch(
  Tesla.Env.client(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.Admin.Directory_v1.Model.UserPhoto.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Adds a photo for the user. This method supports patch semantics.

Parameters

  • connection (type: GoogleApi.Admin.Directory_v1.Connection.t) - Connection to server
  • user_key (type: String.t) - Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
  • optional_params (type: keyword()) - Optional parameters
    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
    • :body (type: GoogleApi.Admin.Directory_v1.Model.UserPhoto.t) -
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.Admin.Directory_v1.Model.UserPhoto{}} on success
  • {:error, info} on failure
Link to this function

directory_users_photos_update(connection, user_key, optional_params \\ [], opts \\ [])

View Source
@spec directory_users_photos_update(
  Tesla.Env.client(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.Admin.Directory_v1.Model.UserPhoto.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Adds a photo for the user.

Parameters

  • connection (type: GoogleApi.Admin.Directory_v1.Connection.t) - Connection to server
  • user_key (type: String.t) - Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
  • optional_params (type: keyword()) - Optional parameters
    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
    • :body (type: GoogleApi.Admin.Directory_v1.Model.UserPhoto.t) -
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.Admin.Directory_v1.Model.UserPhoto{}} on success
  • {:error, info} on failure
Link to this function

directory_users_sign_out(connection, user_key, optional_params \\ [], opts \\ [])

View Source
@spec directory_users_sign_out(Tesla.Env.client(), String.t(), keyword(), keyword()) ::
  {:ok, nil} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}

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.

Parameters

  • connection (type: GoogleApi.Admin.Directory_v1.Connection.t) - Connection to server
  • user_key (type: String.t) - 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.
  • optional_params (type: keyword()) - Optional parameters
    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %{}} on success
  • {:error, info} on failure
Link to this function

directory_users_undelete(connection, user_key, optional_params \\ [], opts \\ [])

View Source
@spec directory_users_undelete(Tesla.Env.client(), String.t(), keyword(), keyword()) ::
  {:ok, nil} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}

Undeletes a deleted user.

Parameters

  • connection (type: GoogleApi.Admin.Directory_v1.Connection.t) - Connection to server
  • user_key (type: String.t) - The immutable id of the user
  • optional_params (type: keyword()) - Optional parameters
    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
    • :body (type: GoogleApi.Admin.Directory_v1.Model.UserUndelete.t) -
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %{}} on success
  • {:error, info} on failure
Link to this function

directory_users_update(connection, user_key, optional_params \\ [], opts \\ [])

View Source
@spec directory_users_update(Tesla.Env.client(), String.t(), keyword(), keyword()) ::
  {:ok, GoogleApi.Admin.Directory_v1.Model.User.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

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.

Parameters

  • connection (type: GoogleApi.Admin.Directory_v1.Connection.t) - Connection to server
  • user_key (type: String.t) - Identifies the user in the API request. The value can be the user's primary email address, alias email address, or unique user ID.
  • optional_params (type: keyword()) - Optional parameters
    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
    • :body (type: GoogleApi.Admin.Directory_v1.Model.User.t) -
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.Admin.Directory_v1.Model.User{}} on success
  • {:error, info} on failure
Link to this function

directory_users_watch(connection, optional_params \\ [], opts \\ [])

View Source
@spec directory_users_watch(Tesla.Env.client(), keyword(), keyword()) ::
  {:ok, GoogleApi.Admin.Directory_v1.Model.Channel.t()}
  | {:ok, Tesla.Env.t()}
  | {:ok, list()}
  | {:error, any()}

Watches for changes in users list.

Parameters

  • connection (type: GoogleApi.Admin.Directory_v1.Connection.t) - Connection to server
  • optional_params (type: keyword()) - Optional parameters
    • :"$.xgafv" (type: String.t) - V1 error format.
    • :access_token (type: String.t) - OAuth access token.
    • :alt (type: String.t) - Data format for response.
    • :callback (type: String.t) - JSONP
    • :fields (type: String.t) - Selector specifying which fields to include in a partial response.
    • :key (type: String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :oauth_token (type: String.t) - OAuth 2.0 token for the current user.
    • :prettyPrint (type: boolean()) - Returns response with indentations and line breaks.
    • :quotaUser (type: String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :uploadType (type: String.t) - Legacy upload protocol for media (e.g. "media", "multipart").
    • :upload_protocol (type: String.t) - Upload protocol for media (e.g. "raw", "multipart").
    • :customFieldMask (type: String.t) - Comma-separated list of schema names. All fields from these schemas are fetched. This should only be set when projection=custom.
    • :customer (type: String.t) - Immutable ID of the Google Workspace account. In case of multi-domain, to fetch all users for a customer, fill this field instead of domain.
    • :domain (type: String.t) - Name of the domain. Fill this field to get users from only this domain. To return all users in a multi-domain fill customer field instead."
    • :event (type: String.t) - Events to watch for.
    • :maxResults (type: integer()) - Maximum number of results to return.
    • :orderBy (type: String.t) - Column to use for sorting results
    • :pageToken (type: String.t) - Token to specify next page in the list
    • :projection (type: String.t) - What subset of fields to fetch for this user.
    • :query (type: String.t) - Query string search. Should be of the form "". Complete documentation is at https: //developers.google.com/admin-sdk/directory/v1/guides/search-users
    • :showDeleted (type: String.t) - If set to true, retrieves the list of deleted users. (Default: false)
    • :sortOrder (type: String.t) - Whether to return results in ascending or descending order.
    • :viewType (type: String.t) - Whether to fetch the administrator-only or domain-wide public view of the user. For more information, see Retrieve a user as a non-administrator.
    • :body (type: GoogleApi.Admin.Directory_v1.Model.Channel.t) -
  • opts (type: keyword()) - Call options

Returns

  • {:ok, %GoogleApi.Admin.Directory_v1.Model.Channel{}} on success
  • {:error, info} on failure