[api-ref] Update style and instances api.

Doc style:
* use tildes for heading 2 (following the rst convention);
* break source lines exceeded 79 characters (rst convention);
* remove unneccessary blank lines:
  * 4 blank lines between sections;
  * 2 blank lines between sub-sections;
  * 1 blank line between paragraphs in a section/subsection;
  * no blank lines at the bottom of a source file.
* add a space after commas in the middle of a line;

Instances API:
* change the order to match the description at the begin;
* add "Update instance name";
* add "Upgrade datastore version".

Change-Id: I3520e42f6ad97cb30632cf05241cec316409c9be
Signed-off-by: Zhao Chao <zhaochao1984@gmail.com>
This commit is contained in:
Zhao Chao 2018-01-25 21:24:39 +08:00
parent fd5ad7f112
commit b0577ae97e
11 changed files with 409 additions and 752 deletions

View File

@ -9,18 +9,17 @@ Database Service v1.0 details.
List versions
=============
~~~~~~~~~~~~~
.. rest_method:: GET /
Lists information about all Database Service API versions.
Normal response codes: 200
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),unprocessableEntity(422),instanceFault(500),notImplemented(501),
serviceUnavailable(503)
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422),
instanceFault(500), notImplemented(501), serviceUnavailable(503)
Response Example
@ -32,32 +31,18 @@ Response Example
Show version details
====================
~~~~~~~~~~~~~~~~~~~~
.. rest_method:: GET /v1.0
Shows details for the Database Service API v1.0.
Normal response codes: 200
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),unprocessableEntity(422),instanceFault(500),notImplemented(501),
serviceUnavailable(503)
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422),
instanceFault(500), notImplemented(501), serviceUnavailable(503)
Response Example
@ -65,16 +50,3 @@ Response Example
.. literalinclude:: samples/db-version-response.json
:language: javascript

View File

@ -8,17 +8,17 @@ Creates and lists all configuration groups.
Create configuration group
==========================
~~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: POST /v1.0/{accountId}/configurations
Creates a configuration group.
Normal response codes: 200
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),unprocessableEntity(422),instanceFault(500),notImplemented(501),
serviceUnavailable(503)
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422),
instanceFault(500), notImplemented(501), serviceUnavailable(503)
Request
@ -31,6 +31,7 @@ Request
- name: name
- accountId: accountId
Request Example
---------------
@ -38,9 +39,6 @@ Request Example
:language: javascript
Response Example
----------------
@ -50,18 +48,8 @@ Response Example
List configuration groups
=========================
~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: GET /v1.0/{accountId}/configurations
@ -70,11 +58,11 @@ Lists all configuration groups.
The list includes the associated data store and data store version
for each configuration group.
Normal response codes: 200
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),unprocessableEntity(422),instanceFault(500),notImplemented(501),
serviceUnavailable(503)
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422),
instanceFault(500), notImplemented(501), serviceUnavailable(503)
Request
@ -85,8 +73,6 @@ Request
- accountId: accountId
Response Example
----------------
@ -96,28 +82,18 @@ Response Example
List configuration group instances
==================================
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: GET /v1.0/{accountId}/configurations/{configId}/instances
Lists the instances associated with the specified configuration group.
Normal response codes: 200
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),unprocessableEntity(422),instanceFault(500),notImplemented(501),
serviceUnavailable(503)
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422),
instanceFault(500), notImplemented(501), serviceUnavailable(503)
Request
@ -129,8 +105,6 @@ Request
- accountId: accountId
Response Example
----------------
@ -140,27 +114,18 @@ Response Example
Delete configuration group
==========================
~~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: DELETE /v1.0/{accountId}/configurations/{configId}
Deletes a configuration group.
Normal response codes: 202
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),unprocessableEntity(422),instanceFault(500),notImplemented(501),
serviceUnavailable(503)
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422),
instanceFault(500), notImplemented(501), serviceUnavailable(503)
Request
@ -174,30 +139,18 @@ Request
Patch configuration group
=========================
~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: PATCH /v1.0/{accountId}/configurations/{configId}
Sets new values for a configuration group.
Normal response codes: 200
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),unprocessableEntity(422),instanceFault(500),notImplemented(501),
serviceUnavailable(503)
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422),
instanceFault(500), notImplemented(501), serviceUnavailable(503)
Request
@ -209,6 +162,7 @@ Request
- configId: configId
- accountId: accountId
Request Example
---------------
@ -216,9 +170,6 @@ Request Example
:language: javascript
Response Example
----------------
@ -228,18 +179,8 @@ Response Example
Show configuration group details
================================
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: GET /v1.0/{accountId}/configurations/{configId}
@ -247,9 +188,9 @@ Lists details about a configuration group, including its values.
Normal response codes: 200
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),unprocessableEntity(422),instanceFault(500),notImplemented(501),
serviceUnavailable(503)
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422),
instanceFault(500), notImplemented(501), serviceUnavailable(503)
Request
@ -261,8 +202,6 @@ Request
- accountId: accountId
Response Example
----------------
@ -272,27 +211,18 @@ Response Example
Update configuration group
==========================
~~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: PUT /v1.0/{accountId}/configurations/{configId}
Sets new values for a configuration group. Also lets you change the name and description of the configuration group.
Sets new values for a configuration group. Also lets you change the name and
description of the configuration group.
Normal response codes: 202
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),unprocessableEntity(422),instanceFault(500),notImplemented(501),
serviceUnavailable(503)
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422),
instanceFault(500), notImplemented(501), serviceUnavailable(503)
Request
@ -306,24 +236,9 @@ Request
- configId: configId
- accountId: accountId
Request Example
---------------
.. literalinclude:: samples/db-update-config-group-request.json
:language: javascript

View File

@ -8,7 +8,7 @@ Resizes instances and volumes and restarts instances.
Restart instance
================
~~~~~~~~~~~~~~~~
.. rest_method:: POST /v1.0/{accountId}/instances/{instanceId}/action
@ -21,9 +21,11 @@ in the database instance.
The database instance is unavailable until the instance restarts.
Normal response codes: 202
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),badMediaType(415),unprocessableEntity(422),instanceFault(500),
notImplemented(501),serviceUnavailable(503)
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), badMediaType(415),
unprocessableEntity(422), instanceFault(500), notImplemented(501),
serviceUnavailable(503)
Request
@ -34,6 +36,7 @@ Request
- instanceId: instanceId
- accountId: accountId
Request Example
---------------
@ -43,22 +46,8 @@ Request Example
Resize instance
===============
~~~~~~~~~~~~~~~
.. rest_method:: POST /v1.0/{accountId}/instances/{instanceId}/action
@ -68,9 +57,11 @@ If you provide a valid ``flavorRef``, this operation changes the
memory size of the instance, and restarts the database.
Normal response codes: 202
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),badMediaType(415),unprocessableEntity(422),instanceFault(500),
notImplemented(501),serviceUnavailable(503)
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), badMediaType(415),
unprocessableEntity(422), instanceFault(500), notImplemented(501),
serviceUnavailable(503)
Request
@ -81,6 +72,7 @@ Request
- instanceId: instanceId
- accountId: accountId
Request Example
---------------
@ -90,22 +82,8 @@ Request Example
Resize instance volume
======================
~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: POST /v1.0/{accountId}/instances/{instanceId}/action
@ -118,9 +96,11 @@ You cannot increase the volume to a size that is larger than the
API volume size limit.
Normal response codes: 202
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),badMediaType(415),unprocessableEntity(422),instanceFault(500),
notImplemented(501),serviceUnavailable(503)
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), badMediaType(415),
unprocessableEntity(422), instanceFault(500), notImplemented(501),
serviceUnavailable(503)
Request
@ -131,6 +111,7 @@ Request
- instanceId: instanceId
- accountId: accountId
Request Example
---------------
@ -140,22 +121,8 @@ Request Example
Promote instance to replica source
==================================
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: POST /v1.0/{accountId}/instances/{instanceId}/action
@ -178,9 +145,11 @@ For ``instanceId``, pass in the instance ID of the replica you want
to promote.
Normal response codes: 202
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),badMediaType(415),unprocessableEntity(422),instanceFault(500),
notImplemented(501),serviceUnavailable(503)
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), badMediaType(415),
unprocessableEntity(422), instanceFault(500), notImplemented(501),
serviceUnavailable(503)
Request
@ -191,6 +160,7 @@ Request
- instanceId: instanceId
- accountId: accountId
Request Example
---------------
@ -200,22 +170,8 @@ Request Example
Delete replication base instance
================================
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: POST /v1.0/{accountId}/instances/{instanceId}/action
@ -242,9 +198,11 @@ For ``instanceId``, pass in the instance ID of the unreachable base
instance.
Normal response codes: 202
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),badMediaType(415),unprocessableEntity(422),instanceFault(500),
notImplemented(501),serviceUnavailable(503)
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), badMediaType(415),
unprocessableEntity(422), instanceFault(500), notImplemented(501),
serviceUnavailable(503)
Request
@ -255,25 +213,9 @@ Request
- instanceId: instanceId
- accountId: accountId
Request Example
---------------
.. literalinclude:: samples/db-instance-eject-replica-request.json
:language: javascript

