Skip to main content

cmek_config

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

Overview​

Namecmek_config
TypeResource
Idgoogle.discoveryengine.cmek_config

Fields​

The following fields are returned by SELECT queries:

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. (NOTEBOOK_LM_STATE_UNSPECIFIED, NOTEBOOK_LM_NOT_READY, NOTEBOOK_LM_READY, NOTEBOOK_LM_NOT_ENABLED)
singleRegionKeysarrayOptional. Single-regional CMEKs that are required for some VAIS features.
statestringOutput only. The states of the CmekConfig. (STATE_UNSPECIFIED, CREATING, ACTIVE, KEY_ISSUE, DELETING, DELETE_FAILED, UNUSABLE, ACTIVE_ROTATING, DELETED, EXPIRED)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_get_cmek_configselectprojectsId, locationsIdGets the CmekConfig.
projects_locations_update_cmek_configupdateprojectsId, locationsIdsetDefaultProvisions 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.

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
locationsIdstring
projectsIdstring
setDefaultboolean

SELECT examples​

Gets the CmekConfig.

SELECT
name,
isDefault,
kmsKey,
kmsKeyVersion,
lastRotationTimestampMicros,
notebooklmState,
singleRegionKeys,
state
FROM google.discoveryengine.cmek_config
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- 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_config
SET
data__kmsKey = '{{ kmsKey }}',
data__name = '{{ name }}',
data__singleRegionKeys = '{{ singleRegionKeys }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND setDefault = {{ setDefault}}
RETURNING
name,
done,
error,
metadata,
response;