Skip to main content

cmek_config

Creates, updates, deletes, gets or lists a cmek_config resource.

Overview

Namecmek_config
TypeResource
Idgoogle.cloudtasks.cmek_config

Fields

NameDatatypeDescription
namestringOutput only. The config resource name which includes the project and location and must end in 'cmekConfig', in the format projects/PROJECT_ID/locations/LOCATION_ID/cmekConfig`
kmsKeystringResource name of the Cloud KMS key, of the form projects/PROJECT_ID/locations/LOCATION_ID/keyRings/KEY_RING_ID/cryptoKeys/KEY_ID, that will be used to encrypt the Queues & Tasks in the region. Setting this as blank will turn off CMEK encryption.

Methods

NameAccessible byRequired ParamsDescription
get_cmek_configSELECTlocationsId, projectsIdGets the CMEK config. Gets the Customer Managed Encryption Key configured with the Cloud Tasks lcoation. By default there is no kms_key configured.
update_cmek_configUPDATElocationsId, projectsIdCreates or Updates a CMEK config. Updates the Customer Managed Encryption Key assotiated with the Cloud Tasks location (Creates if the key does not already exist). All new tasks created in the location will be encrypted at-rest with the KMS-key provided in the config.

SELECT examples

Gets the CMEK config. Gets the Customer Managed Encryption Key configured with the Cloud Tasks lcoation. By default there is no kms_key configured.

SELECT
name,
kmsKey
FROM google.cloudtasks.cmek_config
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

UPDATE example

Updates a cmek_config resource.

/*+ update */
UPDATE google.cloudtasks.cmek_config
SET
kmsKey = '{{ kmsKey }}'
WHERE
locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';