1
0
Fork 0
mirror of https://github.com/imjasonh/gcloud-help synced 2026-07-10 11:21:48 +00:00
gcloud-help/gcloud/alpha/kms/key-handles/create
2025-02-20 10:40:27 +00:00

73 lines
2.6 KiB
Text

NAME
gcloud alpha kms key-handles create - create a new KeyHandle
SYNOPSIS
gcloud alpha kms key-handles create --location=LOCATION
--resource-type=RESOURCE_TYPE
(--generate-key-handle-id | --key-handle-id=KEY_HANDLE_ID)
[GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(ALPHA) Creates a new KeyHandle, triggering the provisioning of a new
CryptoKey for CMEK use with the given resource type in the configured key
project and the same location
EXAMPLES
The following command creates a KeyHandle named my-key-handle within the
location global for the resource type compute.googleapis.com/Disk:
$ gcloud alpha kms key-handles create \
--key-handle-id=my-key-handle --my-key-handle \
--location=global --resource-type=compute.googleapis.com/Disk
In case we want to generate a random KeyHandle id, we can use the
--generate-key-handle-id flag instead of the --key-handle-id flag.
REQUIRED FLAGS
Location resource - The KMS location resource. This represents a Cloud
resource. (NOTE) Some attributes are not given arguments in this group but
can be set in other ways.
To set the project attribute:
◆ provide the argument --location on the command line with a fully
specified name;
◆ set the property core/project.
This must be specified.
--location=LOCATION
ID of the location or fully qualified identifier for the location.
To set the location attribute:
▸ provide the argument --location on the command line.
--resource-type=RESOURCE_TYPE
The resource type selector for KeyHandle resources of the form
{SERVICE}.{UNIVERSE_DOMAIN}/{TYPE}.
Exactly one of these must be specified:
--generate-key-handle-id
Generate a KeyHandle id for the new KeyHandle resource.
--key-handle-id=KEY_HANDLE_ID
The KeyHandle id for the new KeyHandle resource.
GCLOUD WIDE FLAGS
These flags are available to all commands: --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.
NOTES
This command is currently in alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct
project, you might be trying to access an API with an invitation-only early
access allowlist. These variants are also available:
$ gcloud kms key-handles create
$ gcloud beta kms key-handles create