Google Cloud OS Login v1beta API - Class OsLoginServiceClient (3.0.0-beta09)

public abstract class OsLoginServiceClient

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

OsLoginService client wrapper, for convenient use.

Inheritance

object > OsLoginServiceClient

Derived Types

Namespace

Google.Cloud.OsLogin.V1Beta

Assembly

Google.Cloud.OsLogin.V1Beta.dll

Remarks

Cloud OS Login API

The Cloud OS Login API allows you to manage users and their associated SSH public keys for logging into virtual machines on Google Cloud Platform.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the OsLoginService service, which is a host of "oslogin.googleapis.com" and a port of 443.

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default OsLoginService scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

GrpcClient

public virtual OsLoginService.OsLoginServiceClient GrpcClient { get; }

The underlying gRPC OsLoginService client

Property Value
Type Description
OsLoginServiceOsLoginServiceClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

Methods

Create()

public static OsLoginServiceClient Create()

Synchronously creates a OsLoginServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use OsLoginServiceClientBuilder.

Returns
Type Description
OsLoginServiceClient

The created OsLoginServiceClient.

CreateAsync(CancellationToken)

public static Task<OsLoginServiceClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a OsLoginServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use OsLoginServiceClientBuilder.

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskOsLoginServiceClient

The task representing the created OsLoginServiceClient.

CreateSshPublicKey(UserName, SshPublicKey, CallSettings)

public virtual SshPublicKey CreateSshPublicKey(UserName parent, SshPublicKey sshPublicKey, CallSettings callSettings = null)

Create an SSH public key

Parameters
Name Description
parent UserName

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

sshPublicKey SshPublicKey

Required. The SSH public key and expiration time.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
SshPublicKey

The RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.Create();
// Initialize request argument(s)
UserName parent = UserName.FromUser("[USER]");
SshPublicKey sshPublicKey = new SshPublicKey();
// Make the request
SshPublicKey response = osLoginServiceClient.CreateSshPublicKey(parent, sshPublicKey);

CreateSshPublicKey(CreateSshPublicKeyRequest, CallSettings)

public virtual SshPublicKey CreateSshPublicKey(CreateSshPublicKeyRequest request, CallSettings callSettings = null)

Create an SSH public key

Parameters
Name Description
request CreateSshPublicKeyRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
SshPublicKey

The RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.Create();
// Initialize request argument(s)
CreateSshPublicKeyRequest request = new CreateSshPublicKeyRequest
{
    ParentAsUserName = UserName.FromUser("[USER]"),
    SshPublicKey = new SshPublicKey(),
};
// Make the request
SshPublicKey response = osLoginServiceClient.CreateSshPublicKey(request);

CreateSshPublicKey(string, SshPublicKey, CallSettings)

public virtual SshPublicKey CreateSshPublicKey(string parent, SshPublicKey sshPublicKey, CallSettings callSettings = null)

Create an SSH public key

Parameters
Name Description
parent string

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

sshPublicKey SshPublicKey

Required. The SSH public key and expiration time.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
SshPublicKey

The RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.Create();
// Initialize request argument(s)
string parent = "users/[USER]";
SshPublicKey sshPublicKey = new SshPublicKey();
// Make the request
SshPublicKey response = osLoginServiceClient.CreateSshPublicKey(parent, sshPublicKey);

CreateSshPublicKeyAsync(UserName, SshPublicKey, CallSettings)

public virtual Task<SshPublicKey> CreateSshPublicKeyAsync(UserName parent, SshPublicKey sshPublicKey, CallSettings callSettings = null)

Create an SSH public key

Parameters
Name Description
parent UserName

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

sshPublicKey SshPublicKey

Required. The SSH public key and expiration time.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSshPublicKey

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
UserName parent = UserName.FromUser("[USER]");
SshPublicKey sshPublicKey = new SshPublicKey();
// Make the request
SshPublicKey response = await osLoginServiceClient.CreateSshPublicKeyAsync(parent, sshPublicKey);

CreateSshPublicKeyAsync(UserName, SshPublicKey, CancellationToken)

public virtual Task<SshPublicKey> CreateSshPublicKeyAsync(UserName parent, SshPublicKey sshPublicKey, CancellationToken cancellationToken)

Create an SSH public key

Parameters
Name Description
parent UserName

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

sshPublicKey SshPublicKey

Required. The SSH public key and expiration time.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSshPublicKey

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
UserName parent = UserName.FromUser("[USER]");
SshPublicKey sshPublicKey = new SshPublicKey();
// Make the request
SshPublicKey response = await osLoginServiceClient.CreateSshPublicKeyAsync(parent, sshPublicKey);

CreateSshPublicKeyAsync(CreateSshPublicKeyRequest, CallSettings)

public virtual Task<SshPublicKey> CreateSshPublicKeyAsync(CreateSshPublicKeyRequest request, CallSettings callSettings = null)

Create an SSH public key

Parameters
Name Description
request CreateSshPublicKeyRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSshPublicKey

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
CreateSshPublicKeyRequest request = new CreateSshPublicKeyRequest
{
    ParentAsUserName = UserName.FromUser("[USER]"),
    SshPublicKey = new SshPublicKey(),
};
// Make the request
SshPublicKey response = await osLoginServiceClient.CreateSshPublicKeyAsync(request);

CreateSshPublicKeyAsync(CreateSshPublicKeyRequest, CancellationToken)

public virtual Task<SshPublicKey> CreateSshPublicKeyAsync(CreateSshPublicKeyRequest request, CancellationToken cancellationToken)

Create an SSH public key

Parameters
Name Description
request CreateSshPublicKeyRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSshPublicKey

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
CreateSshPublicKeyRequest request = new CreateSshPublicKeyRequest
{
    ParentAsUserName = UserName.FromUser("[USER]"),
    SshPublicKey = new SshPublicKey(),
};
// Make the request
SshPublicKey response = await osLoginServiceClient.CreateSshPublicKeyAsync(request);

CreateSshPublicKeyAsync(string, SshPublicKey, CallSettings)

public virtual Task<SshPublicKey> CreateSshPublicKeyAsync(string parent, SshPublicKey sshPublicKey, CallSettings callSettings = null)

Create an SSH public key

Parameters
Name Description
parent string

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

sshPublicKey SshPublicKey

Required. The SSH public key and expiration time.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSshPublicKey

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "users/[USER]";
SshPublicKey sshPublicKey = new SshPublicKey();
// Make the request
SshPublicKey response = await osLoginServiceClient.CreateSshPublicKeyAsync(parent, sshPublicKey);

CreateSshPublicKeyAsync(string, SshPublicKey, CancellationToken)

public virtual Task<SshPublicKey> CreateSshPublicKeyAsync(string parent, SshPublicKey sshPublicKey, CancellationToken cancellationToken)

Create an SSH public key

Parameters
Name Description
parent string

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

sshPublicKey SshPublicKey

Required. The SSH public key and expiration time.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSshPublicKey

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "users/[USER]";
SshPublicKey sshPublicKey = new SshPublicKey();
// Make the request
SshPublicKey response = await osLoginServiceClient.CreateSshPublicKeyAsync(parent, sshPublicKey);

DeletePosixAccount(PosixAccountName, CallSettings)

public virtual void DeletePosixAccount(PosixAccountName name, CallSettings callSettings = null)

Deletes a POSIX account.

Parameters
Name Description
name PosixAccountName

Required. A reference to the POSIX account to update. POSIX accounts are identified by the project ID they are associated with. A reference to the POSIX account is in format users/{user}/projects/{project}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.Create();
// Initialize request argument(s)
PosixAccountName name = PosixAccountName.FromUserProject("[USER]", "[PROJECT]");
// Make the request
osLoginServiceClient.DeletePosixAccount(name);

DeletePosixAccount(DeletePosixAccountRequest, CallSettings)

public virtual void DeletePosixAccount(DeletePosixAccountRequest request, CallSettings callSettings = null)

Deletes a POSIX account.

Parameters
Name Description
request DeletePosixAccountRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.Create();
// Initialize request argument(s)
DeletePosixAccountRequest request = new DeletePosixAccountRequest
{
    PosixAccountName = PosixAccountName.FromUserProject("[USER]", "[PROJECT]"),
};
// Make the request
osLoginServiceClient.DeletePosixAccount(request);

DeletePosixAccount(string, CallSettings)

public virtual void DeletePosixAccount(string name, CallSettings callSettings = null)

Deletes a POSIX account.

Parameters
Name Description
name string

Required. A reference to the POSIX account to update. POSIX accounts are identified by the project ID they are associated with. A reference to the POSIX account is in format users/{user}/projects/{project}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.Create();
// Initialize request argument(s)
string name = "users/[USER]/projects/[PROJECT]";
// Make the request
osLoginServiceClient.DeletePosixAccount(name);

DeletePosixAccountAsync(PosixAccountName, CallSettings)

public virtual Task DeletePosixAccountAsync(PosixAccountName name, CallSettings callSettings = null)

Deletes a POSIX account.

Parameters
Name Description
name PosixAccountName

Required. A reference to the POSIX account to update. POSIX accounts are identified by the project ID they are associated with. A reference to the POSIX account is in format users/{user}/projects/{project}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
PosixAccountName name = PosixAccountName.FromUserProject("[USER]", "[PROJECT]");
// Make the request
await osLoginServiceClient.DeletePosixAccountAsync(name);

DeletePosixAccountAsync(PosixAccountName, CancellationToken)

public virtual Task DeletePosixAccountAsync(PosixAccountName name, CancellationToken cancellationToken)

Deletes a POSIX account.

Parameters
Name Description
name PosixAccountName

Required. A reference to the POSIX account to update. POSIX accounts are identified by the project ID they are associated with. A reference to the POSIX account is in format users/{user}/projects/{project}.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
PosixAccountName name = PosixAccountName.FromUserProject("[USER]", "[PROJECT]");
// Make the request
await osLoginServiceClient.DeletePosixAccountAsync(name);

DeletePosixAccountAsync(DeletePosixAccountRequest, CallSettings)

public virtual Task DeletePosixAccountAsync(DeletePosixAccountRequest request, CallSettings callSettings = null)

Deletes a POSIX account.

Parameters
Name Description
request DeletePosixAccountRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
DeletePosixAccountRequest request = new DeletePosixAccountRequest
{
    PosixAccountName = PosixAccountName.FromUserProject("[USER]", "[PROJECT]"),
};
// Make the request
await osLoginServiceClient.DeletePosixAccountAsync(request);

DeletePosixAccountAsync(DeletePosixAccountRequest, CancellationToken)

public virtual Task DeletePosixAccountAsync(DeletePosixAccountRequest request, CancellationToken cancellationToken)

Deletes a POSIX account.

Parameters
Name Description
request DeletePosixAccountRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
DeletePosixAccountRequest request = new DeletePosixAccountRequest
{
    PosixAccountName = PosixAccountName.FromUserProject("[USER]", "[PROJECT]"),
};
// Make the request
await osLoginServiceClient.DeletePosixAccountAsync(request);

DeletePosixAccountAsync(string, CallSettings)

public virtual Task DeletePosixAccountAsync(string name, CallSettings callSettings = null)

Deletes a POSIX account.

Parameters
Name Description
name string

Required. A reference to the POSIX account to update. POSIX accounts are identified by the project ID they are associated with. A reference to the POSIX account is in format users/{user}/projects/{project}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "users/[USER]/projects/[PROJECT]";
// Make the request
await osLoginServiceClient.DeletePosixAccountAsync(name);

DeletePosixAccountAsync(string, CancellationToken)

public virtual Task DeletePosixAccountAsync(string name, CancellationToken cancellationToken)

Deletes a POSIX account.

Parameters
Name Description
name string

Required. A reference to the POSIX account to update. POSIX accounts are identified by the project ID they are associated with. A reference to the POSIX account is in format users/{user}/projects/{project}.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "users/[USER]/projects/[PROJECT]";
// Make the request
await osLoginServiceClient.DeletePosixAccountAsync(name);

DeleteSshPublicKey(SshPublicKeyName, CallSettings)

public virtual void DeleteSshPublicKey(SshPublicKeyName name, CallSettings callSettings = null)

Deletes an SSH public key.

Parameters
Name Description
name SshPublicKeyName

Required. The fingerprint of the public key to update. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format users/{user}/sshPublicKeys/{fingerprint}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.Create();
// Initialize request argument(s)
SshPublicKeyName name = SshPublicKeyName.FromUserFingerprint("[USER]", "[FINGERPRINT]");
// Make the request
osLoginServiceClient.DeleteSshPublicKey(name);

DeleteSshPublicKey(DeleteSshPublicKeyRequest, CallSettings)

public virtual void DeleteSshPublicKey(DeleteSshPublicKeyRequest request, CallSettings callSettings = null)

Deletes an SSH public key.

Parameters
Name Description
request DeleteSshPublicKeyRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.Create();
// Initialize request argument(s)
DeleteSshPublicKeyRequest request = new DeleteSshPublicKeyRequest
{
    SshPublicKeyName = SshPublicKeyName.FromUserFingerprint("[USER]", "[FINGERPRINT]"),
};
// Make the request
osLoginServiceClient.DeleteSshPublicKey(request);

DeleteSshPublicKey(string, CallSettings)

public virtual void DeleteSshPublicKey(string name, CallSettings callSettings = null)

Deletes an SSH public key.

Parameters
Name Description
name string

