# Cloud Gaming V1 API - Class Google::Cloud::Gaming::V1::GameServerConfigsService::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-GameServerConfigsService-Client)
- [0.6.0](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/0.6.0/Google-Cloud-Gaming-V1-GameServerConfigsService-Client)
- [0.5.0](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/0.5.0/Google-Cloud-Gaming-V1-GameServerConfigsService-Client)
- [0.4.4](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/0.4.4/Google-Cloud-Gaming-V1-GameServerConfigsService-Client)
Reference documentation and code samples for the Cloud Gaming V1 API class Google::Cloud::Gaming::V1::GameServerConfigsService::Client.

Client for the GameServerConfigsService service.


<br />

The game server config configures the game servers in an Agones fleet.

## Inherits

- Object

## Includes

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

## Methods

### .configure

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

Configure the GameServerConfigsService Client class.


<br />

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

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

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

### #configure

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

Configure the GameServerConfigsService 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-GameServerConfigsService-Client#Google__Cloud__Gaming__V1__GameServerConfigsService__Client_configure_class_ "Google::Cloud::Gaming::V1::GameServerConfigsService::Client.configure (method)").

<br />

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

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

### #create_game_server_config

    def create_game_server_config(request, options = nil) -> ::Gapic::Operation
    def create_game_server_config(parent: nil, config_id: nil, game_server_config: nil) -> ::Gapic::Operation

Creates a new game server config in a given project, location, and game
server deployment. Game server configs are immutable, and are not applied
until referenced in the game server deployment rollout resource.
**Overloads**

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

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

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

Pass arguments to `create_game_server_config` 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}/gameServerDeployments/{deployment}/`.
- **config_id** (::String) --- Required. The ID of the game server config resource to be created.
- **game_server_config** ([::Google::Cloud::Gaming::V1::GameServerConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-GameServerConfig), ::Hash) --- Required. The game server config 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::GameServerConfigsService::Client.new

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

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

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

Deletes a single game server config. The deletion will fail if the game
server config is referenced in a game server deployment rollout.
**Overloads**

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

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

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

Pass arguments to `delete_game_server_config` 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 config to delete, in the following form: `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`.
**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::GameServerConfigsService::Client.new

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

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

    def get_game_server_config(request, options = nil) -> ::Google::Cloud::Gaming::V1::GameServerConfig
    def get_game_server_config(name: nil) -> ::Google::Cloud::Gaming::V1::GameServerConfig

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

    def get_game_server_config(request, options = nil) -> ::Google::Cloud::Gaming::V1::GameServerConfig

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

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

Pass arguments to `get_game_server_config` 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 config to retrieve, in the following form: `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`.
**Yields**

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

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

- ([::Google::Cloud::Gaming::V1::GameServerConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-GameServerConfig))
**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::GameServerConfigsService::Client.new

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

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

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

### #initialize

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

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

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

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

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

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

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

### #list_game_server_configs

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

Lists game server configs in a given project, location, and game server
deployment.
**Overloads**

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

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

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

Pass arguments to `list_game_server_configs` 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}/gameServerDeployments/{deployment}/configs/*`.
- **page_size** (::Integer) --- Optional. The maximum number of items to return. If unspecified, server will pick an appropriate default. 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-ListGameServerConfigsResponse#Google__Cloud__Gaming__V1__ListGameServerConfigsResponse_next_page_token_instance_ "Google::Cloud::Gaming::V1::ListGameServerConfigsResponse#next_page_token (method)") to determine if there are more GameServerConfigs 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.
**Yields**

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

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

- (::Gapic::PagedEnumerable\<[::Google::Cloud::Gaming::V1::GameServerConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-GameServerConfig)\>)
**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::GameServerConfigsService::Client.new

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

# Call the list_game_server_configs method.
result = client.list_game_server_configs 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::GameServerConfig.
  p item
end
```

### #operations_client

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

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

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