- NAME
-
- gcloud kms key-handles create - create a new KeyHandle
- SYNOPSIS
-
-
gcloud kms key-handles create
--___location
=LOCATION
--resource-type
=RESOURCE_TYPE
(--generate-key-handle-id
|--key-handle-id
=KEY_HANDLE_ID
) [GCLOUD_WIDE_FLAG …
]
-
- DESCRIPTION
- 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 ___locationglobal
for the resource typecompute.googleapis.com/Disk
:gcloud 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.
-
provide the argument
-
provide the argument
--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.
-
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.
- 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
-
These variants are also available:
gcloud alpha kms key-handles create
gcloud beta kms key-handles create
gcloud kms key-handles create
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 2025-05-07 UTC.