Add an SSH Public Key

post

/paas/api/v1.1/instancemgmt/{identityDomainId}/services/dbaas/instances/{serviceId}/credentials/crednames/{credentialName}

Adds an SSH public key to a Database Classic Cloud Service instance.

Request

Supported Media Types
Path Parameters
Body ()
Root Schema : Request Body
Type: object
Title: Request Body
Show Source
  • The value of the SSH public key, with any slashes (/) it contains preceded by backslashes, as in \/.
Back to Top

Response

Supported Media Types

202 Response

Accepted. See Status Codes for information about other possible HTTP status codes.
Headers
  • A REST URI you can use to check the progress and completion of the operation.
Body ()
Root Schema : Response Body
Type: object
Title: Response Body
Show Source
Back to Top

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"
}
Back to Top