We recently wrote an overview of Google Cloud Storage classes. However, working with various storage classes is not limited to selecting them. Google also allows you to set lifecycle rules for buckets. Naturally, CloudBerry Explorer is capable of creating these rules.
Ensuring the right authentication method
Before we get to the part with lifecycle rules, please bear in mind one provision regarding your Google Cloud Storage account. The authentication method should be OAuth 2.0 (either Installed Application or Service Account). Access & Secret key is deemed deprecated by Google and will not allow you to create any rules.
Creating lifecycle rules
Now that we've set up our account correctly, let's proceed to creating rules. Right-click on any of your buckets and click Bucket Lifecycle.
The newly appeared window enables you to add, edit, or remove lifecycle rules. For the sake of this example, we're just gonna add a new rule. Click Add.
Now you can minutely adjust the rule as seen fit.
A rule can be of 2 types: delete and set storage class. The monikers are self-explanatory.
Furthermore, rules are applicable to objects depending on the following parameters:
- Age. The number of days following the creation date.
- Created before. This condition is satisfied when an object is created before midnight of the specified date in UTC.
- Matches Storage Class. This condition is satisfied when an object in the bucket is stored as the specified storage class.
- Number of newer versions. Relevant only for versioned objects. If the value of this condition is set to N, an object satisfies the condition when there are at least N versions (including the live version) newer than it. For live objects, the number of newer versions is considered to be 0. For the most recent archived version, the number of newer versions is 1 (or 0 if there is no live object), and so on.
- Is live. Relevant only for versioned objects. If the value is
true, this condition matches the live objects; if the value is
false, it matches archived objects.
CloudBerry Explorer 5.0