public sealed class GetSecretRequest : IMessage<GetSecretRequest>, IEquatable<GetSecretRequest>, IDeepCloneable<GetSecretRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Secret Manager v1beta2 API class GetSecretRequest.
Request message for
[SecretManagerService.GetSecret][google.cloud.secretmanager.v1beta2.SecretManagerService.GetSecret].
Required. The resource name of the
[Secret][google.cloud.secretmanager.v1beta2.Secret], in the format
projects/*/secrets/* or projects/*/locations/*/secrets/*.
[[["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\u003eGetSecretRequest\u003c/code\u003e class is part of the Secret Manager v1beta2 API, specifically used to request a secret via \u003ccode\u003eSecretManagerService.GetSecret\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThis class implements multiple interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, providing functionalities such as deep cloning and equality comparison.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGetSecretRequest\u003c/code\u003e class has two constructors: a default constructor and one that accepts another \u003ccode\u003eGetSecretRequest\u003c/code\u003e object for initialization.\u003c/p\u003e\n"],["\u003cp\u003eIt contains properties such as \u003ccode\u003eName\u003c/code\u003e, which is a required string representing the resource name of the secret, and \u003ccode\u003eSecretName\u003c/code\u003e, which provides a typed view over the \u003ccode\u003eName\u003c/code\u003e property.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGetSecretRequest\u003c/code\u003e class inherits from \u003ccode\u003eobject\u003c/code\u003e and includes methods like \u003ccode\u003eGetHashCode\u003c/code\u003e, \u003ccode\u003eGetType\u003c/code\u003e, and \u003ccode\u003eToString\u003c/code\u003e, and its namespace is \u003ccode\u003eGoogle.Cloud.SecretManager.V1Beta2\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Secret Manager v1beta2 API - Class GetSecretRequest (1.0.0-beta03)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0-beta03 (latest)](/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2.GetSecretRequest)\n- [1.0.0-beta02](/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/1.0.0-beta02/Google.Cloud.SecretManager.V1Beta2.GetSecretRequest) \n\n public sealed class GetSecretRequest : IMessage\u003cGetSecretRequest\u003e, IEquatable\u003cGetSecretRequest\u003e, IDeepCloneable\u003cGetSecretRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Secret Manager v1beta2 API class GetSecretRequest.\n\nRequest message for\n\\[SecretManagerService.GetSecret\\]\\[google.cloud.secretmanager.v1beta2.SecretManagerService.GetSecret\\]. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e GetSecretRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[GetSecretRequest](/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2.GetSecretRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[GetSecretRequest](/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2.GetSecretRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[GetSecretRequest](/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2.GetSecretRequest), [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.V1Beta2](/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2)\n\nAssembly\n--------\n\nGoogle.Cloud.SecretManager.V1Beta2.dll\n\nConstructors\n------------\n\n### GetSecretRequest()\n\n public GetSecretRequest()\n\n### GetSecretRequest(GetSecretRequest)\n\n public GetSecretRequest(GetSecretRequest other)\n\nProperties\n----------\n\n### Name\n\n public string Name { get; set; }\n\nRequired. The resource name of the\n\\[Secret\\]\\[google.cloud.secretmanager.v1beta2.Secret\\], in the format\n`projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.\n\n### SecretName\n\n public SecretName SecretName { get; set; }\n\n[SecretName](/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2.SecretName)-typed view over the [Name](/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2.GetSecretRequest#Google_Cloud_SecretManager_V1Beta2_GetSecretRequest_Name) resource name property."]]