Reference documentation and code samples for the Secret Manager v1beta1 API class SecretPayload.
A secret payload resource in the Secret Manager API. This contains the
sensitive secret data that is associated with a
[SecretVersion][google.cloud.secrets.v1beta1.SecretVersion].
[[["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 resource within the Secret Manager v1beta1 API, encapsulating the sensitive data associated with a specific secret version.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eSecretPayload\u003c/code\u003e is a sealed class that implements interfaces for message handling, equality comparison, deep cloning, and buffer messaging.\u003c/p\u003e\n"],["\u003cp\u003eThe class provides constructors for default instantiation and for creating a copy from an existing \u003ccode\u003eSecretPayload\u003c/code\u003e instance.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eData\u003c/code\u003e property of \u003ccode\u003eSecretPayload\u003c/code\u003e, which is of type \u003ccode\u003eByteString\u003c/code\u003e, stores the actual secret data and is limited to a maximum size of 64KiB.\u003c/p\u003e\n"]]],[],null,["# Secret Manager v1beta1 API - Class SecretPayload (3.0.0-beta06)\n\nVersion latestkeyboard_arrow_down\n\n- [3.0.0-beta06 (latest)](/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta1/latest/Google.Cloud.SecretManager.V1Beta1.SecretPayload)\n- [3.0.0-beta05](/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta1/3.0.0-beta05/Google.Cloud.SecretManager.V1Beta1.SecretPayload)\n- [2.0.0-beta05](/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta1/2.0.0-beta05/Google.Cloud.SecretManager.V1Beta1.SecretPayload) \n\n public sealed class SecretPayload : IMessage\u003cSecretPayload\u003e, IEquatable\u003cSecretPayload\u003e, IDeepCloneable\u003cSecretPayload\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Secret Manager v1beta1 API class SecretPayload.\n\nA secret payload resource in the Secret Manager API. This contains the\nsensitive secret data that is associated with a\n\\[SecretVersion\\]\\[google.cloud.secrets.v1beta1.SecretVersion\\]. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e SecretPayload \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[SecretPayload](/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta1/latest/Google.Cloud.SecretManager.V1Beta1.SecretPayload), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[SecretPayload](/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta1/latest/Google.Cloud.SecretManager.V1Beta1.SecretPayload), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[SecretPayload](/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta1/latest/Google.Cloud.SecretManager.V1Beta1.SecretPayload), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.SecretManager.V1Beta1](/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta1/latest/Google.Cloud.SecretManager.V1Beta1)\n\nAssembly\n--------\n\nGoogle.Cloud.SecretManager.V1Beta1.dll\n\nConstructors\n------------\n\n### SecretPayload()\n\n public SecretPayload()\n\n### SecretPayload(SecretPayload)\n\n public SecretPayload(SecretPayload other)\n\nProperties\n----------\n\n### Data\n\n public ByteString Data { get; set; }\n\nThe secret data. Must be no larger than 64KiB."]]