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
Key | Datatype | Required | Description |
---|---|---|---|
opc-request-id | string | Unique 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-token | string | A 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-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"id":"\u003cstring\u003e","compartmentId":"\u003cstring\u003e","displayName":"\u003cstring\u003e","timeCreated":"\u003cdateTime\u003e","lifecycleState":"DISABLING","vaultId":"\u003cstring\u003e","keyShape":{"algorithm":"RSA","length":"\u003cinteger\u003e","curveId":"NIST_P384"},"currentKeyVersion":"\u003cstring\u003e","definedTags":{"Lorem_59":{"dolorb":{}},"ade_":{"culpa_cc0":{},"nulla_4a":{},"voluptate_a":{}},"dolore8":{"laboref5":{}}},"freeformTags":{"idbf":"\u003cstring\u003e"},"isPrimary":"\u003cboolean\u003e","protectionMode":"SOFTWARE","replicaDetails":{"replicationId":"\u003cstring\u003e"},"restoredFromKeyId":"\u003cstring\u003e","timeOfDeletion":"\u003cdateTime\u003e"}