View File

@ -4,28 +4,26 @@
Database instances (instances)
==============================
Creates, lists, shows details for, attaches a configuration group
to, detaches a configuration group from, deletes, lists
configuration defaults, creates root, and determines whether root
is enabled for instances.
Lists, shows details for, creates, attaches a configuration group to, detaches
a configuration group from, update the name, upgrade datastore version,
deletes, lists configuration defaults, creates root, and determines whether
root is enabled, for instances.
Delete database instance
========================
List database instances
~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: DELETE /v1.0/{accountId}/instances/{instanceId}
.. rest_method:: GET /v1.0/{accountId}/instances
Deletes a database instance, including any associated data.
Lists information, including status, for all database instances.
This operation does not delete any read slaves.
Lists status and information for all database instances.
You cannot complete this operation when the instance state is
either ``REBUILDING`` or ``BUILDING``.
Normal response codes: 200
Normal response codes: 202
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405), overLimit(413),unprocessableEntity(422),instanceFault(500),notImplemented(501),
serviceUnavailable(503)
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422),
instanceFault(500), notImplemented(501), serviceUnavailable(503)
Request
@ -33,26 +31,20 @@ Request
.. rest_parameters:: parameters.yaml
- instanceId: instanceId
- accountId: accountId
Response Example
----------------
.. literalinclude:: samples/db-instances-index-response.json
:language: javascript
Show database instance details
==============================
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: GET /v1.0/{accountId}/instances/{instanceId}
@ -77,11 +69,11 @@ address might change when you resize, migrate, or perform other
operations, the host name always resolves to the correct database
instance.
Normal response codes: 200
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),unprocessableEntity(422),instanceFault(500),notImplemented(501),
serviceUnavailable(503)
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422),
instanceFault(500), notImplemented(501), serviceUnavailable(503)
Request
@ -93,8 +85,6 @@ Request
- accountId: accountId
Response Example
----------------
@ -104,165 +94,8 @@ Response Example
Attach configuration group
==========================
.. rest_method:: PUT /v1.0/{accountId}/instances/{instanceId}
Attaches a configuration group to an instance.
Normal response codes: 202
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),badMediaType(415),unprocessableEntity(422),instanceFault(500),
notImplemented(501),serviceUnavailable(503)
Request
-------
.. rest_parameters:: parameters.yaml
- configuration: configuration
- instanceId: instanceId
- accountId: accountId
Request Example
---------------
.. literalinclude:: samples/db-attach-config-group-request.json
:language: javascript
Detach configuration group
==========================
.. rest_method:: PUT /v1.0/{accountId}/instances/{instanceId}
Detaches a configuration group from an instance.
When you pass in only an instance ID and omit the configuration ID,
this operation detaches any configuration group that was attached
to the instance.
Normal response codes: 202
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),badMediaType(415),unprocessableEntity(422),instanceFault(500),
notImplemented(501),serviceUnavailable(503)
Request
-------
.. rest_parameters:: parameters.yaml
- configuration: configuration
- instanceId: instanceId
- accountId: accountId
Request Example
---------------
.. literalinclude:: samples/db-detach-config-group-request.json
:language: javascript
Detach replica
==============
.. rest_method:: PATCH /v1.0/{accountId}/instances/{instanceId}
Detaches a replica from its replication source.
If you created an instance that is a replica of a source instance,
you can detach the replica from the source. This can be useful if
the source becomes unavailable. In this case, you can detach the
replica from the source, making the replica a standalone database
instance. You can then take the new standalone instance and create
a new replica of that instance.
Normal response codes: 202
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),badMediaType(415),unprocessableEntity(422),instanceFault(500),
notImplemented(501),serviceUnavailable(503)
Request
-------
.. rest_parameters:: parameters.yaml
- replica_of: replica_of
- slave_of: slave_of
- instanceId: instanceId
- accountId: accountId
Request Example
---------------
.. literalinclude:: samples/db-detach-replica-request.json
:language: javascript
Create database instance
========================
~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: POST /v1.0/{accountId}/instances
@ -278,16 +111,16 @@ database instance.
- You can create only one database instance per POST request.
- You can create a database instance with one or more databases. You
associate users with each database.
can also associate users with each database.
- The port on which the database instance is listening is database
specific.
Normal response codes: 200
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),unprocessableEntity(422),instanceFault(500),notImplemented(501),
serviceUnavailable(503)
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422),
instanceFault(500), notImplemented(501), serviceUnavailable(503)
Request
@ -312,6 +145,7 @@ Request
- size: size
- accountId: accountId
Request Example
---------------
@ -319,7 +153,6 @@ Request Example
:language: javascript
Response Parameters
-------------------
@ -336,7 +169,6 @@ Response Parameters
- users: users
Response Example
----------------
@ -346,29 +178,18 @@ Response Example
Attach configuration group
~~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: PUT /v1.0/{accountId}/instances/{instanceId}
Attaches a configuration group to an instance.
Normal response codes: 202
List database instances
=======================
.. rest_method:: GET /v1.0/{accountId}/instances
Lists information, including status, for all database instances.
Lists status and information for all database instances.
Normal response codes: 200
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),unprocessableEntity(422),instanceFault(500),notImplemented(501),
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), badMediaType(415),
unprocessableEntity(422), instanceFault(500), notImplemented(501),
serviceUnavailable(503)
@ -377,44 +198,192 @@ Request
.. rest_parameters:: parameters.yaml
- configuration: configuration
- instanceId: instanceId
- accountId: accountId
Request Example
---------------
Response Example
----------------
.. literalinclude:: samples/db-instances-index-response.json
.. literalinclude:: samples/db-attach-config-group-request.json
:language: javascript
Detach configuration group
~~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: PUT /v1.0/{accountId}/instances/{instanceId}
Detaches a configuration group from an instance.
When you pass in only an instance ID and omit the configuration ID,
this operation detaches any configuration group that was attached
to the instance.
Normal response codes: 202
List configuration defaults
===========================
.. rest_method:: GET /v1.0/{accountId}/instances/{instanceId}/configuration
Lists the configuration defaults for an instance.
Normal response codes: 200
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),unprocessableEntity(422),instanceFault(500),notImplemented(501),
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), badMediaType(415),
unprocessableEntity(422), instanceFault(500), notImplemented(501),
serviceUnavailable(503)
Request
-------
.. rest_parameters:: parameters.yaml
- configuration: configuration
- instanceId: instanceId
- accountId: accountId
Request Example
---------------
.. literalinclude:: samples/db-detach-config-group-request.json
:language: javascript
Detach replica
~~~~~~~~~~~~~~
.. rest_method:: PATCH /v1.0/{accountId}/instances/{instanceId}
Detaches a replica from its replication source.
If you created an instance that is a replica of a source instance,
you can detach the replica from the source. This can be useful if
the source becomes unavailable. In this case, you can detach the
replica from the source, making the replica a standalone database
instance. You can then take the new standalone instance and create
a new replica of that instance.
Normal response codes: 202
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), badMediaType(415),
unprocessableEntity(422), instanceFault(500), notImplemented(501),
serviceUnavailable(503)
Request
-------
.. rest_parameters:: parameters.yaml
- replica_of: replica_of
- slave_of: slave_of
- instanceId: instanceId
- accountId: accountId
Request Example
---------------
.. literalinclude:: samples/db-detach-replica-request.json
:language: javascript
Update instance name
~~~~~~~~~~~~~~~~~~~~
.. rest_method:: PATCH /v1.0/{accountId}/instances/{instanceId}
Update the instance name.
Normal response codes: 202
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), badMediaType(415),
unprocessableEntity(422), instanceFault(500), notImplemented(501),
serviceUnavailable(503)
Request
-------
.. rest_parameters:: parameters.yaml
- instance: instance
- name: instanceName
- instanceId: instanceId
- accountId: accountId
Request Example
---------------
.. literalinclude:: samples/db-update-instance-name-request.json
:language: javascript
Upgrade datastore version
~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: PATCH /v1.0/{accountId}/instances/{instanceId}
Upgrade datastore version.
During datastore version upgrading, the instance status change to ``UPGRADE``,
and changes back to ``ACTIVE`` after upgrading finishes, otherwize changes to
``ERROR`` if the upgrading fails.
Normal response codes: 202
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), badMediaType(415),
unprocessableEntity(422), instanceFault(500), notImplemented(501),
serviceUnavailable(503)
Request
-------
.. rest_parameters:: parameters.yaml
- instance: instance
- datastore_version: datastore_version1
- instanceId: instanceId
- accountId: accountId
Request Example
---------------
.. literalinclude:: samples/db-upgrade-instance-datastore-version-request.json
:language: javascript
Delete database instance
~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: DELETE /v1.0/{accountId}/instances/{instanceId}
Deletes a database instance, including any associated data.
This operation does not delete any read slaves.
You cannot complete this operation when the instance state is
either ``REBUILDING`` or ``BUILDING``.
Normal response codes: 202
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422),
instanceFault(500), notImplemented(501), serviceUnavailable(503)
Request
-------
@ -426,21 +395,31 @@ Request
List configuration defaults
~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: GET /v1.0/{accountId}/instances/{instanceId}/configuration
Lists the configuration defaults for an instance.
Normal response codes: 200
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422),
instanceFault(500), notImplemented(501), serviceUnavailable(503)
Request
-------
.. rest_parameters:: parameters.yaml
- instanceId: instanceId
- accountId: accountId
Response Example
----------------
.. literalinclude:: samples/db-list-cfg-defaults-response.json
:language: javascript

