MXS-1390: Add SSL documentation to servers resource
The servers resource now shows the SSL parameters in the example output. It also lists the parameters in the list of valid values for parameters in the server creation section.
This commit is contained in:
@ -18,9 +18,7 @@ whitespace replaced with hyphens. The server names are case-insensitive.
|
|||||||
|
|
||||||
#### Response
|
#### Response
|
||||||
|
|
||||||
```
|
`Status: 200 OK`
|
||||||
Status: 200 OK
|
|
||||||
```
|
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
{
|
{
|
||||||
@ -62,7 +60,13 @@ Status: 200 OK
|
|||||||
"parameters": { // Server parameters
|
"parameters": { // Server parameters
|
||||||
"address": "127.0.0.1",
|
"address": "127.0.0.1",
|
||||||
"port": 3000,
|
"port": 3000,
|
||||||
"protocol": "MySQLBackend"
|
"protocol": "MySQLBackend",
|
||||||
|
"authenticator": "MySQLBackendAuth",
|
||||||
|
"ssl_key": "/etc/certs/client-key.pem",
|
||||||
|
"ssl_cert": "/etc/certs/client-cert.pem",
|
||||||
|
"ssl_ca_cert": "/etc/certs/ca.pem",
|
||||||
|
"ssl_cert_verify_depth": 9,
|
||||||
|
"ssl_version": "MAX"
|
||||||
},
|
},
|
||||||
"state": "Master, Running", // Server state string
|
"state": "Master, Running", // Server state string
|
||||||
"version_string": "10.1.22-MariaDB", // Server version
|
"version_string": "10.1.22-MariaDB", // Server version
|
||||||
@ -85,12 +89,6 @@ Status: 200 OK
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Server not found:
|
|
||||||
|
|
||||||
```
|
|
||||||
Status: 404 Not Found
|
|
||||||
```
|
|
||||||
|
|
||||||
### Get all servers
|
### Get all servers
|
||||||
|
|
||||||
```
|
```
|
||||||
@ -101,9 +99,7 @@ GET /v1/servers
|
|||||||
|
|
||||||
Response contains a resource collection with all servers.
|
Response contains a resource collection with all servers.
|
||||||
|
|
||||||
```
|
`Status: 200 OK`
|
||||||
Status: 200 OK
|
|
||||||
```
|
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
{
|
{
|
||||||
@ -146,7 +142,13 @@ Status: 200 OK
|
|||||||
"parameters": {
|
"parameters": {
|
||||||
"address": "127.0.0.1",
|
"address": "127.0.0.1",
|
||||||
"port": 3000,
|
"port": 3000,
|
||||||
"protocol": "MySQLBackend"
|
"protocol": "MySQLBackend",
|
||||||
|
"authenticator": "MySQLBackendAuth",
|
||||||
|
"ssl_key": "/etc/certs/client-key.pem",
|
||||||
|
"ssl_cert": "/etc/certs/client-cert.pem",
|
||||||
|
"ssl_ca_cert": "/etc/certs/ca.pem",
|
||||||
|
"ssl_cert_verify_depth": 9,
|
||||||
|
"ssl_version": "MAX"
|
||||||
},
|
},
|
||||||
"state": "Master, Running",
|
"state": "Master, Running",
|
||||||
"version_string": "10.1.22-MariaDB",
|
"version_string": "10.1.22-MariaDB",
|
||||||
@ -197,7 +199,12 @@ Status: 200 OK
|
|||||||
"parameters": {
|
"parameters": {
|
||||||
"address": "127.0.0.1",
|
"address": "127.0.0.1",
|
||||||
"port": 3001,
|
"port": 3001,
|
||||||
"protocol": "MySQLBackend"
|
"protocol": "MySQLBackend",
|
||||||
|
"ssl_key": "/etc/certs/client-key.pem",
|
||||||
|
"ssl_cert": "/etc/certs/client-cert.pem",
|
||||||
|
"ssl_ca_cert": "/etc/certs/ca.pem",
|
||||||
|
"ssl_cert_verify_depth": 9,
|
||||||
|
"ssl_version": "MAX"
|
||||||
},
|
},
|
||||||
"state": "Slave, Running",
|
"state": "Slave, Running",
|
||||||
"version_string": "10.1.22-MariaDB",
|
"version_string": "10.1.22-MariaDB",
|
||||||
@ -295,20 +302,21 @@ The following parameters can be defined when a server is being created.
|
|||||||
- [protocol](../Getting-Started/Configuration-Guide.md#protocol)
|
- [protocol](../Getting-Started/Configuration-Guide.md#protocol)
|
||||||
- [authenticator](../Getting-Started/Configuration-Guide.md#authenticator)
|
- [authenticator](../Getting-Started/Configuration-Guide.md#authenticator)
|
||||||
- [authenticator_options](../Getting-Started/Configuration-Guide.md#authenticator-options)
|
- [authenticator_options](../Getting-Started/Configuration-Guide.md#authenticator-options)
|
||||||
|
- [ssl_key](../Getting-Started/Configuration-Guide.md#ssl_key)
|
||||||
|
- [ssl_cert](../Getting-Started/Configuration-Guide.md#ssl_cert)
|
||||||
|
- [ssl_ca_cert](../Getting-Started/Configuration-Guide.md#ssl_ca_cert)
|
||||||
|
- [ssl_version](../Getting-Started/Configuration-Guide.md#ssl_version)
|
||||||
|
- [ssl_cert_verify_depth](../Getting-Started/Configuration-Guide.md#ssl_cert_verify_depth)
|
||||||
|
|
||||||
#### Response
|
#### Response
|
||||||
|
|
||||||
Server created:
|
Server created:
|
||||||
|
|
||||||
```
|
`Status: 204 No Content`
|
||||||
Status: 204 No Content
|
|
||||||
```
|
|
||||||
|
|
||||||
Invalid JSON body:
|
Invalid JSON body:
|
||||||
|
|
||||||
```
|
`Status: 403 Forbidden`
|
||||||
Status: 403 Forbidden
|
|
||||||
```
|
|
||||||
|
|
||||||
### Update a server
|
### Update a server
|
||||||
|
|
||||||
@ -444,32 +452,20 @@ Request for `PUT /v1/server/server1`:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The current implementation accepts PATCH requests with partially defined
|
If parts of the resource are not defined (e.g. the `attributes` field in the
|
||||||
resources as request body. If parts of the resource are not defined (e.g. the
|
above example), those parts of the resource are not modified. All parts that are
|
||||||
`attributes` field in the above example), those parts of the resource are not
|
defined are interpreted as the new definition of those part of the resource. In
|
||||||
modified. All parts that are defined are interpreted as the new definition of
|
the above example, the `relationships` of the resource are completely redefined.
|
||||||
those part of the resource. In the above example, the `relationships` of the
|
|
||||||
resource are completely redefined.
|
|
||||||
|
|
||||||
#### Response
|
#### Response
|
||||||
|
|
||||||
Server modified:
|
Server modified:
|
||||||
|
|
||||||
```
|
`Status: 204 No Content`
|
||||||
Status: 204 No Content
|
|
||||||
```
|
|
||||||
|
|
||||||
Server not found:
|
|
||||||
|
|
||||||
```
|
|
||||||
Status: 404 Not Found
|
|
||||||
```
|
|
||||||
|
|
||||||
Invalid JSON body:
|
Invalid JSON body:
|
||||||
|
|
||||||
```
|
`Status: 403 Forbidden`
|
||||||
Status: 403 Forbidden
|
|
||||||
```
|
|
||||||
|
|
||||||
### Destroy a server
|
### Destroy a server
|
||||||
|
|
||||||
@ -484,23 +480,13 @@ A server can only be deleted if it is not used by any services or monitors.
|
|||||||
|
|
||||||
#### Response
|
#### Response
|
||||||
|
|
||||||
OK:
|
Server is destroyed:
|
||||||
|
|
||||||
```
|
`Status: 204 No Content`
|
||||||
Status: 204 No Content
|
|
||||||
```
|
|
||||||
|
|
||||||
Server not found:
|
|
||||||
|
|
||||||
```
|
|
||||||
Status: 404 Not Found
|
|
||||||
```
|
|
||||||
|
|
||||||
Server is in use:
|
Server is in use:
|
||||||
|
|
||||||
```
|
`Status: 403 Forbidden`
|
||||||
Status: 403 Forbidden
|
|
||||||
```
|
|
||||||
|
|
||||||
### Set server state
|
### Set server state
|
||||||
|
|
||||||
@ -531,23 +517,13 @@ PUT /v1/servers/db-server-1/set?state=maintenance
|
|||||||
|
|
||||||
#### Response
|
#### Response
|
||||||
|
|
||||||
OK:
|
Server state modified:
|
||||||
|
|
||||||
```
|
`Status: 204 No Content`
|
||||||
Status: 204 No Content
|
|
||||||
```
|
|
||||||
|
|
||||||
Server not found:
|
|
||||||
|
|
||||||
```
|
|
||||||
Status: 404 Not Found
|
|
||||||
```
|
|
||||||
|
|
||||||
Missing or invalid parameter:
|
Missing or invalid parameter:
|
||||||
|
|
||||||
```
|
`Status: 403 Forbidden`
|
||||||
Status: 403 Forbidden
|
|
||||||
```
|
|
||||||
|
|
||||||
### Clear server state
|
### Clear server state
|
||||||
|
|
||||||
@ -562,20 +538,10 @@ _set_ endpoint documentation.
|
|||||||
|
|
||||||
#### Response
|
#### Response
|
||||||
|
|
||||||
OK:
|
Server state modified:
|
||||||
|
|
||||||
```
|
`Status: 204 No Content`
|
||||||
Status: 204 No Content
|
|
||||||
```
|
|
||||||
|
|
||||||
Server not found:
|
|
||||||
|
|
||||||
```
|
|
||||||
Status: 404 Not Found
|
|
||||||
```
|
|
||||||
|
|
||||||
Missing or invalid parameter:
|
Missing or invalid parameter:
|
||||||
|
|
||||||
```
|
`Status: 403 Forbidden`
|
||||||
Status: 403 Forbidden
|
|
||||||
```
|
|
||||||
|
Reference in New Issue
Block a user