Skip to main content

single_tenant_hsm_instances

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

Overview

Namesingle_tenant_hsm_instances
TypeResource
Idgoogle.cloudkms.single_tenant_hsm_instances

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringIdentifier. The resource name for this SingleTenantHsmInstance in the format projects/*/locations/*/singleTenantHsmInstances/*.
createTimestring (google-datetime)Output only. The time at which the SingleTenantHsmInstance was created.
deleteTimestring (google-datetime)Output only. The time at which the SingleTenantHsmInstance was deleted.
disableTimestring (google-datetime)Output only. The time at which the instance will be automatically disabled if not refreshed. This field is updated upon creation and after each successful refresh operation and enable. A RefreshSingleTenantHsmInstance operation must be made via a SingleTenantHsmInstanceProposal before this time otherwise the SingleTenantHsmInstance will become disabled.
keyPortabilityEnabledbooleanOptional. Immutable. Indicates whether key portability is enabled for the SingleTenantHsmInstance. This can only be set at creation time. Key portability features are disabled by default.
quorumAuthobjectRequired. The quorum auth configuration for the SingleTenantHsmInstance. (id: QuorumAuth)
statestringOutput only. The state of the SingleTenantHsmInstance. (STATE_UNSPECIFIED, CREATING, PENDING_TWO_FACTOR_AUTH_REGISTRATION, ACTIVE, DISABLING, DISABLED, DELETING, DELETED, FAILED)
unrefreshedDurationUntilDisablestring (google-duration)Output only. The system-defined duration that an instance can remain unrefreshed until it is automatically disabled. This will have a value of 730 days.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, singleTenantHsmInstancesIdReturns metadata for a given SingleTenantHsmInstance.
listselectprojectsId, locationsIdpageSize, pageToken, showDeleted, filter, orderByLists SingleTenantHsmInstances.
createinsertprojectsId, locationsIdsingleTenantHsmInstanceIdCreates a new SingleTenantHsmInstance in a given Project and Location. User must create a RegisterTwoFactorAuthKeys proposal with this single-tenant HSM instance to finish setup of the instance.

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
singleTenantHsmInstancesIdstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
showDeletedboolean
singleTenantHsmInstanceIdstring

SELECT examples

Returns metadata for a given SingleTenantHsmInstance.

SELECT
name,
createTime,
deleteTime,
disableTime,
keyPortabilityEnabled,
quorumAuth,
state,
unrefreshedDurationUntilDisable
FROM google.cloudkms.single_tenant_hsm_instances
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND singleTenantHsmInstancesId = '{{ singleTenantHsmInstancesId }}' -- required
;

INSERT examples

Creates a new SingleTenantHsmInstance in a given Project and Location. User must create a RegisterTwoFactorAuthKeys proposal with this single-tenant HSM instance to finish setup of the instance.

INSERT INTO google.cloudkms.single_tenant_hsm_instances (
data__name,
data__quorumAuth,
data__keyPortabilityEnabled,
projectsId,
locationsId,
singleTenantHsmInstanceId
)
SELECT
'{{ name }}',
'{{ quorumAuth }}',
{{ keyPortabilityEnabled }},
'{{ projectsId }}',
'{{ locationsId }}',
'{{ singleTenantHsmInstanceId }}'
RETURNING
name,
done,
error,
metadata,
response
;