Required. The fingerprint of the public key to update. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format users/{user}/sshPublicKeys/{fingerprint}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.Create();
// Initialize request argument(s)
string name = "users/[USER]/sshPublicKeys/[FINGERPRINT]";
// Make the request
osLoginServiceClient.DeleteSshPublicKey(name);

DeleteSshPublicKeyAsync(SshPublicKeyName, CallSettings)

public virtual Task DeleteSshPublicKeyAsync(SshPublicKeyName name, CallSettings callSettings = null)

Deletes an SSH public key.

Parameters
Name Description
name SshPublicKeyName

Required. The fingerprint of the public key to update. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format users/{user}/sshPublicKeys/{fingerprint}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
SshPublicKeyName name = SshPublicKeyName.FromUserFingerprint("[USER]", "[FINGERPRINT]");
// Make the request
await osLoginServiceClient.DeleteSshPublicKeyAsync(name);

DeleteSshPublicKeyAsync(SshPublicKeyName, CancellationToken)

public virtual Task DeleteSshPublicKeyAsync(SshPublicKeyName name, CancellationToken cancellationToken)

Deletes an SSH public key.

Parameters
Name Description
name SshPublicKeyName

Required. The fingerprint of the public key to update. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format users/{user}/sshPublicKeys/{fingerprint}.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
SshPublicKeyName name = SshPublicKeyName.FromUserFingerprint("[USER]", "[FINGERPRINT]");
// Make the request
await osLoginServiceClient.DeleteSshPublicKeyAsync(name);

DeleteSshPublicKeyAsync(DeleteSshPublicKeyRequest, CallSettings)

public virtual Task DeleteSshPublicKeyAsync(DeleteSshPublicKeyRequest request, CallSettings callSettings = null)

Deletes an SSH public key.

Parameters
Name Description
request DeleteSshPublicKeyRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteSshPublicKeyRequest request = new DeleteSshPublicKeyRequest
{
    SshPublicKeyName = SshPublicKeyName.FromUserFingerprint("[USER]", "[FINGERPRINT]"),
};
// Make the request
await osLoginServiceClient.DeleteSshPublicKeyAsync(request);

DeleteSshPublicKeyAsync(DeleteSshPublicKeyRequest, CancellationToken)

public virtual Task DeleteSshPublicKeyAsync(DeleteSshPublicKeyRequest request, CancellationToken cancellationToken)

Deletes an SSH public key.

Parameters
Name Description
request DeleteSshPublicKeyRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteSshPublicKeyRequest request = new DeleteSshPublicKeyRequest
{
    SshPublicKeyName = SshPublicKeyName.FromUserFingerprint("[USER]", "[FINGERPRINT]"),
};
// Make the request
await osLoginServiceClient.DeleteSshPublicKeyAsync(request);

DeleteSshPublicKeyAsync(string, CallSettings)

public virtual Task DeleteSshPublicKeyAsync(string name, CallSettings callSettings = null)

Deletes an SSH public key.

Parameters
Name Description
name string

Required. The fingerprint of the public key to update. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format users/{user}/sshPublicKeys/{fingerprint}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "users/[USER]/sshPublicKeys/[FINGERPRINT]";
// Make the request
await osLoginServiceClient.DeleteSshPublicKeyAsync(name);

DeleteSshPublicKeyAsync(string, CancellationToken)

public virtual Task DeleteSshPublicKeyAsync(string name, CancellationToken cancellationToken)

Deletes an SSH public key.

Parameters
Name Description
name string

Required. The fingerprint of the public key to update. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format users/{user}/sshPublicKeys/{fingerprint}.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "users/[USER]/sshPublicKeys/[FINGERPRINT]";
// Make the request
await osLoginServiceClient.DeleteSshPublicKeyAsync(name);

GetLoginProfile(UserName, CallSettings)

public virtual LoginProfile GetLoginProfile(UserName name, CallSettings callSettings = null)

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

Parameters
Name Description
name UserName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
LoginProfile

The RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.Create();
// Initialize request argument(s)
UserName name = UserName.FromUser("[USER]");
// Make the request
LoginProfile response = osLoginServiceClient.GetLoginProfile(name);

GetLoginProfile(GetLoginProfileRequest, CallSettings)

