보존 조치는 법적 또는 보존 의무를 충족하기 위해 데이터를 무기한 보존합니다. 일반적으로 사안과 관련이 있을 수 있는 데이터가 사안이 더 이상 활성 상태가 될 때까지 삭제되지 않도록 하나 이상의 사용자에게 보존 조치가 적용됩니다.
보존 조치의 적용을 받는 사용자가 보존 조치가 적용된 데이터를 삭제하면 해당 데이터가 사용자에게 표시되지 않지만 Vault에는 계속 보존됩니다. 보존 조치가 적용되는 동안에는 Vault 관리자가 보존 조치 중인 데이터를 검색하고 내보낼 수 있습니다.
보관에는 다음과 같은 구성요소가 있습니다.
서비스: 보관할 데이터를 담당하는 애플리케이션입니다. 서비스는 메일, Drive 또는 그룹으로 설정할 수 있습니다.
범위: 보관 대상에 포함되는 항목입니다. 범위는 하나 이상의 사용자 계정 또는 조직 단위 (OU)로 설정할 수 있습니다.
추가 옵션 (선택사항): 정의된 범위 내에 보관할 데이터를 좁히는 데 사용되는 구체적인 세부정보 (검색어 또는 구성 옵션)입니다. 옵션은 다음과 같습니다.
메일, 그룹: 보관 범위를 좁히는 검색어
Drive: 보관에 공유 드라이브 포함
Vault 리소스를 사용하려면 계정에 필요한 Vault 권한과 케이스에 대한 액세스 권한이 있어야 합니다. 법적 사안에 액세스하려면 계정에서 법적 사안을 만들었거나, 법적 사안이 계정과 공유되었거나, 모든 법적 사안 보기 권한이 있어야 합니다.
검색어로 특정 사용자 계정의 메일에 보관 설정 만들기
다음 예에서는 다음 항목에 대해 'My First mail Accounts Hold'라는 보관이 생성되는 방법을 보여줍니다.
서비스: mail
엔티티: 사용자 계정 'user1' 및 'user2'
추가 옵션: 검색어 'to:ceo@company.com'
Directory API에서 사용자 계정 ID를 가져옵니다.
HeldAccount는 계정 ID 또는 이메일을 사용할 수 있습니다. 둘 다 제공된 경우 이메일이 사용되고 계정 ID는 무시됩니다.
자바
HeldMailQuerymailQuery=newHeldMailQuery().setTerms("to:ceo@company.com");Listaccounts=Lists.newArrayList();accounts.add(newHeldAccount().setAccountId(user1accountId));accounts.add(newHeldAccount().setEmail(user2Email));Holdhold=newHold().setName("My First mail Accounts Hold").setCorpus("MAIL");.setQuery(newCorpusQuery().setMailQuery(mailQuery)).setAccounts(accounts);HoldcreatedHold=client.matters().holds().create(matterId,hold).execute();
Python
defcreate_hold_mail_accounts(service,matter_id,account_id):mail_query={'terms':'to:ceo@company.com'}accounts=[{'accountId':user1_account_id},{'email':user2_email}]wanted_hold={'name':'My First mail Accounts Hold','corpus':'MAIL','query':{'mailQuery':mail_query},'accounts':accounts}returnservice.matters().holds().create(matterId=matter_id,body=wanted_hold).execute()
조직 단위에서 Drive 보관 설정 만들기 및 공유 드라이브 콘텐츠 포함
다음 예에서는 다음 항목에 대해 'My First Drive OU Hold'라는 보관이 생성되는 방법을 보여줍니다.
HeldOrgUnitorgUnit=newHeldOrgUnit().setOrgUnitId(orgUnitId);// Include shared drives content.HeldDriveQuerydriveQuery=newHeldDriveQuery().setIncludeSharedDriveFiles(true);// Create the hold.Holdhold=newHold().setName("My First Drive OU Hold").setCorpus("DRIVE").setQuery(newCorpusQuery().setDriveQuery(driveQuery)).setOrgUnit(orgUnit);HoldcreatedHold=client.matters().holds().create(matterId,hold).execute();returncreatedHold;
Python
defcreate_hold_drive_org(service,matter_id,org_unit_id):drive_query={'includeSharedDriveFiles':True}org_unit={'orgUnitId':org_unit_id}wanted_hold={'name':'My First Drive OU Hold','corpus':'DRIVE','orgUnit':org_unit,'query':{'driveQuery':drive_query}}returnservice.matters().holds().create(matterId=matter_id,body=wanted_hold).execute()
날짜 범위가 있는 특정 그룹 계정의 그룹에 보존 조치 만들기
다음 예에서는 다음 항목에 대해 'My First Group Hold'라는 보관이 생성되는 방법을 보여줍니다.
서비스: 그룹스
항목: 그룹 계정 'group1' 및 'group2'
추가 옵션: 'startTime'과 'endTime' 사이의 전송 날짜가 있는 메일만 보관
StringAPRIL_2_2017_GMT="2017-04-02T00:00:00Z";// See below for format*.Listaccounts=Lists.newArrayList();accounts.add(newHeldAccount().setAccountId(accountId));accounts.add(newHeldAccount().setAccountId(accountId2));HeldGroupsQuerygroupQuery=newHeldGroupsQuery();// Restrict by sent date.groupQuery.setStartTime(APRIL_2_2017_GMT);groupQuery.setEndTime(APRIL_2_2017_GMT);// create the holdHoldhold=newHold().setName("My First Group Hold").setCorpus("GROUPS").setQuery(newCorpusQuery().setGroupsQuery(groupQuery));hold.setAccounts(accounts);HoldcreatedHold=client.matters().holds().create(matterId,hold).execute();
Python
defcreate_hold_groups_date_range(service,matter_id,group_account_id):groups_query={'startTime':'2017-04-02T00:00:00Z',# See below for format*'endTime':'2017-04-02T00:00:00Z'}accounts=[{'accountId':group_account_id}]wanted_hold={'name':'My First Group Hold','corpus':'GROUPS','query':{'groupsQuery':groups_query},'accounts':accounts}returnservice.matters().holds().create(matterId=matter_id,body=wanted_hold).execute()
타임스탬프 형식 또한 start/endTimes는 GMT로 변환되고 지정된 날짜의 시작으로 반올림됩니다.
# If no accounts are on hold, ['accounts'] will raise an error.deflist_held_accounts(service,matter_id,hold_id):returnservice.matters().holds().accounts().list(matterId=matter_id,holdId=hold_id).execute()['accounts']
다음 예에서는 기존 보관에 계정을 추가하고 계정을 삭제하는 방법을 보여줍니다.
자바
// Add an account by id.client.matters().holds().accounts().create(matterId,holdId,newHeldAccount().setAccountId(accountId)).execute();// Remove an account by id.client.matters().holds().accounts().delete(matterId,holdId,accountId).execute();Stringemail="email@email.com";// Add an account by email.client.matters().holds().accounts().create(matterId,holdId,newHeldAccount().setEmail(email)).execute();
# This can paginate in the same manner as with matters.deflist_holds(service,matter_id):returnservice.matters().holds().list(matterId=matter_id).execute()
[null,null,["최종 업데이트: 2025-08-29(UTC)"],[],[],null,["# Manage Holds\n\nHolds preserve data indefinitely to meet legal or preservation obligations. Usually holds are placed on one or more users to ensure that the data potentially relevant to a matter cannot be deleted until that matter is no longer active.\n\nIf a user who is subject to a hold deletes held data, that data is removed from the user's view, but it is preserved in Vault. As long as the hold is in place, a Vault admin can search and export that data.\n\nHolds have the following components:\n\n- **A service---**the application responsible for the data to be held. The service can be set to mail, Drive, or Groups.\n- **A scope---**the entities covered by the hold. The scope can be set to one or more user accounts, or to an organizational unit (OU).\n- **Additional options (optional)---** the specific details (search queries or configuration options) used to narrow down the data to be held within the defined scope. Options include:\n - mail, Groups: search query to narrow down the hold\n - Drive: include shared drives in the hold\n\nTo work with Vault resources, the account must have the [required Vault\nprivileges](https://support.google.com/vault/answer/2799699) and access to the\nmatter. To access a matter, the account must have created the matter, have the\nmatter shared with them, or have the **View All Matters** privilege.\n| **Note:** A [matter](/workspace/vault/guides/matters) must exist before you can create a hold.\n\nCreate a hold for mail on specific user accounts with a search query\n--------------------------------------------------------------------\n\nThe following example shows how a hold named \"My First mail Accounts Hold\" is created for:\n\n- Service: mail\n- Entity: user accounts \"user1\" and \"user2\"\n- Additional options: search query \"to:ceo@company.com\"\n\nRetrieve user account IDs from the\n[Directory API](/workspace/admin/directory).\nNote that the HeldAccount can take in account ID or email. If both are given,\nemail is used and account ID is ignored. \n\n### Java\n\n```java\nHeldMailQuery mailQuery = new HeldMailQuery().setTerms(\"to:ceo@company.com\");\nList accounts = Lists.newArrayList();\naccounts.add(new HeldAccount().setAccountId(user1accountId));\naccounts.add(new HeldAccount().setEmail(user2Email));\nHold hold = new Hold()\n .setName(\"My First mail Accounts Hold\")\n .setCorpus(\"MAIL\");\n .setQuery(new CorpusQuery().setMailQuery(mailQuery))\n .setAccounts(accounts);\nHold createdHold = client.matters().holds().create(matterId, hold).execute();\n \n```\n\n### Python\n\n```python\ndef create_hold_mail_accounts(service, matter_id, account_id):\n mail_query = {'terms': 'to:ceo@company.com'}\n accounts = [\n {'accountId': user1_account_id},\n {'email': user2_email}\n ]\n wanted_hold = {\n 'name': 'My First mail Accounts Hold',\n 'corpus': 'MAIL',\n 'query': {\n 'mailQuery': mail_query\n },\n 'accounts': accounts\n }\n return service.matters().holds().create(\n matterId=matter_id, body=wanted_hold).execute()\n```\n\nCreate a hold for Drive on an OU and include shared drive content\n-----------------------------------------------------------------\n\nThe following example shows how a hold named \"My First Drive OU Hold\" is created for:\n\n- Service: Drive\n- Entity: org unit \"Finance\" (OU ID is captured in orgUnitId)\n- Additional options: include shared drives that users in this org unit are members of\n\nRetrieve OU IDs from the [Directory API](/workspace/admin/directory). \n\n### Java\n\n```java\nHeldOrgUnit orgUnit = new HeldOrgUnit().setOrgUnitId(orgUnitId);\n// Include shared drives content.\nHeldDriveQuery driveQuery = new HeldDriveQuery().setIncludeSharedDriveFiles(true);\n// Create the hold.\nHold hold = new Hold()\n .setName(\"My First Drive OU Hold\")\n .setCorpus(\"DRIVE\")\n .setQuery(new CorpusQuery().setDriveQuery(driveQuery))\n .setOrgUnit(orgUnit);\nHold createdHold = client.matters().holds().create(matterId, hold).execute();\nreturn createdHold;\n```\n\n### Python\n\n```python\ndef create_hold_drive_org(service, matter_id, org_unit_id):\n drive_query = {'includeSharedDriveFiles': True}\n org_unit = {'orgUnitId': org_unit_id}\n wanted_hold = {\n 'name': 'My First Drive OU Hold',\n 'corpus': 'DRIVE',\n 'orgUnit': org_unit,\n 'query': {\n 'driveQuery': drive_query\n }\n }\n return service.matters().holds().create(\n matterId=matter_id, body=wanted_hold).execute()\n```\n\nCreate a hold for Groups on specific group accounts with a date range\n---------------------------------------------------------------------\n\nThe following example shows how a hold named \"My First Group Hold\" is created for:\n\n- Service: Groups\n- Entity: group accounts \"group1\" and \"group2\"\n- Additional options: hold only messages with sent dates between \"startTime\" and \"endTime\"\n\nRetrieve group account IDs from the\n[Directory API](/workspace/admin/directory). \n\n### Java\n\n```java\nString APRIL_2_2017_GMT = \"2017-04-02T00:00:00Z\"; // See below for format*.\n \nList accounts = Lists.newArrayList();\naccounts.add(new HeldAccount().setAccountId(accountId));\naccounts.add(new HeldAccount().setAccountId(accountId2));\nHeldGroupsQuery groupQuery = new HeldGroupsQuery();\n// Restrict by sent date.\ngroupQuery.setStartTime(APRIL_2_2017_GMT);\ngroupQuery.setEndTime(APRIL_2_2017_GMT);\n// create the hold\nHold hold = new Hold()\n .setName(\"My First Group Hold\")\n .setCorpus(\"GROUPS\")\n .setQuery(new CorpusQuery().setGroupsQuery(groupQuery));\n hold.setAccounts(accounts);\nHold createdHold = client.matters().holds().create(matterId, hold).execute();\n \n```\n\n### Python\n\n```python\ndef create_hold_groups_date_range(service, matter_id, group_account_id):\n groups_query = {\n 'startTime': '2017-04-02T00:00:00Z', # See below for format*\n 'endTime': '2017-04-02T00:00:00Z'\n }\n accounts = [{'accountId': group_account_id}]\n wanted_hold = {\n 'name': 'My First Group Hold',\n 'corpus': 'GROUPS',\n 'query': {\n 'groupsQuery': groups_query\n },\n 'accounts': accounts\n }\n return service.matters().holds().create(\n matterId=matter_id, body=wanted_hold).execute()\n \n```\n\n- [Timestamp format](https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto#L99). Additionally, start/endTimes are converted to GMT and rounded down to the start of the given date.\n\nQuery and modify existing holds\n-------------------------------\n\nThe following example shows how to list all of the accounts included in an existing hold: \n\n### Java\n\n```java\nclient.matters().holds().accounts().list(matterId, holdId).execute().getAccounts();\n```\n\n### Python\n\n```python\n# If no accounts are on hold, ['accounts'] will raise an error.\ndef list_held_accounts(service, matter_id, hold_id):\n return service.matters().holds().accounts().list(\n matterId=matter_id, holdId=hold_id).execute()['accounts'] \n```\n\nThe following example shows how to add an account to, and remove an account from, an existing hold: \n\n### Java\n\n```java\n// Add an account by id.\nclient\n .matters()\n .holds()\n .accounts()\n .create(matterId, holdId, new HeldAccount().setAccountId(accountId))\n .execute();\n// Remove an account by id.\nclient.matters().holds().accounts().delete(matterId, holdId, accountId).execute();\n\nString email = \"email@email.com\";\n// Add an account by email.\nclient\n .matters()\n .holds()\n .accounts()\n .create(matterId, holdId, new HeldAccount().setEmail(email))\n .execute();\n```\n\n### Python\n\n```python\n \ndef add_held_account(service, matter_id, hold_id, account_id):\n held_account = {'accountId': account_id}\n return service.matters().holds().accounts().create(\n matterId=matter_id, holdId=hold_id, body=held_account).execute()\n\ndef remove_held_account(service, matter_id, hold_id, account_id):\n return service.matters().holds().accounts().delete(\n matterId=matter_id, holdId=hold_id, accountId=account_id).execute()\n\ndef add_held_account(service, matter_id, hold_id, email):\n held_account = {'email': email}\n return service.matters().holds().accounts().create(\n matterId=matter_id, holdId=hold_id, body=held_account).execute()\n \n```\n\nThe following example shows how to modify the OU on an existing OU hold: \n\n### Java\n\n```java\nHold hold = client.matters().holds().get(matterId, holdId).execute();\nhold.getOrgUnit().setOrgUnitId(newOrgUnitId);\nHold modifiedHold = client.matters().holds().update(matterId, holdId, hold).execute();\nreturn modifiedHold;\n \n```\n\n### Python\n\n```python\ndef update_hold_ou(service, matter_id, hold_id, org_unit_id):\n current_hold = get_hold(matter_id, hold_id)\n current_hold['orgUnit'] = {'orgUnitId': org_unit_id}\n return service.matters().holds().update(\n matterId=matter_id, holdId=hold_id, body=current_hold).execute() \n```\n\nThe following example shows how to list all holds for a matter: \n\n### Java\n\n```java\n \nString matterId = \"Matter Id\";\n\n// List all holds.\nList holdsList = \n client.matters().holds().list(matterId).execute().getHolds();\n\n// Paginate on holds.\nListHoldsResponse response = client\n .matters()\n .holds()\n .list(matterId)\n .setPageSize(10)\n .execute();\n\nString nextPageToken = response.getNextPageToken();\nif (nextPageToken != null) {\n client\n .matters()\n .holds()\n .list(matterId)\n .setPageSize(10)\n .setPageToken(nextPageToken)\n .execute();\n}\n \n```\n\n### Python\n\n```python\n# This can paginate in the same manner as with matters.\ndef list_holds(service, matter_id):\n return service.matters().holds().list(matterId=matter_id).execute()\n \n```\n\n\u003cbr /\u003e"]]