Module Expr Str Import alias Import alias Import alias ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If CompareNotIn NameLoad NameLoad body Return BinOpMod NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If NameLoad body If BoolOpOr UnaryOpNot NameLoad CompareNotIn NameLoad NameLoad body Return BinOpMod NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Call NameLoad keyword Str keyword Str keyword NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return TupleLoad Call NameLoad NameLoad Str Call NameLoad NameLoad Str Call NameLoad NameLoad Str keyword Str decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad NameLoad Str decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Print BinOpMod Str SubscriptLoad Call AttributeLoad Call NameLoad NameLoad Str attr Str Index Num Print Call NameLoad NameLoad Str decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Print BinOpMod Str TupleLoad NameLoad NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str Str Str decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Str Call NameLoad NameLoad Str Call NameLoad NameLoad Str keyword Str If NameLoad body For NameStore Call NameLoad Call AttributeLoad NameLoad attr body If CompareIn NameLoad TupleLoad Str Str Str body Continue Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad keyword BinOpMult BinOpAdd Num Call NameLoad NameLoad Str keyword NameLoad Print BinOpMod Str TupleLoad NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr While Call AttributeLoad NameLoad attr body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Return NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body If CompareNotIn AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Raise Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad Num NameLoad body Expr Str Assign NameStore ListLoad Assign NameStore Num Assign NameStore NameLoad If BoolOpOr CompareLt NameLoad Num CompareGt NameLoad Num body Assign NameStore Num If BoolOpAnd CompareIsNot NameLoad NameLoad CompareLt NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad While NameLoad body For NameStore Call AttributeLoad NameLoad attr Str ListLoad body Assign NameStore Call NameLoad NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad AugAssignAdd NameStore Num If BoolOpAnd CompareIsNot NameLoad NameLoad CompareGtE NameLoad NameLoad body Return TupleLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str If UnaryOpNot NameLoad body Return TupleLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr keyword Num If NameLoad body Return SubscriptLoad NameLoad Index Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr keyword Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Num NameLoad body Expr Str Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad If NameLoad body Assign NameStore AttributeLoad NameLoad attr orelse Assign NameStore AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad Num body Expr Str Print BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Print BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr While Call AttributeLoad NameLoad attr body TryExcept body Return Call AttributeLoad NameLoad attr handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body If CompareNotIn AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr If Call AttributeLoad NameLoad attr Str body Return NameLoad Raise Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Return CompareIsNot Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad orelse Print BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad If Call AttributeLoad NameLoad attr NameLoad body Raise Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign NameStore Dict Str Str Str NameLoad Dict Str Str NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr While Call AttributeLoad NameLoad attr body TryExcept body Expr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad attr If NameLoad body Expr Call AttributeLoad NameLoad attr Num If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Raise Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Return handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body If CompareNotIn AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Raise Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Raise Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr While Call AttributeLoad NameLoad attr body TryExcept body Expr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad attr If NameLoad body Expr Call AttributeLoad NameLoad attr Num If Call AttributeLoad NameLoad attr NameLoad body Raise Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Return handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body If CompareNotIn AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Raise Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A Tool to show a pattern of easy access to an API.

Relies on the google-api-python-client and its embedded oauth2client.
See the README for more details on google-api-python-client.
 N/A pprint N/A textwrap N/A time apiclient errors apiclient_errors apiclient.discovery build utils admin_api_tool_errors utils http_utils utils log_utils N/A _MISSING_FIELD_STUB %s field not found in user data. GetFieldFromUser N/A N/A user field_name sub_field_name N/A None N/A N/A Safely retrieves a field from a user dictionary object.

  Some User fields are expressed as dictionaries of sub-fields instead of as
  simple values. This method allows retrieval of both field values and
  sub_field values.  In the following sample User record:

    fields: customerId, isAdmin, kind, name
    sub_fields: fullName, givenName, familyName

    {customerId: A03abcde4
     isAdmin: True
     kind: directory#user
     name: {u'fullName': u'George Enlighten', u'givenName': u'George',
            u'familyName': u'Enlighten'}
    }

  Args:
    user: A user object returned from an Apiary service.
    field_name: String field name for an element in a dictionary.
    sub_field_name: Sometimes retrieve a field from an embedded dictionary.

  Returns:
    If the field is present, returns the field contents.
    Otherwise returns template text to warn the user
    that data fields have changed.
   N/A N/A field_name user N/A N/A N/A _MISSING_FIELD_STUB field_name N/A field_value N/A N/A user get field_name N/A sub_field_name N/A N/A N/A N/A field_value N/A sub_field_name field_value N/A N/A N/A _MISSING_FIELD_STUB N/A [%s][%s] N/A field_name sub_field_name N/A N/A N/A field_value get sub_field_name N/A field_value N/A UsersApiWrapper N/A object N/A N/A Demonstrates a few needed functions of user provisioning. __init__ N/A N/A self http N/A N/A N/A Create our service object with access to Admin SDK APIs.

    Args:
      http: An authorized http interface object.
     N/A N/A self _service N/A build serviceName admin version directory_v1 http http N/A N/A self _users N/A N/A N/A self _service users N/A _ShowAllUserFields N/A N/A user N/A N/A N/A Show all fields [this can be many] of user data.

    Available fields include (use ls_user -u xxx@mybiz.com -l to see real data):
      agreedToTerms, changePasswordAtNextLogin, creationTime, customerId,
      emails, id, includeInGlobalAddressList, ipWhitelisted, isAdmin,
      isDelegatedAdmin, isMailboxSetup, kind, lastLoginTime,
      name ({'familyName': 'xx', 'fullName': 'yy', 'givenName': 'zz'}),
      nonEditableAliases, orgUnitPath, primaryEmail and suspended.

    Args:
      user: user json object returned from the users API list().

    Returns:
      Dictionary of the entire user metadata.
     N/A user N/A staticmethod _ShowBasicUserFields N/A N/A user N/A N/A N/A Select and show only 3 basic fields from returned user json.

    Args:
      user: user json object returned from the users API list().

    Returns:
      Tuple reflecting the user: (email, user_id, full_name).
     N/A N/A N/A GetFieldFromUser user primaryEmail N/A GetFieldFromUser user id N/A GetFieldFromUser user name sub_field_name fullName N/A staticmethod _ProcessCustomerId N/A N/A user N/A N/A N/A Select 'customerId from returned user json.

    Args:
      user: user json object returned from the users API list().

    Returns:
      String user_id for the supplied user.
     N/A N/A GetFieldFromUser user customerId N/A staticmethod _PrintCustomerId N/A N/A user N/A N/A N/A Get commonly needed CustomerId from the domain name.

    Args:
      user: user json object returned from the users API list().
     N/A N/A CustomerId for %s: N/A N/A N/A N/A GetFieldFromUser user primaryEmail split @ N/A 1 N/A N/A GetFieldFromUser user customerId N/A staticmethod _PrintOneLine N/A N/A email user_id full_name N/A N/A N/A Formats a user print line a little like ls -l.

    Example output:

    Users from domain altostrat.com:
    ID                     Email                                 Full Name
    000000558298938768732  george@altostrat.com                  George Lasta
    000000858699628788601  superadmin@altostrat.com              Super Lastb

    Args:
      email: User email (e.g. myemail@mydomain.com).
      user_id: 21 digit domain id.
      full_name: first and last name.
     N/A N/A %-22s %-40s %s N/A user_id email full_name N/A staticmethod _PrintUserHeader N/A N/A N/A N/A N/A Print user header for ls_users and ls_user. N/A N/A N/A UsersApiWrapper _PrintOneLine Email ID Full Name N/A staticmethod _PrintOneUser N/A N/A user long_list N/A False N/A N/A Prints select fields from returned user json.

    Available fields include:
      agreedToTerms, changePasswordAtNextLogin, creationTime, customerId,
      emails, id, includeInGlobalAddressList, ipWhitelisted, isAdmin,
      isDelegatedAdmin, isMailboxSetup, kind, lastLoginTime,
      name ({'familyName': 'xx', 'fullName': 'yy', 'givenName': 'zz'}),
      nonEditableAliases, orgUnitPath, primaryEmail and suspended.
    Special handling is needed for:
      emails, name, nonEditableAliases, name: sort for deterministic output.

    Args:
      user: user json object returned from the users API list().
      long_list: if True, print all known user fields.
     N/A N/A N/A UsersApiWrapper _PrintOneLine N/A GetFieldFromUser user primaryEmail N/A GetFieldFromUser user id N/A GetFieldFromUser user name sub_field_name fullName N/A long_list N/A N/A field N/A sorted N/A N/A user keys N/A N/A N/A field N/A primaryEmail id fullName N/A N/A N/A formatted_text N/A N/A textwrap fill N/A N/A pprint pformat N/A GetFieldFromUser user field subsequent_indent N/A N/A 7 N/A len field break_on_hyphens False N/A N/A     %s: %s N/A field formatted_text N/A staticmethod _ProcessUserListPage N/A N/A self apps_domain max_page next_page_token query_filter N/A None None N/A N/A Helper that handles exceptions retrieving pages of users.

    Args:
      apps_domain: Users apps domain e.g. mybiz.com.
      max_page: Used to optimize paging (1-500).
      next_page_token: Used for ongoing paging of users.
      query_filter: Optinally allow filtering based on many fields.
                    Obvious ones include orgName and orgUnitPath.

    Returns:
      List of users retrieved (one page).
     N/A request N/A N/A N/A self _users list domain apps_domain maxResults max_page pageToken next_page_token query query_filter N/A backoff N/A N/A http_utils Backoff N/A N/A N/A backoff Loop N/A N/A N/A N/A users_list N/A N/A request execute N/A users_list N/A N/A N/A N/A apiclient_errors HttpError N/A e N/A N/A N/A N/A N/A e resp status N/A http_utils RETRY_RESPONSE_CODES N/A N/A N/A N/A admin_api_tool_errors AdminAPIToolUserError N/A %s
