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
The value depends on the type of Exadata Cloud at Customer account that is used to make the request:
For a Traditional Cloud Account, specify the
Identity Domain Name
that is associated with the service.For a Cloud Account with Identity Cloud Service, specify the
Identity Service Id
that is associated with the service, which is a character string beginning withidcs-
.
-
serviceId: string
Name of an existing Exadata Cloud at Customer database deployment. Note: The added SSH key provides access to the entire Exadata Cloud at Customer environment associated with the specified database deployment, not just the specified database deployment.
-
Authorization: string
Base64 encoding of the user name and password of the user making the request. For more information, see Security, Authentication and Authorization.
-
X-ID-TENANT-NAME: string
The value depends on the type of Exadata Cloud at Customer account that is used to make the request:
For a Traditional Cloud Account, specify the
Identity Domain Name
that is associated with the service.For a Cloud Account with Identity Cloud Service, specify the
Identity Service Id
that is associated with the service, which is a character string beginning withidcs-
.
For more information, see Security, Authentication and Authorization.
object
Request Body
-
public-key:
string
The SSH public key value. Note that each slash (
/
) in the key value must be preceeded by a backslash (\
), as in\/
.
Response
- application/json
202 Response
-
Location: string
A REST URI you can use to check the progress and completion of the operation, as described in View Status of an Add SSH Key Job.
object
Response Body
-
status(optional):
string
Status description. For example:
submitted job
.
Examples
The following example shows how to add an SSH public key toan Exadata Cloud at Customer instance by submitting a POST request on the REST endpoint using cURL.
In this example, the identity domain is usexample
and the Oracle Cloud user name and password are serviceadmin
and Pa55_word
. The name of the Exadata Cloud at Customer database deployment is db12c
.
cURL Command
In the following cURL command, the request body is provided directly in the -d
option.
curl -i -X POST --cacert ~/cacert.pem -u serviceadmin:Pa55_word -H "X-ID-TENANT-NAME:usexample" -H "Content-Type:application/json" -d '{ "public-key" : "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAg6A0HG6VpE6OZuOoPzOh+vxA9\/rHnQFdSkQoGurVNi2RdgueHpZliVvOA2v6QO0YiomB3qBRUeIllcjFjyGKlVDbVIW3q\/dDl7OIapDSNUE+CM15+XFhh279\/zh7ko2Ze00hZJ3oeTDrZyapqxTmzvlHB8hYWfeq0Hg88dP+b7HDTj2kZ\/lFFyRARr+2Z42IXOW62VPaslo1PpBjkSyByreJuWRtXS6JNXWD1DIwD5Yfv4JMTecZOa9ENeDJ0mmX0qOeCcUqtThnePCBCemUkgOwQAAH3mQB2ZrGtXJqFYGWqck7JH\/WYiQj54+Y\/Mq40ziXZCMLgFMZTUmxjtJeAQ== rsa-key-20170531" }' https://dbaas.oraclecloud.com/paas/api/v1.1/instancemgmt/usexample/services/dbaas/instances/db12c/credentials/crednames/vmspublickey
HTTP Status Code and Response
HTTP/2.0 202 server: Oracle-Application-Server-11g strict-transport-security: max-age=31536000;includeSubDomains location: https://dbaas.oraclecloud.com:443/paas/api/v1.1/activitylog/usexample/job/12240309 content-language: en access-control-allow-headers: Content-Type, api_key, Authorization, X-ID-TENANT-NAME, X-USER-IDENTITY-DOMAIN-NAME retry-after: 5 access-control-allow-methods: GET, POST, DELETE, PUT, OPTIONS, HEAD x-oracle-dms-ecid: 005KCX1FCAl6uHFpR0H7id00067c0004UB x-oracle-dms-ecid: 005KCX1FCAl6uHFpR0H7id00067c0004UB access-control-allow-origin: * x-frame-options: DENY content-type: application/json vary: user-agent date: Wed, 31 May 2017 01:58:23 GMT { "status": "submitted job" }