1
0
Fork 0
mirror of https://github.com/imjasonh/gcloud-help synced 2026-07-18 23:08:48 +00:00

gcloud: Tue Mar 1 21:43:54 UTC 2022

This commit is contained in:
Automated 2022-03-01 21:43:54 +00:00
parent c1c3b75313
commit 21878eea72
1018 changed files with 4838 additions and 3409 deletions

View file

@ -57,75 +57,59 @@ EXAMPLES
The following command creates a key named frodo with protection level
software within the keyring fellowship and location us-east1:
$ gcloud alpha kms keys create frodo \
--location=us-east1 \
--keyring=fellowship \
--purpose=encryption
$ gcloud alpha kms keys create frodo --location=us-east1 \
--keyring=fellowship --purpose=encryption
The following command creates a key named strider with protection level
software within the keyring rangers and location global with a specified
rotation schedule:
$ gcloud alpha kms keys create strider \
--location=global --keyring=rangers \
--purpose=encryption \
--rotation-period=30d \
$ gcloud alpha kms keys create strider --location=global \
--keyring=rangers --purpose=encryption --rotation-period=30d \
--next-rotation-time=2017-10-12T12:34:56.1234Z
The following command creates a key named foo with protection level
software within the keyring fellowship and location us-east1 with two
specified labels:
$ gcloud alpha kms keys create foo \
--location=us-east1 \
--keyring=fellowship \
--purpose=encryption \
$ gcloud alpha kms keys create foo --location=us-east1 \
--keyring=fellowship --purpose=encryption \
--labels=env=prod,team=kms
The following command creates an asymmetric key named samwise with
protection level software and default algorithm ec-sign-p256-sha256 within
the keyring fellowship and location us-east1:
$ gcloud alpha kms keys create samwise \
--location=us-east1 \
--keyring=fellowship \
--purpose=asymmetric-signing \
$ gcloud alpha kms keys create samwise --location=us-east1 \
--keyring=fellowship --purpose=asymmetric-signing \
--default-algorithm=ec-sign-p256-sha256
The following command creates a key named gimli with protection level hsm
and default algorithm google-symmetric-encryption within the keyring
fellowship and location us-east1:
$ gcloud alpha kms keys create gimli \
--location=us-east1 \
--keyring=fellowship \
--purpose=encryption \
--protection-level=hsm
$ gcloud alpha kms keys create gimli --location=us-east1 \
--keyring=fellowship --purpose=encryption --protection-level=hsm
The following command creates a key named legolas with protection level
external and default algorithm external-symmetric-encryption within the
keyring fellowship and location us-central1:
$ gcloud alpha kms keys create legolas \
--location=us-central1 \
--keyring=fellowship \
--purpose=encryption \
$ gcloud alpha kms keys create legolas --location=us-central1 \
--keyring=fellowship --purpose=encryption \
--default-algorithm=external-symmetric-encryption \
--protection-level=external
--skip-initial-version-creation
--protection-level=external --skip-initial-version-creation
The following command creates a key named bilbo with protection level
external-vpc and default algorithm external-symmetric-encryption and an
EkmConnection of eagles within the keyring fellowship and location
us-central1:
$ gcloud alpha kms keys create bilbo \
--location=us-central1 \
--keyring=fellowship \
--purpose=encryption \
$ gcloud alpha kms keys create bilbo --location=us-central1 \
--keyring=fellowship --purpose=encryption \
--default-algorithm=external-symmetric-encryption \
--protection-level=external-vpc
--skip-initial-version-creation
--protection-level=external-vpc \
--skip-initial-version-creation \
--crypto-key-backend="projects/$(gcloud config get project)/
locations/us-central1/ekmConnections/eagles"