Add a New SSH Public Key

post

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

Adds a new SSH public key for the given credential name.

Note: vmspublickey is the only supported credential name.

Request

Supported Media Types
Path Parameters
Header Parameters
Body ()
The request body defines the details of the SSH public key name and value.
Root Schema : addsshkey-postrequest
Type: object
The request body defines the SSH public key name and value to add.
Show Source
  • The SSH public key value and name. This key will be used for authentication when connecting to the Oracle Java Cloud Service instance using an SSH client.
Back to Top

Response

Supported Media Types

202 Response

Accepted.

See Status Codes for information about other HTTP status codes.

The Location header returns a URI that can be used to view the job status, as described in View the Status of an Operation by Job Id.

The response body shows the status mesage.

Body ()
Root Schema : addsshkey-response
Type: object
Show Source
Back to Top

Examples

The following example shows how to add a new SSH public key for the given credential name by submitting a POST request on the REST resource using cURL.

Note:
  • Currently, the only supported credential name is vmspublickey.

  • The command in this example uses the URL structure https://rest_server_url/resource-path, where rest_server_url is the REST server to contact for your identity domain (or Cloud Account). See Send Requests.

cURL Command

curl -i -X POST -u username:password -d @addsshkeyjson.json -H "Content-Type:application/json" -H "X-ID-TENANT-NAME:ExampleIdentityDomain" https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/jaas/instances/ExampleInstance/credentials/crednames/vmspublickey

Example of Request Body

The following example shows the contents of the request body in JSON format.

{
  "public-key":"ZYZYBZ3NzaC1yc2EAAAABJQAAAQEAix3Pt+tXlziLKWLyfY2tQUfsuHNvuL9SVeIJSmyqevv4n4AKxZ1wkgXdQmaN7iV2VlTJTf\/rpNAwXGwnSQr7GyGZv4udkyKqyBummnAnVNMPirCBr8scQPCfGB2rjVmfwgNK6TVtAD1t+uDhVIHEf9Jb05v940Abt9\/u5MFkxxoldQy6rRxgky3ZYstU72NOpiwmptYL5CDu3aPljZsx\/raKQACsU0qi3sCzLD76tK4sp+8BTkGBQIIJxa1zqdFHQzQmr2tcf8D6E4sauMqCpXGzLoxgrLMPtHfwkDsAaOc2VPVKafqHgKssbEFRrUclJHy3z9loYV6RzPABQpEEee== rsa-key-20166666"
}

Example of Response Header

The following shows an example of the response header. The Location header returns the URI that can be used to view the job status. See View the Status of an Operation by Job Id.

HTTP/1.1 202 Accepted
Date: Tue, 19 Apr 2016 22:00:41 GMT
Transfer-Encoding: chunked
Location: https://rest_server_url/paas/api/v1.1/activitylog/ExampleIdentityDomain/job/8722
Content-Type: application/json

Example of Response Body

The following example shows the response returned in JSON format.

{
   "status":"submitted job"
}
Back to Top