Trove/maintenance-windows-and-version-updates

Database Updates
As a Trove User, I need to the ability to manage DBMS version updates, so that I can minimize unplanned downtime and plan accordingly for my production application environments.

Update Instance
This operation checks an active specified database instance to see if updates are available. It returns True if updates are available for the specified database instance or False otherwise.

GET /instances/{instanceId}/updates Returns true if updates are available for the specified database instance or false otherwise.

Example 4.36. List Available Updates: {   "updates": true, "currentVersion":"MariaDB 10.0.3", "latestVersion":"MariaDB 10.0.4" }

POST/instances/{instanceId}/updates Update the instance to the latest database version.

Response Codes: same as original call

Error Codes: Call should validate if updates are needed and return an error/message if updates are not needed

Request Body:

Create Database Instance
POST /instances Creates a new database instance.

New Attributes

maintenanceWindow, optional

format: YYYY-MM-DDThh:mmZ/YYYY-MM-DDThh:mmZ

Response Codes: same as current call

Error Codes: same as current call

Description:

Request Body:

{   "instance": { "databases": [ {               "character_set": "utf8", "collate": "utf8_general_ci", "name": "sampledb" },            {                "name": "nextround" }       ],         "flavorRef": "https://service/v1.0/1234/flavors/1", "name": "my_db_inst", "volume": { "size": 2 }       "typeRef": "https://service/v1.0/1234/type/1", "maintenanceWindow":"2012-03-28T21:30Z/2012-03-28T22:00Z" } }

Modify Database Instance
PUT /instances/{instanceId}

New Attributes maintenanceWindow, optional format: YYYY-MM-DDThh:mmZ/YYYY-MM-DDThh:mmZ default: will need defaults set if there is no window specified

Response Codes: same as current call

Error Codes: same as current call

Description:

Request Body:

{   "instance": { "maintenanceWindow":"2012-03-28T21:30Z/2012-03-28T22:00Z" } }

List Database Instance Status and Details (Existing Call)
GET /instances/{instanceId} Lists status and details for a specified database instance.

Response Codes: same as original cal

Error Codes: same as original call

Description:

Request Body: This operation does not require a request body.

Response:

{   "instance": { "created": "2012-03-28T21:31:02Z", "flavor": { "id": "1", "links": [ ...           ]        },         "hostname": "hostname", "id": "2450c73f-7805-4afe-a42c-4094ab42666b", "links": [ ...       ],         "name": "my_db_inst", "status": "ACTIVE", "updated": "2012-03-28T21:34:25Z", "volume": { "size": 2, "used": 0.124542236328125 }       "maintenanceWindow":"2012-03-28T21:30Z/2012-03-28T22:00Z" } }