Class v1.VersionsClient (1.1.0)

Manages versions of a service. v1

Package

@google-cloud/appengine-admin

Constructors

(constructor)(opts)

constructor(opts?: ClientOptions);

Construct an instance of VersionsClient.

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;

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.

versionsStub

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

warn

warn: (code: string, message: string, warnType?: string) => void;

Methods

checkCreateVersionProgress(name)

checkCreateVersionProgress(name: string): Promise<LROperation<protos.google.appengine.v1.Version, protos.google.appengine.v1.CreateVersionMetadataV1>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.appengine.v1.Version, protos.google.appengine.v1.CreateVersionMetadataV1>>

{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.
   */
  /**
   *  Name of the parent resource to create this version under. Example:
   *  `apps/myapp/services/default`.
   */
  // const parent = 'abc123'
  /**
   *  Application deployment configuration.
   */
  // const version = {}

  // Imports the Appengine library
  const {VersionsClient} = require('@google-cloud/appengine-admin').v1;

  // Instantiates a client
  const appengineClient = new VersionsClient();

  async function callCreateVersion() {
    // Construct request
    const request = {};

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

  callCreateVersion();

checkDeleteVersionProgress(name)

checkDeleteVersionProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.appengine.v1.OperationMetadataV1>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.appengine.v1.OperationMetadataV1>>

{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.
   */
  /**
   *  Name of the resource requested. Example:
   *  `apps/myapp/services/default/versions/v1`.
   */
  // const name = 'abc123'

  // Imports the Appengine library
  const {VersionsClient} = require('@google-cloud/appengine-admin').v1;

  // Instantiates a client
  const appengineClient = new VersionsClient();

  async function callDeleteVersion() {
    // Construct request
    const request = {};

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

  callDeleteVersion();

checkUpdateVersionProgress(name)

checkUpdateVersionProgress(name: string): Promise<LROperation<protos.google.appengine.v1.Version, protos.google.appengine.v1.OperationMetadataV1>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.appengine.v1.Version, protos.google.appengine.v1.OperationMetadataV1>>

{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.
   */
  /**
   *  Name of the resource to update. Example:
   *  `apps/myapp/services/default/versions/1`.
   */
  // const name = 'abc123'
  /**
   *  A Version containing the updated resource. Only fields set in the field
   *  mask will be updated.
   */
  // const version = {}
  /**
   *  Standard field mask for the set of fields to be updated.
   */
  // const updateMask = {}

  // Imports the Appengine library
  const {VersionsClient} = require('@google-cloud/appengine-admin').v1;

  // Instantiates a client
  const appengineClient = new VersionsClient();

  async function callUpdateVersion() {
    // Construct request
    const request = {};

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

  callUpdateVersion();

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.

createVersion(request, options)

createVersion(request?: protos.google.appengine.v1.ICreateVersionRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.appengine.v1.IVersion, protos.google.appengine.v1.ICreateVersionMetadataV1>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deploys code and resource files to a new version.

Parameters
NameDescription
request protos.google.appengine.v1.ICreateVersionRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.appengine.v1.IVersion, protos.google.appengine.v1.ICreateVersionMetadataV1>, 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.
   */
  /**
   *  Name of the parent resource to create this version under. Example:
   *  `apps/myapp/services/default`.
   */
  // const parent = 'abc123'
  /**
   *  Application deployment configuration.
   */
  // const version = {}

  // Imports the Appengine library
  const {VersionsClient} = require('@google-cloud/appengine-admin').v1;

  // Instantiates a client
  const appengineClient = new VersionsClient();

  async function callCreateVersion() {
    // Construct request
    const request = {};

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

  callCreateVersion();

createVersion(request, options, callback)

createVersion(request: protos.google.appengine.v1.ICreateVersionRequest, options: CallOptions, callback: Callback<LROperation<protos.google.appengine.v1.IVersion, protos.google.appengine.v1.ICreateVersionMetadataV1>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.appengine.v1.ICreateVersionRequest
options CallOptions
callback Callback<LROperation<protos.google.appengine.v1.IVersion, protos.google.appengine.v1.ICreateVersionMetadataV1>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createVersion(request, callback)

createVersion(request: protos.google.appengine.v1.ICreateVersionRequest, callback: Callback<LROperation<protos.google.appengine.v1.IVersion, protos.google.appengine.v1.ICreateVersionMetadataV1>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.appengine.v1.ICreateVersionRequest
callback Callback<LROperation<protos.google.appengine.v1.IVersion, protos.google.appengine.v1.ICreateVersionMetadataV1>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteVersion(request, options)

deleteVersion(request?: protos.google.appengine.v1.IDeleteVersionRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.appengine.v1.IOperationMetadataV1>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Deletes an existing Version resource.

Parameters
NameDescription
request protos.google.appengine.v1.IDeleteVersionRequest

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.appengine.v1.IOperationMetadataV1>, 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.
   */
  /**
   *  Name of the resource requested. Example:
   *  `apps/myapp/services/default/versions/v1`.
   */
  // const name = 'abc123'

  // Imports the Appengine library
  const {VersionsClient} = require('@google-cloud/appengine-admin').v1;

  // Instantiates a client
  const appengineClient = new VersionsClient();

  async function callDeleteVersion() {
    // Construct request
    const request = {};

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

  callDeleteVersion();

deleteVersion(request, options, callback)

deleteVersion(request: protos.google.appengine.v1.IDeleteVersionRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.appengine.v1.IOperationMetadataV1>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.appengine.v1.IDeleteVersionRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.appengine.v1.IOperationMetadataV1>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteVersion(request, callback)

deleteVersion(request: protos.google.appengine.v1.IDeleteVersionRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.appengine.v1.IOperationMetadataV1>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.appengine.v1.IDeleteVersionRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.appengine.v1.IOperationMetadataV1>, protos.google.longrunning.IOperation | 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

getVersion(request, options)

getVersion(request?: protos.google.appengine.v1.IGetVersionRequest, options?: CallOptions): Promise<[
        protos.google.appengine.v1.IVersion,
        protos.google.appengine.v1.IGetVersionRequest | undefined,
        {} | undefined
    ]>;

Gets the specified Version resource. By default, only a BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get the full resource.

Parameters
NameDescription
request protos.google.appengine.v1.IGetVersionRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.appengine.v1.IVersion, protos.google.appengine.v1.IGetVersionRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [Version]. 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.
   */
  /**
   *  Name of the resource requested. Example:
   *  `apps/myapp/services/default/versions/v1`.
   */
  // const name = 'abc123'
  /**
   *  Controls the set of fields returned in the `Get` response.
   */
  // const view = {}

  // Imports the Appengine library
  const {VersionsClient} = require('@google-cloud/appengine-admin').v1;

  // Instantiates a client
  const appengineClient = new VersionsClient();

  async function callGetVersion() {
    // Construct request
    const request = {};

    // Run request
    const response = await appengineClient.getVersion(request);
    console.log(response);
  }

  callGetVersion();

getVersion(request, options, callback)

getVersion(request: protos.google.appengine.v1.IGetVersionRequest, options: CallOptions, callback: Callback<protos.google.appengine.v1.IVersion, protos.google.appengine.v1.IGetVersionRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.appengine.v1.IGetVersionRequest
options CallOptions
callback Callback<protos.google.appengine.v1.IVersion, protos.google.appengine.v1.IGetVersionRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getVersion(request, callback)

getVersion(request: protos.google.appengine.v1.IGetVersionRequest, callback: Callback<protos.google.appengine.v1.IVersion, protos.google.appengine.v1.IGetVersionRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.appengine.v1.IGetVersionRequest
callback Callback<protos.google.appengine.v1.IVersion, protos.google.appengine.v1.IGetVersionRequest | null | undefined, {} | null | 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.

instancePath(app, service, version, instance)

instancePath(app: string, service: string, version: string, instance: string): string;

Return a fully-qualified instance resource name string.

Parameters
NameDescription
app string
service string
version string
instance string
Returns
TypeDescription
string

{string} Resource name string.

listVersions(request, options)

listVersions(request?: protos.google.appengine.v1.IListVersionsRequest, options?: CallOptions): Promise<[
        protos.google.appengine.v1.IVersion[],
        protos.google.appengine.v1.IListVersionsRequest | null,
        protos.google.appengine.v1.IListVersionsResponse
    ]>;

Lists the versions of a service.

Parameters
NameDescription
request protos.google.appengine.v1.IListVersionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.appengine.v1.IVersion[], protos.google.appengine.v1.IListVersionsRequest | null, protos.google.appengine.v1.IListVersionsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of [Version]. 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 listVersionsAsync() 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.

listVersions(request, options, callback)

listVersions(request: protos.google.appengine.v1.IListVersionsRequest, options: CallOptions, callback: PaginationCallback<protos.google.appengine.v1.IListVersionsRequest, protos.google.appengine.v1.IListVersionsResponse | null | undefined, protos.google.appengine.v1.IVersion>): void;
Parameters
NameDescription
request protos.google.appengine.v1.IListVersionsRequest
options CallOptions
callback PaginationCallback<protos.google.appengine.v1.IListVersionsRequest, protos.google.appengine.v1.IListVersionsResponse | null | undefined, protos.google.appengine.v1.IVersion>
Returns
TypeDescription
void

listVersions(request, callback)

listVersions(request: protos.google.appengine.v1.IListVersionsRequest, callback: PaginationCallback<protos.google.appengine.v1.IListVersionsRequest, protos.google.appengine.v1.IListVersionsResponse | null | undefined, protos.google.appengine.v1.IVersion>): void;
Parameters
NameDescription
request protos.google.appengine.v1.IListVersionsRequest
callback PaginationCallback<protos.google.appengine.v1.IListVersionsRequest, protos.google.appengine.v1.IListVersionsResponse | null | undefined, protos.google.appengine.v1.IVersion>
Returns
TypeDescription
void

listVersionsAsync(request, options)

listVersionsAsync(request?: protos.google.appengine.v1.IListVersionsRequest, options?: CallOptions): AsyncIterable<protos.google.appengine.v1.IVersion>;

Equivalent to listVersions, 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.appengine.v1.IListVersionsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.appengine.v1.IVersion>

{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 [Version]. 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.
   */
  /**
   *  Name of the parent Service resource. Example:
   *  `apps/myapp/services/default`.
   */
  // const parent = 'abc123'
  /**
   *  Controls the set of fields returned in the `List` response.
   */
  // const view = {}
  /**
   *  Maximum results to return per page.
   */
  // const pageSize = 1234
  /**
   *  Continuation token for fetching the next page of results.
   */
  // const pageToken = 'abc123'

  // Imports the Appengine library
  const {VersionsClient} = require('@google-cloud/appengine-admin').v1;

  // Instantiates a client
  const appengineClient = new VersionsClient();

  async function callListVersions() {
    // Construct request
    const request = {};

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

  callListVersions();

listVersionsStream(request, options)

listVersionsStream(request?: protos.google.appengine.v1.IListVersionsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.appengine.v1.IListVersionsRequest

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 [Version] 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 listVersionsAsync() 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.

matchAppFromInstanceName(instanceName)

matchAppFromInstanceName(instanceName: string): string | number;

Parse the app from Instance resource.

Parameter
NameDescription
instanceName string

A fully-qualified path representing Instance resource.

Returns
TypeDescription
string | number

{string} A string representing the app.

matchInstanceFromInstanceName(instanceName)

matchInstanceFromInstanceName(instanceName: string): string | number;

Parse the instance from Instance resource.

Parameter
NameDescription
instanceName string

A fully-qualified path representing Instance resource.

Returns
TypeDescription
string | number

{string} A string representing the instance.

matchServiceFromInstanceName(instanceName)

matchServiceFromInstanceName(instanceName: string): string | number;

Parse the service from Instance resource.

Parameter
NameDescription
instanceName string

A fully-qualified path representing Instance resource.

Returns
TypeDescription
string | number

{string} A string representing the service.

matchVersionFromInstanceName(instanceName)

matchVersionFromInstanceName(instanceName: string): string | number;

Parse the version from Instance resource.

Parameter
NameDescription
instanceName string

A fully-qualified path representing Instance resource.

Returns
TypeDescription
string | number

{string} A string representing the version.

updateVersion(request, options)

updateVersion(request?: protos.google.appengine.v1.IUpdateVersionRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.appengine.v1.IVersion, protos.google.appengine.v1.IOperationMetadataV1>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses:

**Standard environment**

* [instance_class](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class)

*automatic scaling* in the standard environment:

* [automatic_scaling.min_idle_instances](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) * [automatic_scaling.max_idle_instances](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) * [automaticScaling.standard_scheduler_settings.max_instances](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) * [automaticScaling.standard_scheduler_settings.min_instances](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) * [automaticScaling.standard_scheduler_settings.target_cpu_utilization](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) * [automaticScaling.standard_scheduler_settings.target_throughput_utilization](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)

*basic scaling* or *manual scaling* in the standard environment:

* [serving_status](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status) * [manual_scaling.instances](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling)

**Flexible environment**

* [serving_status](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status)

*automatic scaling* in the flexible environment:

* [automatic_scaling.min_total_instances](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) * [automatic_scaling.max_total_instances](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) * [automatic_scaling.cool_down_period_sec](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) * [automatic_scaling.cpu_utilization.target_utilization](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)

*manual scaling* in the flexible environment:

* [manual_scaling.instances](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling)

Parameters
NameDescription
request protos.google.appengine.v1.IUpdateVersionRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.appengine.v1.IVersion, protos.google.appengine.v1.IOperationMetadataV1>, 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.
   */
  /**
   *  Name of the resource to update. Example:
   *  `apps/myapp/services/default/versions/1`.
   */
  // const name = 'abc123'
  /**
   *  A Version containing the updated resource. Only fields set in the field
   *  mask will be updated.
   */
  // const version = {}
  /**
   *  Standard field mask for the set of fields to be updated.
   */
  // const updateMask = {}

  // Imports the Appengine library
  const {VersionsClient} = require('@google-cloud/appengine-admin').v1;

  // Instantiates a client
  const appengineClient = new VersionsClient();

  async function callUpdateVersion() {
    // Construct request
    const request = {};

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

  callUpdateVersion();

updateVersion(request, options, callback)

updateVersion(request: protos.google.appengine.v1.IUpdateVersionRequest, options: CallOptions, callback: Callback<LROperation<protos.google.appengine.v1.IVersion, protos.google.appengine.v1.IOperationMetadataV1>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.appengine.v1.IUpdateVersionRequest
options CallOptions
callback Callback<LROperation<protos.google.appengine.v1.IVersion, protos.google.appengine.v1.IOperationMetadataV1>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateVersion(request, callback)

updateVersion(request: protos.google.appengine.v1.IUpdateVersionRequest, callback: Callback<LROperation<protos.google.appengine.v1.IVersion, protos.google.appengine.v1.IOperationMetadataV1>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.appengine.v1.IUpdateVersionRequest
callback Callback<LROperation<protos.google.appengine.v1.IVersion, protos.google.appengine.v1.IOperationMetadataV1>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void