Add an SSH Public Key
/paas/api/v1.1/instancemgmt/{identityDomainId}/services/dbaas/instances/{serviceId}/credentials/crednames/{credentialName}
Request
- application/json
-
credentialName: string
The value
vmspublickey
. -
identityDomainId: string
Identity domain ID for the Database Classic Cloud Service account.
-
serviceId: string
Name of the Database Classic Cloud Service instance.
object
Request Body
-
public-key:
string
The value of the SSH public key, with any slashes (
/
) it contains preceded by backslashes, as in\/
.
Response
- application/json
202 Response
-
Location: string
A REST URI you can use to check the progress and completion of the operation.
object
Response Body
-
status(optional):
string
Status description. For example:
submitted job
.
Examples
The following example shows how to add an SSH public key to a Database Classic Cloud Service instance by submitting a POST request on the REST endpoint using cURL.
This example uses a traditional cloud account, so the {identityDomainId}
path parameter and the X-ID-TENANT-NAME
header parameter are set to the account's domain name, which is usexample
. The service instance is db12c-xp-si2
and the Oracle Cloud user name of the user making the call is dbcsadmin
.
Note that the request body containing the public-key
parameter is provided in the cURL command's --data
option. Also, the actual public key value has been truncated.
cURL Command
$ curl --include --request POST \ --user dbcsadmin:password \ --header "X-ID-TENANT-NAME:usexample" \ --header "Content-Type: application/json" \ --data '{"public-key":"public-key-value"}' \ https://dbaas.oraclecloud.com/paas/api/v1.1/instancemgmt/usexample/services/dbaas/instances/db12c-xp-si2/credentials/crednames/vmspublickey
HTTP Status Code and Response Headers
HTTP/1.1 202 Accepted Date: date-and-time-stamp Server: Oracle-Application-Server-11g Location: https://dbaas.oraclecloud.com:443/paas/api/v1.1/activitylog/usexample/job/5809164 Content-Length: 26 X-ORACLE-DMS-ECID: id-string X-ORACLE-DMS-ECID: id-string X-Frame-Options: DENY Vary: Accept-Encoding,User-Agent Retry-After: 5 Content-Language: en Content-Type: application/json
Response Body
{ "status":"submitted job" }