# Cloud OS Login V1 API - Class Google::Cloud::OsLogin::V1::ImportSshPublicKeyRequest (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::ImportSshPublicKeyRequest.

A request message for importing an SSH public key.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #parent

    def parent() -> ::String

**Returns**

- (::String) --- Required. The unique ID for the user in format `users/{user}`.

### #parent=

    def parent=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. The unique ID for the user in format `users/{user}`.
**Returns**

- (::String) --- Required. The unique ID for the user in format `users/{user}`.

### #project_id

    def project_id() -> ::String

**Returns**

- (::String) --- The project ID of the Google Cloud Platform project.

### #project_id=

    def project_id=(value) -> ::String

**Parameter**

- **value** (::String) --- The project ID of the Google Cloud Platform project.
**Returns**

- (::String) --- The project ID of the Google Cloud Platform project.

### #regions

    def regions() -> ::Array<::String>

**Returns**

- (::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.

### #regions=

    def regions=(value) -> ::Array<::String>

**Parameter**

- **value** (::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.
**Returns**

- (::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.

### #ssh_public_key

    def ssh_public_key() -> ::Google::Cloud::OsLogin::Common::SshPublicKey

**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)) --- Optional. The SSH public key and expiration time.

### #ssh_public_key=

    def ssh_public_key=(value) -> ::Google::Cloud::OsLogin::Common::SshPublicKey

**Parameter**

- **value** ([::Google::Cloud::OsLogin::Common::SshPublicKey](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest/Google-Cloud-OsLogin-Common-SshPublicKey)) --- Optional. The SSH public key and expiration time.
**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)) --- Optional. The SSH public key and expiration time.