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

REST 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-Rest-Client-Configuration "Google::Cloud::Gaming::V1::GameServerConfigsService::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-gaming-v1/latest/Google-Cloud-Gaming-V1-GameServerConfigsService-Rest-Client-Configuration))
**Returns**

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

```ruby
# Modify the configuration for all GameServerConfigsService clients
::Google::Cloud::Gaming::V1::GameServerConfigsService::Rest::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-Rest-Client#Google__Cloud__Gaming__V1__GameServerConfigsService__Rest__Client_configure_class_ "Google::Cloud::Gaming::V1::GameServerConfigsService::Rest::Client.configure (method)").

<br />

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

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

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

### #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**

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

### #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**

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

- **result** ([::Google::Cloud::Gaming::V1::GameServerConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gaming-v1/latest/Google-Cloud-Gaming-V1-GameServerConfig))
- **operation** (::Gapic::Rest::TransportOperation)
**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 REST call is aborted.

### #initialize

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

Create a new GameServerConfigsService REST 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-Rest-Client-Configuration))
**Returns**

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

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

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

### #list_game_server_configs

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

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

    def list_game_server_configs(request, options = nil) -> ::Google::Cloud::Gaming::V1::ListGameServerConfigsResponse

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) -> ::Google::Cloud::Gaming::V1::ListGameServerConfigsResponse

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**

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

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

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

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

### #operations_client

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

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

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