Constructor
new GameServerClustersServiceClient(optionsopt)
Construct an instance of GameServerClustersServiceClient.
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
|
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) checkCreateGameServerClusterProgress(name) → {Promise}
Check the status of the long running operation returned by createGameServerCluster().
Parameters:
| Name | Type | Description |
|---|---|---|
name |
String |
The operation name that will be passed. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
Example
const decodedOperation = await checkCreateGameServerClusterProgress(name);
console.log(decodedOperation.result);
console.log(decodedOperation.done);
console.log(decodedOperation.metadata);
(async) checkDeleteGameServerClusterProgress(name) → {Promise}
Check the status of the long running operation returned by deleteGameServerCluster().
Parameters:
| Name | Type | Description |
|---|---|---|
name |
String |
The operation name that will be passed. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
Example
const decodedOperation = await checkDeleteGameServerClusterProgress(name);
console.log(decodedOperation.result);
console.log(decodedOperation.done);
console.log(decodedOperation.metadata);
(async) checkUpdateGameServerClusterProgress(name) → {Promise}
Check the status of the long running operation returned by updateGameServerCluster().
Parameters:
| Name | Type | Description |
|---|---|---|
name |
String |
The operation name that will be passed. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
Example
const decodedOperation = await checkUpdateGameServerClusterProgress(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. |
createGameServerCluster(request, optionsopt) → {Promise}
Creates a new game server cluster in a given project and location.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
Example
const [operation] = await client.createGameServerCluster(request);
const [response] = await operation.promise();
deleteGameServerCluster(request, optionsopt) → {Promise}
Deletes a single game server cluster.
Parameters:
| Name | Type | Attributes | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
Example
const [operation] = await client.deleteGameServerCluster(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. |
getGameServerCluster(request, optionsopt) → {Promise}
Gets details of a single game server cluster.
Parameters:
| Name | Type | Attributes | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
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. |
listGameServerClusters(request, optionsopt) → {Promise}
Lists game server clusters in a given project and location.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
listGameServerClustersAsync(request, optionsopt) → {Object}
Equivalent to listGameServerClusters, 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
|
|||||||||||||||||||||||||
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 GameServerCluster. 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.listGameServerClustersAsync(request);
for await (const response of iterable) {
// process response
}
listGameServerClustersStream(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
|
|||||||||||||||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Stream |
An object stream which emits an object representing GameServerCluster 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 |
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. |
previewCreateGameServerCluster(request, optionsopt) → {Promise}
Previews creation of a new game server cluster in a given project and location.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
previewDeleteGameServerCluster(request, optionsopt) → {Promise}
Previews deletion of a single game server cluster.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
previewUpdateGameServerCluster(request, optionsopt) → {Promise}
Previews updating a GameServerCluster.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
|||||||||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|
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. |
updateGameServerCluster(request, optionsopt) → {Promise}
Patches a single game server cluster.
Parameters:
| Name | Type | Attributes | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
request |
Object |
The request object that will be sent. Properties
|
||||||||||
options |
object |
<optional> |
Call options. See CallOptions for more details. |
Returns:
| Type | Description |
|---|---|
| Promise |
|