{
  "$schema": "http://cloudbase.it/coriolis/schemas/disk_sync_resources_conn_info#",
  "type": "object",
  "description": "Object defining SSH connection parameters for a temporary minion VM which will carry out disk syncing.",
  "properties": {
    "backend": {
      "enum": ["ssh_backup_writer", "http_backup_writer", "file_backup_writer"]
    },
    "connection_details": {
      "ip": {
        "type": "string"
      },
      "port": {
        "type": "integer"
      },
      "username": {
        "type": "string"
      },
      "password": {
        "$ref": "#/definitions/nullableString"
      },
      "pkey": {
        "$ref": "#/definitions/nullableString"
      },
      "certificates": {
        "type": "object",
        "description": "Certificates for the HTTP-based backup writer.",
        "properties": {
          "client_crt": {
            "type": "string",
            "description": "PEM-encoded client certificate."
          },
          "client_key": {
            "type": "string",
            "description": "PEM-encoded client private key."
          },
          "ca_crt": {
            "type": "string",
            "description": "PEM-encoded vertificate of the authority used to validate the server."
          }
        },
        "required": ["client_crt", "client_key", "ca_crt"]
      },
      "required": ["ip", "port"]
    }
  },
  "required": ["backend", "connection_details"],
  "definitions": {
    "nullableString": {
      "oneOf": [{
        "type": "string"
      }, {
        "type": "null"
      }]
    }
  }
}
