gcloud alpha kms keys versions import --algorithm=ALGORITHM --import-job=IMPORT_JOB [--key=KEY] [--keyring=KEYRING] [--location=LOCATION] [--public-key-file=PUBLIC_KEY_FILE] [--target-key-file=TARGET_KEY_FILE] [--version=VERSION] [--wrapped-key-file=WRAPPED_KEY_FILE] [GCLOUD_WIDE_FLAG …]
(ALPHA) Imports wrapped key material into a new version within an
existing crypto key following the import procedure documented at https://cloud.google.com/kms/docs/importing-a-key.
gcloud alpha kms keys versions import --location=global --keyring=fellowship --key=frodo --import-job=strider --wrapped-key-file=path/to/target/key --algorithm=google-symmetric-encryption--algorithm=ALGORITHMALGORITHM must be one of: aes-128-cbc,
aes-128-ctr, aes-128-gcm, aes-256-cbc,
aes-256-ctr, aes-256-gcm,
ec-sign-ed25519, ec-sign-p256-sha256,
ec-sign-p384-sha384, ec-sign-secp256k1-sha256,
google-symmetric-encryption, hmac-sha1,
hmac-sha224, hmac-sha256, hmac-sha384,
hmac-sha512, kem-xwing, ml-kem-1024,
ml-kem-768, pq-sign-hash-slh-dsa-sha2-128s-sha256,
pq-sign-ml-dsa-44, pq-sign-ml-dsa-44-external-mu,
pq-sign-ml-dsa-65, pq-sign-ml-dsa-65-external-mu,
pq-sign-ml-dsa-87, pq-sign-ml-dsa-87-external-mu,
pq-sign-slh-dsa-sha2-128s, rsa-decrypt-oaep-2048-sha1,
rsa-decrypt-oaep-2048-sha256,
rsa-decrypt-oaep-3072-sha1,
rsa-decrypt-oaep-3072-sha256,
rsa-decrypt-oaep-4096-sha1,
rsa-decrypt-oaep-4096-sha256,
rsa-decrypt-oaep-4096-sha512,
rsa-sign-pkcs1-2048-sha256,
rsa-sign-pkcs1-3072-sha256,
rsa-sign-pkcs1-4096-sha256,
rsa-sign-pkcs1-4096-sha512, rsa-sign-pss-2048-sha256,
rsa-sign-pss-3072-sha256, rsa-sign-pss-4096-sha256,
rsa-sign-pss-4096-sha512, rsa-sign-raw-pkcs1-2048,
rsa-sign-raw-pkcs1-3072, rsa-sign-raw-pkcs1-4096.
--import-job=IMPORT_JOB--key=KEY--keyring=KEYRING--location=LOCATION--public-key-file=PUBLIC_KEY_FILE--target-key-file=TARGET_KEY_FILE--version=VERSION--wrapped-key-file=WRAPPED_KEY_FILE--access-token-file,
--account, --billing-project,
--configuration,
--flags-file,
--flatten, --format, --help, --impersonate-service-account,
--log-http,
--project, --quiet, --trace-token, --user-output-enabled,
--verbosity.
Run $ gcloud help for details.
gcloud kms keys versions importgcloud beta kms keys versions import
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-05-27 UTC.