Skip to main content

ekm_connections

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

Overview

Nameekm_connections
TypeResource
Idgoogle.cloudkms.ekm_connections

Fields

NameDatatypeDescription
namestringOutput only. The resource name for the EkmConnection in the format projects/*/locations/*/ekmConnections/*.
createTimestringOutput only. The time at which the EkmConnection was created.
cryptoSpacePathstringOptional. Identifies the EKM Crypto Space that this EkmConnection maps to. Note: This field is required if KeyManagementMode is CLOUD_KMS.
etagstringOptional. Etag of the currently stored EkmConnection.
keyManagementModestringOptional. Describes who can perform control plane operations on the EKM. If unset, this defaults to MANUAL.
serviceResolversarrayOptional. A list of ServiceResolvers where the EKM can be reached. There should be one ServiceResolver per EKM replica. Currently, only a single ServiceResolver is supported.

Methods

NameAccessible byRequired ParamsDescription
getSELECTekmConnectionsId, locationsId, projectsIdReturns metadata for a given EkmConnection.
listSELECTlocationsId, projectsIdLists EkmConnections.
createINSERTlocationsId, projectsIdCreates a new EkmConnection in a given Project and Location.
patchUPDATEekmConnectionsId, locationsId, projectsIdUpdates an EkmConnection's metadata.
verify_connectivityEXECekmConnectionsId, locationsId, projectsIdVerifies that Cloud KMS can successfully connect to the external key manager specified by an EkmConnection. If there is an error connecting to the EKM, this method returns a FAILED_PRECONDITION status containing structured information as described at https://cloud.google.com/kms/docs/reference/ekm_errors.

SELECT examples

Lists EkmConnections.

SELECT
name,
createTime,
cryptoSpacePath,
etag,
keyManagementMode,
serviceResolvers
FROM google.cloudkms.ekm_connections
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new ekm_connections resource.

/*+ create */
INSERT INTO google.cloudkms.ekm_connections (
locationsId,
projectsId,
serviceResolvers,
etag,
keyManagementMode,
cryptoSpacePath
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ serviceResolvers }}',
'{{ etag }}',
'{{ keyManagementMode }}',
'{{ cryptoSpacePath }}'
;

UPDATE example

Updates a ekm_connections resource.

/*+ update */
UPDATE google.cloudkms.ekm_connections
SET
serviceResolvers = '{{ serviceResolvers }}',
etag = '{{ etag }}',
keyManagementMode = '{{ keyManagementMode }}',
cryptoSpacePath = '{{ cryptoSpacePath }}'
WHERE
ekmConnectionsId = '{{ ekmConnectionsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';