View File

@ -8,7 +8,7 @@ Creates, lists all, and deletes databases.
Delete database
===============
~~~~~~~~~~~~~~~
.. rest_method:: DELETE /v1.0/{accountId}/instances/{instanceId}/databases/{databaseName}
@ -18,9 +18,10 @@ This operation also deletes all data that is associated with the
database.
Normal response codes: 202
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405), overLimit(413),unprocessableEntity(422),instanceFault(500),notImplemented(501),
serviceUnavailable(503)
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422),
instanceFault(500), notImplemented(501), serviceUnavailable(503)
Request
@ -35,29 +36,18 @@ Request
Create database
===============
~~~~~~~~~~~~~~~
.. rest_method:: POST /v1.0/{accountId}/instances/{instanceId}/databases
Creates a database within an instance.
Normal response codes: 202
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),unprocessableEntity(422),instanceFault(500),notImplemented(501),
serviceUnavailable(503)
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422),
instanceFault(500), notImplemented(501), serviceUnavailable(503)
Request
@ -71,6 +61,7 @@ Request
- instanceId: instanceId
- accountId: accountId
Request Example
---------------
@ -80,21 +71,8 @@ Request Example
List instance databases
=======================
~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: GET /v1.0/{accountId}/instances/{instanceId}/databases
@ -105,11 +83,11 @@ system databases. Only the database administrator can view the
``mysql``, ``information_schema``, and ``lost+found`` system
databases.
Normal response codes: 200
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),unprocessableEntity(422),instanceFault(500),notImplemented(501),
serviceUnavailable(503)
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422),
instanceFault(500), notImplemented(501), serviceUnavailable(503)
Request
@ -121,23 +99,8 @@ Request
- accountId: accountId
Response Example
----------------
.. literalinclude:: samples/db-list-databases-response.json
:language: javascript

