GameServerConfigsServiceClient

GameServerConfigsServiceClient

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

Constructor

new GameServerConfigsServiceClient(optionsopt)

Construct an instance of GameServerConfigsServiceClient.

Parameters:
Name Type Attributes Description
options object <optional>

The configuration object. The options accepted by the constructor are described in detail in this document. The common options are:

Properties
Name Type Attributes Description
credentials object <optional>

Credentials object.

Properties
Name Type Attributes Description
client_email string <optional>
private_key string <optional>
email string <optional>

Account email address. Required when using a .pem or .p12 keyFilename.

keyFilename string <optional>

Full path to the a .json, .pem, or .p12 key downloaded from the Google Developers Console. If you provide a path to a JSON file, the projectId option below is not necessary. NOTE: .pem and .p12 require you to specify options.email as well.

port number <optional>

The port on which to connect to the remote host.

projectId string <optional>

The project ID from the Google Developer's Console, e.g. 'grape-spaceship-123'. We will also check the environment variable GCLOUD_PROJECT for your project ID. If your app is running in an environment which supports Application Default Credentials, your project ID will be detected automatically.

apiEndpoint string <optional>

The domain name of the API remote host.

clientConfig gax.ClientConfig <optional>

Client configuration override. Follows the structure of gapicConfig.

fallback boolean <optional>

Use HTTP fallback mode. In fallback mode, a special browser-compatible transport implementation is used instead of gRPC transport. In browser context (if the window object is defined) the fallback mode is enabled automatically; set options.fallback to false if you need to override this behavior.

Members

apiEndpoint

The DNS address for this API service - same as servicePath(), exists for compatibility reasons.

port

The port for this API service.

scopes

The scopes needed to make gRPC calls for every method defined in this service.

servicePath

The DNS address for this API service.

Methods

(async) checkCreateGameServerConfigProgress(name) → {Promise}

Check the status of the long running operation returned by createGameServerConfig().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
Promise
  • The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.
Example
const decodedOperation = await checkCreateGameServerConfigProgress(name);
console.log(decodedOperation.result);
console.log(decodedOperation.done);
console.log(decodedOperation.metadata);

(async) checkDeleteGameServerConfigProgress(name) → {Promise}

Check the status of the long running operation returned by deleteGameServerConfig().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
Promise
  • The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.
Example
const decodedOperation = await checkDeleteGameServerConfigProgress(name);
console.log(decodedOperation.result);
console.log(decodedOperation.done);
console.log(decodedOperation.metadata);

close() → {Promise}

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns:
Type Description
Promise

A promise that resolves when the client is closed.

createGameServerConfig(request, optionsopt) → {Promise}

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.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The parent resource name. Uses the form:

projects/{project}/locations/{location}/gameServerDeployments/{deployment}/.

configId string

Required. The ID of the game server config resource to be created.

gameServerConfig google.cloud.gaming.v1beta.GameServerConfig

Required. The game server config resource to be created.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.
Example
const [operation] = await client.createGameServerConfig(request);
const [response] = await operation.promise();

deleteGameServerConfig(request, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The name of the game server config to delete. Uses the form:

projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.
Example
const [operation] = await client.deleteGameServerConfig(request);
const [response] = await operation.promise();

gameServerClusterPath(project, location, realm, cluster) → {string}

Return a fully-qualified gameServerCluster resource name string.

Parameters:
Name Type Description
project string
location string
realm string
cluster string
Returns:
Type Description
string

Resource name string.

gameServerConfigPath(project, location, deployment, config) → {string}

Return a fully-qualified gameServerConfig resource name string.

Parameters:
Name Type Description
project string
location string
deployment string
config string
Returns:
Type Description
string

Resource name string.

gameServerDeploymentPath(project, location, deployment) → {string}

Return a fully-qualified gameServerDeployment resource name string.

Parameters:
Name Type Description
project string
location string
deployment string
Returns:
Type Description
string

Resource name string.

gameServerDeploymentRolloutPath(project, location, deployment) → {string}

Return a fully-qualified gameServerDeploymentRollout resource name string.

Parameters:
Name Type Description
project string
location string
deployment string
Returns:
Type Description
string

Resource name string.

getGameServerConfig(request, optionsopt) → {Promise}

Gets details of a single game server config.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The name of the game server config to retrieve. Uses the form:

projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing GameServerConfig. Please see the documentation for more details and examples.
Example
const [response] = await client.getGameServerConfig(request);

getProjectId() → {Promise}

Return the project ID used by this class.

Returns:
Type Description
Promise

A promise that resolves to string containing the project ID.

initialize() → {Promise}

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

Returns:
Type Description
Promise

A promise that resolves to an authenticated service stub.

listGameServerConfigs(request, optionsopt) → {Promise}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
parent string

Required. The parent resource name. Uses the form:

projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/*.

pageSize number <optional>

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.

pageToken string <optional>

Optional. The next_page_token value returned from a previous list request, if any.

filter string <optional>

Optional. The filter to apply to list results.

orderBy string <optional>

Optional. Specifies the ordering of results following syntax at https://cloud.google.com/apis/design/design_patterns#sorting_order.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is Array of GameServerConfig. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listGameServerConfigsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listGameServerConfigsAsync(request, optionsopt) → {Object}

Equivalent to listGameServerConfigs, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
parent string

Required. The parent resource name. Uses the form:

projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/*.

pageSize number <optional>

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.

pageToken string <optional>

Optional. The next_page_token value returned from a previous list request, if any.

filter string <optional>

Optional. The filter to apply to list results.

orderBy string <optional>

Optional. Specifies the ordering of results following syntax at https://cloud.google.com/apis/design/design_patterns#sorting_order.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing GameServerConfig. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example
const iterable = client.listGameServerConfigsAsync(request);
for await (const response of iterable) {
  // process response
}

listGameServerConfigsStream(request, optionsopt) → {Stream}

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
parent string

Required. The parent resource name. Uses the form:

projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/*.

pageSize number <optional>

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.

pageToken string <optional>

Optional. The next_page_token value returned from a previous list request, if any.

filter string <optional>

Optional. The filter to apply to list results.

orderBy string <optional>

Optional. Specifies the ordering of results following syntax at https://cloud.google.com/apis/design/design_patterns#sorting_order.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing GameServerConfig on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listGameServerConfigsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

matchClusterFromGameServerClusterName(gameServerClusterName) → {string}

Parse the cluster from GameServerCluster resource.

Parameters:
Name Type Description
gameServerClusterName string

A fully-qualified path representing GameServerCluster resource.

Returns:
Type Description
string

A string representing the cluster.

matchConfigFromGameServerConfigName(gameServerConfigName) → {string}

Parse the config from GameServerConfig resource.

Parameters:
Name Type Description
gameServerConfigName string

A fully-qualified path representing GameServerConfig resource.

Returns:
Type Description
string

A string representing the config.

matchDeploymentFromGameServerConfigName(gameServerConfigName) → {string}

Parse the deployment from GameServerConfig resource.

Parameters:
Name Type Description
gameServerConfigName string

A fully-qualified path representing GameServerConfig resource.

Returns:
Type Description
string

A string representing the deployment.

matchDeploymentFromGameServerDeploymentName(gameServerDeploymentName) → {string}

Parse the deployment from GameServerDeployment resource.

Parameters:
Name Type Description
gameServerDeploymentName string

A fully-qualified path representing GameServerDeployment resource.

Returns:
Type Description
string

A string representing the deployment.

matchDeploymentFromGameServerDeploymentRolloutName(gameServerDeploymentRolloutName) → {string}

Parse the deployment from GameServerDeploymentRollout resource.

Parameters:
Name Type Description
gameServerDeploymentRolloutName string

A fully-qualified path representing GameServerDeploymentRollout resource.

Returns:
Type Description
string

A string representing the deployment.

matchLocationFromGameServerClusterName(gameServerClusterName) → {string}

Parse the location from GameServerCluster resource.

Parameters:
Name Type Description
gameServerClusterName string

A fully-qualified path representing GameServerCluster resource.

Returns:
Type Description
string

A string representing the location.

matchLocationFromGameServerConfigName(gameServerConfigName) → {string}

Parse the location from GameServerConfig resource.

Parameters:
Name Type Description
gameServerConfigName string

A fully-qualified path representing GameServerConfig resource.

Returns:
Type Description
string

A string representing the location.

matchLocationFromGameServerDeploymentName(gameServerDeploymentName) → {string}

Parse the location from GameServerDeployment resource.

Parameters:
Name Type Description
gameServerDeploymentName string

A fully-qualified path representing GameServerDeployment resource.

Returns:
Type Description
string

A string representing the location.

matchLocationFromGameServerDeploymentRolloutName(gameServerDeploymentRolloutName) → {string}

Parse the location from GameServerDeploymentRollout resource.

Parameters:
Name Type Description
gameServerDeploymentRolloutName string

A fully-qualified path representing GameServerDeploymentRollout resource.

Returns:
Type Description
string

A string representing the location.

matchLocationFromRealmName(realmName) → {string}

Parse the location from Realm resource.

Parameters:
Name Type Description
realmName string

A fully-qualified path representing Realm resource.

Returns:
Type Description
string

A string representing the location.

matchProjectFromGameServerClusterName(gameServerClusterName) → {string}

Parse the project from GameServerCluster resource.

Parameters:
Name Type Description
gameServerClusterName string

A fully-qualified path representing GameServerCluster resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromGameServerConfigName(gameServerConfigName) → {string}

Parse the project from GameServerConfig resource.

Parameters:
Name Type Description
gameServerConfigName string

A fully-qualified path representing GameServerConfig resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromGameServerDeploymentName(gameServerDeploymentName) → {string}

Parse the project from GameServerDeployment resource.

Parameters:
Name Type Description
gameServerDeploymentName string

A fully-qualified path representing GameServerDeployment resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromGameServerDeploymentRolloutName(gameServerDeploymentRolloutName) → {string}

Parse the project from GameServerDeploymentRollout resource.

Parameters:
Name Type Description
gameServerDeploymentRolloutName string

A fully-qualified path representing GameServerDeploymentRollout resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromRealmName(realmName) → {string}

Parse the project from Realm resource.

Parameters:
Name Type Description
realmName string

A fully-qualified path representing Realm resource.

Returns:
Type Description
string

A string representing the project.

matchRealmFromGameServerClusterName(gameServerClusterName) → {string}

Parse the realm from GameServerCluster resource.

Parameters:
Name Type Description
gameServerClusterName string

A fully-qualified path representing GameServerCluster resource.

Returns:
Type Description
string

A string representing the realm.

matchRealmFromRealmName(realmName) → {string}

Parse the realm from Realm resource.

Parameters:
Name Type Description
realmName string

A fully-qualified path representing Realm resource.

Returns:
Type Description
string

A string representing the realm.

realmPath(project, location, realm) → {string}

Return a fully-qualified realm resource name string.

Parameters:
Name Type Description
project string
location string
realm string
Returns:
Type Description
string

Resource name string.