2.6.0 (latest) 2.5.0 2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.1.0 1.0.0

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

Reference documentation and code samples for the Cloud Shell v1 API class AddPublicKeyRequest.

Request message for
\[AddPublicKey\]\[google.cloud.shell.v1.CloudShellService.AddPublicKey\].

## Inheritance

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

## Implements

[IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.md.txt)[AddPublicKeyRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Shell.V1/latest/Google.Cloud.Shell.V1.AddPublicKeyRequest.md.txt), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[AddPublicKeyRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Shell.V1/latest/Google.Cloud.Shell.V1.AddPublicKeyRequest.md.txt), [IDeepCloneable](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.md.txt)[AddPublicKeyRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Shell.V1/latest/Google.Cloud.Shell.V1.AddPublicKeyRequest.md.txt), [IBufferMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.md.txt), [IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.md.txt)

## 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.Shell.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Shell.V1/latest/Google.Cloud.Shell.V1.md.txt)

## Assembly

Google.Cloud.Shell.V1.dll

## Constructors

### AddPublicKeyRequest()

    public AddPublicKeyRequest()

### AddPublicKeyRequest(AddPublicKeyRequest)

    public AddPublicKeyRequest(AddPublicKeyRequest other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `AddPublicKeyRequest` |

## Properties

### Environment

    public string Environment { get; set; }

Environment this key should be added to, e.g.
`users/me/environments/default`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### Key

    public string Key { get; set; }

Key that should be added to the environment. Supported formats are
`ssh-dss` (see RFC4253), `ssh-rsa` (see RFC4253), `ecdsa-sha2-nistp256`
(see RFC5656), `ecdsa-sha2-nistp384` (see RFC5656) and
`ecdsa-sha2-nistp521` (see RFC5656). It should be structured as
\&lt;format\&gt; \&lt;content\&gt;, where \&lt;content\&gt; part is encoded with
Base64.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |