public sealed class CertificateAuthority.Types.KeyVersionSpec : IMessage<CertificateAuthority.Types.KeyVersionSpec>, IEquatable<CertificateAuthority.Types.KeyVersionSpec>, IDeepCloneable<CertificateAuthority.Types.KeyVersionSpec>, IBufferMessage, IMessage
Reference documentation and code samples for the Certificate Authority v1 API class CertificateAuthority.Types.KeyVersionSpec.
A Cloud KMS key configuration that a
[CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
will use.
public CertificateAuthority.Types.SignHashAlgorithm Algorithm { get; set; }
The algorithm to use for creating a managed Cloud KMS key for a for a
simplified experience. All managed keys will be have their
[ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as HSM.
The resource name for an existing Cloud KMS CryptoKeyVersion in the
format
projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*.
This option enables full flexibility in the key's capabilities and
properties.
[[["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-04 UTC."],[[["\u003cp\u003eThe latest version available for \u003ccode\u003eCertificateAuthority.Types.KeyVersionSpec\u003c/code\u003e is 3.9.0, with older versions ranging down to 1.0.0 also documented.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCertificateAuthority.Types.KeyVersionSpec\u003c/code\u003e is a class used in the Google Cloud Security Private CA v1 API to specify a Cloud KMS key configuration for a CertificateAuthority.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eKeyVersionSpec\u003c/code\u003e class implements several interfaces including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eKeyVersionSpec\u003c/code\u003e allows specification of either a signing algorithm or a direct Cloud KMS key version.\u003c/p\u003e\n"],["\u003cp\u003eThis class contains properties such as \u003ccode\u003eAlgorithm\u003c/code\u003e, \u003ccode\u003eCloudKmsKeyVersion\u003c/code\u003e, \u003ccode\u003eHasAlgorithm\u003c/code\u003e, \u003ccode\u003eHasCloudKmsKeyVersion\u003c/code\u003e, and \u003ccode\u003eKeyVersionCase\u003c/code\u003e to manage key configurations.\u003c/p\u003e\n"]]],[],null,["# Certificate Authority v1 API - Class CertificateAuthority.Types.KeyVersionSpec (3.10.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.10.0 (latest)](/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.CertificateAuthority.Types.KeyVersionSpec)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/3.9.0/Google.Cloud.Security.PrivateCA.V1.CertificateAuthority.Types.KeyVersionSpec)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/3.8.0/Google.Cloud.Security.PrivateCA.V1.CertificateAuthority.Types.KeyVersionSpec)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/3.7.0/Google.Cloud.Security.PrivateCA.V1.CertificateAuthority.Types.KeyVersionSpec)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/3.6.0/Google.Cloud.Security.PrivateCA.V1.CertificateAuthority.Types.KeyVersionSpec)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/3.5.0/Google.Cloud.Security.PrivateCA.V1.CertificateAuthority.Types.KeyVersionSpec)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/3.4.0/Google.Cloud.Security.PrivateCA.V1.CertificateAuthority.Types.KeyVersionSpec)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/3.3.0/Google.Cloud.Security.PrivateCA.V1.CertificateAuthority.Types.KeyVersionSpec)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/3.2.0/Google.Cloud.Security.PrivateCA.V1.CertificateAuthority.Types.KeyVersionSpec)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/3.1.0/Google.Cloud.Security.PrivateCA.V1.CertificateAuthority.Types.KeyVersionSpec)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/3.0.0/Google.Cloud.Security.PrivateCA.V1.CertificateAuthority.Types.KeyVersionSpec)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/2.3.0/Google.Cloud.Security.PrivateCA.V1.CertificateAuthority.Types.KeyVersionSpec)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/2.2.0/Google.Cloud.Security.PrivateCA.V1.CertificateAuthority.Types.KeyVersionSpec)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/2.1.0/Google.Cloud.Security.PrivateCA.V1.CertificateAuthority.Types.KeyVersionSpec)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/2.0.0/Google.Cloud.Security.PrivateCA.V1.CertificateAuthority.Types.KeyVersionSpec)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/1.0.0/Google.Cloud.Security.PrivateCA.V1.CertificateAuthority.Types.KeyVersionSpec) \n\n public sealed class CertificateAuthority.Types.KeyVersionSpec : IMessage\u003cCertificateAuthority.Types.KeyVersionSpec\u003e, IEquatable\u003cCertificateAuthority.Types.KeyVersionSpec\u003e, IDeepCloneable\u003cCertificateAuthority.Types.KeyVersionSpec\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Certificate Authority v1 API class CertificateAuthority.Types.KeyVersionSpec.\n\nA Cloud KMS key configuration that a\n\\[CertificateAuthority\\]\\[google.cloud.security.privateca.v1.CertificateAuthority\\]\nwill use. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e CertificateAuthority.Types.KeyVersionSpec \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[CertificateAuthority](/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.CertificateAuthority)[Types](/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.CertificateAuthority.Types)[KeyVersionSpec](/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.CertificateAuthority.Types.KeyVersionSpec), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[CertificateAuthority](/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.CertificateAuthority)[Types](/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.CertificateAuthority.Types)[KeyVersionSpec](/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.CertificateAuthority.Types.KeyVersionSpec), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[CertificateAuthority](/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.CertificateAuthority)[Types](/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.CertificateAuthority.Types)[KeyVersionSpec](/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1.CertificateAuthority.Types.KeyVersionSpec), [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.Security.PrivateCA.V1](/dotnet/docs/reference/Google.Cloud.Security.PrivateCA.V1/latest/Google.Cloud.Security.PrivateCA.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Security.PrivateCA.V1.dll\n\nConstructors\n------------\n\n### KeyVersionSpec()\n\n public KeyVersionSpec()\n\n### KeyVersionSpec(KeyVersionSpec)\n\n public KeyVersionSpec(CertificateAuthority.Types.KeyVersionSpec other)\n\nProperties\n----------\n\n### Algorithm\n\n public CertificateAuthority.Types.SignHashAlgorithm Algorithm { get; set; }\n\nThe algorithm to use for creating a managed Cloud KMS key for a for a\nsimplified experience. All managed keys will be have their\n\\[ProtectionLevel\\]\\[google.cloud.kms.v1.ProtectionLevel\\] as `HSM`.\n\n### CloudKmsKeyVersion\n\n public string CloudKmsKeyVersion { get; set; }\n\nThe resource name for an existing Cloud KMS CryptoKeyVersion in the\nformat\n`projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.\nThis option enables full flexibility in the key's capabilities and\nproperties.\n\n### HasAlgorithm\n\n public bool HasAlgorithm { get; }\n\nGets whether the \"algorithm\" field is set\n\n### HasCloudKmsKeyVersion\n\n public bool HasCloudKmsKeyVersion { get; }\n\nGets whether the \"cloud_kms_key_version\" field is set\n\n### KeyVersionCase\n\n public CertificateAuthority.Types.KeyVersionSpec.KeyVersionOneofCase KeyVersionCase { get; }"]]