Skip to main content

key_rings

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

Overview

Namekey_rings
TypeResource
Idgoogle.cloudkms.key_rings

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. The resource name for the KeyRing in the format projects/*/locations/*/keyRings/*.
createTimestring (google-datetime)Output only. The time at which this KeyRing was created.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, keyRingsIdReturns metadata for a given KeyRing.
listselectprojectsId, locationsIdpageSize, pageToken, filter, orderByLists KeyRings.
createinsertprojectsId, locationsIdkeyRingIdCreate a new KeyRing in a given Project and 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
keyRingsIdstring
locationsIdstring
projectsIdstring
filterstring
keyRingIdstring
orderBystring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

Returns metadata for a given KeyRing.

SELECT
name,
createTime
FROM google.cloudkms.key_rings
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND keyRingsId = '{{ keyRingsId }}' -- required;

INSERT examples

Create a new KeyRing in a given Project and Location.

INSERT INTO google.cloudkms.key_rings (
projectsId,
locationsId,
keyRingId
)
SELECT
'{{ projectsId }}',
'{{ locationsId }}',
'{{ keyRingId }}'
RETURNING
name,
createTime
;