{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/scylladb/json-schema/scylladb-cloud-account-schema.json",
  "title": "CloudAccount",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/scylladb-account-api-openapi.yml#/components/schemas/CloudAccount",
  "x-public": true,
  "properties": {
    "checkStatus": {
      "description": "Holds the status of an AccountCloudCredential validation",
      "$ref": "#/$defs/CloudAccountCheckStatus"
    },
    "cloudProviderId": {
      "description": "ID of the cloud provider (full list [get] /deployment/cloud-providers)",
      "type": "integer"
    },
    "id": {
      "description": "Internal ID of the cloud account",
      "type": "integer"
    },
    "owner": {
      "description": "Owner of the account [Scylla, Account]. Owner = Account means it's BYOA deployment.",
      "enum": [
        "Scylla",
        "Account"
      ],
      "type": "string"
    },
    "properties": {
      "$ref": "#/$defs/AWSCloudAccountProperties",
      "description": "AWS cloud account properties"
    },
    "state": {
      "type": "string",
      "description": "Status of the cloud account",
      "enum": [
        "NEW",
        "ACTIVE",
        "DELETED"
      ]
    }
  },
  "type": "object",
  "$defs": {
    "AWSCloudAccountProperties": {
      "x-public": true,
      "properties": {
        "awsAccountId": {
          "type": "string",
          "description": "AWS Account ID"
        },
        "boundaryPolicyArn": {
          "type": "string",
          "description": "ARN of the boundary policy"
        },
        "cloudPolicyArn": {
          "type": "string",
          "description": "ARN of the policy"
        },
        "cloudRoleArn": {
          "type": "string",
          "description": "ARN of the role"
        },
        "cloudRoleExternalId": {
          "type": "string",
          "description": "UUID generated by scylla-cloud (for internal reason)"
        }
      },
      "type": "object"
    },
    "CloudAccountCheckStatus": {
      "x-public": true,
      "properties": {
        "boundaryPolicy": {
          "description": "BoundaryPolicy is the status of the boundary policy in relation to the golden",
          "type": "string"
        },
        "cloudPolicy": {
          "description": "CloudPolicy is the status of the cloud policy in relation to the golden",
          "type": "string"
        },
        "error": {
          "description": "Error contains the last fatal error, if any",
          "type": "string"
        },
        "transientError": {
          "description": "TransientError contains the last transient error, if any",
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}