Create a DBaaS MySQL service

POST /dbaas-mysql/{name}

Create a DBaaS MySQL service

Path parameters

  • name string Required

    Service name

    Minimum length is 0, maximum length is 63.

Body Required

    • backup-hour integer(int64)

      The hour of day (in UTC) when backup for the service is started. New backup is only started if previous backup has already completed.

      Minimum value is 0, maximum value is 23.

    • backup-minute integer(int64)

      The minute of an hour when backup for the service is started. New backup is only started if previous backup has already completed.

      Minimum value is 0, maximum value is 59.

  • integrations array[object]

    Service integrations to be enabled when creating the service.

    • type string Required

      Integration type

      Value is read_replica.

    • Service name

      Minimum length is 0, maximum length is 63.

    • Service name

      Minimum length is 0, maximum length is 63.

    • settings object

      Integration settings

  • ip-filter array[string]

    Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'

  • Service is protected against termination and powering off

  • Service name

    Minimum length is 0, maximum length is 63.

  • ISO time of a backup to recover from for services that support arbitrary times

    Minimum length is 1.

  • MySQL-specific settings

  • Automatic maintenance settings

    • dow string Required

      Day of week for installing updates

      Values are saturday, tuesday, never, wednesday, sunday, friday, monday, or thursday.

    • time string Required

      Time for installing updates, UTC

      Minimum length is 8, maximum length is 8.

  • Custom username for admin user. This must be set only when a new service is being created.

    Minimum length is 1, maximum length is 64. Format should match the following pattern: ^[_A-Za-z0-9][-._A-Za-z0-9]{0,63}$.

  • version string

    MySQL major version

    Minimum length is 1.

  • plan string Required

    Subscription plan

    Minimum length is 1, maximum length is 128.

  • Custom password for admin user. Defaults to random string. This must be set only when a new service is being created.

    Minimum length is 8, maximum length is 256. Format should match the following pattern: ^[a-zA-Z0-9-_]+$.

  • Migrate data from existing server

    • host string Required

      Hostname or IP address of the server where to migrate data from

      Minimum length is 1, maximum length is 255.

    • port integer(int64) Required

      Port number of the server where to migrate data from

      Minimum value is 1, maximum value is 65535.

    • password string

      Password for authentication with the server where to migrate data from

      Minimum length is 1, maximum length is 255.

    • ssl boolean

      The server where to migrate data from is secured with SSL

    • username string

      User name for authentication with the server where to migrate data from

      Minimum length is 1, maximum length is 255.

    • dbname string

      Database name for bootstrapping the initial connection

      Minimum length is 1, maximum length is 63.

    • Comma-separated list of databases, which should be ignored during migration (supported by MySQL only at the moment)

      Minimum length is 1, maximum length is 2048.

    • method string

      The migration method to be used

      Values are dump or replication.

  • The minimum amount of time in seconds to keep binlog entries before deletion. This may be extended for services that require binlog entries for longer than the default for example if using the MySQL Debezium Kafka connector.

    Minimum value is 600, maximum value is 86400.

Responses

  • 200 object

    200

    • id string(uuid)

      Operation ID

    • reason string

      Operation failure reason

      Values are incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, or conflict.

    • Related resource reference

      • id string(uuid)

        Reference ID

      • command string

        Command name

    • message string

      Operation message

    • state string

      Operation status

      Values are failure, pending, success, or timeout.

POST /dbaas-mysql/{name}
curl \
 -X POST https://api-ch-gva-2.exoscale.com/v2/dbaas-mysql/{name} \
 -H "Content-Type: application/json" \
 -d '{"backup-schedule":{"backup-hour":42,"backup-minute":42},"integrations":[{"type":"read_replica","source-service":"string","dest-service":"string","settings":{}}],"ip-filter":["string"],"termination-protection":true,"fork-from-service":"string","recovery-backup-time":"string","mysql-settings":{},"maintenance":{"dow":"saturday","time":"string"},"admin-username":"string","version":"string","plan":"string","admin-password":"string","migration":{"host":"string","port":42,"password":"string","ssl":true,"username":"string","dbname":"string","ignore-dbs":"string","method":"dump"},"binlog-retention-period":42}'
Request example
{
  "backup-schedule": {
    "backup-hour": 42,
    "backup-minute": 42
  },
  "integrations": [
    {
      "type": "read_replica",
      "source-service": "string",
      "dest-service": "string",
      "settings": {}
    }
  ],
  "ip-filter": [
    "string"
  ],
  "termination-protection": true,
  "fork-from-service": "string",
  "recovery-backup-time": "string",
  "mysql-settings": {},
  "maintenance": {
    "dow": "saturday",
    "time": "string"
  },
  "admin-username": "string",
  "version": "string",
  "plan": "string",
  "admin-password": "string",
  "migration": {
    "host": "string",
    "port": 42,
    "password": "string",
    "ssl": true,
    "username": "string",
    "dbname": "string",
    "ignore-dbs": "string",
    "method": "dump"
  },
  "binlog-retention-period": 42
}
Response example (200)
{
  "id": "string",
  "reason": "incorrect",
  "reference": {
    "id": "string",
    "link": "string",
    "command": "string"
  },
  "message": "string",
  "state": "failure"
}