2016-04-12 09:03:46 -04:00
|
|
|
.. -*- rst -*-
|
|
|
|
|
|
|
|
================================================
|
|
|
|
Servers password (servers, os-server-password)
|
|
|
|
================================================
|
|
|
|
|
|
|
|
Shows the encrypted administrative password. Also, clears the encrypted
|
|
|
|
administrative password for a server, which removes it from the metadata
|
|
|
|
server.
|
|
|
|
|
|
|
|
Show Server Password
|
|
|
|
====================
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
.. rest_method:: GET /servers/{server_id}/os-server-password
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Shows the administrative password for a server.
|
|
|
|
|
2016-04-27 22:29:45 +08:00
|
|
|
This operation calls the metadata service to query metadata information and
|
|
|
|
does not read password information from the server itself.
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-27 22:29:45 +08:00
|
|
|
The password saved in the metadata service is typically encrypted using the
|
|
|
|
public SSH key injected into this server, so the SSH private key is needed to
|
|
|
|
read the password.
|
|
|
|
|
|
|
|
Policy defaults enable only users with the administrative role or the owner
|
|
|
|
of the server to perform this operation. Cloud providers can change these
|
|
|
|
permissions through the ``policy.json`` file.
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
2016-04-24 18:52:09 +08:00
|
|
|
Error response codes: unauthorized(401), forbidden(403), itemNotFound(404)
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Request
|
2016-04-14 13:10:59 -04:00
|
|
|
-------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
2016-10-10 14:50:17 -04:00
|
|
|
- server_id: server_id_path
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-27 22:29:45 +08:00
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- password: password
|
|
|
|
|
2016-10-10 14:50:17 -04:00
|
|
|
**Example Show Server Password**
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-20 15:34:02 +09:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-server-password/get-password-resp.json
|
2016-04-12 09:03:46 -04:00
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Clear Admin Password
|
|
|
|
====================
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
.. rest_method:: DELETE /servers/{server_id}/os-server-password
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-27 22:29:45 +08:00
|
|
|
Clears the encrypted administrative password for a server, which removes it
|
|
|
|
from the database.
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
This action does not actually change the instance server password.
|
|
|
|
|
2016-04-27 22:29:45 +08:00
|
|
|
Policy defaults enable only users with the administrative role or the owner
|
|
|
|
of the server to perform this operation. Cloud providers can change these
|
|
|
|
permissions through the ``policy.json`` file.
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Normal response codes: 204
|
|
|
|
|
2016-04-24 18:52:09 +08:00
|
|
|
Error response codes: unauthorized(401), forbidden(403), itemNotFound(404)
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Request
|
2016-04-14 13:10:59 -04:00
|
|
|
-------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
2016-10-10 14:50:17 -04:00
|
|
|
- server_id: server_id_path
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-10-10 14:50:17 -04:00
|
|
|
If successful, this method does not return content in the response body.
|