Skip to main content

import_jobs

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

Overview

Nameimport_jobs
TypeResource
Idgoogle.cloudkms.import_jobs

Fields

NameDatatypeDescription
namestringOutput only. The resource name for this ImportJob in the format projects/*/locations/*/keyRings/*/importJobs/*.
attestationobjectContains an HSM-generated attestation about a key operation. For more information, see [Verifying attestations] (https://cloud.google.com/kms/docs/attest-key).
createTimestringOutput only. The time at which this ImportJob was created.
expireEventTimestringOutput only. The time this ImportJob expired. Only present if state is EXPIRED.
expireTimestringOutput only. The time at which this ImportJob is scheduled for expiration and can no longer be used to import key material.
generateTimestringOutput only. The time this ImportJob's key material was generated.
importMethodstringRequired. Immutable. The wrapping method to be used for incoming key material.
protectionLevelstringRequired. Immutable. The protection level of the ImportJob. This must match the protection_level of the version_template on the CryptoKey you attempt to import into.
publicKeyobjectThe public key component of the wrapping key. For details of the type of key this public key corresponds to, see the ImportMethod.
statestringOutput only. The current state of the ImportJob, indicating if it can be used.

Methods

NameAccessible byRequired ParamsDescription
getSELECTimportJobsId, keyRingsId, locationsId, projectsIdReturns metadata for a given ImportJob.
listSELECTkeyRingsId, locationsId, projectsIdLists ImportJobs.
createINSERTkeyRingsId, locationsId, projectsIdCreate a new ImportJob within a KeyRing. ImportJob.import_method is required.

SELECT examples

Lists ImportJobs.

SELECT
name,
attestation,
createTime,
expireEventTime,
expireTime,
generateTime,
importMethod,
protectionLevel,
publicKey,
state
FROM google.cloudkms.import_jobs
WHERE keyRingsId = '{{ keyRingsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

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

/*+ create */
INSERT INTO google.cloudkms.import_jobs (
keyRingsId,
locationsId,
projectsId,
importMethod,
protectionLevel
)
SELECT
'{{ keyRingsId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ importMethod }}',
'{{ protectionLevel }}'
;