{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/carbon-arc/json-schema/carbon-arc-verify-bucket-access-response-schema.json",
  "title": "VerifyBucketAccessResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/carbon-arc-bucket-access-api-openapi.yml#/components/schemas/VerifyBucketAccessResponse",
  "properties": {
    "dataset_id": {
      "type": "string",
      "title": "Dataset Id"
    },
    "lag": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Lag"
    },
    "cut": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Cut"
    },
    "bucket_found": {
      "type": "boolean",
      "title": "Bucket Found"
    },
    "read_ok": {
      "type": "boolean",
      "title": "Read Ok"
    },
    "principal_count": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Principal Count",
      "description": "Total client-access principals on the live policy. Null when the read failed — NOT zero, which would read as 'nobody has access'."
    },
    "present": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Present"
    },
    "missing": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Missing"
    },
    "read_error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Read Error",
      "description": "Why the read failed, when read_ok is false: invalid_credentials | no_credentials | access_denied | throttled | bucket_missing | unknown. A fixed vocabulary, never raw AWS text, since the caller renders it and AWS messages can carry bucket names and ARNs."
    },
    "checked_at": {
      "type": "string",
      "format": "date-time",
      "title": "Checked At"
    }
  },
  "type": "object",
  "required": [
    "dataset_id",
    "lag",
    "cut",
    "bucket_found",
    "read_ok",
    "present",
    "missing",
    "checked_at"
  ]
}