Advertisement
fkeles

create=api-key.sh

May 17th, 2023 (edited)
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.44 KB | Source Code | 0 0
  1. oci raw-request --http-method POST --target-uri https://identity.<region>.oraclecloud.com/20160918/users/ocid1.user.oc1..<user-id>/apiKeys/ --request-body '{"key" : "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx+QtoB5sXmV4CUxNg53d\n........\n-----END PUBLIC KEY-----"}'
  2. {
  3.   "data": {
  4.     "fingerprint": "7a:bb:a0:7e:1e:c7:33:29:b1:11:f7:70:44:c6:57:55",
  5.     "keyId": "ocid1.tenancy.oc1..<tenancy-id>/ocid1.user.oc1..<user-id>/7a:bb:a0:7e:1e:c7:33:29:b1:11:f7:70:44:c6:57:55",
  6.     "keyValue": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx+QtoB5sXmV4CUxNg53d\n........-----END PUBLIC KEY-----",
  7.     "lifecycleState": "ACTIVE",
  8.     "timeCreated": "2023-05-17T14:00:32.479Z",
  9.     "userId": "ocid1.user.oc1..<user-id>"
  10.   },
  11.   "headers": {
  12.     "Cache-Control": "no-cache, no-store, must-revalidate",
  13.     "Content-Length": "938",
  14.     "Content-Type": "application/json",
  15.     "Date": "Wed, 17 May 2023 14:00:32 GMT",
  16.     "ETag": "2c4e78c2079d4db9b51241b253953a61",
  17.     "Location": "https://identity-control-plane-core.svc.ad3.uk-london-1/20160918/users/ocid1.user.oc1..<user-if>/keys/ocid1.tenancy.oc1..<tenancy-id>/ocid1.user.oc1..<user-id>/7a:bb:a0:7e:1e:c7:33:29:b1:11:f7:70:44:c6:57:55",
  18.     "Pragma": "no-cache",
  19.     "X-Content-Type-Options": "nosniff",
  20.     "opc-request-id": "C35451DC62E441A5842E15B44ADD5C4A/FFCC593BD10CCD87521D58FD02DF17CB/69AF2C8CEFCF9EA3723495A5C1C56655"
  21.   },
  22.   "status": "200 OK"
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement