gcloud beta kms key-handles create Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud beta kms key-handles create - create a new KeyHandle
- SYNOPSIS
gcloud beta kms key-handles create--location=LOCATION--resource-type=RESOURCE_TYPE(--generate-key-handle-id|--key-handle-id=KEY_HANDLE_ID)[GCLOUD_WIDE_FLAG …]
- DESCRIPTION
(BETA)Creates a new KeyHandle, triggering the provisioning of anew CryptoKey for CMEK use with the given resource type in the configured keyproject and the same location- EXAMPLES
- The following command creates a KeyHandle named
my-key-handlewithin the locationglobalfor the resource typecompute.googleapis.com/Disk:gcloudbetakmskey-handlescreate--key-handle-id=my-key-handle--my-key-handle--location=global--resource-type=compute.googleapis.com/DiskIn case we want to generate a random KeyHandle id, we can use the
--generate-key-handle-idflag instead of the--key-handle-idflag. - 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 inother ways.
To set the
projectattribute:- provide the argument
--locationon the command line with a fullyspecified 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
locationattribute:- provide the argument
--locationon 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 inother 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 helpfor details. - NOTES
- This command is currently in beta and might change without notice. Thesevariants are also available:
gcloudkmskey-handlescreategcloudalphakmskey-handlescreate
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-07 UTC.