View File

@ -9,20 +9,21 @@ shows parameter details for a data store version.
Show configuration parameter details
====================================
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: GET /v1.0/{accountId}/datastores/versions/{datastore_version_id}/parameters/{parameter_name}
Displays details for a configuration parameter associated with a data store version.
Displays details for a configuration parameter associated with a data store
version.
Details include the type, minimum and maximum values, and whether
you must restart the instance after you change the parameter value.
Normal response codes: 200
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),unprocessableEntity(422),instanceFault(500),notImplemented(501),
serviceUnavailable(503)
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422),
instanceFault(500), notImplemented(501), serviceUnavailable(503)
Request
@ -35,8 +36,6 @@ Request
- accountId: accountId
Response Example
----------------
@ -46,28 +45,18 @@ Response Example
List datastore versions
=======================
~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: GET /v1.0/{accountId}/datastores/{datastore_name}/versions
Lists the available versions of a data store.
Normal response codes: 200
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),unprocessableEntity(422),instanceFault(500),notImplemented(501),
serviceUnavailable(503)
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422),
instanceFault(500), notImplemented(501), serviceUnavailable(503)
Request
@ -79,8 +68,6 @@ Request
- accountId: accountId
Response Example
----------------
@ -90,18 +77,8 @@ Response Example
List configuration parameters
=============================
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: GET /v1.0/{accountId}/datastores/versions/{datastore_version_id}/parameters
@ -111,11 +88,11 @@ Parameter information includes the type, minimum and maximum
values, and whether you must restart the instance after you change
a parameter value.
Normal response codes: 200
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),unprocessableEntity(422),instanceFault(500),notImplemented(501),
serviceUnavailable(503)
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422),
instanceFault(500), notImplemented(501), serviceUnavailable(503)
Request
@ -127,23 +104,8 @@ Request
- accountId: accountId
Response Example
----------------
.. literalinclude:: samples/db-list-parameters-response.json
:language: javascript

