# Cloud OS Login V1 API - Class Google::Cloud::OsLogin::V1::OsLoginService::Client (v1.7.0)

1.7.0 (latest) 1.6.1 1.5.0 1.4.1 1.3.0 1.2.2 1.1.0 1.0.1 0.12.0 0.11.2 0.10.0 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.5 Reference documentation and code samples for the Cloud OS Login V1 API class Google::Cloud::OsLogin::V1::OsLoginService::Client.

Client for the OsLoginService service.


Cloud OS Login API

<br />

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.

## Inherits

- Object

## Includes

- [Google::Cloud::OsLogin::V1::OsLoginService::Paths](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-V1-OsLoginService-Paths)

## Methods

### .configure

    def self.configure() { |config| ... } -> Client::Configuration

Configure the OsLoginService Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-V1-OsLoginService-Client-Configuration "Google::Cloud::OsLogin::V1::OsLoginService::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-V1-OsLoginService-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-V1-OsLoginService-Client-Configuration))
**Example**

```ruby
# Modify the configuration for all OsLoginService clients
::Google::Cloud::OsLogin::V1::OsLoginService::Client.configure do |config|
  config.timeout = 10.0
end
```

### #configure

    def configure() { |config| ... } -> Client::Configuration

Configure the OsLoginService Client instance.


The configuration is set to the derived mode, meaning that values can be changed,
but structural changes (adding new fields, etc.) are not allowed. Structural changes
should be made on [Client.configure](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-V1-OsLoginService-Client#Google__Cloud__OsLogin__V1__OsLoginService__Client_configure_class_ "Google::Cloud::OsLogin::V1::OsLoginService::Client.configure (method)").

<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-V1-OsLoginService-Client-Configuration "Google::Cloud::OsLogin::V1::OsLoginService::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-V1-OsLoginService-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-V1-OsLoginService-Client-Configuration))

### #create_ssh_public_key

    def create_ssh_public_key(request, options = nil) -> ::Google::Cloud::OsLogin::Common::SshPublicKey
    def create_ssh_public_key(parent: nil, ssh_public_key: nil) -> ::Google::Cloud::OsLogin::Common::SshPublicKey

Create an SSH public key
**Overloads**

    def create_ssh_public_key(request, options = nil) -> ::Google::Cloud::OsLogin::Common::SshPublicKey

Pass arguments to `create_ssh_public_key` via a request object, either of type [CreateSshPublicKeyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-V1-CreateSshPublicKeyRequest "Google::Cloud::OsLogin::V1::CreateSshPublicKeyRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::OsLogin::V1::CreateSshPublicKeyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-V1-CreateSshPublicKeyRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def create_ssh_public_key(parent: nil, ssh_public_key: nil) -> ::Google::Cloud::OsLogin::Common::SshPublicKey

Pass arguments to `create_ssh_public_key` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **parent** (::String) --- Required. The unique ID for the user in format `users/{user}`.
- **ssh_public_key** ([::Google::Cloud::OsLogin::Common::SshPublicKey](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-Common-SshPublicKey), ::Hash) --- Required. The SSH public key and expiration time.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::OsLogin::Common::SshPublicKey](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-Common-SshPublicKey))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::OsLogin::Common::SshPublicKey](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-Common-SshPublicKey))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/os_login/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::OsLogin::V1::OsLoginService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::OsLogin::V1::CreateSshPublicKeyRequest.new

# Call the create_ssh_public_key method.
result = client.create_ssh_public_key request

# The returned object is of type Google::Cloud::OsLogin::Common::SshPublicKey.
p result
```

### #delete_posix_account

    def delete_posix_account(request, options = nil) -> ::Google::Protobuf::Empty
    def delete_posix_account(name: nil) -> ::Google::Protobuf::Empty

Deletes a POSIX account.
**Overloads**

    def delete_posix_account(request, options = nil) -> ::Google::Protobuf::Empty

Pass arguments to `delete_posix_account` via a request object, either of type [DeletePosixAccountRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-V1-DeletePosixAccountRequest "Google::Cloud::OsLogin::V1::DeletePosixAccountRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::OsLogin::V1::DeletePosixAccountRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-V1-DeletePosixAccountRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def delete_posix_account(name: nil) -> ::Google::Protobuf::Empty

Pass arguments to `delete_posix_account` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameter**

- **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}`.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Protobuf::Empty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Protobuf-Empty))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Protobuf::Empty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Protobuf-Empty))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/os_login/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::OsLogin::V1::OsLoginService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::OsLogin::V1::DeletePosixAccountRequest.new

