จัดการการระงับ

การเก็บรักษาเพื่อวัตถุประสงค์ทางกฎหมายจะเก็บรักษาข้อมูลไว้โดยไม่มีกำหนดเพื่อปฏิบัติตามภาระหน้าที่ทางกฎหมายหรือการเก็บรักษา โดยทั่วไปการคงไว้ชั่วคราวจะมีผู้ใช้อย่างน้อย 1 ราย เพื่อให้มั่นใจว่าข้อมูลที่อาจเกี่ยวข้องกับกรณีจะไม่สามารถลบได้จนกว่ากรณีนั้นจะใช้งานไม่ได้อีกต่อไป

หากผู้ใช้ที่คุณต้องการคงข้อมูลไว้ชั่วคราวลบข้อมูลที่คงไว้ชั่วคราว ข้อมูลดังกล่าวจะถูกนำออกจากมุมมองของผู้ใช้ แต่ข้อมูลเหล่านั้นจะเก็บไว้ในห้องนิรภัย ถ้ายังมีการระงับอยู่ ผู้ดูแลระบบห้องนิรภัยจะค้นหาและส่งออกข้อมูลนั้นได้

การคงไว้ชั่วคราวมีส่วนประกอบดังนี้

  • บริการ - แอปพลิเคชันที่รับผิดชอบในการเก็บข้อมูล บริการสามารถตั้งค่าเป็นอีเมล ไดรฟ์ หรือ Groups
  • ขอบเขต - เอนทิตีที่การคงไว้ชั่วคราวครอบคลุม คุณสามารถกำหนดขอบเขตให้กับบัญชีผู้ใช้ 1 บัญชีขึ้นไป หรือหน่วยขององค์กร (OU) ก็ได้
  • ตัวเลือกเพิ่มเติม (ไม่บังคับ) - รายละเอียดเฉพาะ (คำค้นหาหรือตัวเลือกการกำหนดค่า) ที่ใช้เพื่อจำกัดข้อมูลที่จะเก็บไว้ภายในขอบเขตที่กำหนด โดยมีตัวเลือกดังต่อไปนี้
    • mail, Groups: คำค้นหาเพื่อจำกัดการคงไว้ชั่วคราวให้แคบลง
    • ไดรฟ์: รวมไดรฟ์ที่แชร์ในการเก็บรักษา

หากต้องการใช้ทรัพยากรของห้องนิรภัย บัญชีต้องมีสิทธิ์ของห้องนิรภัยที่จำเป็นและการเข้าถึงกรณี หากต้องการเข้าถึงกรณี บัญชีจะต้องสร้างกรณี แชร์กรณีให้ด้วย หรือมีสิทธิ์ดูกรณีทั้งหมด

สร้างการเก็บรักษาอีเมลในบัญชีผู้ใช้ที่เฉพาะเจาะจงด้วยคำค้นหา

ตัวอย่างต่อไปนี้แสดงวิธีการสร้างการเก็บรักษาชื่อ "My First mail Accounts Hold" สำหรับ

  • บริการ: อีเมล
  • เอนทิตี: บัญชีผู้ใช้ "user1" และ "user2"
  • ตัวเลือกเพิ่มเติม: คำค้นหา "to:ceo@company.com"

เรียกข้อมูลรหัสบัญชีผู้ใช้จาก AdminSdk โปรดทราบว่า HeldAccount สามารถรับรหัสบัญชีหรืออีเมลได้ หากได้รับทั้ง 2 อย่าง ระบบจะใช้อีเมล และจะไม่พิจารณารหัสบัญชี

Java

HeldMailQuery mailQuery = new HeldMailQuery().setTerms("to:ceo@company.com");
List accounts = Lists.newArrayList();
accounts.add(new HeldAccount().setAccountId(user1accountId));
accounts.add(new HeldAccount().setEmail(user2Email));
Hold hold = new Hold()
    .setName("My First mail Accounts Hold")
    .setCorpus("MAIL");
    .setQuery(new CorpusQuery().setMailQuery(mailQuery))
    .setAccounts(accounts);
Hold createdHold = client.matters().holds().create(matterId, hold).execute();
  

Python

def create_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
    }
    return service.matters().holds().create(
        matterId=matter_id, body=wanted_hold).execute()

สร้างการเก็บรักษาสำหรับไดรฟ์ใน OU และรวมเนื้อหาในไดรฟ์ที่แชร์

ตัวอย่างต่อไปนี้แสดงวิธีสร้างการเก็บรักษาชื่อ "การคงไว้ชั่วคราวสำหรับ OU ในไดรฟ์รายการแรกของฉัน" สำหรับ

  • บริการ: ไดรฟ์
  • เอนทิตี: หน่วยขององค์กร "Finance" (บันทึกรหัส OU ใน orgUnitId)
  • ตัวเลือกเพิ่มเติม: รวมถึงไดรฟ์ที่แชร์ที่ผู้ใช้ในหน่วยขององค์กรนี้เป็นสมาชิก

เรียกข้อมูลรหัส OU จาก AdminSdk

Java

HeldOrgUnit orgUnit = new HeldOrgUnit().setOrgUnitId(orgUnitId);
// Include shared drives content.
HeldDriveQuery driveQuery = new HeldDriveQuery().setIncludeSharedDriveFiles(true);
// Create the hold.
Hold hold = new Hold()
    .setName("My First Drive OU Hold")
    .setCorpus("DRIVE")
    .setQuery(new CorpusQuery().setDriveQuery(driveQuery))
    .setOrgUnit(orgUnit);
