You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[R2] Improving visibility of common use-cases (cloudflare#22687)
* Adding a partial file to direct users to WB API
* Surfacing link to Access <> R2 tutorial page for
better discoverability.
* Adding example of copying object using aws s3api
* Switching order of links
* Apply suggestions from code review
Co-authored-by: Maddy <[email protected]>
* Update src/content/docs/r2/buckets/storage-classes.mdx
Co-authored-by: Anni Wang <[email protected]>
---------
Co-authored-by: Maddy <[email protected]>
Co-authored-by: Anni Wang <[email protected]>
- Bucket names and buckets are not public by default. To allow public access to a bucket, [visit the public bucket documentation](/r2/buckets/public-buckets/).
50
+
- Bucket names and buckets are not public by default. To allow public access to a bucket, refer to [Public buckets](/r2/buckets/public-buckets/).
51
+
- For information on controlling access to your R2 bucket with Cloudflare Access, refer to [Protect an R2 Bucket with Cloudflare Access](/r2/tutorials/cloudflare-access/).
51
52
- Invalid (unauthorized) access attempts to private buckets do not incur R2 operations charges against that bucket. Refer to the [R2 pricing FAQ](/r2/pricing/#frequently-asked-questions) to understand what operations are billed vs. not billed.
Copy file name to clipboardExpand all lines: src/content/docs/r2/buckets/public-buckets.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ For more information on default Cache behavior and how to customize it, refer to
44
44
45
45
To restrict access to your custom domain's bucket, use Cloudflare's existing security products.
46
46
47
-
-[Cloudflare Zero Trust Access](/cloudflare-one/applications/configure-apps): Protects buckets that should only be accessible by your teammates.
47
+
-[Cloudflare Zero Trust Access](/cloudflare-one/applications/configure-apps): Protects buckets that should only be accessible by your teammates. Refer to [Protect an R2 Bucket with Cloudflare Access](/r2/tutorials/cloudflare-access/) tutorial for more information.
48
48
-[Cloudflare WAF Token Authentication](/waf/custom-rules/use-cases/configure-token-authentication/): Restricts access to documents, files, and media to selected users by providing them with an access token.
Storage classes allow you to trade off between the cost of storage and the cost of accessing data. Every object stored in R2 has an associated storage class.
10
10
@@ -16,50 +16,10 @@ All storage classes share the following characteristics:
16
16
17
17
## Available storage classes
18
18
19
-
<table>
20
-
<tbody>
21
-
<thstyle="width:25%">
22
-
Storage class
23
-
</th>
24
-
<thstyle="width:25%">
25
-
Minimum storage duration
26
-
</th>
27
-
<thstyle="width:25%">
28
-
Data retrieval fees (processing)
29
-
</th>
30
-
<thstyle="width:25%">
31
-
Egress fees (data transfer to Internet)
32
-
</th>
33
-
<tr>
34
-
<td>
35
-
Standard
36
-
</td>
37
-
<td>
38
-
None
39
-
</td>
40
-
<td>
41
-
None
42
-
</td>
43
-
<td>
44
-
None
45
-
</td>
46
-
</tr>
47
-
<tr>
48
-
<td>
49
-
Infrequent Access <inline-pillstyle="beta" />
50
-
</td>
51
-
<td>
52
-
30 days
53
-
</td>
54
-
<td>
55
-
Yes
56
-
</td>
57
-
<td>
58
-
None
59
-
</td>
60
-
</tr>
61
-
</tbody>
62
-
</table>
19
+
| Storage class | Minimum storage duration | Data retrieval fees (processing) | Egress fees (data transfer to Internet) |
For more information on how storage classes impact pricing, refer to [Pricing](/r2/pricing/).
65
25
@@ -124,3 +84,23 @@ Once an object is stored in Infrequent Access, it cannot be transitioned to Stan
124
84
:::
125
85
126
86
To learn more about how to transition objects from Standard storage to Infrequent Access storage, refer to [Object lifecycles](/r2/buckets/object-lifecycles/).
87
+
88
+
## Change storage class for objects
89
+
90
+
You can change the storage class of an object which is already stored in R2 using the [`CopyObject` API](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html).
91
+
92
+
Use the `x-amz-storage-class` header to change between `STANDARD` and `STANDARD_IA`.
93
+
94
+
An example of switching an object from `STANDARD` to `STANDARD_IA` using `aws cli` is shown below:
- Refer to [aws CLI](/r2/examples/aws/aws-cli/) for more information on using `aws CLI`.
106
+
- Refer to [object-level operations](/r2/api/s3/api/#object-level-operations) for the full list of object-level API operations with R2-compatible S3 API.
Copy file name to clipboardExpand all lines: src/content/docs/r2/objects/download-objects.mdx
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,8 @@ sidebar:
5
5
order: 2
6
6
---
7
7
8
+
import { Render } from"~/components";
9
+
8
10
You can download objects from your bucket from the Cloudflare dashboard or using the Wrangler.
9
11
10
12
## Download objects via the Cloudflare dashboard
@@ -30,3 +32,5 @@ Download complete.
30
32
```
31
33
32
34
The file will be downloaded into the current working directory. You can also use the `--file` flag to set a new name for the object as it is downloaded, and the `--pipe` flag to pipe the download to standard output (stdout).
You can upload objects to your bucket from using API (both [Workers Binding API](/r2/api/workers/workers-api-reference/) or [compatible S3 API](/r2/api/s3/api/)), rclone, Cloudflare dashboard, or Wrangler.
11
11
@@ -71,4 +71,6 @@ You can set the `Content-Type` (MIME type), `Content-Disposition`, `Cache-Contro
71
71
Wrangler's `object put` command only allows you to upload one object at a time.
72
72
73
73
Use rclone if you wish to upload multiple objects to R2.
0 commit comments