# Call the delete_posix_account method.
result = client.delete_posix_account request

# The returned object is of type Google::Protobuf::Empty.
p result
```

### #delete_ssh_public_key

    def delete_ssh_public_key(request, options = nil) -> ::Google::Protobuf::Empty
    def delete_ssh_public_key(name: nil) -> ::Google::Protobuf::Empty

Deletes an SSH public key.
**Overloads**

    def delete_ssh_public_key(request, options = nil) -> ::Google::Protobuf::Empty

Pass arguments to `delete_ssh_public_key` via a request object, either of type [DeleteSshPublicKeyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-V1-DeleteSshPublicKeyRequest "Google::Cloud::OsLogin::V1::DeleteSshPublicKeyRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::OsLogin::V1::DeleteSshPublicKeyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-V1-DeleteSshPublicKeyRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def delete_ssh_public_key(name: nil) -> ::Google::Protobuf::Empty

Pass arguments to `delete_ssh_public_key` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameter**

- **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}`.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Protobuf::Empty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Protobuf-Empty))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Protobuf::Empty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Protobuf-Empty))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/os_login/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::OsLogin::V1::OsLoginService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::OsLogin::V1::DeleteSshPublicKeyRequest.new

# Call the delete_ssh_public_key method.
result = client.delete_ssh_public_key request

# The returned object is of type Google::Protobuf::Empty.
p result
```

### #get_login_profile

    def get_login_profile(request, options = nil) -> ::Google::Cloud::OsLogin::V1::LoginProfile
    def get_login_profile(name: nil, project_id: nil, system_id: nil) -> ::Google::Cloud::OsLogin::V1::LoginProfile

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

    def get_login_profile(request, options = nil) -> ::Google::Cloud::OsLogin::V1::LoginProfile

Pass arguments to `get_login_profile` via a request object, either of type [GetLoginProfileRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-V1-GetLoginProfileRequest "Google::Cloud::OsLogin::V1::GetLoginProfileRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::OsLogin::V1::GetLoginProfileRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-V1-GetLoginProfileRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def get_login_profile(name: nil, project_id: nil, system_id: nil) -> ::Google::Cloud::OsLogin::V1::LoginProfile

Pass arguments to `get_login_profile` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **name** (::String) --- Required. The unique ID for the user in format `users/{user}`.
- **project_id** (::String) --- The project ID of the Google Cloud Platform project.
- **system_id** (::String) --- A system ID for filtering the results of the request.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::OsLogin::V1::LoginProfile](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-V1-LoginProfile))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::OsLogin::V1::LoginProfile](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-V1-LoginProfile))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/os_login/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::OsLogin::V1::OsLoginService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::OsLogin::V1::GetLoginProfileRequest.new

# Call the get_login_profile method.
result = client.get_login_profile request

# The returned object is of type Google::Cloud::OsLogin::V1::LoginProfile.
p result
```

### #get_ssh_public_key

    def get_ssh_public_key(request, options = nil) -> ::Google::Cloud::OsLogin::Common::SshPublicKey
    def get_ssh_public_key(name: nil) -> ::Google::Cloud::OsLogin::Common::SshPublicKey

Retrieves an SSH public key.
**Overloads**

    def get_ssh_public_key(request, options = nil) -> ::Google::Cloud::OsLogin::Common::SshPublicKey

Pass arguments to `get_ssh_public_key` via a request object, either of type [GetSshPublicKeyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-V1-GetSshPublicKeyRequest "Google::Cloud::OsLogin::V1::GetSshPublicKeyRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::OsLogin::V1::GetSshPublicKeyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-V1-GetSshPublicKeyRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def get_ssh_public_key(name: nil) -> ::Google::Cloud::OsLogin::Common::SshPublicKey

Pass arguments to `get_ssh_public_key` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameter**

- **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}`.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::OsLogin::Common::SshPublicKey](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-Common-SshPublicKey))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::OsLogin::Common::SshPublicKey](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-Common-SshPublicKey))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/os_login/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::OsLogin::V1::OsLoginService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::OsLogin::V1::GetSshPublicKeyRequest.new

# Call the get_ssh_public_key method.
result = client.get_ssh_public_key request

# The returned object is of type Google::Cloud::OsLogin::Common::SshPublicKey.
p result
```

### #import_ssh_public_key

    def import_ssh_public_key(request, options = nil) -> ::Google::Cloud::OsLogin::V1::ImportSshPublicKeyResponse
    def import_ssh_public_key(parent: nil, ssh_public_key: nil, project_id: nil, regions: nil) -> ::Google::Cloud::OsLogin::V1::ImportSshPublicKeyResponse

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.
**Overloads**

    def import_ssh_public_key(request, options = nil) -> ::Google::Cloud::OsLogin::V1::ImportSshPublicKeyResponse

