gcloud
command to enable automatic key rotation for a key ring:
[KEY_RING_NAME]
with the name of the key ring, [LOCATION]
with the location of the key ring, and [ROTATION_PERIOD]
with the desired rotation period in seconds.gcloud
command to grant the least privilege access to users or service accounts:
[KEY_NAME]
with the name of the key, [LOCATION]
with the location of the key ring, [KEY_RING_NAME]
with the name of the key ring, [MEMBER]
with the user or service account email, and [ROLE]
with the desired IAM role.gcloud
command to enable key versioning for a key:
[KEY_VERSION]
with the version number of the key, [LOCATION]
with the location of the key ring, [KEY_RING_NAME]
with the name of the key ring, and [KEY_NAME]
with the name of the key.google-cloud-kms
Python library to retrieve the list of keys in your CloudKMS keyring.rotation_period
property.update_key
method.google-cloud-kms
Python library to retrieve the list of keys in your CloudKMS keyring.version_template
property.update_key
method.google-cloud-kms
Python library to retrieve the list of keys in your CloudKMS keyring.logging_config
property.update_crypto_key
method.project_id
, location_id
, and keyring_id
with the appropriate values for your CloudKMS setup.