# Google Cloud OS Login v1beta API - Class ImportSshPublicKeyRequest (3.0.0-beta10)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [3.0.0-beta10 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OsLogin.V1Beta/latest/Google.Cloud.OsLogin.V1Beta.ImportSshPublicKeyRequest)
- [3.0.0-beta09](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OsLogin.V1Beta/3.0.0-beta09/Google.Cloud.OsLogin.V1Beta.ImportSshPublicKeyRequest)
- [2.0.0-beta05](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OsLogin.V1Beta/2.0.0-beta05/Google.Cloud.OsLogin.V1Beta.ImportSshPublicKeyRequest)

    public sealed class ImportSshPublicKeyRequest : IMessage<ImportSshPublicKeyRequest>, IEquatable<ImportSshPublicKeyRequest>, IDeepCloneable<ImportSshPublicKeyRequest>, IBufferMessage, IMessage

Reference documentation and code samples for the Google Cloud OS Login v1beta API class ImportSshPublicKeyRequest.

A request message for importing an SSH public key.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> ImportSshPublicKeyRequest

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[ImportSshPublicKeyRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OsLogin.V1Beta/latest/Google.Cloud.OsLogin.V1Beta.ImportSshPublicKeyRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[ImportSshPublicKeyRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OsLogin.V1Beta/latest/Google.Cloud.OsLogin.V1Beta.ImportSshPublicKeyRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[ImportSshPublicKeyRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OsLogin.V1Beta/latest/Google.Cloud.OsLogin.V1Beta.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)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.OsLogin.V1Beta](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OsLogin.V1Beta/latest/Google.Cloud.OsLogin.V1Beta)

## Assembly

Google.Cloud.OsLogin.V1Beta.dll

## Constructors

### ImportSshPublicKeyRequest()

    public ImportSshPublicKeyRequest()

### ImportSshPublicKeyRequest(ImportSshPublicKeyRequest)

    public ImportSshPublicKeyRequest(ImportSshPublicKeyRequest other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OsLogin.V1Beta/latest/Google.Cloud.OsLogin.V1Beta.ImportSshPublicKeyRequest` |

## Properties

### Parent

    public string Parent { get; set; }

The unique ID for the user in format `users/{user}`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### ParentAsUserName

    public UserName ParentAsUserName { get; set; }

[UserName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OsLogin.Common/latest/Google.Cloud.OsLogin.Common.UserName.html)-typed view over the [Parent](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OsLogin.V1Beta/latest/Google.Cloud.OsLogin.V1Beta.ImportSshPublicKeyRequest#Google_Cloud_OsLogin_V1Beta_ImportSshPublicKeyRequest_Parent) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OsLogin.Common/latest/Google.Cloud.OsLogin.Common.UserName.html` |   |

### ProjectId

    public string ProjectId { get; set; }

The project ID of the Google Cloud Platform project.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Regions

    public RepeatedField<string> Regions { get; }

Optional. The regions to which to assert that the key was written.
If unspecified, defaults to all regions.
Regions are listed at <https://cloud.google.com/about/locations#region>.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://learn.microsoft.com/dotnet/api/system.string` |   |

### SshPublicKey

    public SshPublicKey SshPublicKey { get; set; }

Required. The SSH public key and expiration time.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OsLogin.Common/latest/Google.Cloud.OsLogin.Common.SshPublicKey.html` |   |

### View

    public LoginProfileView View { get; set; }

The view configures whether to retrieve security keys information.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OsLogin.V1Beta/latest/Google.Cloud.OsLogin.V1Beta.LoginProfileView` |   |