Cloud Gaming V1 API - Class Google::Cloud::Gaming::V1::GameServerConfigsService::Client (v0.6.0)

Reference documentation and code samples for the Cloud Gaming V1 API class Google::Cloud::Gaming::V1::GameServerConfigsService::Client.

Client for the GameServerConfigsService service.

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

Inherits

  • Object

Methods

.configure

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

Configure the GameServerConfigsService Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# 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.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#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 or an equivalent Hash.
Parameters
  • request (::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, ::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

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 or an equivalent Hash.
Parameters
  • request (::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

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 or an equivalent Hash.
Parameters
  • request (::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
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

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
Returns
  • (Client) — a new instance of Client
Example
# 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 or an equivalent Hash.
Parameters
  • request (::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 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
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

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.