{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Set Remote Reference",
  "description": "Link an instance's resource field to a resource from another project or an imported resource. The instance must not be in a provisioned or failed state.",
  "type": "object",
  "required": ["instanceId", "resourceId", "field"],
  "properties": {
    "instanceId": {
      "type": "string",
      "x-gql-type": "id",
      "title": "Instance ID",
      "description": "The instance to set the remote reference on",
      "examples": ["myproj-prod-database"]
    },
    "resourceId": {
      "type": "string",
      "x-gql-type": "id",
      "title": "Resource ID",
      "description": "The resource to reference — either a UUID for imported resources or 'instance.field' for provisioned resources",
      "examples": ["550e8400-e29b-41d4-a716-446655440000", "myproj-prod-vpc.network"]
    },
    "field": {
      "type": "string",
      "title": "Resource Field",
      "description": "The resource field to assign the reference to",
      "examples": ["username", "network", "database"]
    }
  }
}
