# Google Cloud OS Login v1beta API - Class OsLoginService.OsLoginServiceBase (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.OsLoginService.OsLoginServiceBase)
- [3.0.0-beta09](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OsLogin.V1Beta/3.0.0-beta09/Google.Cloud.OsLogin.V1Beta.OsLoginService.OsLoginServiceBase)
- [2.0.0-beta05](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OsLogin.V1Beta/2.0.0-beta05/Google.Cloud.OsLogin.V1Beta.OsLoginService.OsLoginServiceBase)

    [BindServiceMethod(typeof(OsLoginService), "BindService")]
    public abstract class OsLoginService.OsLoginServiceBase

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

Base class for server-side implementations of OsLoginService

## Inheritance

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

## 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.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [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

## Methods

### CreateSshPublicKey(CreateSshPublicKeyRequest, ServerCallContext)

    public virtual Task<SshPublicKey> CreateSshPublicKey(CreateSshPublicKeyRequest request, ServerCallContext context)

Create an SSH public key

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OsLogin.V1Beta/latest/Google.Cloud.OsLogin.V1Beta.CreateSshPublicKeyRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OsLogin.Common/latest/Google.Cloud.OsLogin.Common.SshPublicKey.html` | The response to send back to the client (wrapped by a task). |

### DeletePosixAccount(DeletePosixAccountRequest, ServerCallContext)

    public virtual Task<Empty> DeletePosixAccount(DeletePosixAccountRequest request, ServerCallContext context)

Deletes a POSIX account.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OsLogin.V1Beta/latest/Google.Cloud.OsLogin.V1Beta.DeletePosixAccountRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.html` | The response to send back to the client (wrapped by a task). |

### DeleteSshPublicKey(DeleteSshPublicKeyRequest, ServerCallContext)

    public virtual Task<Empty> DeleteSshPublicKey(DeleteSshPublicKeyRequest request, ServerCallContext context)

Deletes an SSH public key.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OsLogin.V1Beta/latest/Google.Cloud.OsLogin.V1Beta.DeleteSshPublicKeyRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.html` | The response to send back to the client (wrapped by a task). |

### GetLoginProfile(GetLoginProfileRequest, ServerCallContext)

    public virtual Task<LoginProfile> GetLoginProfile(GetLoginProfileRequest request, ServerCallContext context)

Retrieves the profile information used for logging in to a virtual machine
on Google Compute Engine.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OsLogin.V1Beta/latest/Google.Cloud.OsLogin.V1Beta.GetLoginProfileRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OsLogin.V1Beta/latest/Google.Cloud.OsLogin.V1Beta.LoginProfile` | The response to send back to the client (wrapped by a task). |

### GetSshPublicKey(GetSshPublicKeyRequest, ServerCallContext)

    public virtual Task<SshPublicKey> GetSshPublicKey(GetSshPublicKeyRequest request, ServerCallContext context)

Retrieves an SSH public key.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OsLogin.V1Beta/latest/Google.Cloud.OsLogin.V1Beta.GetSshPublicKeyRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OsLogin.Common/latest/Google.Cloud.OsLogin.Common.SshPublicKey.html` | The response to send back to the client (wrapped by a task). |

### ImportSshPublicKey(ImportSshPublicKeyRequest, ServerCallContext)

    public virtual Task<ImportSshPublicKeyResponse> ImportSshPublicKey(ImportSshPublicKeyRequest request, ServerCallContext context)

Adds an SSH public key and returns the profile information. Default POSIX
account information is set when no username and UID exist as part of the
login profile.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OsLogin.V1Beta/latest/Google.Cloud.OsLogin.V1Beta.ImportSshPublicKeyRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OsLogin.V1Beta/latest/Google.Cloud.OsLogin.V1Beta.ImportSshPublicKeyResponse` | The response to send back to the client (wrapped by a task). |

### SignSshPublicKey(SignSshPublicKeyRequest, ServerCallContext)

    public virtual Task<SignSshPublicKeyResponse> SignSshPublicKey(SignSshPublicKeyRequest request, ServerCallContext context)

Signs an SSH public key for a user to authenticate to an instance.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OsLogin.V1Beta/latest/Google.Cloud.OsLogin.V1Beta.SignSshPublicKeyRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OsLogin.V1Beta/latest/Google.Cloud.OsLogin.V1Beta.SignSshPublicKeyResponse` | The response to send back to the client (wrapped by a task). |

### UpdateSshPublicKey(UpdateSshPublicKeyRequest, ServerCallContext)

    public virtual Task<SshPublicKey> UpdateSshPublicKey(UpdateSshPublicKeyRequest request, ServerCallContext context)

Updates an SSH public key and returns the profile information. This method
supports patch semantics.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OsLogin.V1Beta/latest/Google.Cloud.OsLogin.V1Beta.UpdateSshPublicKeyRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.OsLogin.Common/latest/Google.Cloud.OsLogin.Common.SshPublicKey.html` | The response to send back to the client (wrapped by a task). |