[][src]Struct gcp_client::google::cloud::kms::v1::ImportJob

pub struct ImportJob {
    pub name: String,
    pub import_method: i32,
    pub protection_level: i32,
    pub create_time: Option<Timestamp>,
    pub generate_time: Option<Timestamp>,
    pub expire_time: Option<Timestamp>,
    pub expire_event_time: Option<Timestamp>,
    pub state: i32,
    pub public_key: Option<WrappingPublicKey>,
    pub attestation: Option<KeyOperationAttestation>,
}

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.

Fields

name: String

Output only. The resource name for this [ImportJob][google.cloud.kms.v1.ImportJob] in the format projects/*/locations/*/keyRings/*/importJobs/*.

import_method: i32

Required. Immutable. The wrapping method to be used for incoming key material.

protection_level: i32

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.

create_time: Option<Timestamp>

Output only. The time at which this [ImportJob][google.cloud.kms.v1.ImportJob] was created.

generate_time: Option<Timestamp>

Output only. The time this [ImportJob][google.cloud.kms.v1.ImportJob]'s key material was generated.

expire_time: Option<Timestamp>

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.

expire_event_time: Option<Timestamp>

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].

state: i32

Output only. The current state of the [ImportJob][google.cloud.kms.v1.ImportJob], indicating if it can be used.

public_key: Option<WrappingPublicKey>

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].

attestation: Option<KeyOperationAttestation>

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].

Implementations

impl ImportJob[src]

pub fn import_method(&self) -> ImportMethod[src]

Returns the enum value of import_method, or the default if the field is set to an invalid enum value.

pub fn set_import_method(&mut self, value: ImportMethod)[src]

Sets import_method to the provided enum value.

pub fn state(&self) -> ImportJobState[src]

Returns the enum value of state, or the default if the field is set to an invalid enum value.

pub fn set_state(&mut self, value: ImportJobState)[src]

Sets state to the provided enum value.

pub fn protection_level(&self) -> ProtectionLevel[src]

Returns the enum value of protection_level, or the default if the field is set to an invalid enum value.

pub fn set_protection_level(&mut self, value: ProtectionLevel)[src]

Sets protection_level to the provided enum value.

Trait Implementations

impl Clone for ImportJob[src]

impl Debug for ImportJob[src]

impl Default for ImportJob[src]

impl Message for ImportJob[src]

impl PartialEq<ImportJob> for ImportJob[src]

impl StructuralPartialEq for ImportJob[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]