IPWorks Cloud 2020 ActiveX Edition

Questions / Feedback?

UpdateCompliance Method

Updates the compliance settings for the current bucket or an object in it.

Syntax

wasabicontrol.UpdateCompliance ObjectName

Remarks

Calling this method and passing the empty string for ObjectName will cause the compliance settings stored in BucketCompliance to be applied to the current bucket. Otherwise, this method will cause the compliance settings stored in ObjectCompliance to be applied to the object with the given ObjectName (as long as such an object exists in the current bucket, and the bucket's compliance settings are enabled).

Compliance Notes


Compliance is a Wasabi feature that prevents objects from being modified or deleted before a specified time. The following tables and examples show what compliance settings are available at the bucket- and object-levels, what they do, and how they are used. Be sure to review the documentation for each of the individual settings for more information about them.

Bucket Compliance Settings

Name Description
Status Whether or not compliance is enabled for a bucket. Either "enabled" or "disabled".
LockTime If not "off" (default), the time at which the compliance settings for a bucket were/should be locked.
RetentionDays An integer representing the minimum number of days to retain objects in a bucket. Defaults to 0.
ConditionalHold Whether or not newly created objects in a bucket should be placed under conditional hold. Defaults to "false".
DeleteAfterRetentionWhether or not to automatically delete objects after their retention time has been passed. Defaults to "false".

(Note that there is also a read-only IsLocked field which is set based on the value of LockTime.)

Compliance starts at the bucket level, it must be turned on for a bucket in order for the objects within that bucket to be under compliance. The control makes this easy to do:

wasabi.Bucket = "MyBucket";
wasabi.BucketCompliance = new WasabiBucketCompliance("enabled", "", 10, "true", "");
wasabi.UpdateCompliance("");
This code turns on compliance settings for the bucket called "MyBucket", setting them so that objects are placed under conditional hold, and must be retained for 10 days after the conditional hold is released. The LockTime and DeleteAfterRetention settings are left alone, so they will default to "off" and "false" (respectively).

Important: Locking the compliance settings on a bucket using the LockTime setting is a one-way action. You cannot unlock a bucket's compliance settings without contacting the Wasabi support team. Refer to the Wasabi documentation for more information.

Object Compliance Settings

Name Description
RetentionTime An ISO 8601 date-time before which an object cannot be deleted. Defaults to the time at which the object was created (or at which compliance was turned on) plus the value of the bucket's RetentionDays setting at that time.
LegalHold Whether or not an object is under legal hold, preventing it from being deleted. Defaults to "false".
ConditionalHold Whether or not an object is under conditional hold, preventing it from being deleted and its retention period from beginning. Default depends on the bucket's ConditionalHold setting.

(Note that there is also a read-only Hash field, containing an SHA-256 hash of the object that can be used to verify that it hasn't changed while under compliance.)

When an object's bucket has compliance enabled, all objects in that bucket are under compliance, and you can query any object's compliance settings using the GetCompliance method.

Any individual object can have its compliance settings updated as well. The LegalHold setting can be toggled to prevent (or allow) deletion; the object's ConditionalHold, if "true", can be released by setting to "false", at which time the object will begin its retention period. The object's RetentionTime can also be extended (but not reduced). For example, if you wanted to release an object from conditional hold:

wasabi.Bucket = "MyBucket";
wasabi.ObjectCompliance = new WasabiObjectCompliance("", "false", "");
wasabi.UpdateCompliance("MyObject");

Further Information
Compliance is a powerful tool, but it must be handled carefully. These notes, and the documentation for the compliance-related properties, methods, and types, do not supersede Wasabi's documentation, and reviewing that documentation is highly recommended to gain a full understanding of how compliance works.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Cloud 2020 ActiveX Edition - Version 20.0 [Build 8265]