public sealed class ImportSshPublicKeyRequest : IMessage<ImportSshPublicKeyRequest>, IEquatable<ImportSshPublicKeyRequest>, IDeepCloneable<ImportSshPublicKeyRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud OS Login v1 API class ImportSshPublicKeyRequest.
A request message for importing an SSH public key.
[[["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-28 UTC."],[[["\u003cp\u003eThis document provides reference documentation for the \u003ccode\u003eImportSshPublicKeyRequest\u003c/code\u003e class within the Google Cloud OS Login v1 API, detailing its usage for importing SSH public keys.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eImportSshPublicKeyRequest\u003c/code\u003e class is a request message used to import an SSH public key and is the latest version which is 3.5.0.\u003c/p\u003e\n"],["\u003cp\u003eThe class includes properties like \u003ccode\u003eParent\u003c/code\u003e (user ID), \u003ccode\u003eParentAsUserName\u003c/code\u003e, \u003ccode\u003eProjectId\u003c/code\u003e, \u003ccode\u003eRegions\u003c/code\u003e (key write locations), and \u003ccode\u003eSshPublicKey\u003c/code\u003e (the SSH key details).\u003c/p\u003e\n"],["\u003cp\u003eIt inherits from \u003ccode\u003eobject\u003c/code\u003e and implements interfaces such as \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\u003eThe \u003ccode\u003eImportSshPublicKeyRequest\u003c/code\u003e class has two constructors, a default one, and one that takes another \u003ccode\u003eImportSshPublicKeyRequest\u003c/code\u003e as a parameter, to create a copy of the object.\u003c/p\u003e\n"]]],[],null,["# Google Cloud OS Login v1 API - Class ImportSshPublicKeyRequest (3.5.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.5.0 (latest)](/dotnet/docs/reference/Google.Cloud.OsLogin.V1/latest/Google.Cloud.OsLogin.V1.ImportSshPublicKeyRequest)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.OsLogin.V1/3.4.0/Google.Cloud.OsLogin.V1.ImportSshPublicKeyRequest)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.OsLogin.V1/3.3.0/Google.Cloud.OsLogin.V1.ImportSshPublicKeyRequest)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.OsLogin.V1/3.2.0/Google.Cloud.OsLogin.V1.ImportSshPublicKeyRequest)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.OsLogin.V1/3.1.0/Google.Cloud.OsLogin.V1.ImportSshPublicKeyRequest)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.OsLogin.V1/3.0.0/Google.Cloud.OsLogin.V1.ImportSshPublicKeyRequest)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.OsLogin.V1/2.3.0/Google.Cloud.OsLogin.V1.ImportSshPublicKeyRequest)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.OsLogin.V1/2.2.0/Google.Cloud.OsLogin.V1.ImportSshPublicKeyRequest) \n\n public sealed class ImportSshPublicKeyRequest : IMessage\u003cImportSshPublicKeyRequest\u003e, IEquatable\u003cImportSshPublicKeyRequest\u003e, IDeepCloneable\u003cImportSshPublicKeyRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud OS Login v1 API class ImportSshPublicKeyRequest.\n\nA request message for importing an SSH public key. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e ImportSshPublicKeyRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[ImportSshPublicKeyRequest](/dotnet/docs/reference/Google.Cloud.OsLogin.V1/latest/Google.Cloud.OsLogin.V1.ImportSshPublicKeyRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[ImportSshPublicKeyRequest](/dotnet/docs/reference/Google.Cloud.OsLogin.V1/latest/Google.Cloud.OsLogin.V1.ImportSshPublicKeyRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[ImportSshPublicKeyRequest](/dotnet/docs/reference/Google.Cloud.OsLogin.V1/latest/Google.Cloud.OsLogin.V1.ImportSshPublicKeyRequest), [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.OsLogin.V1](/dotnet/docs/reference/Google.Cloud.OsLogin.V1/latest/Google.Cloud.OsLogin.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.OsLogin.V1.dll\n\nConstructors\n------------\n\n### ImportSshPublicKeyRequest()\n\n public ImportSshPublicKeyRequest()\n\n### ImportSshPublicKeyRequest(ImportSshPublicKeyRequest)\n\n public ImportSshPublicKeyRequest(ImportSshPublicKeyRequest other)\n\nProperties\n----------\n\n### Parent\n\n public string Parent { get; set; }\n\nRequired. The unique ID for the user in format `users/{user}`.\n\n### ParentAsUserName\n\n public UserName ParentAsUserName { get; set; }\n\n[UserName](https://github.com/googleapis/google-cloud-dotnet/blob/fabcd3fcb58c76146b4e09ef3bb416d9a36db288/apis/Google.Cloud.OsLogin.Common/Google.Cloud.OsLogin.Common/CommonResourceNames.g.cs)-typed view over the [Parent](/dotnet/docs/reference/Google.Cloud.OsLogin.V1/latest/Google.Cloud.OsLogin.V1.ImportSshPublicKeyRequest#Google_Cloud_OsLogin_V1_ImportSshPublicKeyRequest_Parent) resource name property.\n\n### ProjectId\n\n public string ProjectId { get; set; }\n\nThe project ID of the Google Cloud Platform project.\n\n### Regions\n\n public RepeatedField\u003cstring\u003e Regions { get; }\n\nOptional. The regions to which to assert that the key was written.\nIf unspecified, defaults to all regions.\nRegions are listed at \u003chttps://cloud.google.com/about/locations#region\u003e.\n\n### SshPublicKey\n\n public SshPublicKey SshPublicKey { get; set; }\n\nOptional. The SSH public key and expiration time."]]