Skip to main content

cmek_configs

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

Overview

Namecmek_configs
TypeResource
Idgoogle.discoveryengine.cmek_configs

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringRequired. The name of the CmekConfig of the form projects/{project}/locations/{location}/cmekConfig or projects/{project}/locations/{location}/cmekConfigs/{cmek_config}.
isDefaultbooleanOutput only. The default CmekConfig for the Customer.
kmsKeystringRequired. KMS key resource name which will be used to encrypt resources projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}.
kmsKeyVersionstringOutput only. KMS key version resource name which will be used to encrypt resources /cryptoKeyVersions/{keyVersion}.
lastRotationTimestampMicrosstring (int64)Output only. The timestamp of the last key rotation.
notebooklmStatestringOutput only. Whether the NotebookLM Corpus is ready to be used.
singleRegionKeysarrayOptional. Single-regional CMEKs that are required for some VAIS features.
statestringOutput only. The states of the CmekConfig.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_cmek_configs_getselectprojectsId, locationsId, cmekConfigsIdGets the CmekConfig.
projects_locations_cmek_configs_listselectprojectsId, locationsIdLists all the CmekConfigs with the project.
projects_locations_cmek_configs_patchupdateprojectsId, locationsId, cmekConfigsIdsetDefaultProvisions a CMEK key for use in a location of a customer's project. This method will also conduct location validation on the provided cmekConfig to make sure the key is valid and can be used in the selected location.
projects_locations_cmek_configs_deletedeleteprojectsId, locationsId, cmekConfigsIdDe-provisions a CmekConfig.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
cmekConfigsIdstring
locationsIdstring
projectsIdstring
setDefaultboolean

SELECT examples

Gets the CmekConfig.

SELECT
name,
isDefault,
kmsKey,
kmsKeyVersion,
lastRotationTimestampMicros,
notebooklmState,
singleRegionKeys,
state
FROM google.discoveryengine.cmek_configs
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND cmekConfigsId = '{{ cmekConfigsId }}' -- required;

UPDATE examples

Provisions a CMEK key for use in a location of a customer's project. This method will also conduct location validation on the provided cmekConfig to make sure the key is valid and can be used in the selected location.

UPDATE google.discoveryengine.cmek_configs
SET
data__name = '{{ name }}',
data__kmsKey = '{{ kmsKey }}',
data__singleRegionKeys = '{{ singleRegionKeys }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND cmekConfigsId = '{{ cmekConfigsId }}' --required
AND setDefault = {{ setDefault}}
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

De-provisions a CmekConfig.

DELETE FROM google.discoveryengine.cmek_configs
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND cmekConfigsId = '{{ cmekConfigsId }}' --required;