Class KeyManagementServiceConnection (2.31.0)

This interface defines virtual methods for each of the user-facing overload sets in KeyManagementServiceClient. This allows users to inject custom behavior (e.g., with a Google Mock object) when writing tests that use objects of type KeyManagementServiceClient.

To create a concrete instance, see MakeKeyManagementServiceConnection().

For mocking, see kms_v1_mocks::MockKeyManagementServiceConnection.

Functions

virtual options()

Returns
Type Description
Options

virtual ListKeyRings(google::cloud::kms::v1::ListKeyRingsRequest)

Parameter
Name Description
request google::cloud::kms::v1::ListKeyRingsRequest
Returns
Type Description
StreamRange< google::cloud::kms::v1::KeyRing >

virtual ListCryptoKeys(google::cloud::kms::v1::ListCryptoKeysRequest)

Parameter
Name Description
request google::cloud::kms::v1::ListCryptoKeysRequest
Returns
Type Description
StreamRange< google::cloud::kms::v1::CryptoKey >

virtual ListCryptoKeyVersions(google::cloud::kms::v1::ListCryptoKeyVersionsRequest)

Parameter
Name Description
request google::cloud::kms::v1::ListCryptoKeyVersionsRequest
Returns
Type Description
StreamRange< google::cloud::kms::v1::CryptoKeyVersion >

virtual ListImportJobs(google::cloud::kms::v1::ListImportJobsRequest)

Parameter
Name Description
request google::cloud::kms::v1::ListImportJobsRequest
Returns
Type Description
StreamRange< google::cloud::kms::v1::ImportJob >

virtual GetKeyRing(google::cloud::kms::v1::GetKeyRingRequest const &)

Parameter
Name Description
request google::cloud::kms::v1::GetKeyRingRequest const &
Returns
Type Description
StatusOr< google::cloud::kms::v1::KeyRing >

virtual GetCryptoKey(google::cloud::kms::v1::GetCryptoKeyRequest const &)

Parameter
Name Description
request google::cloud::kms::v1::GetCryptoKeyRequest const &
Returns
Type Description
StatusOr< google::cloud::kms::v1::CryptoKey >

virtual GetCryptoKeyVersion(google::cloud::kms::v1::GetCryptoKeyVersionRequest const &)

Parameter
Name Description
request google::cloud::kms::v1::GetCryptoKeyVersionRequest const &
Returns
Type Description
StatusOr< google::cloud::kms::v1::CryptoKeyVersion >

virtual GetPublicKey(google::cloud::kms::v1::GetPublicKeyRequest const &)

Parameter
Name Description
request google::cloud::kms::v1::GetPublicKeyRequest const &
Returns
Type Description
StatusOr< google::cloud::kms::v1::PublicKey >

virtual GetImportJob(google::cloud::kms::v1::GetImportJobRequest const &)

Parameter
Name Description
request google::cloud::kms::v1::GetImportJobRequest const &
Returns
Type Description
StatusOr< google::cloud::kms::v1::ImportJob >

virtual CreateKeyRing(google::cloud::kms::v1::CreateKeyRingRequest const &)

Parameter
Name Description
request google::cloud::kms::v1::CreateKeyRingRequest const &
Returns
Type Description
StatusOr< google::cloud::kms::v1::KeyRing >

virtual CreateCryptoKey(google::cloud::kms::v1::CreateCryptoKeyRequest const &)

Parameter
Name Description
request google::cloud::kms::v1::CreateCryptoKeyRequest const &
Returns
Type Description
StatusOr< google::cloud::kms::v1::CryptoKey >

virtual CreateCryptoKeyVersion(google::cloud::kms::v1::CreateCryptoKeyVersionRequest const &)

Parameter
Name Description
request google::cloud::kms::v1::CreateCryptoKeyVersionRequest const &
Returns
Type Description
StatusOr< google::cloud::kms::v1::CryptoKeyVersion >

virtual ImportCryptoKeyVersion(google::cloud::kms::v1::ImportCryptoKeyVersionRequest const &)

Parameter
Name Description
request google::cloud::kms::v1::ImportCryptoKeyVersionRequest const &
Returns
Type Description
StatusOr< google::cloud::kms::v1::CryptoKeyVersion >

virtual CreateImportJob(google::cloud::kms::v1::CreateImportJobRequest const &)

Parameter
Name Description
request google::cloud::kms::v1::CreateImportJobRequest const &
Returns
Type Description
StatusOr< google::cloud::kms::v1::ImportJob >

virtual UpdateCryptoKey(google::cloud::kms::v1::UpdateCryptoKeyRequest const &)

Parameter
Name Description
request google::cloud::kms::v1::UpdateCryptoKeyRequest const &
Returns
Type Description
StatusOr< google::cloud::kms::v1::CryptoKey >

virtual UpdateCryptoKeyVersion(google::cloud::kms::v1::UpdateCryptoKeyVersionRequest const &)

