public sealed class CustomerManagedEncryption : IMessage<CustomerManagedEncryption>, IEquatable<CustomerManagedEncryption>, IDeepCloneable<CustomerManagedEncryption>, IBufferMessage, IMessage
Reference documentation and code samples for the Secret Manager v1beta2 API class CustomerManagedEncryption.
Configuration for encrypting secret payloads using customer-managed
encryption keys (CMEK).
Required. The resource name of the Cloud KMS CryptoKey used to encrypt
secret payloads.
For secrets using the
[UserManaged][google.cloud.secretmanager.v1beta2.Replication.UserManaged]
replication policy type, Cloud KMS CryptoKeys must reside in the same
location as the [replica location][Secret.UserManaged.Replica.location].
For secrets using the
[Automatic][google.cloud.secretmanager.v1beta2.Replication.Automatic]
replication policy type, Cloud KMS CryptoKeys must reside in global.
The expected format is projects/*/locations/*/keyRings/*/cryptoKeys/*.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eCustomerManagedEncryption\u003c/code\u003e class in the Secret Manager v1beta2 API provides configuration for encrypting secret payloads using customer-managed encryption keys (CMEK).\u003c/p\u003e\n"],["\u003cp\u003eThis class is part of the \u003ccode\u003eGoogle.Cloud.SecretManager.V1Beta2\u003c/code\u003e namespace and is implemented in the \u003ccode\u003eGoogle.Cloud.SecretManager.V1Beta2.dll\u003c/code\u003e assembly.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCustomerManagedEncryption\u003c/code\u003e class inherits from \u003ccode\u003eobject\u003c/code\u003e and implements \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt includes a \u003ccode\u003eKmsKeyName\u003c/code\u003e property, a string representing the resource name of the Cloud KMS CryptoKey, which is required for encryption.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eKmsKeyName\u003c/code\u003e Cloud KMS CryptoKeys location requirement depends on the replication policy type, either residing in the same location as the replica or globally.\u003c/p\u003e\n"]]],[],null,[]]