Pass arguments to `import_ssh_public_key` via a request object, either of type [ImportSshPublicKeyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-V1-ImportSshPublicKeyRequest "Google::Cloud::OsLogin::V1::ImportSshPublicKeyRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::OsLogin::V1::ImportSshPublicKeyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-V1-ImportSshPublicKeyRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def import_ssh_public_key(parent: nil, ssh_public_key: nil, project_id: nil, regions: nil) -> ::Google::Cloud::OsLogin::V1::ImportSshPublicKeyResponse

Pass arguments to `import_ssh_public_key` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **parent** (::String) --- Required. The unique ID for the user in format `users/{user}`.
- **ssh_public_key** ([::Google::Cloud::OsLogin::Common::SshPublicKey](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-Common-SshPublicKey), ::Hash) --- Optional. The SSH public key and expiration time.
- **project_id** (::String) --- The project ID of the Google Cloud Platform project.
- **regions** (::Array\<::String\>) --- Optional. The regions to which to assert that the key was written. If unspecified, defaults to all regions. Regions are listed at https://cloud.google.com/about/locations#region.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::OsLogin::V1::ImportSshPublicKeyResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-V1-ImportSshPublicKeyResponse))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::OsLogin::V1::ImportSshPublicKeyResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-V1-ImportSshPublicKeyResponse))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/os_login/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::OsLogin::V1::OsLoginService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::OsLogin::V1::ImportSshPublicKeyRequest.new

# Call the import_ssh_public_key method.
result = client.import_ssh_public_key request

# The returned object is of type Google::Cloud::OsLogin::V1::ImportSshPublicKeyResponse.
p result
```

### #initialize

    def initialize() { |config| ... } -> Client

Create a new OsLoginService client object.
**Yields**

- (config) --- Configure the OsLoginService client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-V1-OsLoginService-Client-Configuration))
**Returns**

- ([Client](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-V1-OsLoginService-Client)) --- a new instance of Client
**Example**

```ruby
# Create a client using the default configuration
client = ::Google::Cloud::OsLogin::V1::OsLoginService::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::OsLogin::V1::OsLoginService::Client.new do |config|
  config.timeout = 10.0
end
```

### #logger

    def logger() -> Logger

The logger used for request/response debug logging.
**Returns**

- (Logger)

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)

### #update_ssh_public_key

    def update_ssh_public_key(request, options = nil) -> ::Google::Cloud::OsLogin::Common::SshPublicKey
    def update_ssh_public_key(name: nil, ssh_public_key: nil, update_mask: nil) -> ::Google::Cloud::OsLogin::Common::SshPublicKey

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

    def update_ssh_public_key(request, options = nil) -> ::Google::Cloud::OsLogin::Common::SshPublicKey

Pass arguments to `update_ssh_public_key` via a request object, either of type [UpdateSshPublicKeyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-V1-UpdateSshPublicKeyRequest "Google::Cloud::OsLogin::V1::UpdateSshPublicKeyRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::OsLogin::V1::UpdateSshPublicKeyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-V1-UpdateSshPublicKeyRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

    def update_ssh_public_key(name: nil, ssh_public_key: nil, update_mask: nil) -> ::Google::Cloud::OsLogin::Common::SshPublicKey

Pass arguments to `update_ssh_public_key` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **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}`.
- **ssh_public_key** ([::Google::Cloud::OsLogin::Common::SshPublicKey](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-Common-SshPublicKey), ::Hash) --- Required. The SSH public key and expiration time.
- **update_mask** ([::Google::Protobuf::FieldMask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Protobuf-FieldMask), ::Hash) --- Mask to control which fields get updated. Updates all if not present.
**Yields**

- (response, operation) --- Access the result along with the RPC operation
**Yield Parameters**

- **response** ([::Google::Cloud::OsLogin::Common::SshPublicKey](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-Common-SshPublicKey))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::OsLogin::Common::SshPublicKey](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-Common-SshPublicKey))
**Raises**

- (::Google::Cloud::Error) --- if the RPC is aborted.
**Example**

Basic example

```ruby
require "google/cloud/os_login/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::OsLogin::V1::OsLoginService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::OsLogin::V1::UpdateSshPublicKeyRequest.new

# Call the update_ssh_public_key method.
result = client.update_ssh_public_key request

# The returned object is of type Google::Cloud::OsLogin::Common::SshPublicKey.
p result
```