public final class ImportJob extends GeneratedMessageV3 implements ImportJobOrBuilder
An ImportJob can be used to create
CryptoKeys and
CryptoKeyVersions using pre-existing
key material, generated outside of Cloud KMS.
When an ImportJob is created, Cloud KMS will
generate a "wrapping key", which is a public/private key pair. You use the
wrapping key to encrypt (also known as wrap) the pre-existing key material to
protect it during the import process. The nature of the wrapping key depends
on the choice of
import_method. When the
wrapping key generation is complete, the
state will be set to
ACTIVE and the
public_key can be fetched. The
fetched public key can then be used to wrap your pre-existing key material.
Once the key material is wrapped, it can be imported into a new
CryptoKeyVersion in an existing
CryptoKey by calling
ImportCryptoKeyVersion.
Multiple CryptoKeyVersions can be
imported with a single ImportJob. Cloud KMS
uses the private key portion of the wrapping key to unwrap the key material.
Only Cloud KMS has access to the private key.
An ImportJob expires 3 days after it is
created. Once expired, Cloud KMS will no longer be able to import or unwrap
any key material that was wrapped with the
ImportJob's public key.
For more information, see
Importing a key.
Protobuf type google.cloud.kms.v1.ImportJob
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
Static Fields
ATTESTATION_FIELD_NUMBER
public static final int ATTESTATION_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
CREATE_TIME_FIELD_NUMBER
public static final int CREATE_TIME_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
EXPIRE_EVENT_TIME_FIELD_NUMBER
public static final int EXPIRE_EVENT_TIME_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
EXPIRE_TIME_FIELD_NUMBER
public static final int EXPIRE_TIME_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
GENERATE_TIME_FIELD_NUMBER
public static final int GENERATE_TIME_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
IMPORT_METHOD_FIELD_NUMBER
public static final int IMPORT_METHOD_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
PROTECTION_LEVEL_FIELD_NUMBER
public static final int PROTECTION_LEVEL_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
PUBLIC_KEY_FIELD_NUMBER
public static final int PUBLIC_KEY_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
STATE_FIELD_NUMBER
public static final int STATE_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
Static Methods
getDefaultInstance()
public static ImportJob getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static ImportJob.Builder newBuilder()
newBuilder(ImportJob prototype)
public static ImportJob.Builder newBuilder(ImportJob prototype)
public static ImportJob parseDelimitedFrom(InputStream input)
public static ImportJob parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static ImportJob parseFrom(byte[] data)
Parameter |
---|
Name | Description |
data | byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static ImportJob parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static ImportJob parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static ImportJob parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static ImportJob parseFrom(CodedInputStream input)
public static ImportJob parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static ImportJob parseFrom(InputStream input)
public static ImportJob parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static ImportJob parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static ImportJob parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<ImportJob> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter |
---|
Name | Description |
obj | Object
|
Overrides
getAttestation()
public KeyOperationAttestation getAttestation()
Output only. Statement that was generated and signed by the key creator
(for example, an HSM) at key creation time. Use this statement to verify
attributes of the key as stored on the HSM, independently of Google.
Only present if the chosen
ImportMethod is one with a
protection level of HSM.
.google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
getAttestationOrBuilder()
public KeyOperationAttestationOrBuilder getAttestationOrBuilder()
Output only. Statement that was generated and signed by the key creator
(for example, an HSM) at key creation time. Use this statement to verify
attributes of the key as stored on the HSM, independently of Google.
Only present if the chosen
ImportMethod is one with a
protection level of HSM.
.google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
getCreateTime()
public Timestamp getCreateTime()
Output only. The time at which this
ImportJob was created.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
---|
Type | Description |
Timestamp | The createTime.
|
getCreateTimeOrBuilder()
public TimestampOrBuilder getCreateTimeOrBuilder()
Output only. The time at which this
ImportJob was created.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
getDefaultInstanceForType()
public ImportJob getDefaultInstanceForType()
getExpireEventTime()
public Timestamp getExpireEventTime()
Output only. The time this ImportJob
expired. Only present if state is
EXPIRED.
.google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
---|
Type | Description |
Timestamp | The expireEventTime.
|
getExpireEventTimeOrBuilder()
public TimestampOrBuilder getExpireEventTimeOrBuilder()
Output only. The time this ImportJob
expired. Only present if state is
EXPIRED.
.google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
getExpireTime()
public Timestamp getExpireTime()
Output only. The time at which this
ImportJob is scheduled for expiration and
can no longer be used to import key material.
.google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
---|
Type | Description |
Timestamp | The expireTime.
|
getExpireTimeOrBuilder()
public TimestampOrBuilder getExpireTimeOrBuilder()
Output only. The time at which this
ImportJob is scheduled for expiration and
can no longer be used to import key material.
.google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
getGenerateTime()
public Timestamp getGenerateTime()
Output only. The time this ImportJob's key
material was generated.
.google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
---|
Type | Description |
Timestamp | The generateTime.
|
getGenerateTimeOrBuilder()
public TimestampOrBuilder getGenerateTimeOrBuilder()
Output only. The time this ImportJob's key
material was generated.
.google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
getImportMethod()
public ImportJob.ImportMethod getImportMethod()
Required. Immutable. The wrapping method to be used for incoming key
material.
.google.cloud.kms.v1.ImportJob.ImportMethod import_method = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
getImportMethodValue()
public int getImportMethodValue()
Required. Immutable. The wrapping method to be used for incoming key
material.
.google.cloud.kms.v1.ImportJob.ImportMethod import_method = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
Returns |
---|
Type | Description |
int | The enum numeric value on the wire for importMethod.
|
getName()
Output only. The resource name for this
ImportJob in the format
projects/*/locations/*/keyRings/*/importJobs/*
.
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
---|
Type | Description |
String | The name.
|
getNameBytes()
public ByteString getNameBytes()
Output only. The resource name for this
ImportJob in the format
projects/*/locations/*/keyRings/*/importJobs/*
.
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
---|
Type | Description |
ByteString | The bytes for name.
|
getParserForType()
public Parser<ImportJob> getParserForType()
Overrides
getProtectionLevel()
public ProtectionLevel getProtectionLevel()
Required. 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.
.google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
getProtectionLevelValue()
public int getProtectionLevelValue()
Required. 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.
.google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
Returns |
---|
Type | Description |
int | The enum numeric value on the wire for protectionLevel.
|
getPublicKey()
public ImportJob.WrappingPublicKey getPublicKey()
Output only. The public key with which to wrap key material prior to
import. Only returned if state is
ACTIVE.
.google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
getPublicKeyOrBuilder()
public ImportJob.WrappingPublicKeyOrBuilder getPublicKeyOrBuilder()
Output only. The public key with which to wrap key material prior to
import. Only returned if state is
ACTIVE.
.google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
getSerializedSize()
public int getSerializedSize()
Returns |
---|
Type | Description |
int | |
Overrides
getState()
public ImportJob.ImportJobState getState()
Output only. The current state of the
ImportJob, indicating if it can be used.
.google.cloud.kms.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
getStateValue()
public int getStateValue()
Output only. The current state of the
ImportJob, indicating if it can be used.
.google.cloud.kms.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
---|
Type | Description |
int | The enum numeric value on the wire for state.
|
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Overrides
hasAttestation()
public boolean hasAttestation()
Output only. Statement that was generated and signed by the key creator
(for example, an HSM) at key creation time. Use this statement to verify
attributes of the key as stored on the HSM, independently of Google.
Only present if the chosen
ImportMethod is one with a
protection level of HSM.
.google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
---|
Type | Description |
boolean | Whether the attestation field is set.
|
hasCreateTime()
public boolean hasCreateTime()
Output only. The time at which this
ImportJob was created.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
---|
Type | Description |
boolean | Whether the createTime field is set.
|
hasExpireEventTime()
public boolean hasExpireEventTime()
Output only. The time this ImportJob
expired. Only present if state is
EXPIRED.
.google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
---|
Type | Description |
boolean | Whether the expireEventTime field is set.
|
hasExpireTime()
public boolean hasExpireTime()
Output only. The time at which this
ImportJob is scheduled for expiration and
can no longer be used to import key material.
.google.protobuf.Timestamp expire_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
---|
Type | Description |
boolean | Whether the expireTime field is set.
|
hasGenerateTime()
public boolean hasGenerateTime()
Output only. The time this ImportJob's key
material was generated.
.google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
---|
Type | Description |
boolean | Whether the generateTime field is set.
|
hasPublicKey()
public boolean hasPublicKey()
Output only. The public key with which to wrap key material prior to
import. Only returned if state is
ACTIVE.
.google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
---|
Type | Description |
boolean | Whether the publicKey field is set.
|
hashCode()
Returns |
---|
Type | Description |
int | |
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public ImportJob.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected ImportJob.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Overrides
toBuilder()
public ImportJob.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides