Struct gapi_grpc::google::cloud::kms::v1::key_management_service_client::KeyManagementServiceClient [−][src]
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 KeyManagementServiceClient<Channel>
[src]
pub async fn connect<D>(dst: D) -> Result<Self, Error> where
D: TryInto<Endpoint>,
D::Error: Into<StdError>,
[src]
D: TryInto<Endpoint>,
D::Error: Into<StdError>,
Attempt to create a new client by connecting to a given endpoint.
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]
T: GrpcService<BoxBody>,
T::ResponseBody: Body + HttpBody + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as HttpBody>::Error: Into<StdError> + Send,
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]
&mut self,
request: impl IntoRequest<ListKeyRingsRequest>
) -> Result<Response<ListKeyRingsResponse>, Status>
Lists [KeyRings][google.cloud.kms.v1.KeyRing].
pub async fn list_crypto_keys(
&mut self,
request: impl IntoRequest<ListCryptoKeysRequest>
) -> Result<Response<ListCryptoKeysResponse>, Status>
[src]
&mut self,
request: impl IntoRequest<ListCryptoKeysRequest>
) -> Result<Response<ListCryptoKeysResponse>, Status>
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]
&mut self,
request: impl IntoRequest<ListCryptoKeyVersionsRequest>
) -> Result<Response<ListCryptoKeyVersionsResponse>, Status>
Lists [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion].
pub async fn list_import_jobs(
&mut self,
request: impl IntoRequest<ListImportJobsRequest>
) -> Result<Response<ListImportJobsResponse>, Status>
[src]
&mut self,
request: impl IntoRequest<ListImportJobsRequest>
) -> Result<Response<ListImportJobsResponse>, Status>
Lists [ImportJobs][google.cloud.kms.v1.ImportJob].
pub async fn get_key_ring(
&mut self,
request: impl IntoRequest<GetKeyRingRequest>
) -> Result<Response<KeyRing>, Status>
[src]
&mut self,
request: impl IntoRequest<GetKeyRingRequest>
) -> Result<Response<KeyRing>, Status>
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]
&mut self,
request: impl IntoRequest<GetCryptoKeyRequest>
) -> Result<Response<CryptoKey>, Status>
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]
&mut self,
request: impl IntoRequest<GetCryptoKeyVersionRequest>
) -> Result<Response<CryptoKeyVersion>, Status>
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]
&mut self,
request: impl IntoRequest<GetPublicKeyRequest>
) -> Result<Response<PublicKey>, Status>
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]
&mut self,
request: impl IntoRequest<GetImportJobRequest>
) -> Result<Response<ImportJob>, Status>
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]
&mut self,
request: impl IntoRequest<CreateKeyRingRequest>
) -> Result<Response<KeyRing>, Status>
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]
&mut self,
request: impl IntoRequest<CreateCryptoKeyRequest>
) -> Result<Response<CryptoKey>, Status>
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]
&mut self,
request: impl IntoRequest<CreateCryptoKeyVersionRequest>
) -> Result<Response<CryptoKeyVersion>, Status>
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]
&mut self,
request: impl IntoRequest<ImportCryptoKeyVersionRequest>
) -> Result<Response<CryptoKeyVersion>, Status>
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]
&mut self,
request: impl IntoRequest<CreateImportJobRequest>
) -> Result<Response<ImportJob>, Status>
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]
&mut self,
request: impl IntoRequest<UpdateCryptoKeyRequest>
) -> Result<Response<CryptoKey>, Status>
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]
&mut self,
request: impl IntoRequest<UpdateCryptoKeyVersionRequest>
) -> Result<Response<CryptoKeyVersion>, Status>
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]
&mut self,
request: impl IntoRequest<EncryptRequest>
) -> Result<Response<EncryptResponse>, Status>
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]
&mut self,
request: impl IntoRequest<DecryptRequest>
) -> Result<Response<DecryptResponse>, Status>
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]
&mut self,
request: impl IntoRequest<AsymmetricSignRequest>
) -> Result<Response<AsymmetricSignResponse>, Status>
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]
&mut self,
request: impl IntoRequest<AsymmetricDecryptRequest>
) -> Result<Response<AsymmetricDecryptResponse>, Status>
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]
&mut self,
request: impl IntoRequest<UpdateCryptoKeyPrimaryVersionRequest>
) -> Result<Response<CryptoKey>, Status>
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]
&mut self,
request: impl IntoRequest<DestroyCryptoKeyVersionRequest>
) -> Result<Response<CryptoKeyVersion>, Status>
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]
&mut self,
request: impl IntoRequest<RestoreCryptoKeyVersionRequest>
) -> Result<Response<CryptoKeyVersion>, Status>
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]
fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[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,
T: Send,
impl<T> Sync for KeyManagementServiceClient<T> where
T: Sync,
T: Sync,
impl<T> Unpin for KeyManagementServiceClient<T> where
T: Unpin,
T: Unpin,
impl<T> !UnwindSafe for KeyManagementServiceClient<T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoRequest<T> for T
[src]
pub fn into_request(self) -> Request<T>
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,