Reference documentation and code samples for the Secret Manager v1beta2 API class SecretPayload.
A secret payload resource in the Secret Manager API. This contains the
sensitive secret payload that is associated with a
[SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion].
Optional. If specified,
[SecretManagerService][google.cloud.secretmanager.v1beta2.SecretManagerService]
will verify the integrity of the received
[data][google.cloud.secretmanager.v1beta2.SecretPayload.data] on
[SecretManagerService.AddSecretVersion][google.cloud.secretmanager.v1beta2.SecretManagerService.AddSecretVersion]
calls using the crc32c checksum and store it to include in future
[SecretManagerService.AccessSecretVersion][google.cloud.secretmanager.v1beta2.SecretManagerService.AccessSecretVersion]
responses. If a checksum is not provided in the
[SecretManagerService.AddSecretVersion][google.cloud.secretmanager.v1beta2.SecretManagerService.AddSecretVersion]
request, the
[SecretManagerService][google.cloud.secretmanager.v1beta2.SecretManagerService]
will generate and store one for you.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eSecretPayload\u003c/code\u003e class represents a secret payload resource within the Secret Manager v1beta2 API, holding sensitive data associated with a \u003ccode\u003eSecretVersion\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe class implements interfaces such as \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, providing functionalities for message handling, equality comparison, deep cloning, and buffer management.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSecretPayload\u003c/code\u003e class has two constructors, a default constructor and one that accepts another \u003ccode\u003eSecretPayload\u003c/code\u003e object, enabling the creation of new instances or copies.\u003c/p\u003e\n"],["\u003cp\u003eIt includes a \u003ccode\u003eData\u003c/code\u003e property of type \u003ccode\u003eByteString\u003c/code\u003e for storing the secret data, which must not exceed 64KiB in size.\u003c/p\u003e\n"],["\u003cp\u003eAn optional \u003ccode\u003eDataCrc32C\u003c/code\u003e property of type \u003ccode\u003elong\u003c/code\u003e allows for the verification of data integrity using a crc32c checksum during \u003ccode\u003eAddSecretVersion\u003c/code\u003e calls and included in \u003ccode\u003eAccessSecretVersion\u003c/code\u003e responses.\u003c/p\u003e\n"]]],[],null,[]]