public virtual LoginProfile GetLoginProfile(GetLoginProfileRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request GetLoginProfileRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
LoginProfile

The RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.Create();
// Initialize request argument(s)
GetLoginProfileRequest request = new GetLoginProfileRequest
{
    UserName = UserName.FromUser("[USER]"),
    ProjectId = "",
    SystemId = "",
    View = LoginProfileView.Unspecified,
};
// Make the request
LoginProfile response = osLoginServiceClient.GetLoginProfile(request);

GetLoginProfile(string, CallSettings)

public virtual LoginProfile GetLoginProfile(string name, CallSettings callSettings = null)

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

Parameters
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
LoginProfile

The RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.Create();
// Initialize request argument(s)
string name = "users/[USER]";
// Make the request
LoginProfile response = osLoginServiceClient.GetLoginProfile(name);

GetLoginProfileAsync(UserName, CallSettings)

public virtual Task<LoginProfile> GetLoginProfileAsync(UserName name, CallSettings callSettings = null)

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

Parameters
Name Description
name UserName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskLoginProfile

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
UserName name = UserName.FromUser("[USER]");
// Make the request
LoginProfile response = await osLoginServiceClient.GetLoginProfileAsync(name);

GetLoginProfileAsync(UserName, CancellationToken)

public virtual Task<LoginProfile> GetLoginProfileAsync(UserName name, CancellationToken cancellationToken)

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

Parameters
Name Description
name UserName

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskLoginProfile

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
UserName name = UserName.FromUser("[USER]");
// Make the request
LoginProfile response = await osLoginServiceClient.GetLoginProfileAsync(name);

GetLoginProfileAsync(GetLoginProfileRequest, CallSettings)

public virtual Task<LoginProfile> GetLoginProfileAsync(GetLoginProfileRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request GetLoginProfileRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskLoginProfile

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
GetLoginProfileRequest request = new GetLoginProfileRequest
{
    UserName = UserName.FromUser("[USER]"),
    ProjectId = "",
    SystemId = "",
    View = LoginProfileView.Unspecified,
};
// Make the request
LoginProfile response = await osLoginServiceClient.GetLoginProfileAsync(request);

GetLoginProfileAsync(GetLoginProfileRequest, CancellationToken)

public virtual Task<LoginProfile> GetLoginProfileAsync(GetLoginProfileRequest request, CancellationToken cancellationToken)

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

Parameters
Name Description
request GetLoginProfileRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskLoginProfile

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
GetLoginProfileRequest request = new GetLoginProfileRequest
{
    UserName = UserName.FromUser("[USER]"),
    ProjectId = "",
    SystemId = "",
    View = LoginProfileView.Unspecified,
};
// Make the request
LoginProfile response = await osLoginServiceClient.GetLoginProfileAsync(request);

GetLoginProfileAsync(string, CallSettings)

public virtual Task<LoginProfile> GetLoginProfileAsync(string name, CallSettings callSettings = null)

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

Parameters
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskLoginProfile

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "users/[USER]";
// Make the request
LoginProfile response = await osLoginServiceClient.GetLoginProfileAsync(name);

GetLoginProfileAsync(string, CancellationToken)

public virtual Task<LoginProfile> GetLoginProfileAsync(string name, CancellationToken cancellationToken)

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

Parameters
Name Description
name string

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskLoginProfile

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "users/[USER]";
// Make the request
LoginProfile response = await osLoginServiceClient.GetLoginProfileAsync(name);

GetSshPublicKey(SshPublicKeyName, CallSettings)

public virtual SshPublicKey GetSshPublicKey(SshPublicKeyName name, CallSettings callSettings = null)

Retrieves an SSH public key.

Parameters
Name Description
name SshPublicKeyName

Required. The fingerprint of the public key to retrieve. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format users/{user}/sshPublicKeys/{fingerprint}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
SshPublicKey

The RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.Create();
// Initialize request argument(s)
SshPublicKeyName name = SshPublicKeyName.FromUserFingerprint("[USER]", "[FINGERPRINT]");
// Make the request
SshPublicKey response = osLoginServiceClient.GetSshPublicKey(name);

GetSshPublicKey(GetSshPublicKeyRequest, CallSettings)

public virtual SshPublicKey GetSshPublicKey(GetSshPublicKeyRequest request, CallSettings callSettings = null)

Retrieves an SSH public key.

Parameters
Name Description
request GetSshPublicKeyRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
SshPublicKey

The RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.Create();
// Initialize request argument(s)
GetSshPublicKeyRequest request = new GetSshPublicKeyRequest
{
    SshPublicKeyName = SshPublicKeyName.FromUserFingerprint("[USER]", "[FINGERPRINT]"),
};
// Make the request
SshPublicKey response = osLoginServiceClient.GetSshPublicKey(request);

GetSshPublicKey(string, CallSettings)

public virtual SshPublicKey GetSshPublicKey(string name, CallSettings callSettings = null)

Retrieves an SSH public key.

Parameters
Name Description
name string

Required. The fingerprint of the public key to retrieve. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format users/{user}/sshPublicKeys/{fingerprint}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
SshPublicKey

The RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.Create();
// Initialize request argument(s)
string name = "users/[USER]/sshPublicKeys/[FINGERPRINT]";
// Make the request
SshPublicKey response = osLoginServiceClient.GetSshPublicKey(name);

GetSshPublicKeyAsync(SshPublicKeyName, CallSettings)

public virtual Task<SshPublicKey> GetSshPublicKeyAsync(SshPublicKeyName name, CallSettings callSettings = null)

Retrieves an SSH public key.

Parameters
Name Description
name SshPublicKeyName

Required. The fingerprint of the public key to retrieve. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format users/{user}/sshPublicKeys/{fingerprint}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSshPublicKey

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
SshPublicKeyName name = SshPublicKeyName.FromUserFingerprint("[USER]", "[FINGERPRINT]");
// Make the request
SshPublicKey response = await osLoginServiceClient.GetSshPublicKeyAsync(name);

GetSshPublicKeyAsync(SshPublicKeyName, CancellationToken)

public virtual Task<SshPublicKey> GetSshPublicKeyAsync(SshPublicKeyName name, CancellationToken cancellationToken)

Retrieves an SSH public key.

Parameters
Name Description
name SshPublicKeyName

Required. The fingerprint of the public key to retrieve. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format users/{user}/sshPublicKeys/{fingerprint}.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSshPublicKey

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
SshPublicKeyName name = SshPublicKeyName.FromUserFingerprint("[USER]", "[FINGERPRINT]");
// Make the request
SshPublicKey response = await osLoginServiceClient.GetSshPublicKeyAsync(name);

GetSshPublicKeyAsync(GetSshPublicKeyRequest, CallSettings)

public virtual Task<SshPublicKey> GetSshPublicKeyAsync(GetSshPublicKeyRequest request, CallSettings callSettings = null)

Retrieves an SSH public key.

Parameters
Name Description
request GetSshPublicKeyRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSshPublicKey

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
GetSshPublicKeyRequest request = new GetSshPublicKeyRequest
{
    SshPublicKeyName = SshPublicKeyName.FromUserFingerprint("[USER]", "[FINGERPRINT]"),
};
// Make the request
SshPublicKey response = await osLoginServiceClient.GetSshPublicKeyAsync(request);

GetSshPublicKeyAsync(GetSshPublicKeyRequest, CancellationToken)

public virtual Task<SshPublicKey> GetSshPublicKeyAsync(GetSshPublicKeyRequest request, CancellationToken cancellationToken)

Retrieves an SSH public key.

Parameters
Name Description
request GetSshPublicKeyRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSshPublicKey

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
GetSshPublicKeyRequest request = new GetSshPublicKeyRequest
{
    SshPublicKeyName = SshPublicKeyName.FromUserFingerprint("[USER]", "[FINGERPRINT]"),
};
// Make the request
SshPublicKey response = await osLoginServiceClient.GetSshPublicKeyAsync(request);

GetSshPublicKeyAsync(string, CallSettings)

public virtual Task<SshPublicKey> GetSshPublicKeyAsync(string name, CallSettings callSettings = null)

Retrieves an SSH public key.

Parameters
Name Description
name string

Required. The fingerprint of the public key to retrieve. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format users/{user}/sshPublicKeys/{fingerprint}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSshPublicKey

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "users/[USER]/sshPublicKeys/[FINGERPRINT]";
// Make the request
SshPublicKey response = await osLoginServiceClient.GetSshPublicKeyAsync(name);

GetSshPublicKeyAsync(string, CancellationToken)

public virtual Task<SshPublicKey> GetSshPublicKeyAsync(string name, CancellationToken cancellationToken)

Retrieves an SSH public key.

Parameters
Name Description
name string

Required. The fingerprint of the public key to retrieve. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format users/{user}/sshPublicKeys/{fingerprint}.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSshPublicKey

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "users/[USER]/sshPublicKeys/[FINGERPRINT]";
// Make the request
SshPublicKey response = await osLoginServiceClient.GetSshPublicKeyAsync(name);

ImportSshPublicKey(UserName, SshPublicKey, CallSettings)

public virtual ImportSshPublicKeyResponse ImportSshPublicKey(UserName parent, SshPublicKey sshPublicKey, CallSettings callSettings = null)

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
parent UserName

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

sshPublicKey SshPublicKey

Required. The SSH public key and expiration time.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ImportSshPublicKeyResponse

The RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.Create();
// Initialize request argument(s)
UserName parent = UserName.FromUser("[USER]");
SshPublicKey sshPublicKey = new SshPublicKey();
// Make the request
ImportSshPublicKeyResponse response = osLoginServiceClient.ImportSshPublicKey(parent, sshPublicKey);

ImportSshPublicKey(UserName, SshPublicKey, string, CallSettings)

public virtual ImportSshPublicKeyResponse ImportSshPublicKey(UserName parent, SshPublicKey sshPublicKey, string projectId, CallSettings callSettings = null)

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
parent UserName

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

sshPublicKey SshPublicKey

Required. The SSH public key and expiration time.

projectId string

The project ID of the Google Cloud Platform project.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ImportSshPublicKeyResponse

The RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.Create();
// Initialize request argument(s)
UserName parent = UserName.FromUser("[USER]");
SshPublicKey sshPublicKey = new SshPublicKey();
string projectId = "";
// Make the request
ImportSshPublicKeyResponse response = osLoginServiceClient.ImportSshPublicKey(parent, sshPublicKey, projectId);

ImportSshPublicKey(ImportSshPublicKeyRequest, CallSettings)

public virtual ImportSshPublicKeyResponse ImportSshPublicKey(ImportSshPublicKeyRequest request, CallSettings callSettings = null)

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 ImportSshPublicKeyRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ImportSshPublicKeyResponse

The RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.Create();
// Initialize request argument(s)
ImportSshPublicKeyRequest request = new ImportSshPublicKeyRequest
{
    ParentAsUserName = UserName.FromUser("[USER]"),
    SshPublicKey = new SshPublicKey(),
    ProjectId = "",
    View = LoginProfileView.Unspecified,
    Regions = { "", },
};
// Make the request
ImportSshPublicKeyResponse response = osLoginServiceClient.ImportSshPublicKey(request);

ImportSshPublicKey(string, SshPublicKey, CallSettings)

public virtual ImportSshPublicKeyResponse ImportSshPublicKey(string parent, SshPublicKey sshPublicKey, CallSettings callSettings = null)

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
parent string

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

sshPublicKey SshPublicKey

Required. The SSH public key and expiration time.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ImportSshPublicKeyResponse

The RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.Create();
// Initialize request argument(s)
string parent = "users/[USER]";
SshPublicKey sshPublicKey = new SshPublicKey();
// Make the request
ImportSshPublicKeyResponse response = osLoginServiceClient.ImportSshPublicKey(parent, sshPublicKey);

ImportSshPublicKey(string, SshPublicKey, string, CallSettings)

public virtual ImportSshPublicKeyResponse ImportSshPublicKey(string parent, SshPublicKey sshPublicKey, string projectId, CallSettings callSettings = null)

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
parent string

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

sshPublicKey SshPublicKey

Required. The SSH public key and expiration time.

projectId string

The project ID of the Google Cloud Platform project.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ImportSshPublicKeyResponse

The RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.Create();
// Initialize request argument(s)
string parent = "users/[USER]";
SshPublicKey sshPublicKey = new SshPublicKey();
string projectId = "";
// Make the request
ImportSshPublicKeyResponse response = osLoginServiceClient.ImportSshPublicKey(parent, sshPublicKey, projectId);

ImportSshPublicKeyAsync(UserName, SshPublicKey, CallSettings)

public virtual Task<ImportSshPublicKeyResponse> ImportSshPublicKeyAsync(UserName parent, SshPublicKey sshPublicKey, CallSettings callSettings = null)

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
parent UserName

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

sshPublicKey SshPublicKey

Required. The SSH public key and expiration time.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskImportSshPublicKeyResponse

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
UserName parent = UserName.FromUser("[USER]");
SshPublicKey sshPublicKey = new SshPublicKey();
// Make the request
ImportSshPublicKeyResponse response = await osLoginServiceClient.ImportSshPublicKeyAsync(parent, sshPublicKey);

ImportSshPublicKeyAsync(UserName, SshPublicKey, string, CallSettings)

public virtual Task<ImportSshPublicKeyResponse> ImportSshPublicKeyAsync(UserName parent, SshPublicKey sshPublicKey, string projectId, CallSettings callSettings = null)

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
parent UserName

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

sshPublicKey SshPublicKey

Required. The SSH public key and expiration time.

projectId string

The project ID of the Google Cloud Platform project.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskImportSshPublicKeyResponse

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
UserName parent = UserName.FromUser("[USER]");
SshPublicKey sshPublicKey = new SshPublicKey();
string projectId = "";
// Make the request
ImportSshPublicKeyResponse response = await osLoginServiceClient.ImportSshPublicKeyAsync(parent, sshPublicKey, projectId);

ImportSshPublicKeyAsync(UserName, SshPublicKey, string, CancellationToken)

public virtual Task<ImportSshPublicKeyResponse> ImportSshPublicKeyAsync(UserName parent, SshPublicKey sshPublicKey, string projectId, CancellationToken cancellationToken)

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
parent UserName

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

sshPublicKey SshPublicKey

Required. The SSH public key and expiration time.

projectId string

The project ID of the Google Cloud Platform project.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskImportSshPublicKeyResponse

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
UserName parent = UserName.FromUser("[USER]");
SshPublicKey sshPublicKey = new SshPublicKey();
string projectId = "";
// Make the request
ImportSshPublicKeyResponse response = await osLoginServiceClient.ImportSshPublicKeyAsync(parent, sshPublicKey, projectId);

ImportSshPublicKeyAsync(UserName, SshPublicKey, CancellationToken)

public virtual Task<ImportSshPublicKeyResponse> ImportSshPublicKeyAsync(UserName parent, SshPublicKey sshPublicKey, CancellationToken cancellationToken)

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
parent UserName

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

sshPublicKey SshPublicKey

Required. The SSH public key and expiration time.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskImportSshPublicKeyResponse

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
UserName parent = UserName.FromUser("[USER]");
SshPublicKey sshPublicKey = new SshPublicKey();
// Make the request
ImportSshPublicKeyResponse response = await osLoginServiceClient.ImportSshPublicKeyAsync(parent, sshPublicKey);

ImportSshPublicKeyAsync(ImportSshPublicKeyRequest, CallSettings)

public virtual Task<ImportSshPublicKeyResponse> ImportSshPublicKeyAsync(ImportSshPublicKeyRequest request, CallSettings callSettings = null)

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 ImportSshPublicKeyRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskImportSshPublicKeyResponse

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
ImportSshPublicKeyRequest request = new ImportSshPublicKeyRequest
{
    ParentAsUserName = UserName.FromUser("[USER]"),
    SshPublicKey = new SshPublicKey(),
    ProjectId = "",
    View = LoginProfileView.Unspecified,
    Regions = { "", },
};
// Make the request
ImportSshPublicKeyResponse response = await osLoginServiceClient.ImportSshPublicKeyAsync(request);

ImportSshPublicKeyAsync(ImportSshPublicKeyRequest, CancellationToken)

public virtual Task<ImportSshPublicKeyResponse> ImportSshPublicKeyAsync(ImportSshPublicKeyRequest request, CancellationToken cancellationToken)

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 ImportSshPublicKeyRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskImportSshPublicKeyResponse

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
ImportSshPublicKeyRequest request = new ImportSshPublicKeyRequest
{
    ParentAsUserName = UserName.FromUser("[USER]"),
    SshPublicKey = new SshPublicKey(),
    ProjectId = "",
    View = LoginProfileView.Unspecified,
    Regions = { "", },
};
// Make the request
ImportSshPublicKeyResponse response = await osLoginServiceClient.ImportSshPublicKeyAsync(request);

ImportSshPublicKeyAsync(string, SshPublicKey, CallSettings)

public virtual Task<ImportSshPublicKeyResponse> ImportSshPublicKeyAsync(string parent, SshPublicKey sshPublicKey, CallSettings callSettings = null)

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
parent string

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

sshPublicKey SshPublicKey

Required. The SSH public key and expiration time.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskImportSshPublicKeyResponse

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "users/[USER]";
SshPublicKey sshPublicKey = new SshPublicKey();
// Make the request
ImportSshPublicKeyResponse response = await osLoginServiceClient.ImportSshPublicKeyAsync(parent, sshPublicKey);

ImportSshPublicKeyAsync(string, SshPublicKey, string, CallSettings)

public virtual Task<ImportSshPublicKeyResponse> ImportSshPublicKeyAsync(string parent, SshPublicKey sshPublicKey, string projectId, CallSettings callSettings = null)

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
parent string

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

sshPublicKey SshPublicKey

Required. The SSH public key and expiration time.

projectId string

The project ID of the Google Cloud Platform project.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskImportSshPublicKeyResponse

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "users/[USER]";
SshPublicKey sshPublicKey = new SshPublicKey();
string projectId = "";
// Make the request
ImportSshPublicKeyResponse response = await osLoginServiceClient.ImportSshPublicKeyAsync(parent, sshPublicKey, projectId);

ImportSshPublicKeyAsync(string, SshPublicKey, string, CancellationToken)

public virtual Task<ImportSshPublicKeyResponse> ImportSshPublicKeyAsync(string parent, SshPublicKey sshPublicKey, string projectId, CancellationToken cancellationToken)

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
parent string

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

sshPublicKey SshPublicKey

Required. The SSH public key and expiration time.

projectId string

The project ID of the Google Cloud Platform project.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskImportSshPublicKeyResponse

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "users/[USER]";
SshPublicKey sshPublicKey = new SshPublicKey();
string projectId = "";
// Make the request
ImportSshPublicKeyResponse response = await osLoginServiceClient.ImportSshPublicKeyAsync(parent, sshPublicKey, projectId);

ImportSshPublicKeyAsync(string, SshPublicKey, CancellationToken)

public virtual Task<ImportSshPublicKeyResponse> ImportSshPublicKeyAsync(string parent, SshPublicKey sshPublicKey, CancellationToken cancellationToken)

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
parent string

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

sshPublicKey SshPublicKey

Required. The SSH public key and expiration time.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskImportSshPublicKeyResponse

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "users/[USER]";
SshPublicKey sshPublicKey = new SshPublicKey();
// Make the request
ImportSshPublicKeyResponse response = await osLoginServiceClient.ImportSshPublicKeyAsync(parent, sshPublicKey);

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
Type Description
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.

SignSshPublicKey(SignSshPublicKeyRequest, CallSettings)

public virtual SignSshPublicKeyResponse SignSshPublicKey(SignSshPublicKeyRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request SignSshPublicKeyRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
SignSshPublicKeyResponse

The RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.Create();
// Initialize request argument(s)
SignSshPublicKeyRequest request = new SignSshPublicKeyRequest
{
    SshPublicKey = "",
    Parent = "",
};
// Make the request
SignSshPublicKeyResponse response = osLoginServiceClient.SignSshPublicKey(request);

SignSshPublicKey(string, string, CallSettings)

public virtual SignSshPublicKeyResponse SignSshPublicKey(string parent, string sshPublicKey, CallSettings callSettings = null)

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

Parameters
Name Description
parent string

The parent project and zone for the signing request. This is needed to properly ensure per-organization ISS processing and potentially to provide for the possibility of zone-specific certificates used in the signing process.

sshPublicKey string

The SSH public key to sign.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
SignSshPublicKeyResponse

The RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.Create();
// Initialize request argument(s)
string parent = "";
string sshPublicKey = "";
// Make the request
SignSshPublicKeyResponse response = osLoginServiceClient.SignSshPublicKey(parent, sshPublicKey);

SignSshPublicKeyAsync(SignSshPublicKeyRequest, CallSettings)

public virtual Task<SignSshPublicKeyResponse> SignSshPublicKeyAsync(SignSshPublicKeyRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request SignSshPublicKeyRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSignSshPublicKeyResponse

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
SignSshPublicKeyRequest request = new SignSshPublicKeyRequest
{
    SshPublicKey = "",
    Parent = "",
};
// Make the request
SignSshPublicKeyResponse response = await osLoginServiceClient.SignSshPublicKeyAsync(request);

SignSshPublicKeyAsync(SignSshPublicKeyRequest, CancellationToken)

public virtual Task<SignSshPublicKeyResponse> SignSshPublicKeyAsync(SignSshPublicKeyRequest request, CancellationToken cancellationToken)

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

Parameters
Name Description
request SignSshPublicKeyRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSignSshPublicKeyResponse

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
SignSshPublicKeyRequest request = new SignSshPublicKeyRequest
{
    SshPublicKey = "",
    Parent = "",
};
// Make the request
SignSshPublicKeyResponse response = await osLoginServiceClient.SignSshPublicKeyAsync(request);

SignSshPublicKeyAsync(string, string, CallSettings)

public virtual Task<SignSshPublicKeyResponse> SignSshPublicKeyAsync(string parent, string sshPublicKey, CallSettings callSettings = null)

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

Parameters
Name Description
parent string

The parent project and zone for the signing request. This is needed to properly ensure per-organization ISS processing and potentially to provide for the possibility of zone-specific certificates used in the signing process.

sshPublicKey string

The SSH public key to sign.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSignSshPublicKeyResponse

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "";
string sshPublicKey = "";
// Make the request
SignSshPublicKeyResponse response = await osLoginServiceClient.SignSshPublicKeyAsync(parent, sshPublicKey);

SignSshPublicKeyAsync(string, string, CancellationToken)

public virtual Task<SignSshPublicKeyResponse> SignSshPublicKeyAsync(string parent, string sshPublicKey, CancellationToken cancellationToken)

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

Parameters
Name Description
parent string

The parent project and zone for the signing request. This is needed to properly ensure per-organization ISS processing and potentially to provide for the possibility of zone-specific certificates used in the signing process.

sshPublicKey string

The SSH public key to sign.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSignSshPublicKeyResponse

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "";
string sshPublicKey = "";
// Make the request
SignSshPublicKeyResponse response = await osLoginServiceClient.SignSshPublicKeyAsync(parent, sshPublicKey);

UpdateSshPublicKey(SshPublicKeyName, SshPublicKey, CallSettings)

public virtual SshPublicKey UpdateSshPublicKey(SshPublicKeyName name, SshPublicKey sshPublicKey, CallSettings callSettings = null)

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

Parameters
Name Description
name SshPublicKeyName

Required. The fingerprint of the public key to update. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format users/{user}/sshPublicKeys/{fingerprint}.

sshPublicKey SshPublicKey

Required. The SSH public key and expiration time.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
SshPublicKey

The RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.Create();
// Initialize request argument(s)
SshPublicKeyName name = SshPublicKeyName.FromUserFingerprint("[USER]", "[FINGERPRINT]");
SshPublicKey sshPublicKey = new SshPublicKey();
// Make the request
SshPublicKey response = osLoginServiceClient.UpdateSshPublicKey(name, sshPublicKey);

UpdateSshPublicKey(SshPublicKeyName, SshPublicKey, FieldMask, CallSettings)

public virtual SshPublicKey UpdateSshPublicKey(SshPublicKeyName name, SshPublicKey sshPublicKey, FieldMask updateMask, CallSettings callSettings = null)

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

Parameters
Name Description
name SshPublicKeyName

Required. The fingerprint of the public key to update. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format users/{user}/sshPublicKeys/{fingerprint}.

sshPublicKey SshPublicKey

Required. The SSH public key and expiration time.

updateMask FieldMask

Mask to control which fields get updated. Updates all if not present.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
SshPublicKey

The RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.Create();
// Initialize request argument(s)
SshPublicKeyName name = SshPublicKeyName.FromUserFingerprint("[USER]", "[FINGERPRINT]");
SshPublicKey sshPublicKey = new SshPublicKey();
FieldMask updateMask = new FieldMask();
// Make the request
SshPublicKey response = osLoginServiceClient.UpdateSshPublicKey(name, sshPublicKey, updateMask);

UpdateSshPublicKey(UpdateSshPublicKeyRequest, CallSettings)

public virtual SshPublicKey UpdateSshPublicKey(UpdateSshPublicKeyRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request UpdateSshPublicKeyRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
SshPublicKey

The RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.Create();
// Initialize request argument(s)
UpdateSshPublicKeyRequest request = new UpdateSshPublicKeyRequest
{
    SshPublicKeyName = SshPublicKeyName.FromUserFingerprint("[USER]", "[FINGERPRINT]"),
    SshPublicKey = new SshPublicKey(),
    UpdateMask = new FieldMask(),
};
// Make the request
SshPublicKey response = osLoginServiceClient.UpdateSshPublicKey(request);

UpdateSshPublicKey(string, SshPublicKey, CallSettings)

public virtual SshPublicKey UpdateSshPublicKey(string name, SshPublicKey sshPublicKey, CallSettings callSettings = null)

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

Parameters
Name Description
name string

Required. The fingerprint of the public key to update. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format users/{user}/sshPublicKeys/{fingerprint}.

sshPublicKey SshPublicKey

Required. The SSH public key and expiration time.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
SshPublicKey

The RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.Create();
// Initialize request argument(s)
string name = "users/[USER]/sshPublicKeys/[FINGERPRINT]";
SshPublicKey sshPublicKey = new SshPublicKey();
// Make the request
SshPublicKey response = osLoginServiceClient.UpdateSshPublicKey(name, sshPublicKey);

UpdateSshPublicKey(string, SshPublicKey, FieldMask, CallSettings)

public virtual SshPublicKey UpdateSshPublicKey(string name, SshPublicKey sshPublicKey, FieldMask updateMask, CallSettings callSettings = null)

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

Parameters
Name Description
name string

Required. The fingerprint of the public key to update. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format users/{user}/sshPublicKeys/{fingerprint}.

sshPublicKey SshPublicKey

Required. The SSH public key and expiration time.

updateMask FieldMask

Mask to control which fields get updated. Updates all if not present.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
SshPublicKey

The RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = OsLoginServiceClient.Create();
// Initialize request argument(s)
string name = "users/[USER]/sshPublicKeys/[FINGERPRINT]";
SshPublicKey sshPublicKey = new SshPublicKey();
FieldMask updateMask = new FieldMask();
// Make the request
SshPublicKey response = osLoginServiceClient.UpdateSshPublicKey(name, sshPublicKey, updateMask);

UpdateSshPublicKeyAsync(SshPublicKeyName, SshPublicKey, CallSettings)

public virtual Task<SshPublicKey> UpdateSshPublicKeyAsync(SshPublicKeyName name, SshPublicKey sshPublicKey, CallSettings callSettings = null)

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

Parameters
Name Description
name SshPublicKeyName

Required. The fingerprint of the public key to update. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format users/{user}/sshPublicKeys/{fingerprint}.

sshPublicKey SshPublicKey

Required. The SSH public key and expiration time.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSshPublicKey

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
SshPublicKeyName name = SshPublicKeyName.FromUserFingerprint("[USER]", "[FINGERPRINT]");
SshPublicKey sshPublicKey = new SshPublicKey();
// Make the request
SshPublicKey response = await osLoginServiceClient.UpdateSshPublicKeyAsync(name, sshPublicKey);

UpdateSshPublicKeyAsync(SshPublicKeyName, SshPublicKey, FieldMask, CallSettings)

public virtual Task<SshPublicKey> UpdateSshPublicKeyAsync(SshPublicKeyName name, SshPublicKey sshPublicKey, FieldMask updateMask, CallSettings callSettings = null)

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

Parameters
Name Description
name SshPublicKeyName

Required. The fingerprint of the public key to update. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format users/{user}/sshPublicKeys/{fingerprint}.

sshPublicKey SshPublicKey

Required. The SSH public key and expiration time.

updateMask FieldMask

Mask to control which fields get updated. Updates all if not present.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSshPublicKey

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
SshPublicKeyName name = SshPublicKeyName.FromUserFingerprint("[USER]", "[FINGERPRINT]");
SshPublicKey sshPublicKey = new SshPublicKey();
FieldMask updateMask = new FieldMask();
// Make the request
SshPublicKey response = await osLoginServiceClient.UpdateSshPublicKeyAsync(name, sshPublicKey, updateMask);

UpdateSshPublicKeyAsync(SshPublicKeyName, SshPublicKey, FieldMask, CancellationToken)

public virtual Task<SshPublicKey> UpdateSshPublicKeyAsync(SshPublicKeyName name, SshPublicKey sshPublicKey, FieldMask updateMask, CancellationToken cancellationToken)

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

Parameters
Name Description
name SshPublicKeyName

Required. The fingerprint of the public key to update. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format users/{user}/sshPublicKeys/{fingerprint}.

sshPublicKey SshPublicKey

Required. The SSH public key and expiration time.

updateMask FieldMask

Mask to control which fields get updated. Updates all if not present.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSshPublicKey

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
SshPublicKeyName name = SshPublicKeyName.FromUserFingerprint("[USER]", "[FINGERPRINT]");
SshPublicKey sshPublicKey = new SshPublicKey();
FieldMask updateMask = new FieldMask();
// Make the request
SshPublicKey response = await osLoginServiceClient.UpdateSshPublicKeyAsync(name, sshPublicKey, updateMask);

UpdateSshPublicKeyAsync(SshPublicKeyName, SshPublicKey, CancellationToken)

public virtual Task<SshPublicKey> UpdateSshPublicKeyAsync(SshPublicKeyName name, SshPublicKey sshPublicKey, CancellationToken cancellationToken)

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

Parameters
Name Description
name SshPublicKeyName

Required. The fingerprint of the public key to update. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format users/{user}/sshPublicKeys/{fingerprint}.

sshPublicKey SshPublicKey

Required. The SSH public key and expiration time.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSshPublicKey

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
SshPublicKeyName name = SshPublicKeyName.FromUserFingerprint("[USER]", "[FINGERPRINT]");
SshPublicKey sshPublicKey = new SshPublicKey();
// Make the request
SshPublicKey response = await osLoginServiceClient.UpdateSshPublicKeyAsync(name, sshPublicKey);

UpdateSshPublicKeyAsync(UpdateSshPublicKeyRequest, CallSettings)

public virtual Task<SshPublicKey> UpdateSshPublicKeyAsync(UpdateSshPublicKeyRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request UpdateSshPublicKeyRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSshPublicKey

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateSshPublicKeyRequest request = new UpdateSshPublicKeyRequest
{
    SshPublicKeyName = SshPublicKeyName.FromUserFingerprint("[USER]", "[FINGERPRINT]"),
    SshPublicKey = new SshPublicKey(),
    UpdateMask = new FieldMask(),
};
// Make the request
SshPublicKey response = await osLoginServiceClient.UpdateSshPublicKeyAsync(request);

UpdateSshPublicKeyAsync(UpdateSshPublicKeyRequest, CancellationToken)

public virtual Task<SshPublicKey> UpdateSshPublicKeyAsync(UpdateSshPublicKeyRequest request, CancellationToken cancellationToken)

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

Parameters
Name Description
request UpdateSshPublicKeyRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSshPublicKey

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateSshPublicKeyRequest request = new UpdateSshPublicKeyRequest
{
    SshPublicKeyName = SshPublicKeyName.FromUserFingerprint("[USER]", "[FINGERPRINT]"),
    SshPublicKey = new SshPublicKey(),
    UpdateMask = new FieldMask(),
};
// Make the request
SshPublicKey response = await osLoginServiceClient.UpdateSshPublicKeyAsync(request);

UpdateSshPublicKeyAsync(string, SshPublicKey, CallSettings)

public virtual Task<SshPublicKey> UpdateSshPublicKeyAsync(string name, SshPublicKey sshPublicKey, CallSettings callSettings = null)

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

Parameters
Name Description
name string

Required. The fingerprint of the public key to update. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format users/{user}/sshPublicKeys/{fingerprint}.

sshPublicKey SshPublicKey

Required. The SSH public key and expiration time.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSshPublicKey

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "users/[USER]/sshPublicKeys/[FINGERPRINT]";
SshPublicKey sshPublicKey = new SshPublicKey();
// Make the request
SshPublicKey response = await osLoginServiceClient.UpdateSshPublicKeyAsync(name, sshPublicKey);

UpdateSshPublicKeyAsync(string, SshPublicKey, FieldMask, CallSettings)

public virtual Task<SshPublicKey> UpdateSshPublicKeyAsync(string name, SshPublicKey sshPublicKey, FieldMask updateMask, CallSettings callSettings = null)

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

Parameters
Name Description
name string

Required. The fingerprint of the public key to update. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format users/{user}/sshPublicKeys/{fingerprint}.

sshPublicKey SshPublicKey

Required. The SSH public key and expiration time.

updateMask FieldMask

Mask to control which fields get updated. Updates all if not present.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSshPublicKey

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "users/[USER]/sshPublicKeys/[FINGERPRINT]";
SshPublicKey sshPublicKey = new SshPublicKey();
FieldMask updateMask = new FieldMask();
// Make the request
SshPublicKey response = await osLoginServiceClient.UpdateSshPublicKeyAsync(name, sshPublicKey, updateMask);

UpdateSshPublicKeyAsync(string, SshPublicKey, FieldMask, CancellationToken)

public virtual Task<SshPublicKey> UpdateSshPublicKeyAsync(string name, SshPublicKey sshPublicKey, FieldMask updateMask, CancellationToken cancellationToken)

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

Parameters
Name Description
name string

Required. The fingerprint of the public key to update. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format users/{user}/sshPublicKeys/{fingerprint}.

sshPublicKey SshPublicKey

Required. The SSH public key and expiration time.

updateMask FieldMask

Mask to control which fields get updated. Updates all if not present.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSshPublicKey

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "users/[USER]/sshPublicKeys/[FINGERPRINT]";
SshPublicKey sshPublicKey = new SshPublicKey();
FieldMask updateMask = new FieldMask();
// Make the request
SshPublicKey response = await osLoginServiceClient.UpdateSshPublicKeyAsync(name, sshPublicKey, updateMask);

UpdateSshPublicKeyAsync(string, SshPublicKey, CancellationToken)

public virtual Task<SshPublicKey> UpdateSshPublicKeyAsync(string name, SshPublicKey sshPublicKey, CancellationToken cancellationToken)

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

Parameters
Name Description
name string

Required. The fingerprint of the public key to update. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format users/{user}/sshPublicKeys/{fingerprint}.

sshPublicKey SshPublicKey

Required. The SSH public key and expiration time.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSshPublicKey

A Task containing the RPC response.

Example
// Create client
OsLoginServiceClient osLoginServiceClient = await OsLoginServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "users/[USER]/sshPublicKeys/[FINGERPRINT]";
SshPublicKey sshPublicKey = new SshPublicKey();
// Make the request
SshPublicKey response = await osLoginServiceClient.UpdateSshPublicKeyAsync(name, sshPublicKey);