Imports the given wrapped AES key.

POST {{managementEndpoint}}/20180608/keys/import

Imports AES and RSA keys to create a new key. 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 both RSA and AES keys. The AES keys are symmetric keys of length 128 bits (16 bytes), 192 bits (24 bytes), or 256 bits (32 bytes), and the RSA keys are asymmetric keys of length 2048 bits (256 bytes), 3072 bits (384 bytes), and 4096 bits (512 bytes). Furthermore, the key length must match what you specify at the time of import. When importing an asymmetric key, only private key must be wrapped in PKCS8 format while the corresponding public key is generated internally by KMS.

Request Body

{"compartmentId"=>"{{compartment_ocid}}", "displayName"=>"<string>", "wrappedImportKey"=>{"keyMaterial"=>"<string>", "wrappingAlgorithm"=>"RSA_OAEP_AES_SHA256"}, "keyShape"=>{"algorithm"=>"AES", "length"=>"<integer>", "curveId"=>"NIST_P256"}, "freeformTags"=>{"ut81"=>"<string>"}, "protectionMode"=>"HSM"}

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;displayName&quot;:&quot;\u003cstring\u003e&quot;,&quot;timeCreated&quot;:&quot;\u003cdateTime\u003e&quot;,&quot;lifecycleState&quot;:&quot;DISABLING&quot;,&quot;vaultId&quot;:&quot;\u003cstring\u003e&quot;,&quot;keyShape&quot;:{&quot;algorithm&quot;:&quot;RSA&quot;,&quot;length&quot;:&quot;\u003cinteger\u003e&quot;,&quot;curveId&quot;:&quot;NIST_P384&quot;},&quot;currentKeyVersion&quot;:&quot;\u003cstring\u003e&quot;,&quot;definedTags&quot;:{&quot;Lorem_59&quot;:{&quot;dolorb&quot;:{}},&quot;ade_&quot;:{&quot;culpa_cc0&quot;:{},&quot;nulla_4a&quot;:{},&quot;voluptate_a&quot;:{}},&quot;dolore8&quot;:{&quot;laboref5&quot;:{}}},&quot;freeformTags&quot;:{&quot;idbf&quot;:&quot;\u003cstring\u003e&quot;},&quot;isPrimary&quot;:&quot;\u003cboolean\u003e&quot;,&quot;protectionMode&quot;:&quot;SOFTWARE&quot;,&quot;replicaDetails&quot;:{&quot;replicationId&quot;:&quot;\u003cstring\u003e&quot;},&quot;restoredFromKeyId&quot;:&quot;\u003cstring\u003e&quot;,&quot;timeOfDeletion&quot;:&quot;\u003cdateTime\u003e&quot;}