managed
Creates, updates, deletes, gets or lists a managed resource.
Overview
| Name | managed |
| Type | Resource |
| Id | cloudflare.r2.managed |
Fields
The following fields are returned by SELECT queries:
- list
Get Managed Subdomain response.
| Name | Datatype | Description |
|---|---|---|
bucketId | string | Bucket ID. |
domain | string | Domain name of the bucket's r2.dev domain. |
enabled | boolean | Whether this bucket is publicly accessible at the r2.dev domain. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | account_id, bucket_name | cf-r2-jurisdiction | Gets state of public access over the bucket's R2-managed (r2.dev) domain. |
update | replace | account_id, bucket_name, enabled | cf-r2-jurisdiction | Updates state of public access over the bucket's R2-managed (r2.dev) domain. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Cloudflare account ID. |
bucket_name | string | The R2 bucket name. |
cf-r2-jurisdiction | string |
SELECT examples
- list
Gets state of public access over the bucket's R2-managed (r2.dev) domain.
SELECT
bucketId,
domain,
enabled
FROM cloudflare.r2.managed
WHERE account_id = '{{ account_id }}' -- required
AND bucket_name = '{{ bucket_name }}' -- required
AND cf-r2-jurisdiction = '{{ cf-r2-jurisdiction }}'
;
REPLACE examples
- update
Updates state of public access over the bucket's R2-managed (r2.dev) domain.
REPLACE cloudflare.r2.managed
SET
enabled = {{ enabled }}
WHERE
account_id = '{{ account_id }}' --required
AND bucket_name = '{{ bucket_name }}' --required
AND enabled = {{ enabled }} --required
AND cf-r2-jurisdiction = '{{ cf-r2-jurisdiction}}'
RETURNING
errors,
messages,
result,
success;