# Parallelstore V1 API - Class Google::Cloud::Parallelstore::V1::Parallelstore::Rest::Client (v1.8.0)

1.8.0 (latest) 1.7.1 1.6.0 1.5.0 1.4.1 1.3.0 1.2.0 1.1.2 1.0.0 0.3.0 0.2.1 0.1.0 Reference documentation and code samples for the Parallelstore V1 API class Google::Cloud::Parallelstore::V1::Parallelstore::Rest::Client.

REST client for the Parallelstore service.

Service describing handlers for resources
Configures and manages parallelstore resources.

Parallelstore service.

The `parallelstore.googleapis.com` service implements the parallelstore API
and defines the following resource model for managing instances:

- The service works with a collection of cloud projects, named: `/projects/`
- Each project has a collection of available locations, named: `/locations/`
- Each location has a collection of instances named `/instances/*`.
- Parallelstore instances are resources of the form: `/projects/{project_id}/locations/{location_id}/instances/{instance_id}`

Note that location_id must be a Google Cloud `zone`; for example:

- `projects/12345/locations/us-central1-c/instances/my-parallelstore-share`

## Inherits

- Object

## Includes

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

## Methods

### .configure

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

Configure the Parallelstore Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-parallelstore-v1/latest/Google-Cloud-Parallelstore-V1-Parallelstore-Rest-Client-Configuration "Google::Cloud::Parallelstore::V1::Parallelstore::Rest::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-parallelstore-v1/latest/Google-Cloud-Parallelstore-V1-Parallelstore-Rest-Client-Configuration))
**Returns**

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

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

### #configure

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

Configure the Parallelstore 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-parallelstore-v1/latest/Google-Cloud-Parallelstore-V1-Parallelstore-Rest-Client#Google__Cloud__Parallelstore__V1__Parallelstore__Rest__Client_configure_class_ "Google::Cloud::Parallelstore::V1::Parallelstore::Rest::Client.configure (method)").

<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-parallelstore-v1/latest/Google-Cloud-Parallelstore-V1-Parallelstore-Rest-Client-Configuration "Google::Cloud::Parallelstore::V1::Parallelstore::Rest::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-parallelstore-v1/latest/Google-Cloud-Parallelstore-V1-Parallelstore-Rest-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-parallelstore-v1/latest/Google-Cloud-Parallelstore-V1-Parallelstore-Rest-Client-Configuration))

### #create_instance

    def create_instance(request, options = nil) -> ::Gapic::Operation
    def create_instance(parent: nil, instance_id: nil, instance: nil, request_id: nil) -> ::Gapic::Operation

Creates a Parallelstore instance in a given project and location.
**Overloads**

    def create_instance(request, options = nil) -> ::Gapic::Operation

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

- **request** ([::Google::Cloud::Parallelstore::V1::CreateInstanceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-parallelstore-v1/latest/Google-Cloud-Parallelstore-V1-CreateInstanceRequest), ::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_instance(parent: nil, instance_id: nil, instance: nil, request_id: nil) -> ::Gapic::Operation

Pass arguments to `create_instance` 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 instance's project and location, in the format `projects/{project}/locations/{location}`. Locations map to Google Cloud zones; for example, `us-west1-b`.
- **instance_id** (::String) ---

  Required. The name of the Parallelstore instance.
  - Must contain only lowercase letters, numbers, and hyphens.
  - Must start with a letter.
  - Must be between 1-63 characters.
  - Must end with a number or a letter.
  - Must be unique within the customer project / location
- **instance** ([::Google::Cloud::Parallelstore::V1::Instance](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-parallelstore-v1/latest/Google-Cloud-Parallelstore-V1-Instance), ::Hash) --- Required. The instance to create.
- **request_id** (::String) --- Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.


  For example, consider a situation where you make an initial request and
  the request times out. If you make the request again with the same request
  ID, the server can check if original operation with the same request ID
  was received, and if so, will ignore the second request. This prevents
  clients from accidentally creating duplicate commitments.

  The request ID must be a valid UUID with the exception that zero UUID is
  not supported (00000000-0000-0000-0000-000000000000).
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** (::Gapic::Operation)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Operation)
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end
```

### #delete_instance

    def delete_instance(request, options = nil) -> ::Gapic::Operation
    def delete_instance(name: nil, request_id: nil) -> ::Gapic::Operation

Deletes a single instance.
**Overloads**

    def delete_instance(request, options = nil) -> ::Gapic::Operation

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

- **request** ([::Google::Cloud::Parallelstore::V1::DeleteInstanceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-parallelstore-v1/latest/Google-Cloud-Parallelstore-V1-DeleteInstanceRequest), ::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_instance(name: nil, request_id: nil) -> ::Gapic::Operation

Pass arguments to `delete_instance` 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. Name of the resource
- **request_id** (::String) --- Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.


  For example, consider a situation where you make an initial request and
  the request times out. If you make the request again with the same request
  ID, the server can check if original operation with the same request ID
  was received, and if so, will ignore the second request. This prevents
  clients from accidentally creating duplicate commitments.

  The request ID must be a valid UUID with the exception that zero UUID is
  not supported (00000000-0000-0000-0000-000000000000).
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** (::Gapic::Operation)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Operation)
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end
```

### #export_data

    def export_data(request, options = nil) -> ::Gapic::Operation
    def export_data(source_parallelstore: nil, destination_gcs_bucket: nil, name: nil, request_id: nil, service_account: nil, metadata_options: nil) -> ::Gapic::Operation

Copies data from Parallelstore to Cloud Storage.
**Overloads**

    def export_data(request, options = nil) -> ::Gapic::Operation

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

- **request** ([::Google::Cloud::Parallelstore::V1::ExportDataRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-parallelstore-v1/latest/Google-Cloud-Parallelstore-V1-ExportDataRequest), ::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 export_data(source_parallelstore: nil, destination_gcs_bucket: nil, name: nil, request_id: nil, service_account: nil, metadata_options: nil) -> ::Gapic::Operation

Pass arguments to `export_data` 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**

- **source_parallelstore** ([::Google::Cloud::Parallelstore::V1::SourceParallelstore](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-parallelstore-v1/latest/Google-Cloud-Parallelstore-V1-SourceParallelstore), ::Hash) --- Parallelstore source.
- **destination_gcs_bucket** ([::Google::Cloud::Parallelstore::V1::DestinationGcsBucket](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-parallelstore-v1/latest/Google-Cloud-Parallelstore-V1-DestinationGcsBucket), ::Hash) --- Cloud Storage destination.
- **name** (::String) --- Required. Name of the resource.
- **request_id** (::String) --- Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.


  For example, consider a situation where you make an initial request and
  the request times out. If you make the request again with the same request
  ID, the server can check if original operation with the same request ID
  was received, and if so, will ignore the second request. This prevents
  clients from accidentally creating duplicate commitments.

  The request ID must be a valid UUID with the exception that zero UUID is
  not supported (00000000-0000-0000-0000-000000000000).
- **service_account** (::String) --- Optional. User-specified Service Account (SA) credentials to be used when performing the transfer. Use one of the following formats:


  - `{EMAIL_ADDRESS_OR_UNIQUE_ID}`
  - `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}`
  - `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}`

  If unspecified, the Parallelstore service agent is used:
  `service-<PROJECT_NUMBER>@gcp-sa-parallelstore.iam.gserviceaccount.com`
- **metadata_options** ([::Google::Cloud::Parallelstore::V1::TransferMetadataOptions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-parallelstore-v1/latest/Google-Cloud-Parallelstore-V1-TransferMetadataOptions), ::Hash) --- Optional. The metadata options for the export data.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** (::Gapic::Operation)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Operation)
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end
```

### #get_instance

    def get_instance(request, options = nil) -> ::Google::Cloud::Parallelstore::V1::Instance
    def get_instance(name: nil) -> ::Google::Cloud::Parallelstore::V1::Instance

Gets details of a single instance.
**Overloads**

    def get_instance(request, options = nil) -> ::Google::Cloud::Parallelstore::V1::Instance

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

- **request** ([::Google::Cloud::Parallelstore::V1::GetInstanceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-parallelstore-v1/latest/Google-Cloud-Parallelstore-V1-GetInstanceRequest), ::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_instance(name: nil) -> ::Google::Cloud::Parallelstore::V1::Instance

Pass arguments to `get_instance` 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 instance resource name, in the format `projects/{project_id}/locations/{location}/instances/{instance_id}`.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::Parallelstore::V1::Instance](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-parallelstore-v1/latest/Google-Cloud-Parallelstore-V1-Instance))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::Parallelstore::V1::Instance](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-parallelstore-v1/latest/Google-Cloud-Parallelstore-V1-Instance))
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::Parallelstore::V1::Instance.
p result
```

### #import_data

    def import_data(request, options = nil) -> ::Gapic::Operation
    def import_data(source_gcs_bucket: nil, destination_parallelstore: nil, name: nil, request_id: nil, service_account: nil, metadata_options: nil) -> ::Gapic::Operation

Copies data from Cloud Storage to Parallelstore.
**Overloads**

    def import_data(request, options = nil) -> ::Gapic::Operation

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

- **request** ([::Google::Cloud::Parallelstore::V1::ImportDataRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-parallelstore-v1/latest/Google-Cloud-Parallelstore-V1-ImportDataRequest), ::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_data(source_gcs_bucket: nil, destination_parallelstore: nil, name: nil, request_id: nil, service_account: nil, metadata_options: nil) -> ::Gapic::Operation

Pass arguments to `import_data` 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**

- **source_gcs_bucket** ([::Google::Cloud::Parallelstore::V1::SourceGcsBucket](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-parallelstore-v1/latest/Google-Cloud-Parallelstore-V1-SourceGcsBucket), ::Hash) --- The Cloud Storage source bucket and, optionally, path inside the bucket.
- **destination_parallelstore** ([::Google::Cloud::Parallelstore::V1::DestinationParallelstore](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-parallelstore-v1/latest/Google-Cloud-Parallelstore-V1-DestinationParallelstore), ::Hash) --- Parallelstore destination.
- **name** (::String) --- Required. Name of the resource.
- **request_id** (::String) --- Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.


  For example, consider a situation where you make an initial request and
  the request times out. If you make the request again with the same request
  ID, the server can check if original operation with the same request ID
  was received, and if so, will ignore the second request. This prevents
  clients from accidentally creating duplicate commitments.

  The request ID must be a valid UUID with the exception that zero UUID is
  not supported (00000000-0000-0000-0000-000000000000).
- **service_account** (::String) --- Optional. User-specified service account credentials to be used when performing the transfer.


  Use one of the following formats:
  - `{EMAIL_ADDRESS_OR_UNIQUE_ID}`
  - `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}`
  - `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}`

  If unspecified, the Parallelstore service agent is used:
  `service-<PROJECT_NUMBER>@gcp-sa-parallelstore.iam.gserviceaccount.com`
- **metadata_options** ([::Google::Cloud::Parallelstore::V1::TransferMetadataOptions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-parallelstore-v1/latest/Google-Cloud-Parallelstore-V1-TransferMetadataOptions), ::Hash) --- Optional. The transfer metadata options for the import data.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** (::Gapic::Operation)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Operation)
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end
```

### #initialize

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

Create a new Parallelstore REST client object.
**Yields**

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

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

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

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

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

### #list_instances

    def list_instances(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Parallelstore::V1::Instance>
    def list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Parallelstore::V1::Instance>

Lists all instances in a given project and location.
**Overloads**

    def list_instances(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Parallelstore::V1::Instance>

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

- **request** ([::Google::Cloud::Parallelstore::V1::ListInstancesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-parallelstore-v1/latest/Google-Cloud-Parallelstore-V1-ListInstancesRequest), ::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 list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Parallelstore::V1::Instance>

Pass arguments to `list_instances` 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 project and location for which to retrieve instance information, in the format `projects/{project_id}/locations/{location}`.


  To retrieve instance information for all locations, use "-" as the value of
  `{location}`.
- **page_size** (::Integer) --- Optional. Requested page size. Server may return fewer items than requested. If unspecified, the server will pick an appropriate default.
- **page_token** (::String) --- Optional. A token identifying a page of results the server should return.
- **filter** (::String) --- Optional. Filtering results.
- **order_by** (::String) --- Optional. Hint for how to order the results.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::Parallelstore::V1::Instance](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-parallelstore-v1/latest/Google-Cloud-Parallelstore-V1-Instance)\>)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::Parallelstore::V1::Instance](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-parallelstore-v1/latest/Google-Cloud-Parallelstore-V1-Instance)\>)
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::Parallelstore::V1::Instance.
  p item
end
```

### #location_client

    def location_client() -> Google::Cloud::Location::Locations::Rest::Client

Get the associated client for mix-in of the Locations.
**Returns**

- (Google::Cloud::Location::Locations::Rest::Client)

### #logger

    def logger() -> Logger

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

- (Logger)

### #operations_client

    def operations_client() -> ::Google::Cloud::Parallelstore::V1::Parallelstore::Rest::Operations

Get the associated client for long-running operations.
**Returns**

- ([::Google::Cloud::Parallelstore::V1::Parallelstore::Rest::Operations](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-parallelstore-v1/latest/Google-Cloud-Parallelstore-V1-Parallelstore-Rest-Operations))

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)

### #update_instance

    def update_instance(request, options = nil) -> ::Gapic::Operation
    def update_instance(update_mask: nil, instance: nil, request_id: nil) -> ::Gapic::Operation

Updates the parameters of a single instance.
**Overloads**

    def update_instance(request, options = nil) -> ::Gapic::Operation

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

- **request** ([::Google::Cloud::Parallelstore::V1::UpdateInstanceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-parallelstore-v1/latest/Google-Cloud-Parallelstore-V1-UpdateInstanceRequest), ::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_instance(update_mask: nil, instance: nil, request_id: nil) -> ::Gapic::Operation

Pass arguments to `update_instance` 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**

- **update_mask** ([::Google::Protobuf::FieldMask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-parallelstore-v1/latest/Google-Protobuf-FieldMask), ::Hash) --- Required. Mask of fields to update. Field mask is used to specify the fields to be overwritten in the Instance resource by the update. At least one path must be supplied in this field. The fields specified in the update_mask are relative to the resource, not the full request.
- **instance** ([::Google::Cloud::Parallelstore::V1::Instance](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-parallelstore-v1/latest/Google-Cloud-Parallelstore-V1-Instance), ::Hash) --- Required. The instance to update.
- **request_id** (::String) --- Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.


  For example, consider a situation where you make an initial request and
  the request times out. If you make the request again with the same request
  ID, the server can check if original operation with the same request ID
  was received, and if so, will ignore the second request. This prevents
  clients from accidentally creating duplicate commitments.

  The request ID must be a valid UUID with the exception that zero UUID is
  not supported (00000000-0000-0000-0000-000000000000).
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** (::Gapic::Operation)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Operation)
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end
```