gcloud_alpha_kms_keys_versions_get-public-key (1)
NAME
- gcloud alpha kms keys versions get-public-key - get the public key for a given version
SYNOPSIS
-
gcloud alpha kms keys versions get-public-key VERSION [--key=KEY] [--keyring=KEYRING] [--location=LOCATION] [--output-file=OUTPUT_FILE] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(ALPHA) Returns the PEM-format public key for the specified asymmetric
The optional flag output-file indicates the path to store PEM. If not specified. PEM will be printed to stdout.
POSITIONAL ARGUMENTS
-
- VERSION
-
Name of the version to get public key.
FLAGS
-
- --key=KEY
-
The containing key.
- --keyring=KEYRING
-
Key ring of the key.
- --location=LOCATION
-
Location of the keyring.
- --output-file=OUTPUT_FILE
-
Path to the output file to store PEM.
GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --configuration, --flags-file, --flatten, --format, --help, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity. Run $ gcloud help for details.
EXAMPLES
The following command saves the public key for CryptoKey frodo Version 2 to '/tmp/my/pem.file':
- $ gcloud alpha kms keys versions get-public-key 2 \ --key frodo \ --keyring fellowship \ --location us-east1 \ --output-file /tmp/my/pem.file
NOTES
This command is currently in ALPHA and may change without notice. If this command fails with API permission errors despite specifying the right project, you will have to apply for early access and have your projects registered on the API whitelist to use it. To do so, contact Support at cloud.google.com/support