View File

@ -8,7 +8,7 @@ Lists all flavors and shows details for a flavor, by ID.
Show flavor details
===================
~~~~~~~~~~~~~~~~~~~
.. rest_method:: GET /v1.0/{accountId}/flavors/{flavorId}
@ -22,11 +22,11 @@ floating point value for this parameter, this call truncates the
decimal portion and uses the integer portion as the ``flavorId``
value.
Normal response codes: 200
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),unprocessableEntity(422),instanceFault(500),notImplemented(501),
serviceUnavailable(503)
Error response codes: badRequest(400),unauthorized(401),forbidden(403),
itemNotFound(404), badMethod(405),overLimit(413),unprocessableEntity(422),
instanceFault(500),notImplemented(501), serviceUnavailable(503)
Request
@ -38,8 +38,6 @@ Request
- accountId: accountId
Response Example
----------------
@ -49,18 +47,8 @@ Response Example
List flavors
============
~~~~~~~~~~~~
.. rest_method:: GET /v1.0/{accountId}/flavors
@ -71,11 +59,11 @@ This operation lists information for all available flavors.
This resource is identical to the flavors found in the OpenStack
Nova API.
Normal response codes: 200
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),unprocessableEntity(422),instanceFault(500),notImplemented(501),
serviceUnavailable(503)
Error response codes: badRequest(400),unauthorized(401),forbidden(403),
itemNotFound(404), badMethod(405),overLimit(413),unprocessableEntity(422),
instanceFault(500),notImplemented(501), serviceUnavailable(503)
Request
@ -86,23 +74,8 @@ Request
- accountId: accountId
Response Example
----------------
.. literalinclude:: samples/db-flavors-response.json
:language: javascript

View File

@ -119,6 +119,12 @@ datastore_version:
in: body
required: false
type: string
datastore_version1:
description: |
Name or ID of a datastore version.
in: body
required: false
type: string
description:
description: |
New description of the configuration group.
@ -147,6 +153,12 @@ instance:
in: body
required: true
type: object
instanceName:
description: |
Name of the instance.
in: body
required: false
type: string
name:
description: |
Name of the configuration group you are creating.

View File

@ -0,0 +1,5 @@
{
"instance": {
"name": "sample_instance"
}
}

View File

