[][src]Struct gcp_client::google::cloud::kms::v1::key_management_service_client::KeyManagementServiceClient

pub struct KeyManagementServiceClient<T> { /* fields omitted */ }

Google Cloud Key Management Service

Manages cryptographic keys and operations using those keys. Implements a REST model with the following objects:

  • [KeyRing][google.cloud.kms.v1.KeyRing]
  • [CryptoKey][google.cloud.kms.v1.CryptoKey]
  • [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
  • [ImportJob][google.cloud.kms.v1.ImportJob]

If you are using manual gRPC libraries, see Using gRPC with Cloud KMS.

Implementations

impl<T> KeyManagementServiceClient<T> where
    T: GrpcService<BoxBody>,
    T::ResponseBody: Body + HttpBody + Send + 'static,
    T::Error: Into<StdError>,
    <T::ResponseBody as HttpBody>::Error: Into<StdError> + Send
[src]

pub fn new(inner: T) -> Self[src]

pub fn with_interceptor(inner: T, interceptor: impl Into<Interceptor>) -> Self[src]

pub async fn list_key_rings<'_>(
    &'_ mut self,
    request: impl IntoRequest<ListKeyRingsRequest>
) -> Result<Response<ListKeyRingsResponse>, Status>
[src]

Lists [KeyRings][google.cloud.kms.v1.KeyRing].

pub async fn list_crypto_keys<'_>(
    &'_ mut self,
    request: impl IntoRequest<ListCryptoKeysRequest>
) -> Result<Response<ListCryptoKeysResponse>, Status>
[src]

Lists [CryptoKeys][google.cloud.kms.v1.CryptoKey].

pub async fn list_crypto_key_versions<'_>(
    &'_ mut self,
    request: impl IntoRequest<ListCryptoKeyVersionsRequest>
) -> Result<Response<ListCryptoKeyVersionsResponse>, Status>
[src]

Lists [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion].

pub async fn list_import_jobs<'_>(
    &'_ mut self,
    request: impl IntoRequest<ListImportJobsRequest>
) -> Result<Response<ListImportJobsResponse>, Status>
[src]

Lists [ImportJobs][google.cloud.kms.v1.ImportJob].

pub async fn get_key_ring<'_>(
    &'_ mut self,
    request: impl IntoRequest<GetKeyRingRequest>
) -> Result<Response<KeyRing>, Status>
[src]

Returns metadata for a given [KeyRing][google.cloud.kms.v1.KeyRing].

pub async fn get_crypto_key<'_>(
    &'_ mut self,
    request: impl IntoRequest<GetCryptoKeyRequest>
) -> Result<Response<CryptoKey>, Status>
[src]

Returns metadata for a given [CryptoKey][google.cloud.kms.v1.CryptoKey], as well as its [primary][google.cloud.kms.v1.CryptoKey.primary] [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].

pub async fn get_crypto_key_version<'_>(
    &'_ mut self,
    request: impl IntoRequest<GetCryptoKeyVersionRequest>
) -> Result<Response<CryptoKeyVersion>, Status>
[src]

Returns metadata for a given [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].

pub async fn get_public_key<'_>(
    &'_ mut self,
    request: impl IntoRequest<GetPublicKeyRequest>
) -> Result<Response<PublicKey>, Status>
[src]

Returns the public key for the given [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. The [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN] or [ASYMMETRIC_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_DECRYPT].

pub async fn get_import_job<'_>(
    &'_ mut self,
    request: impl IntoRequest<GetImportJobRequest>
) -> Result<Response<ImportJob>, Status>
[src]

Returns metadata for a given [ImportJob][google.cloud.kms.v1.ImportJob].

pub async fn create_key_ring<'_>(
    &'_ mut self,
    request: impl IntoRequest<CreateKeyRingRequest>
) -> Result<Response<KeyRing>, Status>
[src]

Create a new [KeyRing][google.cloud.kms.v1.KeyRing] in a given Project and Location.

pub async fn create_crypto_key<'_>(
    &'_ mut self,
    request: impl IntoRequest<CreateCryptoKeyRequest>
) -> Result<Response<CryptoKey>, Status>
[src]

Create a new [CryptoKey][google.cloud.kms.v1.CryptoKey] within a [KeyRing][google.cloud.kms.v1.KeyRing].

[CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] and [CryptoKey.version_template.algorithm][google.cloud.kms.v1.CryptoKeyVersionTemplate.algorithm] are required.

pub async fn create_crypto_key_version<'_>(
    &'_ mut self,
    request: impl IntoRequest<CreateCryptoKeyVersionRequest>
) -> Result<Response<CryptoKeyVersion>, Status>
[src]

Create a new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in a [CryptoKey][google.cloud.kms.v1.CryptoKey].

