# Cloud Gaming V1 API - Class Google::Cloud::Gaming::V1::GameServerClustersService::Client (v0.7.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [0.7.0 (latest)](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-GameServerClustersService-Client)
- [0.6.0](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/0.6.0/Google-Cloud-Gaming-V1-GameServerClustersService-Client)
- [0.5.0](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/0.5.0/Google-Cloud-Gaming-V1-GameServerClustersService-Client)
- [0.4.4](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/0.4.4/Google-Cloud-Gaming-V1-GameServerClustersService-Client)
Reference documentation and code samples for the Cloud Gaming V1 API class Google::Cloud::Gaming::V1::GameServerClustersService::Client.

Client for the GameServerClustersService service.


<br />

The game server cluster maps to Kubernetes clusters running Agones and is
used to manage fleets within clusters.

## Inherits

- Object

## Includes

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

## Methods

### .configure

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

Configure the GameServerClustersService Client class.


<br />

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

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

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

### #configure

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

Configure the GameServerClustersService 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-gaming-v1/latest/Google-Cloud-Gaming-V1-GameServerClustersService-Client#Google__Cloud__Gaming__V1__GameServerClustersService__Client_configure_class_ "Google::Cloud::Gaming::V1::GameServerClustersService::Client.configure (method)").

<br />

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

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-GameServerClustersService-Client-Configuration))

### #create_game_server_cluster

    def create_game_server_cluster(request, options = nil) -> ::Gapic::Operation
    def create_game_server_cluster(parent: nil, game_server_cluster_id: nil, game_server_cluster: nil) -> ::Gapic::Operation

Creates a new game server cluster in a given project and location.
**Overloads**

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

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