@ -0,0 +1,5 @@
{
"instance": {
"datastore_version": "sample_datastore_version"
}
}

View File

@ -8,7 +8,7 @@ Creates, lists all, and deletes users.
Enable root user
================
~~~~~~~~~~~~~~~~
.. rest_method:: POST /v1.0/{accountId}/instances/{instanceId}/root
@ -25,11 +25,11 @@ you change core database settings. These changes can be, but are not
limited to, turning off bin logs, removing users that we use to access
your instance, and so on.
Normal response codes: 200
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),unprocessableEntity(422),instanceFault(500),notImplemented(501),
serviceUnavailable(503)
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422),
instanceFault(500), notImplemented(501), serviceUnavailable(503)
Request
@ -41,8 +41,6 @@ Request
- accountId: accountId
Response Example
----------------
@ -52,18 +50,8 @@ Response Example
Show root-enabled status for database instance
==============================================
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: GET /v1.0/{accountId}/instances/{instanceId}/root
@ -72,11 +60,11 @@ Shows root-enabled status for a database instance.
Returns ``true`` if root user is enabled for a database instance.
Otherwise, returns ``false``.
Normal response codes: 200
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),unprocessableEntity(422),instanceFault(500),notImplemented(501),
serviceUnavailable(503)
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422),
instanceFault(500), notImplemented(501), serviceUnavailable(503)
Request
@ -88,8 +76,6 @@ Request
- accountId: accountId
Response Example
----------------
@ -99,27 +85,18 @@ Response Example
Disable root user
=================
~~~~~~~~~~~~~~~~~
.. rest_method:: DELETE /v1.0/{accountId}/instances/{instanceId}/root
Disables the root user.
Normal response codes: 202
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),unprocessableEntity(422),instanceFault(500),notImplemented(501),
serviceUnavailable(503)
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422),
instanceFault(500), notImplemented(501), serviceUnavailable(503)
Request
@ -133,29 +110,18 @@ Request
Delete user
===========
~~~~~~~~~~~
.. rest_method:: DELETE /v1.0/{accountId}/instances/{instanceId}/users/{name}
Deletes a user for a database instance.
Normal response codes: 202
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),unprocessableEntity(422),instanceFault(500),notImplemented(501),
serviceUnavailable(503)
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422),
instanceFault(500), notImplemented(501), serviceUnavailable(503)
Request
@ -170,20 +136,8 @@ Request
Create user
===========
~~~~~~~~~~~
.. rest_method:: POST /v1.0/{accountId}/instances/{instanceId}/users
@ -217,7 +171,8 @@ This table lists the required attributes for creating users:
| | | one or more database names. | |
+-----------------+------+------------------------------------+----------+
Name of the database that the user can access. You can specify one or more database names.
Name of the database that the user can access. You can specify one or more
database names.
**Notes**
@ -277,9 +232,10 @@ names, and passwords.
+------------------------------+-----------------------------+
Normal response codes: 202
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),unprocessableEntity(422),instanceFault(500),notImplemented(501),
serviceUnavailable(503)
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422),
instanceFault(500), notImplemented(501), serviceUnavailable(503)
Request
@ -299,25 +255,13 @@ Request Example
List database instance users
============================
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: GET /v1.0/{accountId}/instances/{instanceId}/users
Lists the users in a database instance and the associated databases for that user.
Lists the users in a database instance and the associated databases for that
user.
This operation does not return system users. A system user is a
database administrator who administers the health of the database.
@ -336,11 +280,11 @@ The following notes apply to MySQL users:
management.html <http://dev.mysql.com/doc/refman/5.1/en/user-
account-management.html>`_
Normal response codes: 200
Error response codes: badRequest(400),unauthorized(401),forbidden(403),itemNotFound(404),
badMethod(405),overLimit(413),unprocessableEntity(422),instanceFault(500),notImplemented(501),
serviceUnavailable(503)
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), badMethod(405), overLimit(413), unprocessableEntity(422),
instanceFault(500), notImplemented(501), serviceUnavailable(503)
Request
@ -352,23 +296,8 @@ Request
- accountId: accountId
Response Example
----------------
.. literalinclude:: samples/db-list-users-response.json
:language: javascript