Class v1beta.GameServerDeploymentsServiceClient

The game server deployment is used to control the deployment of Agones fleets. v1beta

Package

@google-cloud/game-servers

Constructors

(constructor)(opts)

constructor(opts?: ClientOptions);

Construct an instance of GameServerDeploymentsServiceClient.

Parameter
NameDescription
opts ClientOptions

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;

gameServerDeploymentsServiceStub

gameServerDeploymentsServiceStub?: Promise<{
        [name: string]: Function;
    }>;

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.

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

checkCreateGameServerDeploymentProgress(name)

checkCreateGameServerDeploymentProgress(name: string): Promise<LROperation<protos.google.cloud.gaming.v1beta.GameServerDeployment, protos.google.cloud.gaming.v1beta.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.gaming.v1beta.GameServerDeployment, 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.

Example

  /**
   * 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 game server delpoyment resource to be created.
   */
  // const deploymentId = 'abc123'
  /**
   *  Required. The game server delpoyment resource to be created.
   */
  // const gameServerDeployment = {}

  // Imports the Gaming library
  const {GameServerDeploymentsServiceClient} =
    require('@google-cloud/game-servers').v1beta;

  // Instantiates a client
  const gamingClient = new GameServerDeploymentsServiceClient();

  async function callCreateGameServerDeployment() {
    // Construct request
    const request = {
      parent,
      deploymentId,
      gameServerDeployment,
    };

    // Run request
    const [operation] = await gamingClient.createGameServerDeployment(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateGameServerDeployment();

checkDeleteGameServerDeploymentProgress(name)

checkDeleteGameServerDeploymentProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.gaming.v1beta.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
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.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the game server delpoyment to delete. Uses the form:
   *  `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`.
   */
  // const name = 'abc123'

  // Imports the Gaming library
  const {GameServerDeploymentsServiceClient} =
    require('@google-cloud/game-servers').v1beta;

  // Instantiates a client
  const gamingClient = new GameServerDeploymentsServiceClient();

  async function callDeleteGameServerDeployment() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await gamingClient.deleteGameServerDeployment(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteGameServerDeployment();

checkUpdateGameServerDeploymentProgress(name)

checkUpdateGameServerDeploymentProgress(name: string): Promise<LROperation<protos.google.cloud.gaming.v1beta.GameServerDeployment, protos.google.cloud.gaming.v1beta.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.gaming.v1beta.GameServerDeployment, 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.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The game server delpoyment to be updated.
   *  Only fields specified in update_mask are updated.
   */
  // const gameServerDeployment = {}
  /**
   *  Required. Mask of fields to update. At least one path must be supplied in
   *  this field. For the `FieldMask` definition, see
   *  https:
   *  //developers.google.com/protocol-buffers
   *  // /docs/reference/google.protobuf#fieldmask
   */
  // const updateMask = {}

  // Imports the Gaming library
  const {GameServerDeploymentsServiceClient} =
    require('@google-cloud/game-servers').v1beta;

  // Instantiates a client
  const gamingClient = new GameServerDeploymentsServiceClient();

  async function callUpdateGameServerDeployment() {
    // Construct request
    const request = {
      gameServerDeployment,
      updateMask,
    };

    // Run request
    const [operation] = await gamingClient.updateGameServerDeployment(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateGameServerDeployment();

checkUpdateGameServerDeploymentRolloutProgress(name)

checkUpdateGameServerDeploymentRolloutProgress(name: string): Promise<LROperation<protos.google.cloud.gaming.v1beta.GameServerDeployment, protos.google.cloud.gaming.v1beta.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.gaming.v1beta.GameServerDeployment, 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.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The game server delpoyment rollout to be updated.
   *  Only fields specified in update_mask are updated.
   */
  // const rollout = {}
  /**
   *  Required. Mask of fields to update. At least one path must be supplied in
   *  this field. For the `FieldMask` definition, see
   *  https:
   *  //developers.google.com/protocol-buffers
   *  // /docs/reference/google.protobuf#fieldmask
   */
  // const updateMask = {}

  // Imports the Gaming library
  const {GameServerDeploymentsServiceClient} =
    require('@google-cloud/game-servers').v1beta;

  // Instantiates a client
  const gamingClient = new GameServerDeploymentsServiceClient();

  async function callUpdateGameServerDeploymentRollout() {
    // Construct request
    const request = {
      rollout,
      updateMask,
    };

    // Run request
    const [operation] = await gamingClient.updateGameServerDeploymentRollout(
      request
    );
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateGameServerDeploymentRollout();

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
TypeDescription
Promise<void>

{Promise} A promise that resolves when the client is closed.

createGameServerDeployment(request, options)

createGameServerDeployment(request?: protos.google.cloud.gaming.v1beta.ICreateGameServerDeploymentRequest, options?: CallOptions): Promise<[LROperation<protos.google.cloud.gaming.v1beta.IGameServerDeployment, protos.google.cloud.gaming.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>;

Creates a new game server deployment in a given project and location.

Parameters
NameDescription
request protos.google.cloud.gaming.v1beta.ICreateGameServerDeploymentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[LROperation<protos.google.cloud.gaming.v1beta.IGameServerDeployment, 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 promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * 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 game server delpoyment resource to be created.
   */
  // const deploymentId = 'abc123'
  /**
   *  Required. The game server delpoyment resource to be created.
   */
  // const gameServerDeployment = {}

  // Imports the Gaming library
  const {GameServerDeploymentsServiceClient} =
    require('@google-cloud/game-servers').v1beta;

  // Instantiates a client
  const gamingClient = new GameServerDeploymentsServiceClient();

  async function callCreateGameServerDeployment() {
    // Construct request
    const request = {
      parent,
      deploymentId,
      gameServerDeployment,
    };

    // Run request
    const [operation] = await gamingClient.createGameServerDeployment(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateGameServerDeployment();

createGameServerDeployment(request, options, callback)

createGameServerDeployment(request: protos.google.cloud.gaming.v1beta.ICreateGameServerDeploymentRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.gaming.v1beta.IGameServerDeployment, protos.google.cloud.gaming.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.gaming.v1beta.ICreateGameServerDeploymentRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.gaming.v1beta.IGameServerDeployment, protos.google.cloud.gaming.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createGameServerDeployment(request, callback)

createGameServerDeployment(request: protos.google.cloud.gaming.v1beta.ICreateGameServerDeploymentRequest, callback: Callback<LROperation<protos.google.cloud.gaming.v1beta.IGameServerDeployment, protos.google.cloud.gaming.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.gaming.v1beta.ICreateGameServerDeploymentRequest
callback Callback<LROperation<protos.google.cloud.gaming.v1beta.IGameServerDeployment, protos.google.cloud.gaming.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteGameServerDeployment(request, options)

deleteGameServerDeployment(request?: protos.google.cloud.gaming.v1beta.IDeleteGameServerDeploymentRequest, options?: CallOptions): Promise<[LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gaming.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>;

Deletes a single game server deployment.

Parameters
NameDescription
request protos.google.cloud.gaming.v1beta.IDeleteGameServerDeploymentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
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 promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the game server delpoyment to delete. Uses the form:
   *  `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`.
   */
  // const name = 'abc123'

  // Imports the Gaming library
  const {GameServerDeploymentsServiceClient} =
    require('@google-cloud/game-servers').v1beta;

  // Instantiates a client
  const gamingClient = new GameServerDeploymentsServiceClient();

  async function callDeleteGameServerDeployment() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await gamingClient.deleteGameServerDeployment(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callDeleteGameServerDeployment();

deleteGameServerDeployment(request, options, callback)

deleteGameServerDeployment(request: protos.google.cloud.gaming.v1beta.IDeleteGameServerDeploymentRequest, 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
NameDescription
request protos.google.cloud.gaming.v1beta.IDeleteGameServerDeploymentRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gaming.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteGameServerDeployment(request, callback)

deleteGameServerDeployment(request: protos.google.cloud.gaming.v1beta.IDeleteGameServerDeploymentRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gaming.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.gaming.v1beta.IDeleteGameServerDeploymentRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.gaming.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

fetchDeploymentState(request, options)

fetchDeploymentState(request?: protos.google.cloud.gaming.v1beta.IFetchDeploymentStateRequest, options?: CallOptions): Promise<[protos.google.cloud.gaming.v1beta.IFetchDeploymentStateResponse, (protos.google.cloud.gaming.v1beta.IFetchDeploymentStateRequest | undefined), {} | undefined]>;

Retrieves information about the current state of the game server deployment. Gathers all the Agones fleets and Agones autoscalers, including fleets running an older version of the game server deployment.

Parameters
NameDescription
request protos.google.cloud.gaming.v1beta.IFetchDeploymentStateRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.gaming.v1beta.IFetchDeploymentStateResponse, (protos.google.cloud.gaming.v1beta.IFetchDeploymentStateRequest | undefined), {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [FetchDeploymentStateResponse]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the game server delpoyment. Uses the form:
   *  `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`.
   */
  // const name = 'abc123'

  // Imports the Gaming library
  const {GameServerDeploymentsServiceClient} =
    require('@google-cloud/game-servers').v1beta;

  // Instantiates a client
  const gamingClient = new GameServerDeploymentsServiceClient();

  async function callFetchDeploymentState() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await gamingClient.fetchDeploymentState(request);
    console.log(response);
  }

  callFetchDeploymentState();

fetchDeploymentState(request, options, callback)

fetchDeploymentState(request: protos.google.cloud.gaming.v1beta.IFetchDeploymentStateRequest, options: CallOptions, callback: Callback<protos.google.cloud.gaming.v1beta.IFetchDeploymentStateResponse, protos.google.cloud.gaming.v1beta.IFetchDeploymentStateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.gaming.v1beta.IFetchDeploymentStateRequest
options CallOptions
callback Callback<protos.google.cloud.gaming.v1beta.IFetchDeploymentStateResponse, protos.google.cloud.gaming.v1beta.IFetchDeploymentStateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

fetchDeploymentState(request, callback)

fetchDeploymentState(request: protos.google.cloud.gaming.v1beta.IFetchDeploymentStateRequest, callback: Callback<protos.google.cloud.gaming.v1beta.IFetchDeploymentStateResponse, protos.google.cloud.gaming.v1beta.IFetchDeploymentStateRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.gaming.v1beta.IFetchDeploymentStateRequest
callback Callback<protos.google.cloud.gaming.v1beta.IFetchDeploymentStateResponse, protos.google.cloud.gaming.v1beta.IFetchDeploymentStateRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
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
NameDescription
project string
location string
realm string
cluster string
Returns
TypeDescription
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
NameDescription
project string
location string
deployment string
config string
Returns
TypeDescription
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
NameDescription
project string
location string
deployment string
Returns
TypeDescription
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
NameDescription
project string
location string
deployment string
Returns
TypeDescription
string

{string} Resource name string.

getGameServerDeployment(request, options)

getGameServerDeployment(request?: protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRequest, options?: CallOptions): Promise<[protos.google.cloud.gaming.v1beta.IGameServerDeployment, (protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRequest | undefined), {} | undefined]>;

Gets details of a single game server deployment.

Parameters
NameDescription
request protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.gaming.v1beta.IGameServerDeployment, (protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRequest | undefined), {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [GameServerDeployment]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the game server delpoyment to retrieve. Uses the
   *  form:
   *  `projects/{project}/locations/{location}/gameServerDeployments/{deployment}`.
   */
  // const name = 'abc123'

  // Imports the Gaming library
  const {GameServerDeploymentsServiceClient} =
    require('@google-cloud/game-servers').v1beta;

  // Instantiates a client
  const gamingClient = new GameServerDeploymentsServiceClient();

  async function callGetGameServerDeployment() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await gamingClient.getGameServerDeployment(request);
    console.log(response);
  }

  callGetGameServerDeployment();

getGameServerDeployment(request, options, callback)

getGameServerDeployment(request: protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRequest, options: CallOptions, callback: Callback<protos.google.cloud.gaming.v1beta.IGameServerDeployment, protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRequest
options CallOptions
callback Callback<protos.google.cloud.gaming.v1beta.IGameServerDeployment, protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getGameServerDeployment(request, callback)

getGameServerDeployment(request: protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRequest, callback: Callback<protos.google.cloud.gaming.v1beta.IGameServerDeployment, protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRequest
callback Callback<protos.google.cloud.gaming.v1beta.IGameServerDeployment, protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getGameServerDeploymentRollout(request, options)

getGameServerDeploymentRollout(request?: protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRolloutRequest, options?: CallOptions): Promise<[protos.google.cloud.gaming.v1beta.IGameServerDeploymentRollout, (protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRolloutRequest | undefined), {} | undefined]>;

Gets details a single game server deployment rollout.

Parameters
NameDescription
request protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRolloutRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.gaming.v1beta.IGameServerDeploymentRollout, (protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRolloutRequest | undefined), {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [GameServerDeploymentRollout]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the game server delpoyment to retrieve. Uses the
   *  form:
   *  `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/rollout`.
   */
  // const name = 'abc123'

  // Imports the Gaming library
  const {GameServerDeploymentsServiceClient} =
    require('@google-cloud/game-servers').v1beta;

  // Instantiates a client
  const gamingClient = new GameServerDeploymentsServiceClient();

  async function callGetGameServerDeploymentRollout() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await gamingClient.getGameServerDeploymentRollout(request);
    console.log(response);
  }

  callGetGameServerDeploymentRollout();

getGameServerDeploymentRollout(request, options, callback)

getGameServerDeploymentRollout(request: protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRolloutRequest, options: CallOptions, callback: Callback<protos.google.cloud.gaming.v1beta.IGameServerDeploymentRollout, protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRolloutRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRolloutRequest
options CallOptions
callback Callback<protos.google.cloud.gaming.v1beta.IGameServerDeploymentRollout, protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRolloutRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getGameServerDeploymentRollout(request, callback)

getGameServerDeploymentRollout(request: protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRolloutRequest, callback: Callback<protos.google.cloud.gaming.v1beta.IGameServerDeploymentRollout, protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRolloutRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRolloutRequest
callback Callback<protos.google.cloud.gaming.v1beta.IGameServerDeploymentRollout, protos.google.cloud.gaming.v1beta.IGetGameServerDeploymentRolloutRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getProjectId()

getProjectId(): Promise<string>;
Returns
TypeDescription
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
NameDescription
callback Callback<string, undefined, undefined>
Returns
TypeDescription
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
TypeDescription
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

listGameServerDeployments(request, options)

listGameServerDeployments(request?: protos.google.cloud.gaming.v1beta.IListGameServerDeploymentsRequest, options?: CallOptions): Promise<[protos.google.cloud.gaming.v1beta.IGameServerDeployment[], protos.google.cloud.gaming.v1beta.IListGameServerDeploymentsRequest | null, protos.google.cloud.gaming.v1beta.IListGameServerDeploymentsResponse]>;

Lists game server deployments in a given project and location.

Parameters
NameDescription
request protos.google.cloud.gaming.v1beta.IListGameServerDeploymentsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.gaming.v1beta.IGameServerDeployment[], protos.google.cloud.gaming.v1beta.IListGameServerDeploymentsRequest | null, protos.google.cloud.gaming.v1beta.IListGameServerDeploymentsResponse]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [GameServerDeployment]. 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 listGameServerDeploymentsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listGameServerDeployments(request, options, callback)

listGameServerDeployments(request: protos.google.cloud.gaming.v1beta.IListGameServerDeploymentsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.gaming.v1beta.IListGameServerDeploymentsRequest, protos.google.cloud.gaming.v1beta.IListGameServerDeploymentsResponse | null | undefined, protos.google.cloud.gaming.v1beta.IGameServerDeployment>): void;
Parameters
NameDescription
request protos.google.cloud.gaming.v1beta.IListGameServerDeploymentsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.gaming.v1beta.IListGameServerDeploymentsRequest, protos.google.cloud.gaming.v1beta.IListGameServerDeploymentsResponse | null | undefined, protos.google.cloud.gaming.v1beta.IGameServerDeployment>
Returns
TypeDescription
void

listGameServerDeployments(request, callback)

listGameServerDeployments(request: protos.google.cloud.gaming.v1beta.IListGameServerDeploymentsRequest, callback: PaginationCallback<protos.google.cloud.gaming.v1beta.IListGameServerDeploymentsRequest, protos.google.cloud.gaming.v1beta.IListGameServerDeploymentsResponse | null | undefined, protos.google.cloud.gaming.v1beta.IGameServerDeployment>): void;
Parameters
NameDescription
request protos.google.cloud.gaming.v1beta.IListGameServerDeploymentsRequest
callback PaginationCallback<protos.google.cloud.gaming.v1beta.IListGameServerDeploymentsRequest, protos.google.cloud.gaming.v1beta.IListGameServerDeploymentsResponse | null | undefined, protos.google.cloud.gaming.v1beta.IGameServerDeployment>
Returns
TypeDescription
void

listGameServerDeploymentsAsync(request, options)

listGameServerDeploymentsAsync(request?: protos.google.cloud.gaming.v1beta.IListGameServerDeploymentsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.gaming.v1beta.IGameServerDeployment>;

Equivalent to listGameServerDeployments, but returns an iterable object.

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

Parameters
NameDescription
request protos.google.cloud.gaming.v1beta.IListGameServerDeploymentsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.gaming.v1beta.IGameServerDeployment>

{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 [GameServerDeployment]. 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.

Example

  /**
   * 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, the
   *  server will pick an appropriate default. The server may return fewer items
   *  than requested. A caller should only rely on response's
   *  next_page_token google.cloud.gaming.v1beta.ListGameServerDeploymentsResponse.next_page_token
   *  to determine if there are more GameServerDeployments 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 {GameServerDeploymentsServiceClient} =
    require('@google-cloud/game-servers').v1beta;

  // Instantiates a client
  const gamingClient = new GameServerDeploymentsServiceClient();

  async function callListGameServerDeployments() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await gamingClient.listGameServerDeploymentsAsync(request);
    for await (const response of iterable) {
      console.log(response);
    }
  }

  callListGameServerDeployments();

listGameServerDeploymentsStream(request, options)

listGameServerDeploymentsStream(request?: protos.google.cloud.gaming.v1beta.IListGameServerDeploymentsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.gaming.v1beta.IListGameServerDeploymentsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing [GameServerDeployment] 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 listGameServerDeploymentsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

matchClusterFromGameServerClusterName(gameServerClusterName)

matchClusterFromGameServerClusterName(gameServerClusterName: string): string | number;

Parse the cluster from GameServerCluster resource.

Parameter
NameDescription
gameServerClusterName string

A fully-qualified path representing GameServerCluster resource.

Returns
TypeDescription
string | number

{string} A string representing the cluster.

matchConfigFromGameServerConfigName(gameServerConfigName)

matchConfigFromGameServerConfigName(gameServerConfigName: string): string | number;

Parse the config from GameServerConfig resource.

Parameter
NameDescription
gameServerConfigName string

A fully-qualified path representing GameServerConfig resource.

Returns
TypeDescription
string | number

{string} A string representing the config.

matchDeploymentFromGameServerConfigName(gameServerConfigName)

matchDeploymentFromGameServerConfigName(gameServerConfigName: string): string | number;

Parse the deployment from GameServerConfig resource.

Parameter
NameDescription
gameServerConfigName string

A fully-qualified path representing GameServerConfig resource.

Returns
TypeDescription
string | number

{string} A string representing the deployment.

matchDeploymentFromGameServerDeploymentName(gameServerDeploymentName)

matchDeploymentFromGameServerDeploymentName(gameServerDeploymentName: string): string | number;

Parse the deployment from GameServerDeployment resource.

Parameter
NameDescription
gameServerDeploymentName string

A fully-qualified path representing GameServerDeployment resource.

Returns
TypeDescription
string | number

{string} A string representing the deployment.

matchDeploymentFromGameServerDeploymentRolloutName(gameServerDeploymentRolloutName)

matchDeploymentFromGameServerDeploymentRolloutName(gameServerDeploymentRolloutName: string): string | number;

Parse the deployment from GameServerDeploymentRollout resource.

Parameter
NameDescription
gameServerDeploymentRolloutName string

A fully-qualified path representing GameServerDeploymentRollout resource.

Returns
TypeDescription
string | number

{string} A string representing the deployment.

matchLocationFromGameServerClusterName(gameServerClusterName)

matchLocationFromGameServerClusterName(gameServerClusterName: string): string | number;

Parse the location from GameServerCluster resource.

Parameter
NameDescription
gameServerClusterName string

A fully-qualified path representing GameServerCluster resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromGameServerConfigName(gameServerConfigName)

matchLocationFromGameServerConfigName(gameServerConfigName: string): string | number;

Parse the location from GameServerConfig resource.

Parameter
NameDescription
gameServerConfigName string

A fully-qualified path representing GameServerConfig resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromGameServerDeploymentName(gameServerDeploymentName)

matchLocationFromGameServerDeploymentName(gameServerDeploymentName: string): string | number;

Parse the location from GameServerDeployment resource.

Parameter
NameDescription
gameServerDeploymentName string

A fully-qualified path representing GameServerDeployment resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromGameServerDeploymentRolloutName(gameServerDeploymentRolloutName)

matchLocationFromGameServerDeploymentRolloutName(gameServerDeploymentRolloutName: string): string | number;

Parse the location from GameServerDeploymentRollout resource.

Parameter
NameDescription
gameServerDeploymentRolloutName string

A fully-qualified path representing GameServerDeploymentRollout resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchLocationFromRealmName(realmName)

matchLocationFromRealmName(realmName: string): string | number;

Parse the location from Realm resource.

Parameter
NameDescription
realmName string

A fully-qualified path representing Realm resource.

Returns
TypeDescription
string | number

{string} A string representing the location.

matchProjectFromGameServerClusterName(gameServerClusterName)

matchProjectFromGameServerClusterName(gameServerClusterName: string): string | number;

Parse the project from GameServerCluster resource.

Parameter
NameDescription
gameServerClusterName string

A fully-qualified path representing GameServerCluster resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromGameServerConfigName(gameServerConfigName)

matchProjectFromGameServerConfigName(gameServerConfigName: string): string | number;

Parse the project from GameServerConfig resource.

Parameter
NameDescription
gameServerConfigName string

A fully-qualified path representing GameServerConfig resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromGameServerDeploymentName(gameServerDeploymentName)

matchProjectFromGameServerDeploymentName(gameServerDeploymentName: string): string | number;

Parse the project from GameServerDeployment resource.

Parameter
NameDescription
gameServerDeploymentName string

A fully-qualified path representing GameServerDeployment resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromGameServerDeploymentRolloutName(gameServerDeploymentRolloutName)

matchProjectFromGameServerDeploymentRolloutName(gameServerDeploymentRolloutName: string): string | number;

Parse the project from GameServerDeploymentRollout resource.

Parameter
NameDescription
gameServerDeploymentRolloutName string

A fully-qualified path representing GameServerDeploymentRollout resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchProjectFromRealmName(realmName)

matchProjectFromRealmName(realmName: string): string | number;

Parse the project from Realm resource.

Parameter
NameDescription
realmName string

A fully-qualified path representing Realm resource.

Returns
TypeDescription
string | number

{string} A string representing the project.

matchRealmFromGameServerClusterName(gameServerClusterName)

matchRealmFromGameServerClusterName(gameServerClusterName: string): string | number;

Parse the realm from GameServerCluster resource.

Parameter
NameDescription
gameServerClusterName string

A fully-qualified path representing GameServerCluster resource.

Returns
TypeDescription
string | number

{string} A string representing the realm.

matchRealmFromRealmName(realmName)

matchRealmFromRealmName(realmName: string): string | number;

Parse the realm from Realm resource.

Parameter
NameDescription
realmName string

A fully-qualified path representing Realm resource.

Returns
TypeDescription
string | number

{string} A string representing the realm.

previewGameServerDeploymentRollout(request, options)

previewGameServerDeploymentRollout(request?: protos.google.cloud.gaming.v1beta.IPreviewGameServerDeploymentRolloutRequest, options?: CallOptions): Promise<[protos.google.cloud.gaming.v1beta.IPreviewGameServerDeploymentRolloutResponse, (protos.google.cloud.gaming.v1beta.IPreviewGameServerDeploymentRolloutRequest | undefined), {} | undefined]>;

Previews the game server deployment rollout. This API does not mutate the rollout resource.

Parameters
NameDescription
request protos.google.cloud.gaming.v1beta.IPreviewGameServerDeploymentRolloutRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[protos.google.cloud.gaming.v1beta.IPreviewGameServerDeploymentRolloutResponse, (protos.google.cloud.gaming.v1beta.IPreviewGameServerDeploymentRolloutRequest | undefined), {} | undefined]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [PreviewGameServerDeploymentRolloutResponse]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The game server deployment rollout to be updated.
   *  Only fields specified in update_mask are updated.
   */
  // const rollout = {}
  /**
   *  Optional. Mask of fields to update. At least one path must be supplied in
   *  this field. 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. Defaults to the
   *  immediately after the proposed rollout completes.
   */
  // const previewTime = {}

  // Imports the Gaming library
  const {GameServerDeploymentsServiceClient} =
    require('@google-cloud/game-servers').v1beta;

  // Instantiates a client
  const gamingClient = new GameServerDeploymentsServiceClient();

  async function callPreviewGameServerDeploymentRollout() {
    // Construct request
    const request = {
      rollout,
    };

    // Run request
    const response = await gamingClient.previewGameServerDeploymentRollout(
      request
    );
    console.log(response);
  }

  callPreviewGameServerDeploymentRollout();

previewGameServerDeploymentRollout(request, options, callback)

previewGameServerDeploymentRollout(request: protos.google.cloud.gaming.v1beta.IPreviewGameServerDeploymentRolloutRequest, options: CallOptions, callback: Callback<protos.google.cloud.gaming.v1beta.IPreviewGameServerDeploymentRolloutResponse, protos.google.cloud.gaming.v1beta.IPreviewGameServerDeploymentRolloutRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.gaming.v1beta.IPreviewGameServerDeploymentRolloutRequest
options CallOptions
callback Callback<protos.google.cloud.gaming.v1beta.IPreviewGameServerDeploymentRolloutResponse, protos.google.cloud.gaming.v1beta.IPreviewGameServerDeploymentRolloutRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

previewGameServerDeploymentRollout(request, callback)

previewGameServerDeploymentRollout(request: protos.google.cloud.gaming.v1beta.IPreviewGameServerDeploymentRolloutRequest, callback: Callback<protos.google.cloud.gaming.v1beta.IPreviewGameServerDeploymentRolloutResponse, protos.google.cloud.gaming.v1beta.IPreviewGameServerDeploymentRolloutRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.gaming.v1beta.IPreviewGameServerDeploymentRolloutRequest
callback Callback<protos.google.cloud.gaming.v1beta.IPreviewGameServerDeploymentRolloutResponse, protos.google.cloud.gaming.v1beta.IPreviewGameServerDeploymentRolloutRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

realmPath(project, location, realm)

realmPath(project: string, location: string, realm: string): string;

Return a fully-qualified realm resource name string.

Parameters
NameDescription
project string
location string
realm string
Returns
TypeDescription
string

{string} Resource name string.

updateGameServerDeployment(request, options)

updateGameServerDeployment(request?: protos.google.cloud.gaming.v1beta.IUpdateGameServerDeploymentRequest, options?: CallOptions): Promise<[LROperation<protos.google.cloud.gaming.v1beta.IGameServerDeployment, protos.google.cloud.gaming.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>;

Patches a game server deployment.

Parameters
NameDescription
request protos.google.cloud.gaming.v1beta.IUpdateGameServerDeploymentRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[LROperation<protos.google.cloud.gaming.v1beta.IGameServerDeployment, 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 promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The game server delpoyment to be updated.
   *  Only fields specified in update_mask are updated.
   */
  // const gameServerDeployment = {}
  /**
   *  Required. Mask of fields to update. At least one path must be supplied in
   *  this field. For the `FieldMask` definition, see
   *  https:
   *  //developers.google.com/protocol-buffers
   *  // /docs/reference/google.protobuf#fieldmask
   */
  // const updateMask = {}

  // Imports the Gaming library
  const {GameServerDeploymentsServiceClient} =
    require('@google-cloud/game-servers').v1beta;

  // Instantiates a client
  const gamingClient = new GameServerDeploymentsServiceClient();

  async function callUpdateGameServerDeployment() {
    // Construct request
    const request = {
      gameServerDeployment,
      updateMask,
    };

    // Run request
    const [operation] = await gamingClient.updateGameServerDeployment(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateGameServerDeployment();

updateGameServerDeployment(request, options, callback)

updateGameServerDeployment(request: protos.google.cloud.gaming.v1beta.IUpdateGameServerDeploymentRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.gaming.v1beta.IGameServerDeployment, protos.google.cloud.gaming.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.gaming.v1beta.IUpdateGameServerDeploymentRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.gaming.v1beta.IGameServerDeployment, protos.google.cloud.gaming.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateGameServerDeployment(request, callback)

updateGameServerDeployment(request: protos.google.cloud.gaming.v1beta.IUpdateGameServerDeploymentRequest, callback: Callback<LROperation<protos.google.cloud.gaming.v1beta.IGameServerDeployment, protos.google.cloud.gaming.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.gaming.v1beta.IUpdateGameServerDeploymentRequest
callback Callback<LROperation<protos.google.cloud.gaming.v1beta.IGameServerDeployment, protos.google.cloud.gaming.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateGameServerDeploymentRollout(request, options)

updateGameServerDeploymentRollout(request?: protos.google.cloud.gaming.v1beta.IUpdateGameServerDeploymentRolloutRequest, options?: CallOptions): Promise<[LROperation<protos.google.cloud.gaming.v1beta.IGameServerDeployment, protos.google.cloud.gaming.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>;

Patches a single game server deployment rollout. The method will not return an error if the update does not affect any existing realms. For example - if the default_game_server_config is changed but all existing realms use the override, that is valid. Similarly, if a non existing realm is explicitly called out in game_server_config_overrides field, that will also not result in an error.

Parameters
NameDescription
request protos.google.cloud.gaming.v1beta.IUpdateGameServerDeploymentRolloutRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[LROperation<protos.google.cloud.gaming.v1beta.IGameServerDeployment, 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 promise() method returns a promise you can await for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The game server delpoyment rollout to be updated.
   *  Only fields specified in update_mask are updated.
   */
  // const rollout = {}
  /**
   *  Required. Mask of fields to update. At least one path must be supplied in
   *  this field. For the `FieldMask` definition, see
   *  https:
   *  //developers.google.com/protocol-buffers
   *  // /docs/reference/google.protobuf#fieldmask
   */
  // const updateMask = {}

  // Imports the Gaming library
  const {GameServerDeploymentsServiceClient} =
    require('@google-cloud/game-servers').v1beta;

  // Instantiates a client
  const gamingClient = new GameServerDeploymentsServiceClient();

  async function callUpdateGameServerDeploymentRollout() {
    // Construct request
    const request = {
      rollout,
      updateMask,
    };

    // Run request
    const [operation] = await gamingClient.updateGameServerDeploymentRollout(
      request
    );
    const [response] = await operation.promise();
    console.log(response);
  }

  callUpdateGameServerDeploymentRollout();

updateGameServerDeploymentRollout(request, options, callback)

updateGameServerDeploymentRollout(request: protos.google.cloud.gaming.v1beta.IUpdateGameServerDeploymentRolloutRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.gaming.v1beta.IGameServerDeployment, protos.google.cloud.gaming.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.gaming.v1beta.IUpdateGameServerDeploymentRolloutRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.gaming.v1beta.IGameServerDeployment, protos.google.cloud.gaming.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateGameServerDeploymentRollout(request, callback)

updateGameServerDeploymentRollout(request: protos.google.cloud.gaming.v1beta.IUpdateGameServerDeploymentRolloutRequest, callback: Callback<LROperation<protos.google.cloud.gaming.v1beta.IGameServerDeployment, protos.google.cloud.gaming.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.gaming.v1beta.IUpdateGameServerDeploymentRolloutRequest
callback Callback<LROperation<protos.google.cloud.gaming.v1beta.IGameServerDeployment, protos.google.cloud.gaming.v1beta.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void