Hold createdHold = client.matters().holds().create(matterId, hold).execute();
return createdHold;

Python

def create_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
        }
    }
    return service.matters().holds().create(
        matterId=matter_id, body=wanted_hold).execute()

สร้างการเก็บรักษาสำหรับ Groups ในบัญชีกลุ่มที่กำหนดโดยมีช่วงวันที่

ตัวอย่างต่อไปนี้แสดงวิธีสร้างการเก็บรักษาชื่อ "การคงไว้ชั่วคราวในกลุ่มแรกของฉัน" สำหรับ

  • บริการ: กลุ่ม
  • เอนทิตี: บัญชีกลุ่ม "group1" และ "group2"
  • ตัวเลือกเพิ่มเติม: ระงับเฉพาะข้อความที่มีวันที่ส่งระหว่าง "startTime" และ "endTime"

เรียกข้อมูลรหัสบัญชีกลุ่มจาก AdminSdk

Java

String APRIL_2_2017_GMT = "2017-04-02T00:00:00Z"; // See below for format*.
 
List accounts = Lists.newArrayList();
accounts.add(new HeldAccount().setAccountId(accountId));
accounts.add(new HeldAccount().setAccountId(accountId2));
HeldGroupsQuery groupQuery = new HeldGroupsQuery();
// Restrict by sent date.
groupQuery.setStartTime(APRIL_2_2017_GMT);
groupQuery.setEndTime(APRIL_2_2017_GMT);
// create the hold
Hold hold = new Hold()
    .setName("My First Group Hold")
    .setCorpus("GROUPS")
    .setQuery(new CorpusQuery().setGroupsQuery(groupQuery));
    hold.setAccounts(accounts);
Hold createdHold = client.matters().holds().create(matterId, hold).execute();
 

Python

def create_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
    }
    return service.matters().holds().create(
        matterId=matter_id, body=wanted_hold).execute()
 
  • รูปแบบการประทับเวลา นอกจากนี้ เวลาเริ่มต้น/สิ้นสุดจะแปลงเป็น GMT และปัดเศษลงเป็นวันที่เริ่มต้นของวันที่ที่ระบุ

ค้นหาและแก้ไขการระงับที่มีอยู่

ตัวอย่างต่อไปนี้แสดงวิธีแสดงรายการบัญชีทั้งหมดที่รวมอยู่ในการคงไว้ชั่วคราวที่มีอยู่

Java

client.matters().holds().accounts().list(matterId, holdId).execute().getAccounts();

Python

# If no accounts are on hold, ['accounts'] will raise an error.
def list_held_accounts(service, matter_id, hold_id):
    return service.matters().holds().accounts().list(
        matterId=matter_id, holdId=hold_id).execute()['accounts'] 

ตัวอย่างต่อไปนี้แสดงวิธีเพิ่มบัญชีและนำบัญชีออกจากการระงับที่มีอยู่

Java

// Add an account by id.
client
        .matters()
        .holds()
        .accounts()
        .create(matterId, holdId, new HeldAccount().setAccountId(accountId))
        .execute();
// Remove an account by id.
client.matters().holds().accounts().delete(matterId, holdId, accountId).execute();

String email = "email@email.com";
// Add an account by email.
client
        .matters()
        .holds()
        .accounts()
        .create(matterId, holdId, new HeldAccount().setEmail(email))
        .execute();

Python

 
def add_held_account(service, matter_id, hold_id, account_id):
    held_account = {'accountId': account_id}
    return service.matters().holds().accounts().create(
        matterId=matter_id, holdId=hold_id, body=held_account).execute()

def remove_held_account(service, matter_id, hold_id, account_id):
    return service.matters().holds().accounts().delete(
        matterId=matter_id, holdId=hold_id, accountId=account_id).execute()

def add_held_account(service, matter_id, hold_id, email):
    held_account = {'email': email}
    return service.matters().holds().accounts().create(
        matterId=matter_id, holdId=hold_id, body=held_account).execute()
 

ตัวอย่างต่อไปนี้แสดงวิธีแก้ไข OU ในการเก็บรักษา OU ที่มีอยู่

Java

Hold hold = client.matters().holds().get(matterId, holdId).execute();
hold.getOrgUnit().setOrgUnitId(newOrgUnitId);
Hold modifiedHold = client.matters().holds().update(matterId, holdId, hold).execute();
return modifiedHold;
 

Python

def update_hold_ou(service, matter_id, hold_id, org_unit_id):
    current_hold = get_hold(matter_id, hold_id)
    current_hold['orgUnit'] = {'orgUnitId': org_unit_id}
    return service.matters().holds().update(
        matterId=matter_id, holdId=hold_id, body=current_hold).execute() 

ตัวอย่างต่อไปนี้แสดงวิธีแสดงรายการการคงไว้ชั่วคราวทั้งหมดสําหรับกรณีหนึ่งๆ

Java

 
String matterId = "Matter Id";

// List all holds. List holdsList = client.matters().holds().list(matterId).execute().getHolds();

// Paginate on holds. ListHoldsResponse response = client .matters() .holds() .list(matterId) .setPageSize(10) .execute();

String nextPageToken = response.getNextPageToken(); if (nextPageToken != null) { client .matters() .holds() .list(matterId) .setPageSize(10) .setPageToken(nextPageToken) .execute(); }

Python

# This can paginate in the same manner as with matters.
def list_holds(service, matter_id):
    return service.matters().holds().list(matterId=matter_id).execute()