Cloudflare R2 · Schema

R2 Temp_Access_Creds_Request

Object StorageCloud StorageS3-CompatibleEgress-FreeBucketsDeveloper PlatformCloudflare

Properties

Name Type Description
bucket string Name of the R2 bucket.
objects array Optional object paths to scope the credentials to.
parentAccessKeyId string The parent access key id to use for signing.
permission string Permissions allowed on the credentials.
prefixes array Optional prefix paths to scope the credentials to.
ttlSeconds number How long the credentials will live for in seconds.
View JSON Schema on GitHub

JSON Schema

cloudflare-r2-temp-access-creds-request.json Raw ↑
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/cloudflare-r2/main/json-schema/cloudflare-r2-temp-access-creds-request.json",
  "title": "R2 Temp_Access_Creds_Request",
  "example": {
    "bucket": "example-bucket",
    "objects": [
      "example-object"
    ],
    "parentAccessKeyId": "example-access-key-id",
    "permission": "object-read-write",
    "prefixes": [
      "example-prefix/"
    ],
    "ttlSeconds": 3600
  },
  "properties": {
    "bucket": {
      "description": "Name of the R2 bucket.",
      "type": "string",
      "x-auditable": true
    },
    "objects": {
      "description": "Optional object paths to scope the credentials to.",
      "items": {
        "type": "string",
        "x-auditable": true
      },
      "type": "array"
    },
    "parentAccessKeyId": {
      "description": "The parent access key id to use for signing.",
      "type": "string"
    },
    "permission": {
      "description": "Permissions allowed on the credentials.",
      "enum": [
        "admin-read-write",
        "admin-read-only",
        "object-read-write",
        "object-read-only"
      ],
      "type": "string",
      "x-auditable": true
    },
    "prefixes": {
      "description": "Optional prefix paths to scope the credentials to.",
      "items": {
        "type": "string",
        "x-auditable": true
      },
      "type": "array"
    },
    "ttlSeconds": {
      "default": 900,
      "description": "How long the credentials will live for in seconds.",
      "maximum": 604800,
      "type": "number",
      "x-auditable": true
    }
  },
  "required": [
    "bucket",
    "permission",
    "ttlSeconds",
    "parentAccessKeyId"
  ],
  "type": "object"
}