1
0
Fork 0
mirror of https://github.com/imjasonh/gcloud-help synced 2026-07-20 04:58:26 +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 kms keys create frodo \
--location=us-east1 \
--keyring=fellowship \
--purpose=encryption
$ gcloud 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 kms keys create strider \
--location=global --keyring=rangers \
--purpose=encryption \
--rotation-period=30d \
$ gcloud 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 kms keys create foo \
--location=us-east1 \
--keyring=fellowship \
--purpose=encryption \
$ gcloud 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 kms keys create samwise \
--location=us-east1 \
--keyring=fellowship \
--purpose=asymmetric-signing \
$ gcloud 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 kms keys create gimli \
--location=us-east1 \
--keyring=fellowship \
--purpose=encryption \
--protection-level=hsm
$ gcloud 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 kms keys create legolas \
--location=us-central1 \
--keyring=fellowship \
--purpose=encryption \
$ gcloud 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 kms keys create bilbo \
--location=us-central1 \
--keyring=fellowship \
--purpose=encryption \
$ gcloud 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"

View file

@ -13,8 +13,7 @@ EXAMPLES
The following command removes the rotation schedule for the key named frodo
within the keyring fellowship and location global:
$ gcloud kms keys remove-rotation-schedule frodo \
--location=global \
$ gcloud kms keys remove-rotation-schedule frodo --location=global \
--keyring=fellowship
POSITIONAL ARGUMENTS

View file

@ -24,10 +24,8 @@ EXAMPLES
within the keyring fellowship and location global starting at the specified
time:
$ gcloud kms keys set-rotation-schedule frodo \
--location=global \
--keyring=fellowship \
--rotation-period=30d \
$ gcloud kms keys set-rotation-schedule frodo --location=global \
--keyring=fellowship --rotation-period=30d \
--next-rotation-time=2017-10-12T12:34:56.1234Z
POSITIONAL ARGUMENTS

View file

@ -36,52 +36,41 @@ EXAMPLES
within the keyring fellowship and location global starting at the specified
time:
$ gcloud kms keys update frodo \
--location=global \
--keyring=fellowship \
--rotation-period=30d \
$ gcloud kms keys update frodo --location=global \
--keyring=fellowship --rotation-period=30d \
--next-rotation-time=2017-10-12T12:34:56.1234Z
The following command removes the rotation schedule for the key named frodo
within the keyring fellowship and location global:
$ gcloud kms keys update frodo \
--location=global \
--keyring=fellowship \
--remove-rotation-schedule
$ gcloud kms keys update frodo --location=global \
--keyring=fellowship --remove-rotation-schedule
The following command updates the labels value for the key named frodo
within the keyring fellowship and location global. If the label key does
not exist at the time, it will be added:
$ gcloud kms keys update frodo \
--location=global \
--keyring=fellowship \
--update-labels=k1=v1
$ gcloud kms keys update frodo --location=global \
--keyring=fellowship --update-labels=k1=v1
The following command removes labels k1 and k2 from the key named frodo
within the keyring fellowship and location global:
$ gcloud kms keys update frodo \
--location=global \
--keyring=fellowship \
--remove-labels=k1,k2
$ gcloud kms keys update frodo --location=global \
--keyring=fellowship --remove-labels=k1,k2
The following command updates the primary version for the key named frodo
within the keyring fellowship and location global:
$ gcloud kms keys update frodo \
--location=global \
--keyring=fellowship \
--primary-version=1
$ gcloud kms keys update frodo --location=global \
--keyring=fellowship --primary-version=1
The following command updates the default algorithm for the key named frodo
within the keyring fellowship and location global, assuming the key
originally has purpose 'asymmetric-encryption' and algorithm
'rsa-decrypt-oaep-2048-sha256':
$ gcloud kms keys update frodo \
--location=global \
$ gcloud kms keys update frodo --location=global \
--keyring=fellowship \
--default-algorithm=rsa-decrypt-oaep-4096-sha256

View file

@ -15,8 +15,7 @@ EXAMPLES
fellowship keyring, and global location and sets it as the primary version:
$ gcloud kms keys versions create --location=global \
--keyring=fellowship \
--key=frodo --primary
--keyring=fellowship --key=frodo --primary
The following command creates a new version within the legolas key,
fellowship keyring, us-central1 location,
@ -24,8 +23,7 @@ EXAMPLES
and sets it as the key's primary version:
$ gcloud kms keys versions create --location=us-central1 \
--keyring=fellowship \
--key=legolas \
--keyring=fellowship --key=legolas \
--external-key-uri=https://example.kms/v0/some/key/path \
--primary
@ -35,10 +33,8 @@ EXAMPLES
version:
$ gcloud kms keys versions create --location=us-central1 \
--keyring=fellowship \
--key=bilbo \
--ekm-connection-key-path=v0/some/key/path \
--primary
--keyring=fellowship --key=bilbo \
--ekm-connection-key-path=v0/some/key/path --primary
FLAGS
--ekm-connection-key-path=EKM_CONNECTION_KEY_PATH

View file

@ -17,11 +17,9 @@ EXAMPLES
The following command saves the public key for CryptoKey frodo Version 2 to
'/tmp/my/pem.file':
$ gcloud kms keys versions get-public-key 2 \
--key=frodo \
--keyring=fellowship \
--location=us-east1 \
--output-file=/tmp/my/pem.file
$ gcloud kms keys versions get-public-key 2 --key=frodo \
--keyring=fellowship --location=us-east1 \
--output-file=/tmp/my/pem.file
POSITIONAL ARGUMENTS
VERSION

View file

@ -23,11 +23,9 @@ EXAMPLES
the provided key material.
$ gcloud kms keys versions import --location=global \
--keyring=fellowship \
--key=frodo \
--import-job=strider \
--rsa-aes-wrapped-key-file=path/to/target/key \
--algorithm=google-symmetric-encryption
--keyring=fellowship --key=frodo --import-job=strider \
--rsa-aes-wrapped-key-file=path/to/target/key \
--algorithm=google-symmetric-encryption
REQUIRED FLAGS
--algorithm=ALGORITHM

View file

@ -15,8 +15,7 @@ EXAMPLES
fellowship, and location global:
$ gcloud kms keys versions list --location=global \
--keyring=fellowship \
--key=frodo
--keyring=fellowship --key=frodo
FLAGS
--key=KEY

View file

@ -19,33 +19,27 @@ EXAMPLES
fellowship and location us-east1:
$ gcloud kms keys versions update 8 --location=us-east1 \
--keyring=fellowship \
--key=frodo \
--state=enabled
--keyring=fellowship --key=frodo --state=enabled
The following command disables the key version 8 of key frodo within
keyring fellowship and location us-east1:
$ gcloud kms keys versions update 8 --location=us-east1 \
--keyring=fellowship \
--key=frodo \
--state=disabled
--keyring=fellowship --key=frodo --state=disabled
The following command updates the external key URI of version 8 of key
frodo within keyring fellowship and location us-east1:
$ gcloud kms keys versions update 8 --location=us-east1 \
--keyring=fellowship \
--key=frodo \
--external-key-uri=https://example.kms/v0/some/key/path
--keyring=fellowship --key=frodo \
--external-key-uri=https://example.kms/v0/some/key/path
The following command updates the ekm connection key path of version 8 of
key bilbo within keyring fellowship and location us-east1:
$ gcloud kms keys versions update 8 --location=us-east1 \
--keyring=fellowship \
--key=bilbo \
--ekm-connection-key-path=v0/some/key/path
--keyring=fellowship --key=bilbo \
--ekm-connection-key-path=v0/some/key/path
POSITIONAL ARGUMENTS
VERSION