Object Lock Protection (ObjectLockProtection)

Table 1. Object Lock protection log entry fields
Field name Type Required Description
legal_hold Boolean no This indicates if there is a legal hold.
last_modified_time_legal_hold String, ISO-8601 in yyyy-MM-dd'T'HH:mm:ss.SSS'Z' yes, if there was ever a legal hold This is the timestamp of the last change to legal_hold.
retention ObjectLockRetention no This indicates if there is retention.

Retention is active if this date is in the future.

Retention is expired if this date is in the past.

last_modified_time_retention String, ISO-8601 in yyyy-MM-dd'T'HH:mm:ss.SSS'Z' yes, if there was ever retention  

The following code is an example of an "object_lock_protection" blob where object is protected with Object Lock legal hold (set to "ON"):

"object_lock_protection": {
  "legal_hold": true,
  "last_modified_time_legal_hold": "2022-11-22T02:12:30.205Z",
}

The following code is an example of an "object_lock_protection" blob where object is protected with Object Lock retention:

"object_lock_protection": {
  "retention": {
    "mode": "COMPLIANCE",
    "retain_until_date": "2022-11-22T02:12:40.000Z"
  },
  "last_modified_time_retention": "2022-11-22T02:12:30.205Z"
}

The following code is an example of an "object_lock_protection" blob where object Lock legal hold and retention:

"object_lock_protection": {
  "legal_hold": true,
  "last_modified_time_legal_hold": "2022-11-22T02:12:30.205Z",
  "retention": {
    "mode": "COMPLIANCE",
    "retain_until_date": "2022-11-22T02:12:40.000Z"
  },
  "last_modified_time_retention": "2022-11-22T02:12:30.205Z"
}

The following code is an example of an "object_lock_protection" blob where object is not protected with Object Lock legal hold (set to "OFF"):

"object_lock_protection": {
  "legal_hold": false,
  "last_modified_time_legal_hold": "2022-11-22T02:12:30.205Z"
}

The following code is an example of an "object_lock_protection" blob where object is no longer protected with Object Lock retention. Retention expired and was removed by user.:

"object_lock_protection": {
  "last_modified_time_retention": "2022-11-22T02:12:30.205Z"
}