- **request** ([::Google::Cloud::Gaming::V1::CreateGameServerClusterRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-CreateGameServerClusterRequest), ::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_game_server_cluster(parent: nil, game_server_cluster_id: nil, game_server_cluster: nil) -> ::Gapic::Operation

Pass arguments to `create_game_server_cluster` 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 name, in the following form: `projects/{project}/locations/{location}/realms/{realm-id}`.
- **game_server_cluster_id** (::String) --- Required. The ID of the game server cluster resource to be created.
- **game_server_cluster** ([::Google::Cloud::Gaming::V1::GameServerCluster](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-GameServerCluster), ::Hash) --- Required. The game server cluster resource to be created.
**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/gaming/v1"

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

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

# Call the create_game_server_cluster method.
result = client.create_game_server_cluster 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_game_server_cluster

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

Deletes a single game server cluster.
**Overloads**

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

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

- **request** ([::Google::Cloud::Gaming::V1::DeleteGameServerClusterRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-DeleteGameServerClusterRequest), ::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_game_server_cluster(name: nil) -> ::Gapic::Operation

Pass arguments to `delete_game_server_cluster` 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 game server cluster to delete, in the following form: `projects/{project}/locations/{location}/gameServerClusters/{cluster}`.
**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/gaming/v1"

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

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

# Call the delete_game_server_cluster method.
result = client.delete_game_server_cluster 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_game_server_cluster

    def get_game_server_cluster(request, options = nil) -> ::Google::Cloud::Gaming::V1::GameServerCluster
    def get_game_server_cluster(name: nil, view: nil) -> ::Google::Cloud::Gaming::V1::GameServerCluster

Gets details of a single game server cluster.
**Overloads**

    def get_game_server_cluster(request, options = nil) -> ::Google::Cloud::Gaming::V1::GameServerCluster

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

- **request** ([::Google::Cloud::Gaming::V1::GetGameServerClusterRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-GetGameServerClusterRequest), ::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_game_server_cluster(name: nil, view: nil) -> ::Google::Cloud::Gaming::V1::GameServerCluster

Pass arguments to `get_game_server_cluster` 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 game server cluster to retrieve, in the following form: `projects/{project}/locations/{location}/realms/{realm-id}/gameServerClusters/{cluster}`.
- **view** ([::Google::Cloud::Gaming::V1::GameServerClusterView](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-GameServerClusterView)) --- Optional. View for the returned GameServerCluster objects. When `FULL` is specified, the `cluster_state` field is also returned in the GameServerCluster object, which includes the state of the referenced Kubernetes cluster such as versions and provider info. The default/unset value is GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED, same as BASIC, which does not return the `cluster_state` field.
**Yields**

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

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

- ([::Google::Cloud::Gaming::V1::GameServerCluster](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-GameServerCluster))
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::Gaming::V1::GameServerCluster.
p result
```

### #initialize

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

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

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

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

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

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

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

### #list_game_server_clusters

    def list_game_server_clusters(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Gaming::V1::GameServerCluster>
    def list_game_server_clusters(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Gaming::V1::GameServerCluster>

Lists game server clusters in a given project and location.
**Overloads**

    def list_game_server_clusters(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Gaming::V1::GameServerCluster>

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

- **request** ([::Google::Cloud::Gaming::V1::ListGameServerClustersRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-ListGameServerClustersRequest), ::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_game_server_clusters(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Gaming::V1::GameServerCluster>

Pass arguments to `list_game_server_clusters` 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 name, in the following form: "projects/{project}/locations/{location}/realms/{realm}".
- **page_size** (::Integer) --- Optional. The maximum number of items to return. If unspecified, the server will pick an appropriate default. The server may return fewer items than requested. A caller should only rely on response's [next_page_token](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-ListGameServerClustersResponse#Google__Cloud__Gaming__V1__ListGameServerClustersResponse_next_page_token_instance_ "Google::Cloud::Gaming::V1::ListGameServerClustersResponse#next_page_token (method)") to determine if there are more GameServerClusters left to be queried.
- **page_token** (::String) --- Optional. The next_page_token value returned from a previous List request, if any.
- **filter** (::String) --- Optional. The filter to apply to list results.
- **order_by** (::String) --- Optional. Specifies the ordering of results following syntax at https://cloud.google.com/apis/design/design_patterns#sorting_order.
- **view** ([::Google::Cloud::Gaming::V1::GameServerClusterView](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-GameServerClusterView)) --- Optional. View for the returned GameServerCluster objects. When `FULL` is specified, the `cluster_state` field is also returned in the GameServerCluster object, which includes the state of the referenced Kubernetes cluster such as versions and provider info. The default/unset value is GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED, same as BASIC, which does not return the `cluster_state` field.
**Yields**

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

- **response** (::Gapic::PagedEnumerable\<[::Google::Cloud::Gaming::V1::GameServerCluster](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-GameServerCluster)\>)
- **operation** (::GRPC::ActiveCall::Operation)
**Returns**

- (::Gapic::PagedEnumerable\<[::Google::Cloud::Gaming::V1::GameServerCluster](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-GameServerCluster)\>)
**Raises**

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

Basic example

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

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

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

# Call the list_game_server_clusters method.
result = client.list_game_server_clusters 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::Gaming::V1::GameServerCluster.
  p item
end
```

### #operations_client

    def operations_client() -> ::Google::Cloud::Gaming::V1::GameServerClustersService::Operations

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

- ([::Google::Cloud::Gaming::V1::GameServerClustersService::Operations](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-GameServerClustersService-Operations))

### #preview_create_game_server_cluster

    def preview_create_game_server_cluster(request, options = nil) -> ::Google::Cloud::Gaming::V1::PreviewCreateGameServerClusterResponse
    def preview_create_game_server_cluster(parent: nil, game_server_cluster_id: nil, game_server_cluster: nil, preview_time: nil, view: nil) -> ::Google::Cloud::Gaming::V1::PreviewCreateGameServerClusterResponse

Previews creation of a new game server cluster in a given project and
location.
**Overloads**

    def preview_create_game_server_cluster(request, options = nil) -> ::Google::Cloud::Gaming::V1::PreviewCreateGameServerClusterResponse

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

- **request** ([::Google::Cloud::Gaming::V1::PreviewCreateGameServerClusterRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-PreviewCreateGameServerClusterRequest), ::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 preview_create_game_server_cluster(parent: nil, game_server_cluster_id: nil, game_server_cluster: nil, preview_time: nil, view: nil) -> ::Google::Cloud::Gaming::V1::PreviewCreateGameServerClusterResponse

Pass arguments to `preview_create_game_server_cluster` 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 name, in the following form: `projects/{project}/locations/{location}/realms/{realm}`.
- **game_server_cluster_id** (::String) --- Required. The ID of the game server cluster resource to be created.
- **game_server_cluster** ([::Google::Cloud::Gaming::V1::GameServerCluster](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-GameServerCluster), ::Hash) --- Required. The game server cluster resource to be created.
- **preview_time** ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Protobuf-Timestamp), ::Hash) --- Optional. The target timestamp to compute the preview.
- **view** ([::Google::Cloud::Gaming::V1::GameServerClusterView](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-GameServerClusterView)) --- Optional. This field is deprecated, preview will always return KubernetesClusterState.
**Yields**

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

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

- ([::Google::Cloud::Gaming::V1::PreviewCreateGameServerClusterResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-PreviewCreateGameServerClusterResponse))
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::Gaming::V1::PreviewCreateGameServerClusterResponse.
p result
```

### #preview_delete_game_server_cluster

    def preview_delete_game_server_cluster(request, options = nil) -> ::Google::Cloud::Gaming::V1::PreviewDeleteGameServerClusterResponse
    def preview_delete_game_server_cluster(name: nil, preview_time: nil) -> ::Google::Cloud::Gaming::V1::PreviewDeleteGameServerClusterResponse

Previews deletion of a single game server cluster.
**Overloads**

    def preview_delete_game_server_cluster(request, options = nil) -> ::Google::Cloud::Gaming::V1::PreviewDeleteGameServerClusterResponse

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

- **request** ([::Google::Cloud::Gaming::V1::PreviewDeleteGameServerClusterRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-PreviewDeleteGameServerClusterRequest), ::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 preview_delete_game_server_cluster(name: nil, preview_time: nil) -> ::Google::Cloud::Gaming::V1::PreviewDeleteGameServerClusterResponse

Pass arguments to `preview_delete_game_server_cluster` 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 game server cluster to delete, in the following form: `projects/{project}/locations/{location}/gameServerClusters/{cluster}`.
- **preview_time** ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Protobuf-Timestamp), ::Hash) --- Optional. The target timestamp to compute the preview.
**Yields**

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

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

- ([::Google::Cloud::Gaming::V1::PreviewDeleteGameServerClusterResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-PreviewDeleteGameServerClusterResponse))
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::Gaming::V1::PreviewDeleteGameServerClusterResponse.
p result
```

### #preview_update_game_server_cluster

    def preview_update_game_server_cluster(request, options = nil) -> ::Google::Cloud::Gaming::V1::PreviewUpdateGameServerClusterResponse
    def preview_update_game_server_cluster(game_server_cluster: nil, update_mask: nil, preview_time: nil) -> ::Google::Cloud::Gaming::V1::PreviewUpdateGameServerClusterResponse

Previews updating a GameServerCluster.
**Overloads**

    def preview_update_game_server_cluster(request, options = nil) -> ::Google::Cloud::Gaming::V1::PreviewUpdateGameServerClusterResponse

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

- **request** ([::Google::Cloud::Gaming::V1::PreviewUpdateGameServerClusterRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-PreviewUpdateGameServerClusterRequest), ::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 preview_update_game_server_cluster(game_server_cluster: nil, update_mask: nil, preview_time: nil) -> ::Google::Cloud::Gaming::V1::PreviewUpdateGameServerClusterResponse

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

- **game_server_cluster** ([::Google::Cloud::Gaming::V1::GameServerCluster](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-GameServerCluster), ::Hash) --- Required. The game server cluster to be updated. Only fields specified in update_mask are updated.
- **update_mask** ([::Google::Protobuf::FieldMask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Protobuf-FieldMask), ::Hash) --- Required. Mask of fields to update. At least one path must be supplied in this field. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
- **preview_time** ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Protobuf-Timestamp), ::Hash) --- Optional. The target timestamp to compute the preview.
**Yields**

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

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

- ([::Google::Cloud::Gaming::V1::PreviewUpdateGameServerClusterResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-PreviewUpdateGameServerClusterResponse))
**Raises**

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

Basic example

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

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

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

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

# The returned object is of type Google::Cloud::Gaming::V1::PreviewUpdateGameServerClusterResponse.
p result
```

### #update_game_server_cluster

    def update_game_server_cluster(request, options = nil) -> ::Gapic::Operation
    def update_game_server_cluster(game_server_cluster: nil, update_mask: nil) -> ::Gapic::Operation

Patches a single game server cluster.
**Overloads**

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

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

- **request** ([::Google::Cloud::Gaming::V1::UpdateGameServerClusterRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-UpdateGameServerClusterRequest), ::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_game_server_cluster(game_server_cluster: nil, update_mask: nil) -> ::Gapic::Operation

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

- **game_server_cluster** ([::Google::Cloud::Gaming::V1::GameServerCluster](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-GameServerCluster), ::Hash) --- Required. The game server cluster to be updated. Only fields specified in update_mask are updated.
- **update_mask** ([::Google::Protobuf::FieldMask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Protobuf-FieldMask), ::Hash) --- Required. Mask of fields to update. At least one path must be supplied in this field. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
**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/gaming/v1"

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

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

# Call the update_game_server_cluster method.
result = client.update_game_server_cluster 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
```