A realm is a grouping of game server clusters that are considered interchangeable. v1beta
Package
@google-cloud/game-serversConstructors
(constructor)(opts, gaxInstance)
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
Construct an instance of RealmsServiceClient.
Parameters | |
---|---|
Name | Description |
opts |
ClientOptions
|
gaxInstance |
typeof gax | typeof gax.fallback
: loaded instance of |
Properties
apiEndpoint
static get apiEndpoint(): string;
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
auth
auth: gax.GoogleAuth;
descriptors
descriptors: Descriptors;
innerApiCalls
innerApiCalls: {
[name: string]: Function;
};
operationsClient
operationsClient: gax.OperationsClient;
pathTemplates
pathTemplates: {
[name: string]: gax.PathTemplate;
};
port
static get port(): number;
The port for this API service.
realmsServiceStub
realmsServiceStub?: Promise<{
[name: string]: Function;
}>;
scopes
static get scopes(): string[];
The scopes needed to make gRPC calls for every method defined in this service.
servicePath
static get servicePath(): string;
The DNS address for this API service.
warn
warn: (code: string, message: string, warnType?: string) => void;
Methods
checkCreateRealmProgress(name)
checkCreateRealmProgress(name: string): Promise<LROperation<protos.google.cloud.gaming.v1beta.Realm, protos.google.cloud.gaming.v1beta.OperationMetadata>>;
Check the status of the long running operation returned by createRealm()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.gaming.v1beta.Realm, protos.google.cloud.gaming.v1beta.OperationMetadata>> | {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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent resource name. Uses the form:
* `projects/{project}/locations/{location}`.
*/
// const parent = 'abc123'
/**
* Required. The ID of the realm resource to be created.
*/
// const realmId = 'abc123'
/**
* Required. The realm resource to be created.
*/
// const realm = {}
// Imports the Gaming library
const {RealmsServiceClient} = require('@google-cloud/game-servers').v1beta;
// Instantiates a client
const gamingClient = new RealmsServiceClient();
async function callCreateRealm() {
// Construct request
const request = {
parent,
realmId,
realm,
};
// Run request
const [operation] = await gamingClient.createRealm(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateRealm();
checkDeleteRealmProgress(name)
checkDeleteRealmProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.gaming.v1beta.OperationMetadata>>;
Check the status of the long running operation returned by deleteRealm()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.gaming.v1beta.OperationMetadata>> | {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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the realm to delete. Uses the form:
* `projects/{project}/locations/{location}/realms/{realm}`.
*/
// const name = 'abc123'
// Imports the Gaming library
const {RealmsServiceClient} = require('@google-cloud/game-servers').v1beta;
// Instantiates a client
const gamingClient = new RealmsServiceClient();
async function callDeleteRealm() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await gamingClient.deleteRealm(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteRealm();
checkUpdateRealmProgress(name)
checkUpdateRealmProgress(name: string): Promise<LROperation<protos.google.cloud.gaming.v1beta.Realm, protos.google.cloud.gaming.v1beta.OperationMetadata>>;
Check the status of the long running operation returned by updateRealm()
.
Parameter | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
Promise<LROperation<protos.google.cloud.gaming.v1beta.Realm, protos.google.cloud.gaming.v1beta.OperationMetadata>> | {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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The realm to be updated.
* Only fields specified in update_mask are updated.
*/
// const realm = {}
/**
* Required. The update mask applies to the resource. For the `FieldMask`
* definition, see
* https:
* //developers.google.com/protocol-buffers
* // /docs/reference/google.protobuf#fieldmask
*/
// const updateMask = {}
// Imports the Gaming library
const {RealmsServiceClient} = require('@google-cloud/game-servers').v1beta;
// Instantiates a client
const gamingClient = new RealmsServiceClient();
async function callUpdateRealm() {
// Construct request
const request = {
realm,
updateMask,
};
// Run request
const [operation] = await gamingClient.updateRealm(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateRealm();
close()
close(): Promise<void>;
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<void> | {Promise} A promise that resolves when the client is closed. |
createRealm(request, options)
createRealm(request?: protos.google.cloud.gaming.v1beta.ICreateRealmRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.gaming.v1beta.IRealm, protos.google.cloud.gaming.v1beta.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Creates a new realm in a given project and location.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.gaming.v1beta.ICreateRealmRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.gaming.v1beta.IRealm, protos.google.cloud.gaming.v1beta.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent resource name. Uses the form:
* `projects/{project}/locations/{location}`.
*/
// const parent = 'abc123'
/**
* Required. The ID of the realm resource to be created.
*/
// const realmId = 'abc123'
/**
* Required. The realm resource to be created.
*/
// const realm = {}
// Imports the Gaming library
const {RealmsServiceClient} = require('@google-cloud/game-servers').v1beta;
// Instantiates a client
const gamingClient = new RealmsServiceClient();
async function callCreateRealm() {
// Construct request
const request = {
parent,
realmId,
realm,
};
// Run request
const [operation] = await gamingClient.createRealm(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateRealm();
createRealm(request, options, callback)
createRealm(request: protos.google.cloud.gaming.v1beta.ICreateRealmRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.gaming.v1beta.IRealm, protos.google.cloud.gaming.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.gaming.v1beta.ICreateRealmRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.gaming.v1beta.IRealm, protos.google.cloud.gaming.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createRealm(request, callback)
createRealm(request: protos.google.cloud.gaming.v1beta.ICreateRealmRequest, callback: Callback<LROperation<protos.google.cloud.gaming.v1beta.IRealm, protos.google.cloud.gaming.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.gaming.v1beta.ICreateRealmRequest
|
callback |
Callback<LROperation<protos.google.cloud.gaming.v1beta.IRealm, protos.google.cloud.gaming.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deleteRealm(request, options)
deleteRealm(request?: protos.google.cloud.gaming.v1beta.IDeleteRealmRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gaming.v1beta.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Deletes a single realm.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.gaming.v1beta.IDeleteRealmRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gaming.v1beta.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the realm to delete. Uses the form:
* `projects/{project}/locations/{location}/realms/{realm}`.
*/
// const name = 'abc123'
// Imports the Gaming library
const {RealmsServiceClient} = require('@google-cloud/game-servers').v1beta;
// Instantiates a client
const gamingClient = new RealmsServiceClient();
async function callDeleteRealm() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await gamingClient.deleteRealm(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteRealm();
deleteRealm(request, options, callback)
deleteRealm(request: protos.google.cloud.gaming.v1beta.IDeleteRealmRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gaming.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.gaming.v1beta.IDeleteRealmRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gaming.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deleteRealm(request, callback)
deleteRealm(request: protos.google.cloud.gaming.v1beta.IDeleteRealmRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gaming.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.gaming.v1beta.IDeleteRealmRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gaming.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
gameServerClusterPath(project, location, realm, cluster)
gameServerClusterPath(project: string, location: string, realm: string, cluster: string): string;
Return a fully-qualified gameServerCluster resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
realm |
string
|
cluster |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
gameServerConfigPath(project, location, deployment, config)
gameServerConfigPath(project: string, location: string, deployment: string, config: string): string;
Return a fully-qualified gameServerConfig resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
deployment |
string
|
config |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
gameServerDeploymentPath(project, location, deployment)
gameServerDeploymentPath(project: string, location: string, deployment: string): string;
Return a fully-qualified gameServerDeployment resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
deployment |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
gameServerDeploymentRolloutPath(project, location, deployment)
gameServerDeploymentRolloutPath(project: string, location: string, deployment: string): string;
Return a fully-qualified gameServerDeploymentRollout resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
deployment |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
getProjectId()
getProjectId(): Promise<string>;
Returns | |
---|---|
Type | Description |
Promise<string> |
getProjectId(callback)
getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter | |
---|---|
Name | Description |
callback |
Callback<string, undefined, undefined>
|
Returns | |
---|---|
Type | Description |
void |
getRealm(request, options)
getRealm(request?: protos.google.cloud.gaming.v1beta.IGetRealmRequest, options?: CallOptions): Promise<[
protos.google.cloud.gaming.v1beta.IRealm,
protos.google.cloud.gaming.v1beta.IGetRealmRequest | undefined,
{} | undefined
]>;
Gets details of a single realm.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.gaming.v1beta.IGetRealmRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.gaming.v1beta.IRealm,
protos.google.cloud.gaming.v1beta.IGetRealmRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the realm to retrieve. Uses the form:
* `projects/{project}/locations/{location}/realms/{realm}`.
*/
// const name = 'abc123'
// Imports the Gaming library
const {RealmsServiceClient} = require('@google-cloud/game-servers').v1beta;
// Instantiates a client
const gamingClient = new RealmsServiceClient();
async function callGetRealm() {
// Construct request
const request = {
name,
};
// Run request
const response = await gamingClient.getRealm(request);
console.log(response);
}
callGetRealm();
getRealm(request, options, callback)
getRealm(request: protos.google.cloud.gaming.v1beta.IGetRealmRequest, options: CallOptions, callback: Callback<protos.google.cloud.gaming.v1beta.IRealm, protos.google.cloud.gaming.v1beta.IGetRealmRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.gaming.v1beta.IGetRealmRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.gaming.v1beta.IRealm, protos.google.cloud.gaming.v1beta.IGetRealmRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getRealm(request, callback)
getRealm(request: protos.google.cloud.gaming.v1beta.IGetRealmRequest, callback: Callback<protos.google.cloud.gaming.v1beta.IRealm, protos.google.cloud.gaming.v1beta.IGetRealmRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.gaming.v1beta.IGetRealmRequest
|
callback |
Callback<protos.google.cloud.gaming.v1beta.IRealm, protos.google.cloud.gaming.v1beta.IGetRealmRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
initialize()
initialize(): Promise<{
[name: string]: Function;
}>;
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<{
[name: string]: Function;
}> | {Promise} A promise that resolves to an authenticated service stub. |
listRealms(request, options)
listRealms(request?: protos.google.cloud.gaming.v1beta.IListRealmsRequest, options?: CallOptions): Promise<[
protos.google.cloud.gaming.v1beta.IRealm[],
protos.google.cloud.gaming.v1beta.IListRealmsRequest | null,
protos.google.cloud.gaming.v1beta.IListRealmsResponse
]>;
Lists realms in a given project and location.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.gaming.v1beta.IListRealmsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.gaming.v1beta.IRealm[],
protos.google.cloud.gaming.v1beta.IListRealmsRequest | null,
protos.google.cloud.gaming.v1beta.IListRealmsResponse
]> | {Promise} - The promise which resolves to an array. The first element of the array is Array of . 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 |
listRealms(request, options, callback)
listRealms(request: protos.google.cloud.gaming.v1beta.IListRealmsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.gaming.v1beta.IListRealmsRequest, protos.google.cloud.gaming.v1beta.IListRealmsResponse | null | undefined, protos.google.cloud.gaming.v1beta.IRealm>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.gaming.v1beta.IListRealmsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.gaming.v1beta.IListRealmsRequest, protos.google.cloud.gaming.v1beta.IListRealmsResponse | null | undefined, protos.google.cloud.gaming.v1beta.IRealm>
|
Returns | |
---|---|
Type | Description |
void |
listRealms(request, callback)
listRealms(request: protos.google.cloud.gaming.v1beta.IListRealmsRequest, callback: PaginationCallback<protos.google.cloud.gaming.v1beta.IListRealmsRequest, protos.google.cloud.gaming.v1beta.IListRealmsResponse | null | undefined, protos.google.cloud.gaming.v1beta.IRealm>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.gaming.v1beta.IListRealmsRequest
|
callback |
PaginationCallback<protos.google.cloud.gaming.v1beta.IListRealmsRequest, protos.google.cloud.gaming.v1beta.IListRealmsResponse | null | undefined, protos.google.cloud.gaming.v1beta.IRealm>
|
Returns | |
---|---|
Type | Description |
void |
listRealmsAsync(request, options)
listRealmsAsync(request?: protos.google.cloud.gaming.v1beta.IListRealmsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.gaming.v1beta.IRealm>;
Equivalent to listRealms
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.gaming.v1beta.IListRealmsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.gaming.v1beta.IRealm> | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent resource name. Uses the form:
* `projects/{project}/locations/{location}`.
*/
// const parent = 'abc123'
/**
* 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 google.cloud.gaming.v1beta.ListRealmsResponse.next_page_token
* to determine if there are more realms left to be queried.
*/
// const pageSize = 1234
/**
* Optional. The next_page_token value returned from a previous List request,
* if any.
*/
// const pageToken = 'abc123'
/**
* Optional. The filter to apply to list results.
*/
// const filter = 'abc123'
/**
* Optional. Specifies the ordering of results following syntax at
* https://cloud.google.com/apis/design/design_patterns#sorting_order.
*/
// const orderBy = 'abc123'
// Imports the Gaming library
const {RealmsServiceClient} = require('@google-cloud/game-servers').v1beta;
// Instantiates a client
const gamingClient = new RealmsServiceClient();
async function callListRealms() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = await gamingClient.listRealmsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListRealms();
listRealmsStream(request, options)
listRealmsStream(request?: protos.google.cloud.gaming.v1beta.IListRealmsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.gaming.v1beta.IListRealmsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Transform | {Stream} An object stream which emits an object representing 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)
matchClusterFromGameServerClusterName(gameServerClusterName: string): string | number;
Parse the cluster from GameServerCluster resource.
Parameter | |
---|---|
Name | Description |
gameServerClusterName |
string
A fully-qualified path representing GameServerCluster resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the cluster. |
matchConfigFromGameServerConfigName(gameServerConfigName)
matchConfigFromGameServerConfigName(gameServerConfigName: string): string | number;
Parse the config from GameServerConfig resource.
Parameter | |
---|---|
Name | Description |
gameServerConfigName |
string
A fully-qualified path representing GameServerConfig resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the config. |
matchDeploymentFromGameServerConfigName(gameServerConfigName)
matchDeploymentFromGameServerConfigName(gameServerConfigName: string): string | number;
Parse the deployment from GameServerConfig resource.
Parameter | |
---|---|
Name | Description |
gameServerConfigName |
string
A fully-qualified path representing GameServerConfig resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the deployment. |
matchDeploymentFromGameServerDeploymentName(gameServerDeploymentName)
matchDeploymentFromGameServerDeploymentName(gameServerDeploymentName: string): string | number;
Parse the deployment from GameServerDeployment resource.
Parameter | |
---|---|
Name | Description |
gameServerDeploymentName |
string
A fully-qualified path representing GameServerDeployment resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the deployment. |
matchDeploymentFromGameServerDeploymentRolloutName(gameServerDeploymentRolloutName)
matchDeploymentFromGameServerDeploymentRolloutName(gameServerDeploymentRolloutName: string): string | number;
Parse the deployment from GameServerDeploymentRollout resource.
Parameter | |
---|---|
Name | Description |
gameServerDeploymentRolloutName |
string
A fully-qualified path representing GameServerDeploymentRollout resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the deployment. |
matchLocationFromGameServerClusterName(gameServerClusterName)
matchLocationFromGameServerClusterName(gameServerClusterName: string): string | number;
Parse the location from GameServerCluster resource.
Parameter | |
---|---|
Name | Description |
gameServerClusterName |
string
A fully-qualified path representing GameServerCluster resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromGameServerConfigName(gameServerConfigName)
matchLocationFromGameServerConfigName(gameServerConfigName: string): string | number;
Parse the location from GameServerConfig resource.
Parameter | |
---|---|
Name | Description |
gameServerConfigName |
string
A fully-qualified path representing GameServerConfig resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromGameServerDeploymentName(gameServerDeploymentName)
matchLocationFromGameServerDeploymentName(gameServerDeploymentName: string): string | number;
Parse the location from GameServerDeployment resource.
Parameter | |
---|---|
Name | Description |
gameServerDeploymentName |
string
A fully-qualified path representing GameServerDeployment resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromGameServerDeploymentRolloutName(gameServerDeploymentRolloutName)
matchLocationFromGameServerDeploymentRolloutName(gameServerDeploymentRolloutName: string): string | number;
Parse the location from GameServerDeploymentRollout resource.
Parameter | |
---|---|
Name | Description |
gameServerDeploymentRolloutName |
string
A fully-qualified path representing GameServerDeploymentRollout resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromRealmName(realmName)
matchLocationFromRealmName(realmName: string): string | number;
Parse the location from Realm resource.
Parameter | |
---|---|
Name | Description |
realmName |
string
A fully-qualified path representing Realm resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchProjectFromGameServerClusterName(gameServerClusterName)
matchProjectFromGameServerClusterName(gameServerClusterName: string): string | number;
Parse the project from GameServerCluster resource.
Parameter | |
---|---|
Name | Description |
gameServerClusterName |
string
A fully-qualified path representing GameServerCluster resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromGameServerConfigName(gameServerConfigName)
matchProjectFromGameServerConfigName(gameServerConfigName: string): string | number;
Parse the project from GameServerConfig resource.
Parameter | |
---|---|
Name | Description |
gameServerConfigName |
string
A fully-qualified path representing GameServerConfig resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromGameServerDeploymentName(gameServerDeploymentName)
matchProjectFromGameServerDeploymentName(gameServerDeploymentName: string): string | number;
Parse the project from GameServerDeployment resource.
Parameter | |
---|---|
Name | Description |
gameServerDeploymentName |
string
A fully-qualified path representing GameServerDeployment resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromGameServerDeploymentRolloutName(gameServerDeploymentRolloutName)
matchProjectFromGameServerDeploymentRolloutName(gameServerDeploymentRolloutName: string): string | number;
Parse the project from GameServerDeploymentRollout resource.
Parameter | |
---|---|
Name | Description |
gameServerDeploymentRolloutName |
string
A fully-qualified path representing GameServerDeploymentRollout resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromRealmName(realmName)
matchProjectFromRealmName(realmName: string): string | number;
Parse the project from Realm resource.
Parameter | |
---|---|
Name | Description |
realmName |
string
A fully-qualified path representing Realm resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchRealmFromGameServerClusterName(gameServerClusterName)
matchRealmFromGameServerClusterName(gameServerClusterName: string): string | number;
Parse the realm from GameServerCluster resource.
Parameter | |
---|---|
Name | Description |
gameServerClusterName |
string
A fully-qualified path representing GameServerCluster resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the realm. |
matchRealmFromRealmName(realmName)
matchRealmFromRealmName(realmName: string): string | number;
Parse the realm from Realm resource.
Parameter | |
---|---|
Name | Description |
realmName |
string
A fully-qualified path representing Realm resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the realm. |
previewRealmUpdate(request, options)
previewRealmUpdate(request?: protos.google.cloud.gaming.v1beta.IPreviewRealmUpdateRequest, options?: CallOptions): Promise<[
protos.google.cloud.gaming.v1beta.IPreviewRealmUpdateResponse,
protos.google.cloud.gaming.v1beta.IPreviewRealmUpdateRequest | undefined,
{} | undefined
]>;
Previews patches to a single realm.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.gaming.v1beta.IPreviewRealmUpdateRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.gaming.v1beta.IPreviewRealmUpdateResponse,
protos.google.cloud.gaming.v1beta.IPreviewRealmUpdateRequest | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The realm to be updated.
* Only fields specified in update_mask are updated.
*/
// const realm = {}
/**
* Required. The update mask applies to the resource. For the `FieldMask`
* definition, see
* https:
* //developers.google.com/protocol-buffers
* // /docs/reference/google.protobuf#fieldmask
*/
// const updateMask = {}
/**
* Optional. The target timestamp to compute the preview.
*/
// const previewTime = {}
// Imports the Gaming library
const {RealmsServiceClient} = require('@google-cloud/game-servers').v1beta;
// Instantiates a client
const gamingClient = new RealmsServiceClient();
async function callPreviewRealmUpdate() {
// Construct request
const request = {
realm,
updateMask,
};
// Run request
const response = await gamingClient.previewRealmUpdate(request);
console.log(response);
}
callPreviewRealmUpdate();
previewRealmUpdate(request, options, callback)
previewRealmUpdate(request: protos.google.cloud.gaming.v1beta.IPreviewRealmUpdateRequest, options: CallOptions, callback: Callback<protos.google.cloud.gaming.v1beta.IPreviewRealmUpdateResponse, protos.google.cloud.gaming.v1beta.IPreviewRealmUpdateRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.gaming.v1beta.IPreviewRealmUpdateRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.gaming.v1beta.IPreviewRealmUpdateResponse, protos.google.cloud.gaming.v1beta.IPreviewRealmUpdateRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
previewRealmUpdate(request, callback)
previewRealmUpdate(request: protos.google.cloud.gaming.v1beta.IPreviewRealmUpdateRequest, callback: Callback<protos.google.cloud.gaming.v1beta.IPreviewRealmUpdateResponse, protos.google.cloud.gaming.v1beta.IPreviewRealmUpdateRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.gaming.v1beta.IPreviewRealmUpdateRequest
|
callback |
Callback<protos.google.cloud.gaming.v1beta.IPreviewRealmUpdateResponse, protos.google.cloud.gaming.v1beta.IPreviewRealmUpdateRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
realmPath(project, location, realm)
realmPath(project: string, location: string, realm: string): string;
Return a fully-qualified realm resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
realm |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
updateRealm(request, options)
updateRealm(request?: protos.google.cloud.gaming.v1beta.IUpdateRealmRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.gaming.v1beta.IRealm, protos.google.cloud.gaming.v1beta.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
Patches a single realm.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.gaming.v1beta.IUpdateRealmRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
LROperation<protos.google.cloud.gaming.v1beta.IRealm, protos.google.cloud.gaming.v1beta.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The realm to be updated.
* Only fields specified in update_mask are updated.
*/
// const realm = {}
/**
* Required. The update mask applies to the resource. For the `FieldMask`
* definition, see
* https:
* //developers.google.com/protocol-buffers
* // /docs/reference/google.protobuf#fieldmask
*/
// const updateMask = {}
// Imports the Gaming library
const {RealmsServiceClient} = require('@google-cloud/game-servers').v1beta;
// Instantiates a client
const gamingClient = new RealmsServiceClient();
async function callUpdateRealm() {
// Construct request
const request = {
realm,
updateMask,
};
// Run request
const [operation] = await gamingClient.updateRealm(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateRealm();
updateRealm(request, options, callback)
updateRealm(request: protos.google.cloud.gaming.v1beta.IUpdateRealmRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.gaming.v1beta.IRealm, protos.google.cloud.gaming.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.gaming.v1beta.IUpdateRealmRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.gaming.v1beta.IRealm, protos.google.cloud.gaming.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
updateRealm(request, callback)
updateRealm(request: protos.google.cloud.gaming.v1beta.IUpdateRealmRequest, callback: Callback<LROperation<protos.google.cloud.gaming.v1beta.IRealm, protos.google.cloud.gaming.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.gaming.v1beta.IUpdateRealmRequest
|
callback |
Callback<LROperation<protos.google.cloud.gaming.v1beta.IRealm, protos.google.cloud.gaming.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |