public final class ImportJob extends GeneratedMessageV3 implements ImportJobOrBuilder
An [ImportJob][google.cloud.kms.v1.ImportJob] can be used to create [CryptoKeys][google.cloud.kms.v1.CryptoKey] and [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] using pre-existing key material, generated outside of Cloud KMS. When an [ImportJob][google.cloud.kms.v1.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][google.cloud.kms.v1.ImportJob.import_method]. When the wrapping key generation is complete, the [state][google.cloud.kms.v1.ImportJob.state] will be set to [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE] and the [public_key][google.cloud.kms.v1.ImportJob.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][google.cloud.kms.v1.CryptoKeyVersion] in an existing [CryptoKey][google.cloud.kms.v1.CryptoKey] by calling [ImportCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersion]. Multiple [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] can be imported with a single [ImportJob][google.cloud.kms.v1.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][google.cloud.kms.v1.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][google.cloud.kms.v1.ImportJob]'s public key. For more information, see [Importing a key](https://cloud.google.com/kms/docs/importing-a-key).Protobuf type
google.cloud.kms.v1.ImportJob
Modifier and Type | Class and Description |
---|---|
static class |
ImportJob.Builder
An [ImportJob][google.cloud.kms.v1.ImportJob] can be used to create
[CryptoKeys][google.cloud.kms.v1.CryptoKey] and
[CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] using pre-existing
key material, generated outside of Cloud KMS.
|
static class |
ImportJob.ImportJobState
The state of the [ImportJob][google.cloud.kms.v1.ImportJob], indicating if
it can be used.
|
static class |
ImportJob.ImportMethod
[ImportMethod][google.cloud.kms.v1.ImportJob.ImportMethod] describes the
key wrapping method chosen for this
[ImportJob][google.cloud.kms.v1.ImportJob].
|
static class |
ImportJob.WrappingPublicKey
The public key component of the wrapping key.
|
static interface |
ImportJob.WrappingPublicKeyOrBuilder |
GeneratedMessageV3.BuilderParent, GeneratedMessageV3.ExtendableBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage,BuilderType extends GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, GeneratedMessageV3.ExtendableMessage<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.FieldAccessorTable, GeneratedMessageV3.UnusedPrivateParameter
AbstractMessageLite.InternalOneOfEnum
Modifier and Type | Field and Description |
---|---|
static int |
ATTESTATION_FIELD_NUMBER |
static int |
CREATE_TIME_FIELD_NUMBER |
static int |
EXPIRE_EVENT_TIME_FIELD_NUMBER |
static int |
EXPIRE_TIME_FIELD_NUMBER |
static int |
GENERATE_TIME_FIELD_NUMBER |
static int |
IMPORT_METHOD_FIELD_NUMBER |
static int |
NAME_FIELD_NUMBER |
static int |
PROTECTION_LEVEL_FIELD_NUMBER |
static int |
PUBLIC_KEY_FIELD_NUMBER |
static int |
STATE_FIELD_NUMBER |
alwaysUseFieldBuilders, unknownFields
memoizedSize
memoizedHashCode
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
toByteArray, toByteString, writeDelimitedTo, writeTo
public static final int NAME_FIELD_NUMBER
public static final int IMPORT_METHOD_FIELD_NUMBER
public static final int PROTECTION_LEVEL_FIELD_NUMBER
public static final int CREATE_TIME_FIELD_NUMBER
public static final int GENERATE_TIME_FIELD_NUMBER
public static final int EXPIRE_TIME_FIELD_NUMBER
public static final int EXPIRE_EVENT_TIME_FIELD_NUMBER
public static final int STATE_FIELD_NUMBER
public static final int PUBLIC_KEY_FIELD_NUMBER
public static final int ATTESTATION_FIELD_NUMBER
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance
in class GeneratedMessageV3
public final UnknownFieldSet getUnknownFields()
getUnknownFields
in interface MessageOrBuilder
getUnknownFields
in class GeneratedMessageV3
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3
public String getName()
Output only. The resource name for this [ImportJob][google.cloud.kms.v1.ImportJob] in the format `projects/*/locations/*/keyRings/*/importJobs/*`.
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
getName
in interface ImportJobOrBuilder
public ByteString getNameBytes()
Output only. The resource name for this [ImportJob][google.cloud.kms.v1.ImportJob] in the format `projects/*/locations/*/keyRings/*/importJobs/*`.
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
getNameBytes
in interface ImportJobOrBuilder
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];
getImportMethodValue
in interface ImportJobOrBuilder
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];
getImportMethod
in interface ImportJobOrBuilder
public int getProtectionLevelValue()
Required. Immutable. The protection level of the [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] of the [version_template][google.cloud.kms.v1.CryptoKey.version_template] on the [CryptoKey][google.cloud.kms.v1.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
in interface ImportJobOrBuilder
public ProtectionLevel getProtectionLevel()
Required. Immutable. The protection level of the [ImportJob][google.cloud.kms.v1.ImportJob]. This must match the [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level] of the [version_template][google.cloud.kms.v1.CryptoKey.version_template] on the [CryptoKey][google.cloud.kms.v1.CryptoKey] you attempt to import into.
.google.cloud.kms.v1.ProtectionLevel protection_level = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
getProtectionLevel
in interface ImportJobOrBuilder
public boolean hasCreateTime()
Output only. The time at which this [ImportJob][google.cloud.kms.v1.ImportJob] was created.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
hasCreateTime
in interface ImportJobOrBuilder
public Timestamp getCreateTime()
Output only. The time at which this [ImportJob][google.cloud.kms.v1.ImportJob] was created.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
getCreateTime
in interface ImportJobOrBuilder
public TimestampOrBuilder getCreateTimeOrBuilder()
Output only. The time at which this [ImportJob][google.cloud.kms.v1.ImportJob] was created.
.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
getCreateTimeOrBuilder
in interface ImportJobOrBuilder
public boolean hasGenerateTime()
Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key material was generated.
.google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
hasGenerateTime
in interface ImportJobOrBuilder
public Timestamp getGenerateTime()
Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key material was generated.
.google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
getGenerateTime
in interface ImportJobOrBuilder
public TimestampOrBuilder getGenerateTimeOrBuilder()
Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key material was generated.
.google.protobuf.Timestamp generate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
getGenerateTimeOrBuilder
in interface ImportJobOrBuilder
public boolean hasExpireTime()
Output only. The time at which this [ImportJob][google.cloud.kms.v1.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];
hasExpireTime
in interface ImportJobOrBuilder
public Timestamp getExpireTime()
Output only. The time at which this [ImportJob][google.cloud.kms.v1.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];
getExpireTime
in interface ImportJobOrBuilder
public TimestampOrBuilder getExpireTimeOrBuilder()
Output only. The time at which this [ImportJob][google.cloud.kms.v1.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];
getExpireTimeOrBuilder
in interface ImportJobOrBuilder
public boolean hasExpireEventTime()
Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob] expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED].
.google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
hasExpireEventTime
in interface ImportJobOrBuilder
public Timestamp getExpireEventTime()
Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob] expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED].
.google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
getExpireEventTime
in interface ImportJobOrBuilder
public TimestampOrBuilder getExpireEventTimeOrBuilder()
Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob] expired. Only present if [state][google.cloud.kms.v1.ImportJob.state] is [EXPIRED][google.cloud.kms.v1.ImportJob.ImportJobState.EXPIRED].
.google.protobuf.Timestamp expire_event_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
getExpireEventTimeOrBuilder
in interface ImportJobOrBuilder
public int getStateValue()
Output only. The current state of the [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used.
.google.cloud.kms.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
getStateValue
in interface ImportJobOrBuilder
public ImportJob.ImportJobState getState()
Output only. The current state of the [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used.
.google.cloud.kms.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
getState
in interface ImportJobOrBuilder
public boolean hasPublicKey()
Output only. The public key with which to wrap key material prior to import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE].
.google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
hasPublicKey
in interface ImportJobOrBuilder
public ImportJob.WrappingPublicKey getPublicKey()
Output only. The public key with which to wrap key material prior to import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE].
.google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
getPublicKey
in interface ImportJobOrBuilder
public ImportJob.WrappingPublicKeyOrBuilder getPublicKeyOrBuilder()
Output only. The public key with which to wrap key material prior to import. Only returned if [state][google.cloud.kms.v1.ImportJob.state] is [ACTIVE][google.cloud.kms.v1.ImportJob.ImportJobState.ACTIVE].
.google.cloud.kms.v1.ImportJob.WrappingPublicKey public_key = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
getPublicKeyOrBuilder
in interface ImportJobOrBuilder
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][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
.google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
hasAttestation
in interface ImportJobOrBuilder
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][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
.google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
getAttestation
in interface ImportJobOrBuilder
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][google.cloud.kms.v1.ImportJob.ImportMethod] is one with a protection level of [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
.google.cloud.kms.v1.KeyOperationAttestation attestation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
getAttestationOrBuilder
in interface ImportJobOrBuilder
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3
public void writeTo(CodedOutputStream output) throws IOException
writeTo
in interface MessageLite
writeTo
in class GeneratedMessageV3
IOException
public int getSerializedSize()
getSerializedSize
in interface MessageLite
getSerializedSize
in class GeneratedMessageV3
public boolean equals(Object obj)
equals
in interface Message
equals
in class AbstractMessage
public int hashCode()
hashCode
in interface Message
hashCode
in class AbstractMessage
public static ImportJob parseFrom(ByteBuffer data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static ImportJob parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static ImportJob parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static ImportJob parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static ImportJob parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static ImportJob parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static ImportJob parseFrom(InputStream input) throws IOException
IOException
public static ImportJob parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static ImportJob parseDelimitedFrom(InputStream input) throws IOException
IOException
public static ImportJob parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static ImportJob parseFrom(CodedInputStream input) throws IOException
IOException
public static ImportJob parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public ImportJob.Builder newBuilderForType()
newBuilderForType
in interface Message
newBuilderForType
in interface MessageLite
public static ImportJob.Builder newBuilder()
public static ImportJob.Builder newBuilder(ImportJob prototype)
public ImportJob.Builder toBuilder()
toBuilder
in interface Message
toBuilder
in interface MessageLite
protected ImportJob.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
newBuilderForType
in class GeneratedMessageV3
public static ImportJob getDefaultInstance()
public Parser<ImportJob> getParserForType()
getParserForType
in interface Message
getParserForType
in interface MessageLite
getParserForType
in class GeneratedMessageV3
public ImportJob getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
Copyright © 2022 Google LLC. All rights reserved.