Please check your domain spelling (%s). N/A N/A N/A http_utils ParseHttpResult N/A e uri N/A e resp N/A e content apps_domain N/A N/A N/A log_utils LogInfo N/A Possible quota problem retrieving users (%d). N/A N/A e resp status N/A N/A N/A backoff Fail N/A _ProcessDomainUsers N/A N/A self apps_domain process_fn max_results max_page query_filter N/A None 100 None N/A N/A Helper to allow multiple, different print functions.

    Args:
      apps_domain: Users apps domain e.g. mybiz.com.
      process_fn: Function to be used against each user object (e.g. print).
      max_results: If not None, stop after this many users.
      max_page: Used to optimize paging (1-500).
      query_filter: Optinally allow filtering based on many fields.
                    Obvious ones include orgName and orgUnitPath.

    Returns:
      Tuple of (result list, count of users retrieved). The result list is
      populated using results from process_fn().
     N/A results N/A N/A retrieved_count 0 N/A next_page_token None N/A N/A N/A max_page 1 N/A max_page 500 N/A N/A max_page 100 N/A N/A N/A max_results None N/A max_results max_page N/A N/A max_page max_results N/A users_list N/A N/A self _ProcessUserListPage apps_domain apps_domain max_page max_page query_filter query_filter N/A True N/A N/A user N/A N/A users_list get users N/A N/A N/A result N/A process_fn user N/A result N/A N/A N/A N/A results append result N/A retrieved_count 1 N/A N/A N/A max_results None N/A retrieved_count max_results N/A N/A N/A results retrieved_count N/A next_page_token N/A N/A users_list get nextPageToken N/A N/A next_page_token N/A N/A N/A results retrieved_count N/A users_list N/A N/A self _ProcessUserListPage apps_domain apps_domain max_page max_page query_filter query_filter next_page_token next_page_token N/A GetCustomerId N/A N/A self apps_domain N/A N/A N/A Look up the customer_id for a specific apps_domain.

    Other APIs use customer_id as the key to domain-specific
    requests.

    Args:
      apps_domain: Users apps domain e.g. mybiz.com.

    Returns:
      The single customer_id as a string.
     N/A N/A results _ N/A N/A self _ProcessDomainUsers apps_domain apps_domain process_fn N/A self _ProcessCustomerId max_results 1 N/A results N/A N/A N/A results N/A 0 N/A None N/A PrintCustomerId N/A N/A self apps_domain N/A N/A N/A Simple lookup of the customerId from the first user.

    Args:
      apps_domain: Users apps domain e.g. mybiz.com.
     N/A N/A N/A self _ProcessDomainUsers apps_domain apps_domain process_fn N/A self _PrintCustomerId max_results 1 N/A GetDomainUsers N/A N/A self apps_domain basic max_results max_page query_filter N/A True None 500 None N/A N/A List user details into a data structure.

    Used to serialize a large list of users to a (json) file.

    Args:
      apps_domain: Users apps domain e.g. mybiz.com.
      basic: If True, return a 3-tuple of (email, user_id, full_name) for
             each user, else return the whole user dictionary for each.
      max_results: If not None, stop after this many users.
      max_page: Used to optimize paging (1-500).
      query_filter: Optinally allow filtering based on many fields.
                    Obvious ones include orgName and orgUnitPath.

    Returns:
      List of tuples of user details [(email, id, full_name)...]
     N/A N/A N/A log_utils LogDebug N/A GetDomainUsers (%s). max_results N/A basic N/A N/A user_attribute_filter_fn N/A self _ShowBasicUserFields N/A N/A user_attribute_filter_fn N/A self _ShowAllUserFields N/A N/A results _ N/A N/A self _ProcessDomainUsers apps_domain apps_domain max_results max_results max_page max_page query_filter query_filter process_fn user_attribute_filter_fn N/A results N/A PrintDomainUsers N/A N/A self apps_domain max_results max_page N/A None 500 N/A N/A Powerful demonstration of ease of user provisioning API.

    If the customer is interested in multiple domains, this might
    be rewritten to use customer=customer_id instead of domain=xxx.

    Args:
      apps_domain: Users apps domain e.g. mybiz.com.
      max_results: If not None, stop after this many users.
      max_page: Used to optimize paging (1-500).
     N/A N/A Users from domain %s: apps_domain N/A N/A N/A self _PrintUserHeader N/A N/A _ count N/A N/A self _ProcessDomainUsers apps_domain apps_domain process_fn N/A self _PrintOneUser max_results max_results max_page max_page N/A N/A %d users found. count N/A GetDomainUser N/A N/A self user_mail N/A N/A N/A Retrieve document for a user in an apps domain.

    A common reason to call this is to retrieve the user_id from an email name.

    Args:
      user_mail: username to check.

    Returns:
      The user document (available fields listed in _PrintOneUser()).
     N/A N/A N/A log_utils LogDebug N/A GetDomainUser (%s). user_mail N/A request N/A N/A N/A self _users get userKey user_mail N/A backoff N/A N/A http_utils Backoff N/A N/A N/A backoff Loop N/A N/A N/A N/A N/A N/A request execute N/A N/A N/A N/A apiclient_errors HttpError N/A e N/A N/A N/A N/A N/A e resp status N/A http_utils RETRY_RESPONSE_CODES N/A N/A error_text N/A N/A http_utils ParseHttpResult N/A e uri N/A e resp N/A e content N/A N/A N/A error_text startswith ERROR: status=404 N/A N/A None N/A N/A N/A admin_api_tool_errors AdminAPIToolUserError N/A User %s not found: %s N/A user_mail error_text N/A N/A N/A log_utils LogInfo N/A Possible quota problem retrieving user %s (%d). Retrying after a short wait. N/A user_mail N/A N/A e resp status N/A N/A N/A backoff Fail N/A IsDomainUser N/A N/A self user_mail N/A N/A N/A Check if domain users exists.

    Args:
      user_mail: user email to check.

    Returns:
      True if user exists else False.
     N/A N/A N/A log_utils LogDebug N/A IsDomainuser (%s). user_mail N/A N/A N/A N/A self GetDomainUser user_mail None N/A PrintDomainUser N/A N/A self user_mail long_list N/A False N/A N/A Print basic details of a domain user.

    Used by a command line utility to possible check if a user exists.
    If used with --long_list, all user details are printed.

    Args:
      user_mail: user email to find.
      long_list: If True, print added user fields.
     N/A user N/A N/A self GetDomainUser user_mail N/A user N/A N/A N/A N/A self _PrintUserHeader N/A N/A N/A self _PrintOneUser user user long_list long_list N/A N/A N/A User %s not found. user_mail N/A AddDomainUser N/A N/A self first_name last_name user_mail new_password verify N/A False N/A N/A Adds user to the domain.

    Checks if the user already exists.  Users are created by default
    as unsuspended, non-admin users.

    Args:
      first_name: Given first name.
      last_name: Family name.
      user_mail: user_mail to add.
      new_password: Password to set.
      verify: If True, verify user was created.
     N/A N/A N/A log_utils LogDebug N/A AddDomainUser (%s). user_mail N/A N/A N/A self IsDomainUser user_mail N/A N/A N/A N/A admin_api_tool_errors AdminAPIToolUserError N/A User %s already exists. user_mail N/A body N/A primaryEmail name password user_mail N/A givenName familyName first_name last_name new_password N/A backoff N/A N/A http_utils Backoff N/A N/A N/A backoff Loop N/A N/A N/A N/A N/A N/A N/A N/A N/A self _users insert body body execute N/A verify N/A N/A N/A N/A time sleep 2 N/A N/A N/A N/A self IsDomainUser user_mail N/A N/A N/A N/A admin_api_tool_errors AdminAPIToolUserError N/A Problem creating user: %s user_mail N/A N/A N/A N/A N/A apiclient_errors HttpError N/A e N/A N/A N/A N/A N/A e resp status N/A http_utils RETRY_RESPONSE_CODES N/A N/A N/A N/A admin_api_tool_errors AdminAPIToolUserError N/A N/A http_utils ParseHttpResult N/A e uri N/A e resp N/A e content N/A N/A N/A log_utils LogInfo N/A Possible quota problem adding user %s (%d). Retrying after a short wait. N/A user_mail N/A N/A e resp status N/A N/A N/A backoff Fail N/A DeleteDomainUser N/A N/A self user_mail verify N/A False N/A N/A Deletes user from the domain.

    Checks if the user already exists before attempting delete.

    Args:
      user_mail: user_mail to add.
      verify: If True, verify user was deleted.

    Raises:
      AdminAPIToolUserError: Unable to delete user.
     N/A N/A N/A log_utils LogDebug N/A DeleteDomainUser (%s). user_mail N/A N/A N/A N/A self IsDomainUser user_mail N/A N/A N/A N/A admin_api_tool_errors AdminAPIToolUserError N/A ERROR: user (%s) not a domain member. You may need to check "Enable provisioning API" in your Domain Settings->User Settings. user_mail N/A backoff N/A N/A http_utils Backoff N/A N/A N/A backoff Loop N/A N/A N/A N/A N/A N/A N/A N/A N/A self _users delete userKey user_mail execute N/A verify N/A N/A N/A N/A time sleep 2 N/A N/A N/A self IsDomainUser user_mail N/A N/A N/A N/A admin_api_tool_errors AdminAPIToolUserError N/A Problem deleting user %s. user_mail N/A N/A N/A N/A N/A apiclient_errors HttpError N/A e N/A N/A N/A N/A N/A e resp status N/A http_utils RETRY_RESPONSE_CODES N/A N/A N/A N/A admin_api_tool_errors AdminAPIToolUserError N/A N/A http_utils ParseHttpResult N/A e uri N/A e resp N/A e content N/A N/A N/A log_utils LogInfo N/A Possible quota problem deleting user %s (%d). Retrying after a short wait. N/A user_mail N/A N/A e resp status N/A N/A N/A backoff Fail N/A N/A