The server will assign the next sequential id. If unset, [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED].

pub async fn import_crypto_key_version<'_>(
    &'_ mut self,
    request: impl IntoRequest<ImportCryptoKeyVersionRequest>
) -> Result<Response<CryptoKeyVersion>, Status>
[src]

Imports a new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] into an existing [CryptoKey][google.cloud.kms.v1.CryptoKey] using the wrapped key material provided in the request.

The version ID will be assigned the next sequential id within the [CryptoKey][google.cloud.kms.v1.CryptoKey].

pub async fn create_import_job<'_>(
    &'_ mut self,
    request: impl IntoRequest<CreateImportJobRequest>
) -> Result<Response<ImportJob>, Status>
[src]

Create a new [ImportJob][google.cloud.kms.v1.ImportJob] within a [KeyRing][google.cloud.kms.v1.KeyRing].

[ImportJob.import_method][google.cloud.kms.v1.ImportJob.import_method] is required.

pub async fn update_crypto_key<'_>(
    &'_ mut self,
    request: impl IntoRequest<UpdateCryptoKeyRequest>
) -> Result<Response<CryptoKey>, Status>
[src]

Update a [CryptoKey][google.cloud.kms.v1.CryptoKey].

pub async fn update_crypto_key_version<'_>(
    &'_ mut self,
    request: impl IntoRequest<UpdateCryptoKeyVersionRequest>
) -> Result<Response<CryptoKeyVersion>, Status>
[src]

Update a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s metadata.

[state][google.cloud.kms.v1.CryptoKeyVersion.state] may be changed between [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] and [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED] using this method. See [DestroyCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.DestroyCryptoKeyVersion] and [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] to move between other states.

pub async fn encrypt<'_>(
    &'_ mut self,
    request: impl IntoRequest<EncryptRequest>
) -> Result<Response<EncryptResponse>, Status>
[src]

Encrypts data, so that it can only be recovered by a call to [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt]. The [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].

pub async fn decrypt<'_>(
    &'_ mut self,
    request: impl IntoRequest<DecryptRequest>
) -> Result<Response<DecryptResponse>, Status>
[src]

Decrypts data that was protected by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt]. The [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] must be [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].

pub async fn asymmetric_sign<'_>(
    &'_ mut self,
    request: impl IntoRequest<AsymmetricSignRequest>
) -> Result<Response<AsymmetricSignResponse>, Status>
[src]

Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] ASYMMETRIC_SIGN, producing a signature that can be verified with the public key retrieved from [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].

pub async fn asymmetric_decrypt<'_>(
    &'_ mut self,
    request: impl IntoRequest<AsymmetricDecryptRequest>
) -> Result<Response<AsymmetricDecryptResponse>, Status>
[src]

Decrypts data that was encrypted with a public key retrieved from [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] corresponding to a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] ASYMMETRIC_DECRYPT.

pub async fn update_crypto_key_primary_version<'_>(
    &'_ mut self,
    request: impl IntoRequest<UpdateCryptoKeyPrimaryVersionRequest>
) -> Result<Response<CryptoKey>, Status>
[src]

Update the version of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that will be used in [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt].

Returns an error if called on an asymmetric key.

pub async fn destroy_crypto_key_version<'_>(
    &'_ mut self,
    request: impl IntoRequest<DestroyCryptoKeyVersionRequest>
) -> Result<Response<CryptoKeyVersion>, Status>
[src]

Schedule a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] for destruction.

Upon calling this method, [CryptoKeyVersion.state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED] and [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will be set to a time 24 hours in the future, at which point the [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be changed to [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED], and the key material will be irrevocably destroyed.

Before the [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] is reached, [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion] may be called to reverse the process.

pub async fn restore_crypto_key_version<'_>(
    &'_ mut self,
    request: impl IntoRequest<RestoreCryptoKeyVersionRequest>
) -> Result<Response<CryptoKeyVersion>, Status>
[src]

Restore a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED] state.

Upon restoration of the CryptoKeyVersion, [state][google.cloud.kms.v1.CryptoKeyVersion.state] will be set to [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED], and [destroy_time][google.cloud.kms.v1.CryptoKeyVersion.destroy_time] will be cleared.

Trait Implementations

impl<T: Clone> Clone for KeyManagementServiceClient<T>[src]

impl<T> Debug for KeyManagementServiceClient<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for KeyManagementServiceClient<T>

impl<T> Send for KeyManagementServiceClient<T> where
    T: Send

impl<T> Sync for KeyManagementServiceClient<T> where
    T: Sync

impl<T> Unpin for KeyManagementServiceClient<T> where
    T: Unpin

impl<T> !UnwindSafe for KeyManagementServiceClient<T>

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]