Skip to main content

ekm_connections

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

Overview

Nameekm_connections
TypeResource
Idgoogle.cloudkms.ekm_connections

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. The resource name for the EkmConnection in the format projects/*/locations/*/ekmConnections/*.
createTimestring (google-datetime)Output 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

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, ekmConnectionsIdReturns metadata for a given EkmConnection.
listselectprojectsId, locationsIdpageSize, pageToken, filter, orderByLists EkmConnections.
createinsertprojectsId, locationsIdekmConnectionIdCreates a new EkmConnection in a given Project and Location.
patchupdateprojectsId, locationsId, ekmConnectionsIdupdateMaskUpdates an EkmConnection's metadata.
verify_connectivityexecprojectsId, locationsId, ekmConnectionsIdVerifies 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.

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
ekmConnectionsIdstring
locationsIdstring
projectsIdstring
ekmConnectionIdstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

Returns metadata for a given EkmConnection.

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

INSERT examples

Creates a new EkmConnection in a given Project and Location.

INSERT INTO google.cloudkms.ekm_connections (
data__serviceResolvers,
data__etag,
data__keyManagementMode,
data__cryptoSpacePath,
projectsId,
locationsId,
ekmConnectionId
)
SELECT
'{{ serviceResolvers }}',
'{{ etag }}',
'{{ keyManagementMode }}',
'{{ cryptoSpacePath }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ ekmConnectionId }}'
RETURNING
name,
createTime,
cryptoSpacePath,
etag,
keyManagementMode,
serviceResolvers
;

UPDATE examples

Updates an EkmConnection's metadata.

UPDATE google.cloudkms.ekm_connections
SET
data__serviceResolvers = '{{ serviceResolvers }}',
data__etag = '{{ etag }}',
data__keyManagementMode = '{{ keyManagementMode }}',
data__cryptoSpacePath = '{{ cryptoSpacePath }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND ekmConnectionsId = '{{ ekmConnectionsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
createTime,
cryptoSpacePath,
etag,
keyManagementMode,
serviceResolvers;

Lifecycle Methods

Verifies 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.

EXEC google.cloudkms.ekm_connections.verify_connectivity 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@ekmConnectionsId='{{ ekmConnectionsId }}' --required;