Skip to main content

metrics

Creates, updates, deletes, gets or lists a metrics resource.

Overview​

Namemetrics
TypeResource
Idcloudflare.r2.metrics

Fields​

The following fields are returned by SELECT queries:

Get Account-Level Metrics response.

NameDatatypeDescription
infrequentAccessobjectMetrics based on what state they are in(uploaded or published).
standardobjectMetrics based on what state they are in(uploaded or published).

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectaccount_idGet Storage/Object Count Metrics across all buckets in your account. Note that Account-Level Metrics may not immediately reflect the latest data.

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.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.

SELECT examples​

Get Storage/Object Count Metrics across all buckets in your account. Note that Account-Level Metrics may not immediately reflect the latest data.

SELECT
infrequentAccess,
standard
FROM cloudflare.r2.metrics
WHERE account_id = '{{ account_id }}' -- required
;