Skip to content

Conversation

@jonesphillip
Copy link
Contributor

Added documentation for R2 bucket locks

@jonesphillip jonesphillip requested a review from jkoe-cf January 27, 2025 22:59
@jonesphillip jonesphillip requested review from a team, Oxyjun and elithrar as code owners January 27, 2025 22:59
@github-actions github-actions bot added size/s product:r2 R2 object storage: https://developers.cloudflare.com/r2 labels Jan 27, 2025
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 27, 2025

Deploying cloudflare-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4e04711
Status: ✅  Deploy successful!
Preview URL: https://7c629144.cloudflare-docs-7ou.pages.dev
Branch Preview URL: https://pjones-bucket-lock.cloudflare-docs-7ou.pages.dev

View logs

@github-actions
Copy link
Contributor

@@ -0,0 +1,77 @@
---
title: Bucket locks
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
title: Bucket locks
title: Use bucket locks

Do you think it's worth changing this title, and removing the "Get started with bucket locks" H2 below?


Bucket locks prevent the deletion and overwriting of objects in an R2 bucket for a specified period — or indefinitely. When enabled, bucket locks enforce retention policies on your objects, helping protect them from accidental or premature deletions.

## Get started with bucket locks
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Get started with bucket locks


## Get started with bucket locks

### Prerequisites
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Prerequisites
## Prerequisites

Bucket locks are currently configurable via API only.
:::

### Enable bucket lock via API
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Enable bucket lock via API
## Enable bucket lock via API


For more information on required parameters and examples of how to enable bucket lock, refer to the [API documentation](/api/resources/r2/subresources/buckets/subresources/lock/methods/update/). For information about getting started with the Cloudflare API, refer to [Make API calls](/fundamentals/api/how-to/make-api-calls/).

### Get bucket lock rules via API
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Get bucket lock rules via API
## Get bucket lock rules via API


For more information on required parameters and examples of how to get bucket lock rules, refer to the [API documentation](/api/resources/r2/subresources/buckets/subresources/lock/methods/update/).

## Bucket lock rules
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've not turned this H2 into a H1, as we don't typically have H1s later in the page. I personally think this still works?

We can consider adding numbers to the other H2s if we want to emphasise a sense of progression.

@jonesphillip jonesphillip merged commit b04db35 into production Jan 31, 2025
12 checks passed
@jonesphillip jonesphillip deleted the pjones/bucket-lock branch January 31, 2025 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:r2 R2 object storage: https://developers.cloudflare.com/r2 size/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants