Imports the given wrapped key material and then rotate the key to begin using the new key version for the specified key.

POST {{managementEndpoint}}/20180608/keys/:keyId/keyVersions/import

Imports AES key material to create a new key version and then rotate the key to begin using the new key version. The key material must be base64-encoded and wrapped by the vault's public RSA wrapping key before you can import it. Key Management supports AES symmetric keys that are exactly 16, 24, or 32 bytes. Furthermore, the key length must match the length of the specified key and what you specify as the length at the time of import. When importing an asymmetric key, only the private key must be wrapped in PKCS8 format while the corresponding public key is generated internally by KMS.

Request Body

{"wrappedImportKey"=>{"keyMaterial"=>"<string>", "wrappingAlgorithm"=>"RSA_OAEP_AES_SHA256"}, "freeformTags"=>{"sed_4_"=>"<string>"}}

HEADERS

KeyDatatypeRequiredDescription
opc-request-idstringUnique identifier for the request. If provided, the returned request ID
will include this value. Otherwise, a random request ID will be
generated by the service.
opc-retry-tokenstringA token that uniquely identifies a request so it can be retried in case
of a timeout or server error without risk of executing that same action
again. Retry tokens expire after 24 hours, but can be invalidated
before then due to conflicting operations (e.g., if a resource has been
deleted and purged from the system, then a retry of the original
creation request may be rejected).
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;compartmentId&quot;:&quot;\u003cstring\u003e&quot;,&quot;timeCreated&quot;:&quot;\u003cdateTime\u003e&quot;,&quot;vaultId&quot;:&quot;\u003cstring\u003e&quot;,&quot;keyId&quot;:&quot;\u003cstring\u003e&quot;,&quot;isPrimary&quot;:&quot;\u003cboolean\u003e&quot;,&quot;lifecycleState&quot;:&quot;ENABLED&quot;,&quot;origin&quot;:&quot;EXTERNAL&quot;,&quot;publicKey&quot;:&quot;\u003cstring\u003e&quot;,&quot;replicaDetails&quot;:{&quot;replicationId&quot;:&quot;\u003cstring\u003e&quot;},&quot;restoredFromKeyVersionId&quot;:&quot;\u003cstring\u003e&quot;,&quot;timeOfDeletion&quot;:&quot;\u003cdateTime\u003e&quot;}