Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 40 additions & 14 deletions pages/object-storage/how-to/manage-lifecycle-rules.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,22 @@ dates:
import Requirements from '@macros/iam/requirements.mdx'
import LifecycleMinimalDurationMessage from '@macros/object-storage/lifecycle-minimal-duration-message.mdx'

With the Scaleway console, you can use lifecycle rules to [manually](/object-storage/how-to/edit-storage-class/) or automatically change the storage class of your objects. These rules also allow users to set expiration dates for objects and their versions.
The Scaleway console allows you to automatically manage the lifecycle of your object by setting lifecycle rules. These rules allow you to automatically:
- Delete your objects and their versions by setting expiration durations
- Transition objects and their versions to a colder storage class
- Abort incomplete [multipart uploads](/object-storage/api-cli/multipart-uploads/)

Comment thread
SamyOubouaziz marked this conversation as resolved.
Lifecycle rules also allow you to automatically abort incomplete [multipart uploads](/object-storage/api-cli/multipart-uploads/).
<Message type="important">
Lifecycle rules for non-current versions are currently available in the Milan, Amsterdam, and Warsaw regions. Support for the Paris region will be added soon.
</Message>

You can either apply these rules to each object in a bucket or to a specific set of objects by using filters based on prefixes and tags.

Lifecycle rules only allow the following transitions:

- Standard Multi-AZ -> Standard One Zone
- Standard Multi-AZ -> Glacier
- Standard One Zone -> Glacier

<LifecycleMinimalDurationMessage />

Expand All @@ -22,31 +35,44 @@ Lifecycle rules also allow you to automatically abort incomplete [multipart uplo
- An [Object Storage bucket](/object-storage/how-to/create-a-bucket/)

## How to create a lifecycle rule

1. Click **Object Storage** in the **Storage** section of the side menu. The list of your buckets displays.

2. Click the name of your bucket. The list of your objects displays.

3. Click **Lifecycle rules**.

4. Click **+ Create Lifecycle rule** to add a rule.

5. Enter a name for the rule.

6. Select the scope of the lifecycle rule:

- Apply the rule to all the objects contained in the bucket.

- Filter the objects you want the rule to be applied to by one or both of the following criteria:

- [**Prefix**](/object-storage/concepts/#prefix): based on the object name and path. The defined rule will be applied to all objects with the same name [prefix](/object-storage/concepts/#prefix).

- [**Tags**](/object-storage/concepts/#tags): comprised of a **key** and an associated **value**. These tags should be defined before rule creation, for either a bucket or an object. You can add one or more tags to your filter.

7. Configure the behavior of the lifecycle rule:
- Automatically transition the current version of your objects to another storage class after a specified number of days.
- Automatically delete the current version of your objects after a specified number of days.

- Automatically transition the current version of your objects to a colder storage class after the specified number of days.

- Automatically transition the non-current versions of your objects to a colder storage tier after the specified number of days.

- Automatically expire and delete the current version of your objects after the specified number of days.

- Automatically expire and delete non-current versions of an object after a specified number of days once it becomes non-current.

- Automatically abort [incomplete multipart uploads](/object-storage/api-cli/multipart-uploads/#aborting-a-multipart-upload) after a specified number of days.

8. Click **Next Step** to proceed.

9. Review the summary of your lifecycle rule, then click **Create lifecycle rule** to confirm.

<Message type="important">
- Lifecycle rules only allow the following transitions:
- Standard Multi-AZ -> Standard One Zone
- Standard Multi-AZ -> Glacier
- Standard One Zone -> Glacier
</Message>
Your new rule is enabled and appears in the lifecycle rules list.

## How to disable a lifecycle rule

Expand All @@ -57,8 +83,8 @@ Lifecycle rules also allow you to automatically abort incomplete [multipart uplo
5. Click **Disable**. A confirmation window pops up.
6. Click **Disable lifecycle rule** to confirm.

<Message type="note">
Once disabled, the lifecycle rule remains listed and can be enabled again. Click <Icon name="more" />, then select **Activate** to re-enable it.
</Message>
<Message type="note">
Once disabled, the lifecycle rule remains listed and can be enabled again. Click <Icon name="more" />, then select **Activate** to re-enable it.
</Message>

To permanently delete a rule, click <Icon name="more" />, then click **Delete**.
To permanently delete a rule, click <Icon name="more" /> next to its name, then click **Delete**.
Loading