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

API calls for all endpoints tagged Users.

Link to this section Summary

Functions

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, 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.

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.

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.

Link to this section Functions

Link to this function

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

View Source

Specs

directory_users_aliases_delete(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  keyword(),
  keyword()
) :: {:ok, nil} | {:ok, Tesla.Env.t()} | {: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

Specs

directory_users_aliases_insert(
  Tesla.Env.client(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.Admin.Directory_v1.Model.Alias.t()}
  | {:ok, Tesla.Env.t()}
  | {: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

Specs

directory_users_aliases_list(
  Tesla.Env.client(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.Admin.Directory_v1.Model.Aliases.t()}
  | {:ok, Tesla.Env.t()}
  | {: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").
  • 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

Specs

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

Watch 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

Specs

directory_users_delete(Tesla.Env.client(), String.t(), keyword(), keyword()) ::
  {:ok, nil} | {:ok, Tesla.Env.t()} | {: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

Specs

directory_users_get(Tesla.Env.client(), String.t(), keyword(), keyword()) ::
  {:ok, GoogleApi.Admin.Directory_v1.Model.User.t()}
  | {:ok, Tesla.Env.t()}
  | {: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

Specs

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

Creates a user.

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").
    • :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

Specs

directory_users_list(Tesla.Env.client(), keyword(), keyword()) ::
  {:ok, GoogleApi.Admin.Directory_v1.Model.Users.t()}
  | {:ok, Tesla.Env.t()}
  | {: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 G Suite account. In case of a multi-domain account, to fetch all groups for a customer, fill 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. Either the customer or the domain parameter must be provided.
    • :domain (type: String.t) - The domain name. Use this field to get fields 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.
    • :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.
    • :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

Specs

directory_users_make_admin(Tesla.Env.client(), String.t(), keyword(), keyword()) ::
  {:ok, nil} | {:ok, Tesla.Env.t()} | {: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

Specs

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

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.

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

Specs

directory_users_photos_delete(
  Tesla.Env.client(),
  String.t(),
  keyword(),
  keyword()
) :: {:ok, nil} | {:ok, Tesla.Env.t()} | {: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

Specs

directory_users_photos_get(Tesla.Env.client(), String.t(), keyword(), keyword()) ::
  {:ok, GoogleApi.Admin.Directory_v1.Model.UserPhoto.t()}
  | {:ok, Tesla.Env.t()}
  | {: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

Specs

directory_users_photos_patch(
  Tesla.Env.client(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.Admin.Directory_v1.Model.UserPhoto.t()}
  | {:ok, Tesla.Env.t()}
  | {: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

Specs

directory_users_photos_update(
  Tesla.Env.client(),
  String.t(),
  keyword(),
  keyword()
) ::
  {:ok, GoogleApi.Admin.Directory_v1.Model.UserPhoto.t()}
  | {:ok, Tesla.Env.t()}
  | {: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

Specs

directory_users_sign_out(Tesla.Env.client(), String.t(), keyword(), keyword()) ::
  {:ok, nil} | {:ok, Tesla.Env.t()} | {:error, any()}

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.

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

Specs

directory_users_undelete(Tesla.Env.client(), String.t(), keyword(), keyword()) ::
  {:ok, nil} | {:ok, Tesla.Env.t()} | {: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

Specs

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

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.

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

Specs

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

Watch 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 G Suite 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