public sealed class EnableSecretVersionRequest : IMessage<EnableSecretVersionRequest>, IEquatable<EnableSecretVersionRequest>, IDeepCloneable<EnableSecretVersionRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Secret Manager v1beta2 API class EnableSecretVersionRequest.
Request message for
[SecretManagerService.EnableSecretVersion][google.cloud.secretmanager.v1beta2.SecretManagerService.EnableSecretVersion].
Optional. Etag of the
[SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion]. The
request succeeds if it matches the etag of the currently stored secret
version object. If the etag is omitted, the request succeeds.
Required. The resource name of the
[SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion] to enable
in the format projects/*/secrets/*/versions/* or
projects/*/locations/*/secrets/*/versions/*.
[[["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\u003eEnableSecretVersionRequest\u003c/code\u003e class is part of the Secret Manager v1beta2 API and is used to enable a specific version of a secret.\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 for message handling and cloning.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eEnableSecretVersionRequest\u003c/code\u003e class includes properties such as \u003ccode\u003eEtag\u003c/code\u003e, \u003ccode\u003eName\u003c/code\u003e, and \u003ccode\u003eSecretVersionName\u003c/code\u003e to specify the target secret version and ensure data integrity.\u003c/p\u003e\n"],["\u003cp\u003eThere are two constructor overloads for the \u003ccode\u003eEnableSecretVersionRequest\u003c/code\u003e class, one being a parameterless constructor and the other taking an \u003ccode\u003eEnableSecretVersionRequest\u003c/code\u003e as a parameter for cloning.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of this class is \u003cstrong\u003e1.0.0-beta03\u003c/strong\u003e and it is located in the namespace \u003ccode\u003eGoogle.Cloud.SecretManager.V1Beta2\u003c/code\u003e, found within the \u003ccode\u003eGoogle.Cloud.SecretManager.V1Beta2.dll\u003c/code\u003e assembly.\u003c/p\u003e\n"]]],[],null,["# Secret Manager v1beta2 API - Class EnableSecretVersionRequest (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.EnableSecretVersionRequest)\n- [1.0.0-beta02](/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/1.0.0-beta02/Google.Cloud.SecretManager.V1Beta2.EnableSecretVersionRequest) \n\n public sealed class EnableSecretVersionRequest : IMessage\u003cEnableSecretVersionRequest\u003e, IEquatable\u003cEnableSecretVersionRequest\u003e, IDeepCloneable\u003cEnableSecretVersionRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Secret Manager v1beta2 API class EnableSecretVersionRequest.\n\nRequest message for\n\\[SecretManagerService.EnableSecretVersion\\]\\[google.cloud.secretmanager.v1beta2.SecretManagerService.EnableSecretVersion\\]. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e EnableSecretVersionRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[EnableSecretVersionRequest](/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2.EnableSecretVersionRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[EnableSecretVersionRequest](/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2.EnableSecretVersionRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[EnableSecretVersionRequest](/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2.EnableSecretVersionRequest), [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### EnableSecretVersionRequest()\n\n public EnableSecretVersionRequest()\n\n### EnableSecretVersionRequest(EnableSecretVersionRequest)\n\n public EnableSecretVersionRequest(EnableSecretVersionRequest other)\n\nProperties\n----------\n\n### Etag\n\n public string Etag { get; set; }\n\nOptional. Etag of the\n\\[SecretVersion\\]\\[google.cloud.secretmanager.v1beta2.SecretVersion\\]. The\nrequest succeeds if it matches the etag of the currently stored secret\nversion object. If the etag is omitted, the request succeeds.\n\n### Name\n\n public string Name { get; set; }\n\nRequired. The resource name of the\n\\[SecretVersion\\]\\[google.cloud.secretmanager.v1beta2.SecretVersion\\] to enable\nin the format `projects/*/secrets/*/versions/*` or\n`projects/*/locations/*/secrets/*/versions/*`.\n\n### SecretVersionName\n\n public SecretVersionName SecretVersionName { get; set; }\n\n[SecretVersionName](/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2.SecretVersionName)-typed view over the [Name](/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2.EnableSecretVersionRequest#Google_Cloud_SecretManager_V1Beta2_EnableSecretVersionRequest_Name) resource name property."]]