View Selected SSH Keys' Details
/paas/api/v1.1/instancemgmt/{identityDomainId}/services/MySQLCS/credentials
By default, a single request returns a maximum of 50 keys. Use the
serviceName
query parameter to limit the results to a single service, use the limitRowCount
query parameter to control maximum number returned, and use the offset
query parameter to fetch additional results, if available. All query parameters are optional.Request
-
identityDomainId: string
Name of the identity domain for the MySQL Cloud Service account.
-
credname(optional): string
The only supported credential name value is 'vmspublickey', which is used by default.
-
serviceName(optional): string
Name of a MySQL Cloud Service instance. The response is limited to credentials for this service instance. If omitted, credentials for all MySQL Cloud Service instances in the identity domain are returned.
-
X-ID-TENANT-NAME: string
Name of the identity domain for the MySQL Cloud Service account.
Response
- application/json
200 Response
object
-
hasMore(optional):
boolean
Indicates whether more keys are available to be requested, with the value
true
indicating that more are available.
When true, use theoffset
query parameter to fetch additional results. By default,offset
is 0 (zero) andlimitRowCount
is 50. -
items(optional):
array items
Array of JSON objects, with one element containing SSH key details for each key returned.
-
totalResults(optional):
integer
Number of SSH keys returned by this request.
array
-
[0]:
object ssh-get-key-items
The details of one SSH key.
object
-
computeKeyName(optional):
string
The fully qualified name of the SSH Key object in Oracle Compute Cloud Service where the SSH public key value is stored.
-
credName(optional):
string
Credential name. The only supported credential name is
vmspublickey
. -
credType(optional):
string
Credential type. The only supported value is
SSH
. -
description(optional):
string
Credential description of the credential name.
-
identityDomain(optional):
string
Identity domain ID for the Oracle MySQL Cloud Service account.
-
lastUpdateMessage(optional):
string
Message returned from the last update for the SSH key. For example:
newly created
,updated by username
. -
lastUpdateStatus(optional):
string
Status of the last update for the SSH key.
-
lastUpdateTime(optional):
string
Date and time the SSH key was last updated. For example,
2017-09-21T18:10:09.006+0000
. -
osUserName(optional):
string
Compute virtual machine OS user name. The only supported value is
opc
. -
parentType(optional):
string
The value
SERVICE
. -
publicKey(optional):
string
Public key for the secure shell (SSH). This key is used for authentication when connecting to the Oracle MySQL Cloud Service instance using an SSH client.
-
serviceName(optional):
string
Name of the Oracle MySQL Cloud Service instance.
-
serviceState(optional):
string
State of the service instance. For example,
RUNNING
. -
serviceType(optional):
string
Cloud service type. This value is
MySQLCS
for Oracle MySQL Cloud Service.
Examples
The following example shows how to view detailed information about the SSH public keys for one MySQL Cloud Service instance in the identity domain by submitting a GET request on the REST endpoint using cURL.
Note: The command in this example uses the URL structure https://rest_server_url/resource-path
, where rest_server_url
is the Oracle Public Cloud or Oracle Cloud Machine REST server to contact for your identity domain or tenant name. See Send Requests for the appropriate URL structure to use on Oracle Public Cloud or Oracle Cloud Machine.
cURL Command
This example retrieves SSH key details for a MySQL Cloud service named SomeInstance in the ExampleIdentityDomain identity domain by defining the optional serviceName query parameter. The optional credname, limitRowCount, and offset query parameters are not used in this example.
curl -i -X GET \ -u "username:password" \ -H "X-ID-TENANT-NAME: ExampleIdentityDomain" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/MySQLCS/credentials?serviceName=SomeInstance
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 200 OK
Date: Wed, 30 Nov 2016 23:19:45 GMT
Transfer-Encoding: chunked
Content-Type: application/json
X-ORACLE-DMS-ECID: c80e846d30-19c-08e6bd-d3847-2106b3216977-e3d8
X-Frame-Options: DENY
Access-Control-Allow-Methods: GET, POST, DELETE, PUT, OPTIONS, HEAD
Access-Control-Allow-Headers: Content-Type, api_key, Authorization
Access-Control-Allow-Origin: *
Example of Response Body
The following shows an example of the response body in JSON format.
{ "items": [ { "identityDomain": "ExampleIdentityDomain", "serviceType": "MySQLCS", "serviceName": "SomeInstance", "credName": "vmspublickey", "credType": "SSH", "parentType": "SERVICE", "lastUpdateTime": "2016-11-30T22:54:29.948+0000", "lastUpdateStatus": "success", "lastUpdateMessage": "newly created", "osUserName": "opc", "computeKeyName": "\/mysql\/foo\/paas.MySQLCS.SomeInstance.ora_opc__vm_user_ssh_cred_", "publicKey": "ssh-rsa SSH KEY INFO HERE WAS REMOVED FROM THIS EXAMPLE ...", "description": "Service user ssh public key which can be used to access the service VM instances", "serviceState": "RUNNING" } ], "hasMore": false, "totalResults": 1 }