public sealed class DestroySecretVersionRequest : IMessage<DestroySecretVersionRequest>, IEquatable<DestroySecretVersionRequest>, IDeepCloneable<DestroySecretVersionRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Secret Manager v1 API class DestroySecretVersionRequest.
Request message for
[SecretManagerService.DestroySecretVersion][google.cloud.secretmanager.v1.SecretManagerService.DestroySecretVersion].
Optional. Etag of the
[SecretVersion][google.cloud.secretmanager.v1.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.v1.SecretVersion] to destroy 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-09-03 UTC."],[[["\u003cp\u003eThe latest version available for the \u003ccode\u003eDestroySecretVersionRequest\u003c/code\u003e in the Secret Manager v1 API is 2.5.0, and previous versions are listed from 2.4.0 down to 1.3.0.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eDestroySecretVersionRequest\u003c/code\u003e is a class used to request the destruction of a secret version within the Google Cloud Secret Manager.\u003c/p\u003e\n"],["\u003cp\u003eThis class inherits from \u003ccode\u003eobject\u003c/code\u003e and implements interfaces like \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, for its full featureset.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDestroySecretVersionRequest\u003c/code\u003e class has two constructors: a default constructor and one that accepts another \u003ccode\u003eDestroySecretVersionRequest\u003c/code\u003e object, allowing for creating copies.\u003c/p\u003e\n"],["\u003cp\u003eThe class contains properties such as \u003ccode\u003eEtag\u003c/code\u003e, \u003ccode\u003eName\u003c/code\u003e, and \u003ccode\u003eSecretVersionName\u003c/code\u003e, which are essential for specifying and validating the secret version to be destroyed, with \u003ccode\u003eSecretVersionName\u003c/code\u003e being a typed view over the \u003ccode\u003eName\u003c/code\u003e resource.\u003c/p\u003e\n"]]],[],null,["# Secret Manager v1 API - Class DestroySecretVersionRequest (2.6.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.6.0 (latest)](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.DestroySecretVersionRequest)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/2.5.0/Google.Cloud.SecretManager.V1.DestroySecretVersionRequest)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/2.4.0/Google.Cloud.SecretManager.V1.DestroySecretVersionRequest)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/2.3.0/Google.Cloud.SecretManager.V1.DestroySecretVersionRequest)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/2.2.0/Google.Cloud.SecretManager.V1.DestroySecretVersionRequest)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/2.1.0/Google.Cloud.SecretManager.V1.DestroySecretVersionRequest)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/2.0.0/Google.Cloud.SecretManager.V1.DestroySecretVersionRequest)\n- [1.9.0](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.9.0/Google.Cloud.SecretManager.V1.DestroySecretVersionRequest)\n- [1.8.0](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.8.0/Google.Cloud.SecretManager.V1.DestroySecretVersionRequest)\n- [1.7.0](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.7.0/Google.Cloud.SecretManager.V1.DestroySecretVersionRequest)\n- [1.6.0](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.6.0/Google.Cloud.SecretManager.V1.DestroySecretVersionRequest)\n- [1.5.0](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.5.0/Google.Cloud.SecretManager.V1.DestroySecretVersionRequest)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.4.0/Google.Cloud.SecretManager.V1.DestroySecretVersionRequest)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.3.0/Google.Cloud.SecretManager.V1.DestroySecretVersionRequest) \n\n public sealed class DestroySecretVersionRequest : IMessage\u003cDestroySecretVersionRequest\u003e, IEquatable\u003cDestroySecretVersionRequest\u003e, IDeepCloneable\u003cDestroySecretVersionRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Secret Manager v1 API class DestroySecretVersionRequest.\n\nRequest message for\n\\[SecretManagerService.DestroySecretVersion\\]\\[google.cloud.secretmanager.v1.SecretManagerService.DestroySecretVersion\\]. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e DestroySecretVersionRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[DestroySecretVersionRequest](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.DestroySecretVersionRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[DestroySecretVersionRequest](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.DestroySecretVersionRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[DestroySecretVersionRequest](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.DestroySecretVersionRequest), [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.V1](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.SecretManager.V1.dll\n\nConstructors\n------------\n\n### DestroySecretVersionRequest()\n\n public DestroySecretVersionRequest()\n\n### DestroySecretVersionRequest(DestroySecretVersionRequest)\n\n public DestroySecretVersionRequest(DestroySecretVersionRequest other)\n\nProperties\n----------\n\n### Etag\n\n public string Etag { get; set; }\n\nOptional. Etag of the\n\\[SecretVersion\\]\\[google.cloud.secretmanager.v1.SecretVersion\\]. The request\nsucceeds if it matches the etag of the currently stored secret version\nobject. 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.v1.SecretVersion\\] to destroy in\nthe 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.V1/latest/Google.Cloud.SecretManager.V1.SecretVersionName)-typed view over the [Name](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.DestroySecretVersionRequest#Google_Cloud_SecretManager_V1_DestroySecretVersionRequest_Name) resource name property."]]