{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cockroach-labs/json-schema/cockroach-labs-migration-assistant-schema.json",
  "title": "MigrationAssistant",
  "description": "MigrationAssistant is a per-cluster migration assistant deployment. The url,\nusername, password, and bucket_grantee are populated only while the status is\nRUNNING. The last_error is populated only when the status is FAILED.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cockroach-labs-migration-assistant-api-openapi.yml#/components/schemas/MigrationAssistant",
  "type": "object",
  "properties": {
    "bucket_grantee": {
      "description": "The cloud-native identity the customer must grant bucket access to;\npopulated when the status is RUNNING. Format depends on the cluster's cloud\n(AWS IAM role ARN, GCP service account email, or Azure object ID).",
      "type": "string"
    },
    "cluster_id": {
      "description": "The ID of the cluster this assistant is deployed for.",
      "type": "string"
    },
    "created_at": {
      "description": "Timestamp when the assistant was created.",
      "type": "string",
      "format": "date-time"
    },
    "deployed_region": {
      "description": "The cluster region the assistant is deployed in.",
      "type": "string"
    },
    "health": {
      "$ref": "#/$defs/MigrationAssistantHealth.Type"
    },
    "id": {
      "description": "The unique ID of the migration assistant.",
      "type": "string"
    },
    "last_error": {
      "description": "The failure detail; populated when the status is FAILED.",
      "type": "string"
    },
    "password": {
      "description": "The password used to sign in to the assistant; populated when the status is\nRUNNING.",
      "type": "string"
    },
    "status": {
      "$ref": "#/$defs/MigrationAssistantStatus.Type"
    },
    "updated_at": {
      "description": "Timestamp when the assistant was last updated.",
      "type": "string",
      "format": "date-time"
    },
    "url": {
      "description": "The URL used to reach the assistant; populated when the status is RUNNING.",
      "type": "string"
    },
    "username": {
      "description": "The username used to sign in to the assistant; populated when the status is\nRUNNING.",
      "type": "string"
    }
  },
  "required": [
    "id",
    "cluster_id",
    "deployed_region",
    "status",
    "created_at",
    "updated_at",
    "health"
  ],
  "$defs": {
    "MigrationAssistantHealth.Type": {
      "description": " - NOT_COMPUTED: Health is not computed; the assistant is not RUNNING.\n - HEALTHY: The assistant is ready and serving.\n - UNAVAILABLE: The assistant is RUNNING but not currently serving. This is usually\ntransient (for example, its pod is restarting); retry shortly.\n - UNKNOWN: The live health probe could not be reached, so serving health is not\nknown. This is usually transient; retry shortly.",
      "type": "string",
      "enum": [
        "NOT_COMPUTED",
        "HEALTHY",
        "UNAVAILABLE",
        "UNKNOWN"
      ]
    },
    "MigrationAssistantStatus.Type": {
      "description": " - PENDING: The assistant has been requested and is being provisioned.\n - RUNNING: The assistant is ready; its URL and credentials are available.\n - DELETING: Deletion has been requested and is in progress.\n - FAILED: A provisioning or deletion operation failed; see last_error.",
      "type": "string",
      "enum": [
        "PENDING",
        "RUNNING",
        "DELETING",
        "FAILED"
      ]
    }
  }
}