Parameter
Name Description
request google::cloud::kms::v1::UpdateCryptoKeyVersionRequest const &
Returns
Type Description
StatusOr< google::cloud::kms::v1::CryptoKeyVersion >

virtual UpdateCryptoKeyPrimaryVersion(google::cloud::kms::v1::UpdateCryptoKeyPrimaryVersionRequest const &)

Parameter
Name Description
request google::cloud::kms::v1::UpdateCryptoKeyPrimaryVersionRequest const &
Returns
Type Description
StatusOr< google::cloud::kms::v1::CryptoKey >

virtual DestroyCryptoKeyVersion(google::cloud::kms::v1::DestroyCryptoKeyVersionRequest const &)

Parameter
Name Description
request google::cloud::kms::v1::DestroyCryptoKeyVersionRequest const &
Returns
Type Description
StatusOr< google::cloud::kms::v1::CryptoKeyVersion >

virtual RestoreCryptoKeyVersion(google::cloud::kms::v1::RestoreCryptoKeyVersionRequest const &)

Parameter
Name Description
request google::cloud::kms::v1::RestoreCryptoKeyVersionRequest const &
Returns
Type Description
StatusOr< google::cloud::kms::v1::CryptoKeyVersion >

virtual Encrypt(google::cloud::kms::v1::EncryptRequest const &)

Parameter
Name Description
request google::cloud::kms::v1::EncryptRequest const &
Returns
Type Description
StatusOr< google::cloud::kms::v1::EncryptResponse >

virtual Decrypt(google::cloud::kms::v1::DecryptRequest const &)

Parameter
Name Description
request google::cloud::kms::v1::DecryptRequest const &
Returns
Type Description
StatusOr< google::cloud::kms::v1::DecryptResponse >

virtual RawEncrypt(google::cloud::kms::v1::RawEncryptRequest const &)

Parameter
Name Description
request google::cloud::kms::v1::RawEncryptRequest const &
Returns
Type Description
StatusOr< google::cloud::kms::v1::RawEncryptResponse >

virtual RawDecrypt(google::cloud::kms::v1::RawDecryptRequest const &)

Parameter
Name Description
request google::cloud::kms::v1::RawDecryptRequest const &
Returns
Type Description
StatusOr< google::cloud::kms::v1::RawDecryptResponse >

virtual AsymmetricSign(google::cloud::kms::v1::AsymmetricSignRequest const &)

Parameter
Name Description
request google::cloud::kms::v1::AsymmetricSignRequest const &
Returns
Type Description
StatusOr< google::cloud::kms::v1::AsymmetricSignResponse >

virtual AsymmetricDecrypt(google::cloud::kms::v1::AsymmetricDecryptRequest const &)

Parameter
Name Description
request google::cloud::kms::v1::AsymmetricDecryptRequest const &
Returns
Type Description
StatusOr< google::cloud::kms::v1::AsymmetricDecryptResponse >

virtual MacSign(google::cloud::kms::v1::MacSignRequest const &)

Parameter
Name Description
request google::cloud::kms::v1::MacSignRequest const &
Returns
Type Description
StatusOr< google::cloud::kms::v1::MacSignResponse >

virtual MacVerify(google::cloud::kms::v1::MacVerifyRequest const &)

Parameter
Name Description
request google::cloud::kms::v1::MacVerifyRequest const &
Returns
Type Description
StatusOr< google::cloud::kms::v1::MacVerifyResponse >

virtual GenerateRandomBytes(google::cloud::kms::v1::GenerateRandomBytesRequest const &)

Parameter
Name Description
request google::cloud::kms::v1::GenerateRandomBytesRequest const &
Returns
Type Description
StatusOr< google::cloud::kms::v1::GenerateRandomBytesResponse >

virtual ListLocations(google::cloud::location::ListLocationsRequest)

Parameter
Name Description
request google::cloud::location::ListLocationsRequest
Returns
Type Description
StreamRange< google::cloud::location::Location >

virtual GetLocation(google::cloud::location::GetLocationRequest const &)

Parameter
Name Description
request google::cloud::location::GetLocationRequest const &
Returns
Type Description
StatusOr< google::cloud::location::Location >

virtual SetIamPolicy(google::iam::v1::SetIamPolicyRequest const &)

Parameter
Name Description
request google::iam::v1::SetIamPolicyRequest const &
Returns
Type Description
StatusOr< google::iam::v1::Policy >

virtual GetIamPolicy(google::iam::v1::GetIamPolicyRequest const &)

Parameter
Name Description
request google::iam::v1::GetIamPolicyRequest const &
Returns
Type Description
StatusOr< google::iam::v1::Policy >

virtual TestIamPermissions(google::iam::v1::TestIamPermissionsRequest const &)

Parameter
Name Description
request google::iam::v1::TestIamPermissionsRequest const &
Returns
Type Description
StatusOr< google::iam::v1::TestIamPermissionsResponse >

virtual GetOperation(google::longrunning::GetOperationRequest const &)

Parameter
Name Description
request google::longrunning::GetOperationRequest const &
Returns
Type Description
StatusOr< google::longrunning::Operation >