簡體   English   中英

特定用戶的Google Drive導出(Google保險櫃)

[英]Google Drive Export (Google Vault) for Specific User

文檔之后 ,有一個示例可以導出特定OU的所有示例

def create_drive_ou_all_data_export(service, matter_id):
  ou_to_search = 'ou id retrieved from admin sdk'
  drive_query_options = {'includeSharedDrives': True}
  drive_query = {
      'corpus': 'DRIVE',
      'dataScope': 'ALL_DATA',
      'searchMethod': 'ORG_UNIT',
      'orgUnitInfo': {
          'org_unit_id': ou_to_search
      },
      'driveOptions': drive_query_options,
      'startTime': '2017-03-16T00:00:00Z',
      'endTime': '2017-09-23T00:00:00Z',
      'timeZone': 'Etc/GMT+2'
  }
  drive_export_options = {'includeAccessInfo': False}
  wanted_export = {
      'name': 'My first drive ou export',
      'query': drive_query,
      'exportOptions': {
          'driveOptions': drive_export_options
      }
  }
  return service.matters().exports().create(
      matterId=matter_id, body=wanted_export).execute()

但是,它沒有顯示如何僅導出給定用戶,這可能嗎? 另外,用於創建導出的所有不同主體選項在哪里? 這些示例似乎並未顯示所有可用的參數。

您想使用searchMethod:account參考查詢: https : //developers.google.com/vault/reference/rest/v1/Query參考搜索方法: https : //developers.google.com/vault/reference/rest/ v1 / Query#SearchMethod參考AccountInfo: https : //developers.google.com/vault/reference/rest/v1/Query#AccountInfo

drive_query = {
      'corpus': 'DRIVE',
      'dataScope': 'ALL_DATA',
      'searchMethod': 'ACCOUNT', # This is different
      'accountInfo': { # This is different
          'emails': ['email1@company.com', 'email2@company.com', 'email3@company.com']
      },
      'driveOptions': drive_query_options,
      'startTime': '2017-03-16T00:00:00Z',
      'endTime': '2017-09-23T00:00:00Z',
      'timeZone': 'Etc/GMT+2'
  }

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM