# Memorystore V1BETA API - Class Google::Cloud::Memorystore::V1beta::Memorystore::Client (v0.12.0)

0.12.0 (latest) 0.11.0 0.10.0 0.9.0 0.8.0 0.7.0 0.6.0 0.5.1 0.4.0 0.3.0 0.2.0 0.1.0 Reference documentation and code samples for the Memorystore V1BETA API class Google::Cloud::Memorystore::V1beta::Memorystore::Client.

Client for the Memorystore service.


<br />

Service describing handlers for resources

## Inherits

- Object

## Includes

- [Google::Cloud::Memorystore::V1beta::Memorystore::Paths](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-memorystore-v1beta/latest/Google-Cloud-Memorystore-V1beta-Memorystore-Paths)

## Methods

### .configure

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

Configure the Memorystore Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-memorystore-v1beta/latest/Google-Cloud-Memorystore-V1beta-Memorystore-Client-Configuration "Google::Cloud::Memorystore::V1beta::Memorystore::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-memorystore-v1beta/latest/Google-Cloud-Memorystore-V1beta-Memorystore-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-memorystore-v1beta/latest/Google-Cloud-Memorystore-V1beta-Memorystore-Client-Configuration))
**Example**

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

### #configure

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

Configure the Memorystore 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-memorystore-v1beta/latest/Google-Cloud-Memorystore-V1beta-Memorystore-Client#Google__Cloud__Memorystore__V1beta__Memorystore__Client_configure_class_ "Google::Cloud::Memorystore::V1beta::Memorystore::Client.configure (method)").

<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-memorystore-v1beta/latest/Google-Cloud-Memorystore-V1beta-Memorystore-Client-Configuration "Google::Cloud::Memorystore::V1beta::Memorystore::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-memorystore-v1beta/latest/Google-Cloud-Memorystore-V1beta-Memorystore-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-memorystore-v1beta/latest/Google-Cloud-Memorystore-V1beta-Memorystore-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 new 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-memorystore-v1beta/latest/Google-Cloud-Memorystore-V1beta-CreateInstanceRequest "Google::Cloud::Memorystore::V1beta::CreateInstanceRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Memorystore::V1beta::CreateInstanceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-memorystore-v1beta/latest/Google-Cloud-Memorystore-V1beta-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 parent resource where this instance will be created. Format: projects/{project}/locations/{location}
- **instance_id** (::String) ---

  Required. The ID to use for the instance, which will become the final
  component of the instance's resource name.

  This value is subject to the following restrictions:
  - Must be 4-63 characters in length
  - Must begin with a letter or digit
  - Must contain only lowercase letters, digits, and hyphens
  - Must not end with a hyphen
  - Must be unique within a location
- **instance** ([::Google::Cloud::Memorystore::V1beta::Instance](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-memorystore-v1beta/latest/Google-Cloud-Memorystore-V1beta-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**

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

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

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

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

Basic example

```ruby
require "google/cloud/memorystore/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Memorystore::V1beta::Memorystore::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Memorystore::V1beta::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-memorystore-v1beta/latest/Google-Cloud-Memorystore-V1beta-DeleteInstanceRequest "Google::Cloud::Memorystore::V1beta::DeleteInstanceRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Memorystore::V1beta::DeleteInstanceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-memorystore-v1beta/latest/Google-Cloud-Memorystore-V1beta-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. The name of the instance to delete. Format: projects/{project}/locations/{location}/instances/{instance}
- **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**

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

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

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

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

Basic example

```ruby
require "google/cloud/memorystore/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Memorystore::V1beta::Memorystore::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Memorystore::V1beta::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
```

### #get_certificate_authority

    def get_certificate_authority(request, options = nil) -> ::Google::Cloud::Memorystore::V1beta::CertificateAuthority
    def get_certificate_authority(name: nil) -> ::Google::Cloud::Memorystore::V1beta::CertificateAuthority

Gets details about the certificate authority for an Instance.
**Overloads**

    def get_certificate_authority(request, options = nil) -> ::Google::Cloud::Memorystore::V1beta::CertificateAuthority

Pass arguments to `get_certificate_authority` via a request object, either of type [GetCertificateAuthorityRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-memorystore-v1beta/latest/Google-Cloud-Memorystore-V1beta-GetCertificateAuthorityRequest "Google::Cloud::Memorystore::V1beta::GetCertificateAuthorityRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Memorystore::V1beta::GetCertificateAuthorityRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-memorystore-v1beta/latest/Google-Cloud-Memorystore-V1beta-GetCertificateAuthorityRequest), ::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_certificate_authority(name: nil) -> ::Google::Cloud::Memorystore::V1beta::CertificateAuthority

Pass arguments to `get_certificate_authority` 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 name of the certificate authority. Format: projects/{project}/locations/{location}/instances/{instance}/certificateAuthority
**Yields**

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

- **response** ([::Google::Cloud::Memorystore::V1beta::CertificateAuthority](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-memorystore-v1beta/latest/Google-Cloud-Memorystore-V1beta-CertificateAuthority))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::Memorystore::V1beta::CertificateAuthority](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-memorystore-v1beta/latest/Google-Cloud-Memorystore-V1beta-CertificateAuthority))
**Raises**

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

Basic example

```ruby
require "google/cloud/memorystore/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Memorystore::V1beta::Memorystore::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Memorystore::V1beta::GetCertificateAuthorityRequest.new

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

# The returned object is of type Google::Cloud::Memorystore::V1beta::CertificateAuthority.
p result
```

### #get_instance

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

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

    def get_instance(request, options = nil) -> ::Google::Cloud::Memorystore::V1beta::Instance

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

- **request** ([::Google::Cloud::Memorystore::V1beta::GetInstanceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-memorystore-v1beta/latest/Google-Cloud-Memorystore-V1beta-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::Memorystore::V1beta::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 name of the instance to retrieve. Format: projects/{project}/locations/{location}/instances/{instance}
**Yields**

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

- **response** ([::Google::Cloud::Memorystore::V1beta::Instance](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-memorystore-v1beta/latest/Google-Cloud-Memorystore-V1beta-Instance))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::Memorystore::V1beta::Instance](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-memorystore-v1beta/latest/Google-Cloud-Memorystore-V1beta-Instance))
**Raises**

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

Basic example

```ruby
require "google/cloud/memorystore/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Memorystore::V1beta::Memorystore::Client.new

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

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

# The returned object is of type Google::Cloud::Memorystore::V1beta::Instance.
p result
```

### #get_shared_regional_certificate_authority

    def get_shared_regional_certificate_authority(request, options = nil) -> ::Google::Cloud::Memorystore::V1beta::SharedRegionalCertificateAuthority
    def get_shared_regional_certificate_authority(name: nil) -> ::Google::Cloud::Memorystore::V1beta::SharedRegionalCertificateAuthority

Gets the details of shared regional certificate authority information for
Memorystore instance.
**Overloads**

    def get_shared_regional_certificate_authority(request, options = nil) -> ::Google::Cloud::Memorystore::V1beta::SharedRegionalCertificateAuthority

Pass arguments to `get_shared_regional_certificate_authority` via a request object, either of type [GetSharedRegionalCertificateAuthorityRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-memorystore-v1beta/latest/Google-Cloud-Memorystore-V1beta-GetSharedRegionalCertificateAuthorityRequest "Google::Cloud::Memorystore::V1beta::GetSharedRegionalCertificateAuthorityRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Memorystore::V1beta::GetSharedRegionalCertificateAuthorityRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-memorystore-v1beta/latest/Google-Cloud-Memorystore-V1beta-GetSharedRegionalCertificateAuthorityRequest), ::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_shared_regional_certificate_authority(name: nil) -> ::Google::Cloud::Memorystore::V1beta::SharedRegionalCertificateAuthority

Pass arguments to `get_shared_regional_certificate_authority` 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. Regional certificate authority resource name using the form: `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority` where `location_id` refers to a Google Cloud region.
**Yields**

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

- **response** ([::Google::Cloud::Memorystore::V1beta::SharedRegionalCertificateAuthority](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-memorystore-v1beta/latest/Google-Cloud-Memorystore-V1beta-SharedRegionalCertificateAuthority))
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- ([::Google::Cloud::Memorystore::V1beta::SharedRegionalCertificateAuthority](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-memorystore-v1beta/latest/Google-Cloud-Memorystore-V1beta-SharedRegionalCertificateAuthority))
**Raises**

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

Basic example

```ruby
require "google/cloud/memorystore/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Memorystore::V1beta::Memorystore::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Memorystore::V1beta::GetSharedRegionalCertificateAuthorityRequest.new

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

# The returned object is of type Google::Cloud::Memorystore::V1beta::SharedRegionalCertificateAuthority.
p result
```

### #initialize

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

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

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

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-memorystore-v1beta/latest/Google-Cloud-Memorystore-V1beta-Memorystore-Client-Configuration))
**Returns**

- ([Client](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-memorystore-v1beta/latest/Google-Cloud-Memorystore-V1beta-Memorystore-Client)) --- a new instance of Client
**Example**

```ruby
# Create a client using the default configuration
client = ::Google::Cloud::Memorystore::V1beta::Memorystore::Client.new

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

### #list_instances

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

Lists Instances in a given project and location.
**Overloads**

    def list_instances(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Memorystore::V1beta::Instance>

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

- **request** ([::Google::Cloud::Memorystore::V1beta::ListInstancesRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-memorystore-v1beta/latest/Google-Cloud-Memorystore-V1beta-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::PagedEnumerable<::Google::Cloud::Memorystore::V1beta::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 parent to list instances from. Format: projects/{project}/locations/{location}
- **page_size** (::Integer) --- Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
- **page_token** (::String) --- Optional. A token identifying a page of results the server should return.
- **filter** (::String) --- Optional. Expression for filtering results.
- **order_by** (::String) --- Optional. Sort results by a defined order. Supported values: "name", "create_time".
**Yields**

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

- **response** (::Gapic::PagedEnumerable\<[::Google::Cloud::Memorystore::V1beta::Instance](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-memorystore-v1beta/latest/Google-Cloud-Memorystore-V1beta-Instance)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::PagedEnumerable\<[::Google::Cloud::Memorystore::V1beta::Instance](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-memorystore-v1beta/latest/Google-Cloud-Memorystore-V1beta-Instance)\>)
**Raises**

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

Basic example

```ruby
require "google/cloud/memorystore/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Memorystore::V1beta::Memorystore::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Memorystore::V1beta::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::Memorystore::V1beta::Instance.
  p item
end
```

### #location_client

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

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

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

### #logger

    def logger() -> Logger

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

- (Logger)

### #operations_client

    def operations_client() -> ::Google::Cloud::Memorystore::V1beta::Memorystore::Operations

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

- ([::Google::Cloud::Memorystore::V1beta::Memorystore::Operations](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-memorystore-v1beta/latest/Google-Cloud-Memorystore-V1beta-Memorystore-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-memorystore-v1beta/latest/Google-Cloud-Memorystore-V1beta-UpdateInstanceRequest "Google::Cloud::Memorystore::V1beta::UpdateInstanceRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::Memorystore::V1beta::UpdateInstanceRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-memorystore-v1beta/latest/Google-Cloud-Memorystore-V1beta-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-memorystore-v1beta/latest/Google-Protobuf-FieldMask), ::Hash) --- Optional. The list of fields to be updated on the instance. At least one field must be specified.
- **instance** ([::Google::Cloud::Memorystore::V1beta::Instance](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-memorystore-v1beta/latest/Google-Cloud-Memorystore-V1beta-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**

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

- **response** (::Gapic::Operation)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

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

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

Basic example

```ruby
require "google/cloud/memorystore/v1beta"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Memorystore::V1beta::Memorystore::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Memorystore::V1beta::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
```