Class v1.InstanceGroupManagersClient

The InstanceGroupManagers API. v1

Package

@google-cloud/compute

Constructors

(constructor)(opts)

constructor(opts?: ClientOptions);

Construct an instance of InstanceGroupManagersClient.

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;
    };

instanceGroupManagersStub

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

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

abandonInstances(request, options)

abandonInstances(request?: protos.google.cloud.compute.v1.IAbandonInstancesInstanceGroupManagerRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.compute.v1.IOperation, null>,
        protos.google.cloud.compute.v1.IOperation | undefined,
        {} | undefined
    ]>;

Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.

Parameters
NameDescription
request protos.google.cloud.compute.v1.IAbandonInstancesInstanceGroupManagerRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.compute.v1.IOperation, null>, protos.google.cloud.compute.v1.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. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. This method is considered to be in beta. This means while stable it is still a work-in-progress and under active development, and might get backwards-incompatible changes at any time. .promise() is not supported yet.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name of the managed instance group.
   */
  // const instanceGroupManager = 'abc123'
  /**
   *  The body resource for this request
   */
  // const instanceGroupManagersAbandonInstancesRequestResource = {}
  /**
   *  Project ID for this request.
   */
  // const project = 'my-project'
  /**
   *  An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  The name of the zone where the managed instance group is located.
   */
  // const zone = 'abc123'

  // Imports the Compute library
  const {InstanceGroupManagersClient} = require('@google-cloud/compute').v1;

  // Instantiates a client
  const computeClient = new InstanceGroupManagersClient();

  async function callAbandonInstances() {
    // Construct request
    const request = {
      instanceGroupManager,
      instanceGroupManagersAbandonInstancesRequestResource,
      project,
      zone,
    };

    // Run request
    const response = await computeClient.abandonInstances(request);
    console.log(response);
  }

  callAbandonInstances();

abandonInstances(request, options, callback)

abandonInstances(request: protos.google.cloud.compute.v1.IAbandonInstancesInstanceGroupManagerRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IAbandonInstancesInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.IAbandonInstancesInstanceGroupManagerRequest
options CallOptions
callback Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IAbandonInstancesInstanceGroupManagerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

abandonInstances(request, callback)

abandonInstances(request: protos.google.cloud.compute.v1.IAbandonInstancesInstanceGroupManagerRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IAbandonInstancesInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.IAbandonInstancesInstanceGroupManagerRequest
callback Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IAbandonInstancesInstanceGroupManagerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

aggregatedListAsync(request, options)

aggregatedListAsync(request?: protos.google.cloud.compute.v1.IAggregatedListInstanceGroupManagersRequest, options?: CallOptions): AsyncIterable<[
        string,
        protos.google.cloud.compute.v1.IInstanceGroupManagersScopedList
    ]>;

Equivalent to aggregatedList, 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.compute.v1.IAggregatedListInstanceGroupManagersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<[ string, protos.google.cloud.compute.v1.IInstanceGroupManagersScopedList ]>

{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 as tuple [string, [InstanceGroupManagersScopedList]]. 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.
   */
  /**
   *  A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. for="" example,="" if="" you="" are="" filtering="" compute="" engine="" instances,="" you="" can="" exclude="" instances="" named="" `example-instance`="" by="" specifying="" `name="" !="example-instance`." you="" can="" also="" filter="" nested="" fields.="" for="" example,="" you="" could="" specify="" `scheduling.automaticrestart="false`" to="" include="" instances="" only="" if="" they="" are="" not="" scheduled="" for="" automatic="" restarts.="" you="" can="" use="" filtering="" on="" nested="" fields="" to="" filter="" based="" on="" resource="" labels.="" to="" filter="" on="" multiple="" expressions,="" provide="" each="" separate="" expression="" within="" parentheses.="" for="" example:="" ```="" (scheduling.automaticrestart="true)" (cpuplatform="Intel Skylake" )="" ```="" by="" default,="" each="" expression="" is="" an="" `and`="" expression.="" however,="" you="" can="" include="" `and`="" and="" `or`="" expressions="" explicitly.="" for="" example:="" ```="" (cpuplatform="Intel Skylake" )="" or="" (cpuplatform="Intel Broadwell" )="" and="" (scheduling.automaticrestart="true)" ```="" */="" const="" filter='abc123' *="" *="" indicates="" whether="" every="" visible="" scope="" for="" each="" scope="" type="" (zone,="" region,="" global)="" should="" be="" included="" in="" the="" response.="" for="" new="" resource="" types="" added="" after="" this="" field,="" the="" flag="" has="" no="" effect="" as="" new="" resource="" types="" will="" always="" include="" every="" visible="" scope="" for="" each="" scope="" type="" in="" response.="" for="" resource="" types="" which="" predate="" this="" field,="" if="" this="" flag="" is="" omitted="" or="" false,="" only="" scopes="" of="" the="" scope="" types="" where="" the="" resource="" type="" is="" expected="" to="" be="" found="" will="" be="" included.="" */="" const="" includeallscopes="true" *="" *="" the="" maximum="" number="" of="" results="" per="" page="" that="" should="" be="" returned.="" if="" the="" number="" of="" available="" results="" is="" larger="" than="" `maxresults`,="" compute="" engine="" returns="" a="" `nextpagetoken`="" that="" can="" be="" used="" to="" get="" the="" next="" page="" of="" results="" in="" subsequent="" list="" requests.="" acceptable="" values="" are="" `0`="" to="" `500`,="" inclusive.="" (default:="" `500`)="" */="" const="" maxresults="1234" *="" *="" sorts="" list="" results="" by="" a="" certain="" order.="" by="" default,="" results="" are="" returned="" in="" alphanumerical="" order="" based="" on="" the="" resource="" name.="" you="" can="" also="" sort="" results="" in="" descending="" order="" based="" on="" the="" creation="" timestamp="" using="" `orderby="creationTimestamp desc" `.="" this="" sorts="" results="" based="" on="" the="" `creationtimestamp`="" field="" in="" reverse="" chronological="" order="" (newest="" result="" first).="" use="" this="" to="" sort="" resources="" like="" operations="" so="" that="" the="" newest="" operation="" is="" returned="" first.="" currently,="" only="" sorting="" by="" `name`="" or="" `creationtimestamp="" desc`="" is="" supported.="" */="" const="" orderby='abc123' *="" *="" specifies="" a="" page="" token="" to="" use.="" set="" `pagetoken`="" to="" the="" `nextpagetoken`="" returned="" by="" a="" previous="" list="" request="" to="" get="" the="" next="" page="" of="" results.="" */="" const="" pagetoken='abc123' *="" *="" project="" id="" for="" this="" request.="" */="" const="" project='my-project' *="" *="" opt-in="" for="" partial="" success="" behavior="" which="" provides="" partial="" results="" in="" case="" of="" failure.="" the="" default="" value="" is="" false.="" */="" const="" returnpartialsuccess="true" imports="" the="" compute="" library="" const="" {instancegroupmanagersclient}="require('@google-cloud/compute').v1;" instantiates="" a="" client="" const="" computeclient="new" instancegroupmanagersclient();="" async="" function="" callaggregatedlist()="" {="" construct="" request="" const="" request="{" project,="" };="" run="" request="" const="" iterable="await" computeclient.aggregatedlistasync(request);="" for="" await="" (const="" [key,="" value]="" of="" iterable)="" {="" console.log(response);="" }="" }="" callaggregatedlist();="">

applyUpdatesToInstances(request, options)

applyUpdatesToInstances(request?: protos.google.cloud.compute.v1.IApplyUpdatesToInstancesInstanceGroupManagerRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.compute.v1.IOperation, null>,
        protos.google.cloud.compute.v1.IOperation | undefined,
        {} | undefined
    ]>;

Applies changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions.

Parameters
NameDescription
request protos.google.cloud.compute.v1.IApplyUpdatesToInstancesInstanceGroupManagerRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.compute.v1.IOperation, null>, protos.google.cloud.compute.v1.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. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. This method is considered to be in beta. This means while stable it is still a work-in-progress and under active development, and might get backwards-incompatible changes at any time. .promise() is not supported yet.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name of the managed instance group, should conform to RFC1035.
   */
  // const instanceGroupManager = 'abc123'
  /**
   *  The body resource for this request
   */
  // const instanceGroupManagersApplyUpdatesRequestResource = {}
  /**
   *  Project ID for this request.
   */
  // const project = 'my-project'
  /**
   *  The name of the zone where the managed instance group is located. Should conform to RFC1035.
   */
  // const zone = 'abc123'

  // Imports the Compute library
  const {InstanceGroupManagersClient} = require('@google-cloud/compute').v1;

  // Instantiates a client
  const computeClient = new InstanceGroupManagersClient();

  async function callApplyUpdatesToInstances() {
    // Construct request
    const request = {
      instanceGroupManager,
      instanceGroupManagersApplyUpdatesRequestResource,
      project,
      zone,
    };

    // Run request
    const response = await computeClient.applyUpdatesToInstances(request);
    console.log(response);
  }

  callApplyUpdatesToInstances();

applyUpdatesToInstances(request, options, callback)

applyUpdatesToInstances(request: protos.google.cloud.compute.v1.IApplyUpdatesToInstancesInstanceGroupManagerRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IApplyUpdatesToInstancesInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.IApplyUpdatesToInstancesInstanceGroupManagerRequest
options CallOptions
callback Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IApplyUpdatesToInstancesInstanceGroupManagerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

applyUpdatesToInstances(request, callback)

applyUpdatesToInstances(request: protos.google.cloud.compute.v1.IApplyUpdatesToInstancesInstanceGroupManagerRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IApplyUpdatesToInstancesInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.IApplyUpdatesToInstancesInstanceGroupManagerRequest
callback Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IApplyUpdatesToInstancesInstanceGroupManagerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

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.

createInstances(request, options)

createInstances(request?: protos.google.cloud.compute.v1.ICreateInstancesInstanceGroupManagerRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.compute.v1.IOperation, null>,
        protos.google.cloud.compute.v1.IOperation | undefined,
        {} | undefined
    ]>;

Creates instances with per-instance configs in this managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.

Parameters
NameDescription
request protos.google.cloud.compute.v1.ICreateInstancesInstanceGroupManagerRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.compute.v1.IOperation, null>, protos.google.cloud.compute.v1.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. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. This method is considered to be in beta. This means while stable it is still a work-in-progress and under active development, and might get backwards-incompatible changes at any time. .promise() is not supported yet.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name of the managed instance group. It should conform to RFC1035.
   */
  // const instanceGroupManager = 'abc123'
  /**
   *  The body resource for this request
   */
  // const instanceGroupManagersCreateInstancesRequestResource = {}
  /**
   *  Project ID for this request.
   */
  // const project = 'my-project'
  /**
   *  An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  The name of the zone where the managed instance group is located. It should conform to RFC1035.
   */
  // const zone = 'abc123'

  // Imports the Compute library
  const {InstanceGroupManagersClient} = require('@google-cloud/compute').v1;

  // Instantiates a client
  const computeClient = new InstanceGroupManagersClient();

  async function callCreateInstances() {
    // Construct request
    const request = {
      instanceGroupManager,
      instanceGroupManagersCreateInstancesRequestResource,
      project,
      zone,
    };

    // Run request
    const response = await computeClient.createInstances(request);
    console.log(response);
  }

  callCreateInstances();

createInstances(request, options, callback)

createInstances(request: protos.google.cloud.compute.v1.ICreateInstancesInstanceGroupManagerRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.ICreateInstancesInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.ICreateInstancesInstanceGroupManagerRequest
options CallOptions
callback Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.ICreateInstancesInstanceGroupManagerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createInstances(request, callback)

createInstances(request: protos.google.cloud.compute.v1.ICreateInstancesInstanceGroupManagerRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.ICreateInstancesInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.ICreateInstancesInstanceGroupManagerRequest
callback Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.ICreateInstancesInstanceGroupManagerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

delete(request, options)

delete(request?: protos.google.cloud.compute.v1.IDeleteInstanceGroupManagerRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.compute.v1.IOperation, null>,
        protos.google.cloud.compute.v1.IOperation | undefined,
        {} | undefined
    ]>;

Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.

Parameters
NameDescription
request protos.google.cloud.compute.v1.IDeleteInstanceGroupManagerRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.compute.v1.IOperation, null>, protos.google.cloud.compute.v1.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. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. This method is considered to be in beta. This means while stable it is still a work-in-progress and under active development, and might get backwards-incompatible changes at any time. .promise() is not supported yet.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name of the managed instance group to delete.
   */
  // const instanceGroupManager = 'abc123'
  /**
   *  Project ID for this request.
   */
  // const project = 'my-project'
  /**
   *  An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  The name of the zone where the managed instance group is located.
   */
  // const zone = 'abc123'

  // Imports the Compute library
  const {InstanceGroupManagersClient} = require('@google-cloud/compute').v1;

  // Instantiates a client
  const computeClient = new InstanceGroupManagersClient();

  async function callDelete() {
    // Construct request
    const request = {
      instanceGroupManager,
      project,
      zone,
    };

    // Run request
    const response = await computeClient.delete(request);
    console.log(response);
  }

  callDelete();

delete(request, options, callback)

delete(request: protos.google.cloud.compute.v1.IDeleteInstanceGroupManagerRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IDeleteInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.IDeleteInstanceGroupManagerRequest
options CallOptions
callback Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IDeleteInstanceGroupManagerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

delete(request, callback)

delete(request: protos.google.cloud.compute.v1.IDeleteInstanceGroupManagerRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IDeleteInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.IDeleteInstanceGroupManagerRequest
callback Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IDeleteInstanceGroupManagerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteInstances(request, options)

deleteInstances(request?: protos.google.cloud.compute.v1.IDeleteInstancesInstanceGroupManagerRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.compute.v1.IOperation, null>,
        protos.google.cloud.compute.v1.IOperation | undefined,
        {} | undefined
    ]>;

Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.

Parameters
NameDescription
request protos.google.cloud.compute.v1.IDeleteInstancesInstanceGroupManagerRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.compute.v1.IOperation, null>, protos.google.cloud.compute.v1.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. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. This method is considered to be in beta. This means while stable it is still a work-in-progress and under active development, and might get backwards-incompatible changes at any time. .promise() is not supported yet.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name of the managed instance group.
   */
  // const instanceGroupManager = 'abc123'
  /**
   *  The body resource for this request
   */
  // const instanceGroupManagersDeleteInstancesRequestResource = {}
  /**
   *  Project ID for this request.
   */
  // const project = 'my-project'
  /**
   *  An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  The name of the zone where the managed instance group is located.
   */
  // const zone = 'abc123'

  // Imports the Compute library
  const {InstanceGroupManagersClient} = require('@google-cloud/compute').v1;

  // Instantiates a client
  const computeClient = new InstanceGroupManagersClient();

  async function callDeleteInstances() {
    // Construct request
    const request = {
      instanceGroupManager,
      instanceGroupManagersDeleteInstancesRequestResource,
      project,
      zone,
    };

    // Run request
    const response = await computeClient.deleteInstances(request);
    console.log(response);
  }

  callDeleteInstances();

deleteInstances(request, options, callback)

deleteInstances(request: protos.google.cloud.compute.v1.IDeleteInstancesInstanceGroupManagerRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IDeleteInstancesInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.IDeleteInstancesInstanceGroupManagerRequest
options CallOptions
callback Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IDeleteInstancesInstanceGroupManagerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteInstances(request, callback)

deleteInstances(request: protos.google.cloud.compute.v1.IDeleteInstancesInstanceGroupManagerRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IDeleteInstancesInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.IDeleteInstancesInstanceGroupManagerRequest
callback Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IDeleteInstancesInstanceGroupManagerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deletePerInstanceConfigs(request, options)

deletePerInstanceConfigs(request?: protos.google.cloud.compute.v1.IDeletePerInstanceConfigsInstanceGroupManagerRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.compute.v1.IOperation, null>,
        protos.google.cloud.compute.v1.IOperation | undefined,
        {} | undefined
    ]>;

Deletes selected per-instance configs for the managed instance group.

Parameters
NameDescription
request protos.google.cloud.compute.v1.IDeletePerInstanceConfigsInstanceGroupManagerRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.compute.v1.IOperation, null>, protos.google.cloud.compute.v1.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. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. This method is considered to be in beta. This means while stable it is still a work-in-progress and under active development, and might get backwards-incompatible changes at any time. .promise() is not supported yet.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name of the managed instance group. It should conform to RFC1035.
   */
  // const instanceGroupManager = 'abc123'
  /**
   *  The body resource for this request
   */
  // const instanceGroupManagersDeletePerInstanceConfigsReqResource = {}
  /**
   *  Project ID for this request.
   */
  // const project = 'my-project'
  /**
   *  The name of the zone where the managed instance group is located. It should conform to RFC1035.
   */
  // const zone = 'abc123'

  // Imports the Compute library
  const {InstanceGroupManagersClient} = require('@google-cloud/compute').v1;

  // Instantiates a client
  const computeClient = new InstanceGroupManagersClient();

  async function callDeletePerInstanceConfigs() {
    // Construct request
    const request = {
      instanceGroupManager,
      instanceGroupManagersDeletePerInstanceConfigsReqResource,
      project,
      zone,
    };

    // Run request
    const response = await computeClient.deletePerInstanceConfigs(request);
    console.log(response);
  }

  callDeletePerInstanceConfigs();

deletePerInstanceConfigs(request, options, callback)

deletePerInstanceConfigs(request: protos.google.cloud.compute.v1.IDeletePerInstanceConfigsInstanceGroupManagerRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IDeletePerInstanceConfigsInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.IDeletePerInstanceConfigsInstanceGroupManagerRequest
options CallOptions
callback Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IDeletePerInstanceConfigsInstanceGroupManagerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deletePerInstanceConfigs(request, callback)

deletePerInstanceConfigs(request: protos.google.cloud.compute.v1.IDeletePerInstanceConfigsInstanceGroupManagerRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IDeletePerInstanceConfigsInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.IDeletePerInstanceConfigsInstanceGroupManagerRequest
callback Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IDeletePerInstanceConfigsInstanceGroupManagerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

get(request, options)

get(request?: protos.google.cloud.compute.v1.IGetInstanceGroupManagerRequest, options?: CallOptions): Promise<[
        protos.google.cloud.compute.v1.IInstanceGroupManager,
        (protos.google.cloud.compute.v1.IGetInstanceGroupManagerRequest | undefined),
        {} | undefined
    ]>;

Returns all of the details about the specified managed instance group. Gets a list of available managed instance groups by making a list() request.

Parameters
NameDescription
request protos.google.cloud.compute.v1.IGetInstanceGroupManagerRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.compute.v1.IInstanceGroupManager, (protos.google.cloud.compute.v1.IGetInstanceGroupManagerRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing [InstanceGroupManager]. 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.
   */
  /**
   *  The name of the managed instance group.
   */
  // const instanceGroupManager = 'abc123'
  /**
   *  Project ID for this request.
   */
  // const project = 'my-project'
  /**
   *  The name of the zone where the managed instance group is located.
   */
  // const zone = 'abc123'

  // Imports the Compute library
  const {InstanceGroupManagersClient} = require('@google-cloud/compute').v1;

  // Instantiates a client
  const computeClient = new InstanceGroupManagersClient();

  async function callGet() {
    // Construct request
    const request = {
      instanceGroupManager,
      project,
      zone,
    };

    // Run request
    const response = await computeClient.get(request);
    console.log(response);
  }

  callGet();

get(request, options, callback)

get(request: protos.google.cloud.compute.v1.IGetInstanceGroupManagerRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IInstanceGroupManager, protos.google.cloud.compute.v1.IGetInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.IGetInstanceGroupManagerRequest
options CallOptions
callback Callback<protos.google.cloud.compute.v1.IInstanceGroupManager, protos.google.cloud.compute.v1.IGetInstanceGroupManagerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

get(request, callback)

get(request: protos.google.cloud.compute.v1.IGetInstanceGroupManagerRequest, callback: Callback<protos.google.cloud.compute.v1.IInstanceGroupManager, protos.google.cloud.compute.v1.IGetInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.IGetInstanceGroupManagerRequest
callback Callback<protos.google.cloud.compute.v1.IInstanceGroupManager, protos.google.cloud.compute.v1.IGetInstanceGroupManagerRequest | 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.

insert(request, options)

insert(request?: protos.google.cloud.compute.v1.IInsertInstanceGroupManagerRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.compute.v1.IOperation, null>,
        protos.google.cloud.compute.v1.IOperation | undefined,
        {} | undefined
    ]>;

Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method. A managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.

Parameters
NameDescription
request protos.google.cloud.compute.v1.IInsertInstanceGroupManagerRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.compute.v1.IOperation, null>, protos.google.cloud.compute.v1.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. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. This method is considered to be in beta. This means while stable it is still a work-in-progress and under active development, and might get backwards-incompatible changes at any time. .promise() is not supported yet.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The body resource for this request
   */
  // const instanceGroupManagerResource = {}
  /**
   *  Project ID for this request.
   */
  // const project = 'my-project'
  /**
   *  An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  The name of the zone where you want to create the managed instance group.
   */
  // const zone = 'abc123'

  // Imports the Compute library
  const {InstanceGroupManagersClient} = require('@google-cloud/compute').v1;

  // Instantiates a client
  const computeClient = new InstanceGroupManagersClient();

  async function callInsert() {
    // Construct request
    const request = {
      instanceGroupManagerResource,
      project,
      zone,
    };

    // Run request
    const response = await computeClient.insert(request);
    console.log(response);
  }

  callInsert();

insert(request, options, callback)

insert(request: protos.google.cloud.compute.v1.IInsertInstanceGroupManagerRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IInsertInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.IInsertInstanceGroupManagerRequest
options CallOptions
callback Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IInsertInstanceGroupManagerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

insert(request, callback)

insert(request: protos.google.cloud.compute.v1.IInsertInstanceGroupManagerRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IInsertInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.IInsertInstanceGroupManagerRequest
callback Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IInsertInstanceGroupManagerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

list(request, options)

list(request?: protos.google.cloud.compute.v1.IListInstanceGroupManagersRequest, options?: CallOptions): Promise<[
        protos.google.cloud.compute.v1.IInstanceGroupManager[],
        protos.google.cloud.compute.v1.IListInstanceGroupManagersRequest | null,
        protos.google.cloud.compute.v1.IInstanceGroupManagerList
    ]>;

Retrieves a list of managed instance groups that are contained within the specified project and zone.

Parameters
NameDescription
request protos.google.cloud.compute.v1.IListInstanceGroupManagersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.compute.v1.IInstanceGroupManager[], protos.google.cloud.compute.v1.IListInstanceGroupManagersRequest | null, protos.google.cloud.compute.v1.IInstanceGroupManagerList ]>

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

list(request, options, callback)

list(request: protos.google.cloud.compute.v1.IListInstanceGroupManagersRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.compute.v1.IListInstanceGroupManagersRequest, protos.google.cloud.compute.v1.IInstanceGroupManagerList | null | undefined, protos.google.cloud.compute.v1.IInstanceGroupManager>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.IListInstanceGroupManagersRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.compute.v1.IListInstanceGroupManagersRequest, protos.google.cloud.compute.v1.IInstanceGroupManagerList | null | undefined, protos.google.cloud.compute.v1.IInstanceGroupManager>
Returns
TypeDescription
void

list(request, callback)

list(request: protos.google.cloud.compute.v1.IListInstanceGroupManagersRequest, callback: PaginationCallback<protos.google.cloud.compute.v1.IListInstanceGroupManagersRequest, protos.google.cloud.compute.v1.IInstanceGroupManagerList | null | undefined, protos.google.cloud.compute.v1.IInstanceGroupManager>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.IListInstanceGroupManagersRequest
callback PaginationCallback<protos.google.cloud.compute.v1.IListInstanceGroupManagersRequest, protos.google.cloud.compute.v1.IInstanceGroupManagerList | null | undefined, protos.google.cloud.compute.v1.IInstanceGroupManager>
Returns
TypeDescription
void

listAsync(request, options)

listAsync(request?: protos.google.cloud.compute.v1.IListInstanceGroupManagersRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.compute.v1.IInstanceGroupManager>;

Equivalent to list, 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.compute.v1.IListInstanceGroupManagersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.compute.v1.IInstanceGroupManager>

{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 [InstanceGroupManager]. 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.
   */
  /**
   *  A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. for="" example,="" if="" you="" are="" filtering="" compute="" engine="" instances,="" you="" can="" exclude="" instances="" named="" `example-instance`="" by="" specifying="" `name="" !="example-instance`." you="" can="" also="" filter="" nested="" fields.="" for="" example,="" you="" could="" specify="" `scheduling.automaticrestart="false`" to="" include="" instances="" only="" if="" they="" are="" not="" scheduled="" for="" automatic="" restarts.="" you="" can="" use="" filtering="" on="" nested="" fields="" to="" filter="" based="" on="" resource="" labels.="" to="" filter="" on="" multiple="" expressions,="" provide="" each="" separate="" expression="" within="" parentheses.="" for="" example:="" ```="" (scheduling.automaticrestart="true)" (cpuplatform="Intel Skylake" )="" ```="" by="" default,="" each="" expression="" is="" an="" `and`="" expression.="" however,="" you="" can="" include="" `and`="" and="" `or`="" expressions="" explicitly.="" for="" example:="" ```="" (cpuplatform="Intel Skylake" )="" or="" (cpuplatform="Intel Broadwell" )="" and="" (scheduling.automaticrestart="true)" ```="" */="" const="" filter='abc123' *="" *="" the="" maximum="" number="" of="" results="" per="" page="" that="" should="" be="" returned.="" if="" the="" number="" of="" available="" results="" is="" larger="" than="" `maxresults`,="" compute="" engine="" returns="" a="" `nextpagetoken`="" that="" can="" be="" used="" to="" get="" the="" next="" page="" of="" results="" in="" subsequent="" list="" requests.="" acceptable="" values="" are="" `0`="" to="" `500`,="" inclusive.="" (default:="" `500`)="" */="" const="" maxresults="1234" *="" *="" sorts="" list="" results="" by="" a="" certain="" order.="" by="" default,="" results="" are="" returned="" in="" alphanumerical="" order="" based="" on="" the="" resource="" name.="" you="" can="" also="" sort="" results="" in="" descending="" order="" based="" on="" the="" creation="" timestamp="" using="" `orderby="creationTimestamp desc" `.="" this="" sorts="" results="" based="" on="" the="" `creationtimestamp`="" field="" in="" reverse="" chronological="" order="" (newest="" result="" first).="" use="" this="" to="" sort="" resources="" like="" operations="" so="" that="" the="" newest="" operation="" is="" returned="" first.="" currently,="" only="" sorting="" by="" `name`="" or="" `creationtimestamp="" desc`="" is="" supported.="" */="" const="" orderby='abc123' *="" *="" specifies="" a="" page="" token="" to="" use.="" set="" `pagetoken`="" to="" the="" `nextpagetoken`="" returned="" by="" a="" previous="" list="" request="" to="" get="" the="" next="" page="" of="" results.="" */="" const="" pagetoken='abc123' *="" *="" project="" id="" for="" this="" request.="" */="" const="" project='my-project' *="" *="" opt-in="" for="" partial="" success="" behavior="" which="" provides="" partial="" results="" in="" case="" of="" failure.="" the="" default="" value="" is="" false.="" */="" const="" returnpartialsuccess="true" *="" *="" the="" name="" of="" the="" zone="" where="" the="" managed="" instance="" group="" is="" located.="" */="" const="" zone='abc123' imports="" the="" compute="" library="" const="" {instancegroupmanagersclient}="require('@google-cloud/compute').v1;" instantiates="" a="" client="" const="" computeclient="new" instancegroupmanagersclient();="" async="" function="" calllist()="" {="" construct="" request="" const="" request="{" project,="" zone,="" };="" run="" request="" const="" iterable="await" computeclient.listasync(request);="" for="" await="" (const="" response="" of="" iterable)="" {="" console.log(response);="" }="" }="" calllist();="">

listErrors(request, options)

listErrors(request?: protos.google.cloud.compute.v1.IListErrorsInstanceGroupManagersRequest, options?: CallOptions): Promise<[
        protos.google.cloud.compute.v1.IInstanceManagedByIgmError[],
        protos.google.cloud.compute.v1.IListErrorsInstanceGroupManagersRequest | null,
        protos.google.cloud.compute.v1.IInstanceGroupManagersListErrorsResponse
    ]>;

Lists all errors thrown by actions on instances for a given managed instance group. The filter and orderBy query parameters are not supported.

Parameters
NameDescription
request protos.google.cloud.compute.v1.IListErrorsInstanceGroupManagersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.compute.v1.IInstanceManagedByIgmError[], protos.google.cloud.compute.v1.IListErrorsInstanceGroupManagersRequest | null, protos.google.cloud.compute.v1.IInstanceGroupManagersListErrorsResponse ]>

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

listErrors(request, options, callback)

listErrors(request: protos.google.cloud.compute.v1.IListErrorsInstanceGroupManagersRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.compute.v1.IListErrorsInstanceGroupManagersRequest, protos.google.cloud.compute.v1.IInstanceGroupManagersListErrorsResponse | null | undefined, protos.google.cloud.compute.v1.IInstanceManagedByIgmError>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.IListErrorsInstanceGroupManagersRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.compute.v1.IListErrorsInstanceGroupManagersRequest, protos.google.cloud.compute.v1.IInstanceGroupManagersListErrorsResponse | null | undefined, protos.google.cloud.compute.v1.IInstanceManagedByIgmError>
Returns
TypeDescription
void

listErrors(request, callback)

listErrors(request: protos.google.cloud.compute.v1.IListErrorsInstanceGroupManagersRequest, callback: PaginationCallback<protos.google.cloud.compute.v1.IListErrorsInstanceGroupManagersRequest, protos.google.cloud.compute.v1.IInstanceGroupManagersListErrorsResponse | null | undefined, protos.google.cloud.compute.v1.IInstanceManagedByIgmError>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.IListErrorsInstanceGroupManagersRequest
callback PaginationCallback<protos.google.cloud.compute.v1.IListErrorsInstanceGroupManagersRequest, protos.google.cloud.compute.v1.IInstanceGroupManagersListErrorsResponse | null | undefined, protos.google.cloud.compute.v1.IInstanceManagedByIgmError>
Returns
TypeDescription
void

listErrorsAsync(request, options)

listErrorsAsync(request?: protos.google.cloud.compute.v1.IListErrorsInstanceGroupManagersRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.compute.v1.IInstanceManagedByIgmError>;

Equivalent to listErrors, 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.compute.v1.IListErrorsInstanceGroupManagersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.compute.v1.IInstanceManagedByIgmError>

{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 [InstanceManagedByIgmError]. 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.
   */
  /**
   *  A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. for="" example,="" if="" you="" are="" filtering="" compute="" engine="" instances,="" you="" can="" exclude="" instances="" named="" `example-instance`="" by="" specifying="" `name="" !="example-instance`." you="" can="" also="" filter="" nested="" fields.="" for="" example,="" you="" could="" specify="" `scheduling.automaticrestart="false`" to="" include="" instances="" only="" if="" they="" are="" not="" scheduled="" for="" automatic="" restarts.="" you="" can="" use="" filtering="" on="" nested="" fields="" to="" filter="" based="" on="" resource="" labels.="" to="" filter="" on="" multiple="" expressions,="" provide="" each="" separate="" expression="" within="" parentheses.="" for="" example:="" ```="" (scheduling.automaticrestart="true)" (cpuplatform="Intel Skylake" )="" ```="" by="" default,="" each="" expression="" is="" an="" `and`="" expression.="" however,="" you="" can="" include="" `and`="" and="" `or`="" expressions="" explicitly.="" for="" example:="" ```="" (cpuplatform="Intel Skylake" )="" or="" (cpuplatform="Intel Broadwell" )="" and="" (scheduling.automaticrestart="true)" ```="" */="" const="" filter='abc123' *="" *="" the="" name="" of="" the="" managed="" instance="" group.="" it="" must="" be="" a="" string="" that="" meets="" the="" requirements="" in="" rfc1035,="" or="" an="" unsigned="" long="" integer:="" must="" match="" regexp="" pattern:="" (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|1-9{0,19}.="" */="" const="" instancegroupmanager='abc123' *="" *="" the="" maximum="" number="" of="" results="" per="" page="" that="" should="" be="" returned.="" if="" the="" number="" of="" available="" results="" is="" larger="" than="" `maxresults`,="" compute="" engine="" returns="" a="" `nextpagetoken`="" that="" can="" be="" used="" to="" get="" the="" next="" page="" of="" results="" in="" subsequent="" list="" requests.="" acceptable="" values="" are="" `0`="" to="" `500`,="" inclusive.="" (default:="" `500`)="" */="" const="" maxresults="1234" *="" *="" sorts="" list="" results="" by="" a="" certain="" order.="" by="" default,="" results="" are="" returned="" in="" alphanumerical="" order="" based="" on="" the="" resource="" name.="" you="" can="" also="" sort="" results="" in="" descending="" order="" based="" on="" the="" creation="" timestamp="" using="" `orderby="creationTimestamp desc" `.="" this="" sorts="" results="" based="" on="" the="" `creationtimestamp`="" field="" in="" reverse="" chronological="" order="" (newest="" result="" first).="" use="" this="" to="" sort="" resources="" like="" operations="" so="" that="" the="" newest="" operation="" is="" returned="" first.="" currently,="" only="" sorting="" by="" `name`="" or="" `creationtimestamp="" desc`="" is="" supported.="" */="" const="" orderby='abc123' *="" *="" specifies="" a="" page="" token="" to="" use.="" set="" `pagetoken`="" to="" the="" `nextpagetoken`="" returned="" by="" a="" previous="" list="" request="" to="" get="" the="" next="" page="" of="" results.="" */="" const="" pagetoken='abc123' *="" *="" project="" id="" for="" this="" request.="" */="" const="" project='my-project' *="" *="" opt-in="" for="" partial="" success="" behavior="" which="" provides="" partial="" results="" in="" case="" of="" failure.="" the="" default="" value="" is="" false.="" */="" const="" returnpartialsuccess="true" *="" *="" the="" name="" of="" the="" zone="" where="" the="" managed="" instance="" group="" is="" located.="" it="" should="" conform="" to="" rfc1035.="" */="" const="" zone='abc123' imports="" the="" compute="" library="" const="" {instancegroupmanagersclient}="require('@google-cloud/compute').v1;" instantiates="" a="" client="" const="" computeclient="new" instancegroupmanagersclient();="" async="" function="" calllisterrors()="" {="" construct="" request="" const="" request="{" instancegroupmanager,="" project,="" zone,="" };="" run="" request="" const="" iterable="await" computeclient.listerrorsasync(request);="" for="" await="" (const="" response="" of="" iterable)="" {="" console.log(response);="" }="" }="" calllisterrors();="">

listErrorsStream(request, options)

listErrorsStream(request?: protos.google.cloud.compute.v1.IListErrorsInstanceGroupManagersRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.compute.v1.IListErrorsInstanceGroupManagersRequest

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 [InstanceManagedByIgmError] 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 listErrorsAsync() 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.

listManagedInstances(request, options)

listManagedInstances(request?: protos.google.cloud.compute.v1.IListManagedInstancesInstanceGroupManagersRequest, options?: CallOptions): Promise<[
        protos.google.cloud.compute.v1.IManagedInstance[],
        protos.google.cloud.compute.v1.IListManagedInstancesInstanceGroupManagersRequest | null,
        protos.google.cloud.compute.v1.IInstanceGroupManagersListManagedInstancesResponse
    ]>;

Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. The orderBy query parameter is not supported.

Parameters
NameDescription
request protos.google.cloud.compute.v1.IListManagedInstancesInstanceGroupManagersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.compute.v1.IManagedInstance[], protos.google.cloud.compute.v1.IListManagedInstancesInstanceGroupManagersRequest | null, protos.google.cloud.compute.v1.IInstanceGroupManagersListManagedInstancesResponse ]>

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

listManagedInstances(request, options, callback)

listManagedInstances(request: protos.google.cloud.compute.v1.IListManagedInstancesInstanceGroupManagersRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.compute.v1.IListManagedInstancesInstanceGroupManagersRequest, protos.google.cloud.compute.v1.IInstanceGroupManagersListManagedInstancesResponse | null | undefined, protos.google.cloud.compute.v1.IManagedInstance>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.IListManagedInstancesInstanceGroupManagersRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.compute.v1.IListManagedInstancesInstanceGroupManagersRequest, protos.google.cloud.compute.v1.IInstanceGroupManagersListManagedInstancesResponse | null | undefined, protos.google.cloud.compute.v1.IManagedInstance>
Returns
TypeDescription
void

listManagedInstances(request, callback)

listManagedInstances(request: protos.google.cloud.compute.v1.IListManagedInstancesInstanceGroupManagersRequest, callback: PaginationCallback<protos.google.cloud.compute.v1.IListManagedInstancesInstanceGroupManagersRequest, protos.google.cloud.compute.v1.IInstanceGroupManagersListManagedInstancesResponse | null | undefined, protos.google.cloud.compute.v1.IManagedInstance>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.IListManagedInstancesInstanceGroupManagersRequest
callback PaginationCallback<protos.google.cloud.compute.v1.IListManagedInstancesInstanceGroupManagersRequest, protos.google.cloud.compute.v1.IInstanceGroupManagersListManagedInstancesResponse | null | undefined, protos.google.cloud.compute.v1.IManagedInstance>
Returns
TypeDescription
void

listManagedInstancesAsync(request, options)

listManagedInstancesAsync(request?: protos.google.cloud.compute.v1.IListManagedInstancesInstanceGroupManagersRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.compute.v1.IManagedInstance>;

Equivalent to listManagedInstances, 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.compute.v1.IListManagedInstancesInstanceGroupManagersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.compute.v1.IManagedInstance>

{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 [ManagedInstance]. 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.
   */
  /**
   *  A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. for="" example,="" if="" you="" are="" filtering="" compute="" engine="" instances,="" you="" can="" exclude="" instances="" named="" `example-instance`="" by="" specifying="" `name="" !="example-instance`." you="" can="" also="" filter="" nested="" fields.="" for="" example,="" you="" could="" specify="" `scheduling.automaticrestart="false`" to="" include="" instances="" only="" if="" they="" are="" not="" scheduled="" for="" automatic="" restarts.="" you="" can="" use="" filtering="" on="" nested="" fields="" to="" filter="" based="" on="" resource="" labels.="" to="" filter="" on="" multiple="" expressions,="" provide="" each="" separate="" expression="" within="" parentheses.="" for="" example:="" ```="" (scheduling.automaticrestart="true)" (cpuplatform="Intel Skylake" )="" ```="" by="" default,="" each="" expression="" is="" an="" `and`="" expression.="" however,="" you="" can="" include="" `and`="" and="" `or`="" expressions="" explicitly.="" for="" example:="" ```="" (cpuplatform="Intel Skylake" )="" or="" (cpuplatform="Intel Broadwell" )="" and="" (scheduling.automaticrestart="true)" ```="" */="" const="" filter='abc123' *="" *="" the="" name="" of="" the="" managed="" instance="" group.="" */="" const="" instancegroupmanager='abc123' *="" *="" the="" maximum="" number="" of="" results="" per="" page="" that="" should="" be="" returned.="" if="" the="" number="" of="" available="" results="" is="" larger="" than="" `maxresults`,="" compute="" engine="" returns="" a="" `nextpagetoken`="" that="" can="" be="" used="" to="" get="" the="" next="" page="" of="" results="" in="" subsequent="" list="" requests.="" acceptable="" values="" are="" `0`="" to="" `500`,="" inclusive.="" (default:="" `500`)="" */="" const="" maxresults="1234" *="" *="" sorts="" list="" results="" by="" a="" certain="" order.="" by="" default,="" results="" are="" returned="" in="" alphanumerical="" order="" based="" on="" the="" resource="" name.="" you="" can="" also="" sort="" results="" in="" descending="" order="" based="" on="" the="" creation="" timestamp="" using="" `orderby="creationTimestamp desc" `.="" this="" sorts="" results="" based="" on="" the="" `creationtimestamp`="" field="" in="" reverse="" chronological="" order="" (newest="" result="" first).="" use="" this="" to="" sort="" resources="" like="" operations="" so="" that="" the="" newest="" operation="" is="" returned="" first.="" currently,="" only="" sorting="" by="" `name`="" or="" `creationtimestamp="" desc`="" is="" supported.="" */="" const="" orderby='abc123' *="" *="" specifies="" a="" page="" token="" to="" use.="" set="" `pagetoken`="" to="" the="" `nextpagetoken`="" returned="" by="" a="" previous="" list="" request="" to="" get="" the="" next="" page="" of="" results.="" */="" const="" pagetoken='abc123' *="" *="" project="" id="" for="" this="" request.="" */="" const="" project='my-project' *="" *="" opt-in="" for="" partial="" success="" behavior="" which="" provides="" partial="" results="" in="" case="" of="" failure.="" the="" default="" value="" is="" false.="" */="" const="" returnpartialsuccess="true" *="" *="" the="" name="" of="" the="" zone="" where="" the="" managed="" instance="" group="" is="" located.="" */="" const="" zone='abc123' imports="" the="" compute="" library="" const="" {instancegroupmanagersclient}="require('@google-cloud/compute').v1;" instantiates="" a="" client="" const="" computeclient="new" instancegroupmanagersclient();="" async="" function="" calllistmanagedinstances()="" {="" construct="" request="" const="" request="{" instancegroupmanager,="" project,="" zone,="" };="" run="" request="" const="" iterable="await" computeclient.listmanagedinstancesasync(request);="" for="" await="" (const="" response="" of="" iterable)="" {="" console.log(response);="" }="" }="" calllistmanagedinstances();="">

listManagedInstancesStream(request, options)

listManagedInstancesStream(request?: protos.google.cloud.compute.v1.IListManagedInstancesInstanceGroupManagersRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.compute.v1.IListManagedInstancesInstanceGroupManagersRequest

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 [ManagedInstance] 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 listManagedInstancesAsync() 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.

listPerInstanceConfigs(request, options)

listPerInstanceConfigs(request?: protos.google.cloud.compute.v1.IListPerInstanceConfigsInstanceGroupManagersRequest, options?: CallOptions): Promise<[
        protos.google.cloud.compute.v1.IPerInstanceConfig[],
        protos.google.cloud.compute.v1.IListPerInstanceConfigsInstanceGroupManagersRequest | null,
        protos.google.cloud.compute.v1.IInstanceGroupManagersListPerInstanceConfigsResp
    ]>;

Lists all of the per-instance configs defined for the managed instance group. The orderBy query parameter is not supported.

Parameters
NameDescription
request protos.google.cloud.compute.v1.IListPerInstanceConfigsInstanceGroupManagersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.compute.v1.IPerInstanceConfig[], protos.google.cloud.compute.v1.IListPerInstanceConfigsInstanceGroupManagersRequest | null, protos.google.cloud.compute.v1.IInstanceGroupManagersListPerInstanceConfigsResp ]>

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

listPerInstanceConfigs(request, options, callback)

listPerInstanceConfigs(request: protos.google.cloud.compute.v1.IListPerInstanceConfigsInstanceGroupManagersRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.compute.v1.IListPerInstanceConfigsInstanceGroupManagersRequest, protos.google.cloud.compute.v1.IInstanceGroupManagersListPerInstanceConfigsResp | null | undefined, protos.google.cloud.compute.v1.IPerInstanceConfig>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.IListPerInstanceConfigsInstanceGroupManagersRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.compute.v1.IListPerInstanceConfigsInstanceGroupManagersRequest, protos.google.cloud.compute.v1.IInstanceGroupManagersListPerInstanceConfigsResp | null | undefined, protos.google.cloud.compute.v1.IPerInstanceConfig>
Returns
TypeDescription
void

listPerInstanceConfigs(request, callback)

listPerInstanceConfigs(request: protos.google.cloud.compute.v1.IListPerInstanceConfigsInstanceGroupManagersRequest, callback: PaginationCallback<protos.google.cloud.compute.v1.IListPerInstanceConfigsInstanceGroupManagersRequest, protos.google.cloud.compute.v1.IInstanceGroupManagersListPerInstanceConfigsResp | null | undefined, protos.google.cloud.compute.v1.IPerInstanceConfig>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.IListPerInstanceConfigsInstanceGroupManagersRequest
callback PaginationCallback<protos.google.cloud.compute.v1.IListPerInstanceConfigsInstanceGroupManagersRequest, protos.google.cloud.compute.v1.IInstanceGroupManagersListPerInstanceConfigsResp | null | undefined, protos.google.cloud.compute.v1.IPerInstanceConfig>
Returns
TypeDescription
void

listPerInstanceConfigsAsync(request, options)

listPerInstanceConfigsAsync(request?: protos.google.cloud.compute.v1.IListPerInstanceConfigsInstanceGroupManagersRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.compute.v1.IPerInstanceConfig>;

Equivalent to listPerInstanceConfigs, 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.compute.v1.IListPerInstanceConfigsInstanceGroupManagersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.compute.v1.IPerInstanceConfig>

{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 [PerInstanceConfig]. 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.
   */
  /**
   *  A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. for="" example,="" if="" you="" are="" filtering="" compute="" engine="" instances,="" you="" can="" exclude="" instances="" named="" `example-instance`="" by="" specifying="" `name="" !="example-instance`." you="" can="" also="" filter="" nested="" fields.="" for="" example,="" you="" could="" specify="" `scheduling.automaticrestart="false`" to="" include="" instances="" only="" if="" they="" are="" not="" scheduled="" for="" automatic="" restarts.="" you="" can="" use="" filtering="" on="" nested="" fields="" to="" filter="" based="" on="" resource="" labels.="" to="" filter="" on="" multiple="" expressions,="" provide="" each="" separate="" expression="" within="" parentheses.="" for="" example:="" ```="" (scheduling.automaticrestart="true)" (cpuplatform="Intel Skylake" )="" ```="" by="" default,="" each="" expression="" is="" an="" `and`="" expression.="" however,="" you="" can="" include="" `and`="" and="" `or`="" expressions="" explicitly.="" for="" example:="" ```="" (cpuplatform="Intel Skylake" )="" or="" (cpuplatform="Intel Broadwell" )="" and="" (scheduling.automaticrestart="true)" ```="" */="" const="" filter='abc123' *="" *="" the="" name="" of="" the="" managed="" instance="" group.="" it="" should="" conform="" to="" rfc1035.="" */="" const="" instancegroupmanager='abc123' *="" *="" the="" maximum="" number="" of="" results="" per="" page="" that="" should="" be="" returned.="" if="" the="" number="" of="" available="" results="" is="" larger="" than="" `maxresults`,="" compute="" engine="" returns="" a="" `nextpagetoken`="" that="" can="" be="" used="" to="" get="" the="" next="" page="" of="" results="" in="" subsequent="" list="" requests.="" acceptable="" values="" are="" `0`="" to="" `500`,="" inclusive.="" (default:="" `500`)="" */="" const="" maxresults="1234" *="" *="" sorts="" list="" results="" by="" a="" certain="" order.="" by="" default,="" results="" are="" returned="" in="" alphanumerical="" order="" based="" on="" the="" resource="" name.="" you="" can="" also="" sort="" results="" in="" descending="" order="" based="" on="" the="" creation="" timestamp="" using="" `orderby="creationTimestamp desc" `.="" this="" sorts="" results="" based="" on="" the="" `creationtimestamp`="" field="" in="" reverse="" chronological="" order="" (newest="" result="" first).="" use="" this="" to="" sort="" resources="" like="" operations="" so="" that="" the="" newest="" operation="" is="" returned="" first.="" currently,="" only="" sorting="" by="" `name`="" or="" `creationtimestamp="" desc`="" is="" supported.="" */="" const="" orderby='abc123' *="" *="" specifies="" a="" page="" token="" to="" use.="" set="" `pagetoken`="" to="" the="" `nextpagetoken`="" returned="" by="" a="" previous="" list="" request="" to="" get="" the="" next="" page="" of="" results.="" */="" const="" pagetoken='abc123' *="" *="" project="" id="" for="" this="" request.="" */="" const="" project='my-project' *="" *="" opt-in="" for="" partial="" success="" behavior="" which="" provides="" partial="" results="" in="" case="" of="" failure.="" the="" default="" value="" is="" false.="" */="" const="" returnpartialsuccess="true" *="" *="" the="" name="" of="" the="" zone="" where="" the="" managed="" instance="" group="" is="" located.="" it="" should="" conform="" to="" rfc1035.="" */="" const="" zone='abc123' imports="" the="" compute="" library="" const="" {instancegroupmanagersclient}="require('@google-cloud/compute').v1;" instantiates="" a="" client="" const="" computeclient="new" instancegroupmanagersclient();="" async="" function="" calllistperinstanceconfigs()="" {="" construct="" request="" const="" request="{" instancegroupmanager,="" project,="" zone,="" };="" run="" request="" const="" iterable="await" computeclient.listperinstanceconfigsasync(request);="" for="" await="" (const="" response="" of="" iterable)="" {="" console.log(response);="" }="" }="" calllistperinstanceconfigs();="">

listPerInstanceConfigsStream(request, options)

listPerInstanceConfigsStream(request?: protos.google.cloud.compute.v1.IListPerInstanceConfigsInstanceGroupManagersRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.compute.v1.IListPerInstanceConfigsInstanceGroupManagersRequest

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 [PerInstanceConfig] 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 listPerInstanceConfigsAsync() 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.

listStream(request, options)

listStream(request?: protos.google.cloud.compute.v1.IListInstanceGroupManagersRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request protos.google.cloud.compute.v1.IListInstanceGroupManagersRequest

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 [InstanceGroupManager] 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 listAsync() 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.

patch(request, options)

patch(request?: protos.google.cloud.compute.v1.IPatchInstanceGroupManagerRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.compute.v1.IOperation, null>,
        protos.google.cloud.compute.v1.IOperation | undefined,
        {} | undefined
    ]>;

Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. If you update your group to specify a new template or instance configuration, it's possible that your intended specification for each VM in the group is different from the current state of that VM. To learn how to apply an updated configuration to the VMs in a MIG, see Updating instances in a MIG.

Parameters
NameDescription
request protos.google.cloud.compute.v1.IPatchInstanceGroupManagerRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.compute.v1.IOperation, null>, protos.google.cloud.compute.v1.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. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. This method is considered to be in beta. This means while stable it is still a work-in-progress and under active development, and might get backwards-incompatible changes at any time. .promise() is not supported yet.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name of the instance group manager.
   */
  // const instanceGroupManager = 'abc123'
  /**
   *  The body resource for this request
   */
  // const instanceGroupManagerResource = {}
  /**
   *  Project ID for this request.
   */
  // const project = 'my-project'
  /**
   *  An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  The name of the zone where you want to create the managed instance group.
   */
  // const zone = 'abc123'

  // Imports the Compute library
  const {InstanceGroupManagersClient} = require('@google-cloud/compute').v1;

  // Instantiates a client
  const computeClient = new InstanceGroupManagersClient();

  async function callPatch() {
    // Construct request
    const request = {
      instanceGroupManager,
      instanceGroupManagerResource,
      project,
      zone,
    };

    // Run request
    const response = await computeClient.patch(request);
    console.log(response);
  }

  callPatch();

patch(request, options, callback)

patch(request: protos.google.cloud.compute.v1.IPatchInstanceGroupManagerRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IPatchInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.IPatchInstanceGroupManagerRequest
options CallOptions
callback Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IPatchInstanceGroupManagerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

patch(request, callback)

patch(request: protos.google.cloud.compute.v1.IPatchInstanceGroupManagerRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IPatchInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.IPatchInstanceGroupManagerRequest
callback Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IPatchInstanceGroupManagerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

patchPerInstanceConfigs(request, options)

patchPerInstanceConfigs(request?: protos.google.cloud.compute.v1.IPatchPerInstanceConfigsInstanceGroupManagerRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.compute.v1.IOperation, null>,
        protos.google.cloud.compute.v1.IOperation | undefined,
        {} | undefined
    ]>;

Inserts or patches per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.

Parameters
NameDescription
request protos.google.cloud.compute.v1.IPatchPerInstanceConfigsInstanceGroupManagerRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.compute.v1.IOperation, null>, protos.google.cloud.compute.v1.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. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. This method is considered to be in beta. This means while stable it is still a work-in-progress and under active development, and might get backwards-incompatible changes at any time. .promise() is not supported yet.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name of the managed instance group. It should conform to RFC1035.
   */
  // const instanceGroupManager = 'abc123'
  /**
   *  The body resource for this request
   */
  // const instanceGroupManagersPatchPerInstanceConfigsReqResource = {}
  /**
   *  Project ID for this request.
   */
  // const project = 'my-project'
  /**
   *  An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  The name of the zone where the managed instance group is located. It should conform to RFC1035.
   */
  // const zone = 'abc123'

  // Imports the Compute library
  const {InstanceGroupManagersClient} = require('@google-cloud/compute').v1;

  // Instantiates a client
  const computeClient = new InstanceGroupManagersClient();

  async function callPatchPerInstanceConfigs() {
    // Construct request
    const request = {
      instanceGroupManager,
      instanceGroupManagersPatchPerInstanceConfigsReqResource,
      project,
      zone,
    };

    // Run request
    const response = await computeClient.patchPerInstanceConfigs(request);
    console.log(response);
  }

  callPatchPerInstanceConfigs();

patchPerInstanceConfigs(request, options, callback)

patchPerInstanceConfigs(request: protos.google.cloud.compute.v1.IPatchPerInstanceConfigsInstanceGroupManagerRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IPatchPerInstanceConfigsInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.IPatchPerInstanceConfigsInstanceGroupManagerRequest
options CallOptions
callback Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IPatchPerInstanceConfigsInstanceGroupManagerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

patchPerInstanceConfigs(request, callback)

patchPerInstanceConfigs(request: protos.google.cloud.compute.v1.IPatchPerInstanceConfigsInstanceGroupManagerRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IPatchPerInstanceConfigsInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.IPatchPerInstanceConfigsInstanceGroupManagerRequest
callback Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IPatchPerInstanceConfigsInstanceGroupManagerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

recreateInstances(request, options)

recreateInstances(request?: protos.google.cloud.compute.v1.IRecreateInstancesInstanceGroupManagerRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.compute.v1.IOperation, null>,
        protos.google.cloud.compute.v1.IOperation | undefined,
        {} | undefined
    ]>;

Flags the specified VM instances in the managed instance group to be immediately recreated. Each instance is recreated using the group's current configuration. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of each instance by checking its currentAction field; for more information, see Checking the status of managed instances. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.

Parameters
NameDescription
request protos.google.cloud.compute.v1.IRecreateInstancesInstanceGroupManagerRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.compute.v1.IOperation, null>, protos.google.cloud.compute.v1.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. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. This method is considered to be in beta. This means while stable it is still a work-in-progress and under active development, and might get backwards-incompatible changes at any time. .promise() is not supported yet.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name of the managed instance group.
   */
  // const instanceGroupManager = 'abc123'
  /**
   *  The body resource for this request
   */
  // const instanceGroupManagersRecreateInstancesRequestResource = {}
  /**
   *  Project ID for this request.
   */
  // const project = 'my-project'
  /**
   *  An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  The name of the zone where the managed instance group is located.
   */
  // const zone = 'abc123'

  // Imports the Compute library
  const {InstanceGroupManagersClient} = require('@google-cloud/compute').v1;

  // Instantiates a client
  const computeClient = new InstanceGroupManagersClient();

  async function callRecreateInstances() {
    // Construct request
    const request = {
      instanceGroupManager,
      instanceGroupManagersRecreateInstancesRequestResource,
      project,
      zone,
    };

    // Run request
    const response = await computeClient.recreateInstances(request);
    console.log(response);
  }

  callRecreateInstances();

recreateInstances(request, options, callback)

recreateInstances(request: protos.google.cloud.compute.v1.IRecreateInstancesInstanceGroupManagerRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IRecreateInstancesInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.IRecreateInstancesInstanceGroupManagerRequest
options CallOptions
callback Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IRecreateInstancesInstanceGroupManagerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

recreateInstances(request, callback)

recreateInstances(request: protos.google.cloud.compute.v1.IRecreateInstancesInstanceGroupManagerRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IRecreateInstancesInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.IRecreateInstancesInstanceGroupManagerRequest
callback Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IRecreateInstancesInstanceGroupManagerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

resize(request, options)

resize(request?: protos.google.cloud.compute.v1.IResizeInstanceGroupManagerRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.compute.v1.IOperation, null>,
        protos.google.cloud.compute.v1.IOperation | undefined,
        {} | undefined
    ]>;

Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method. When resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the selection including: + The status of the VM instance. + The health of the VM instance. + The instance template version the VM is based on. + For regional managed instance groups, the location of the VM instance. This list is subject to change. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.

Parameters
NameDescription
request protos.google.cloud.compute.v1.IResizeInstanceGroupManagerRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.compute.v1.IOperation, null>, protos.google.cloud.compute.v1.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. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. This method is considered to be in beta. This means while stable it is still a work-in-progress and under active development, and might get backwards-incompatible changes at any time. .promise() is not supported yet.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name of the managed instance group.
   */
  // const instanceGroupManager = 'abc123'
  /**
   *  Project ID for this request.
   */
  // const project = 'my-project'
  /**
   *  An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter.
   */
  // const size = 1234
  /**
   *  The name of the zone where the managed instance group is located.
   */
  // const zone = 'abc123'

  // Imports the Compute library
  const {InstanceGroupManagersClient} = require('@google-cloud/compute').v1;

  // Instantiates a client
  const computeClient = new InstanceGroupManagersClient();

  async function callResize() {
    // Construct request
    const request = {
      instanceGroupManager,
      project,
      size,
      zone,
    };

    // Run request
    const response = await computeClient.resize(request);
    console.log(response);
  }

  callResize();

resize(request, options, callback)

resize(request: protos.google.cloud.compute.v1.IResizeInstanceGroupManagerRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IResizeInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.IResizeInstanceGroupManagerRequest
options CallOptions
callback Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IResizeInstanceGroupManagerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

resize(request, callback)

resize(request: protos.google.cloud.compute.v1.IResizeInstanceGroupManagerRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IResizeInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.IResizeInstanceGroupManagerRequest
callback Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IResizeInstanceGroupManagerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setInstanceTemplate(request, options)

setInstanceTemplate(request?: protos.google.cloud.compute.v1.ISetInstanceTemplateInstanceGroupManagerRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.compute.v1.IOperation, null>,
        protos.google.cloud.compute.v1.IOperation | undefined,
        {} | undefined
    ]>;

Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group's updatePolicy.type to PROACTIVE.

Parameters
NameDescription
request protos.google.cloud.compute.v1.ISetInstanceTemplateInstanceGroupManagerRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.compute.v1.IOperation, null>, protos.google.cloud.compute.v1.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. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. This method is considered to be in beta. This means while stable it is still a work-in-progress and under active development, and might get backwards-incompatible changes at any time. .promise() is not supported yet.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name of the managed instance group.
   */
  // const instanceGroupManager = 'abc123'
  /**
   *  The body resource for this request
   */
  // const instanceGroupManagersSetInstanceTemplateRequestResource = {}
  /**
   *  Project ID for this request.
   */
  // const project = 'my-project'
  /**
   *  An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  The name of the zone where the managed instance group is located.
   */
  // const zone = 'abc123'

  // Imports the Compute library
  const {InstanceGroupManagersClient} = require('@google-cloud/compute').v1;

  // Instantiates a client
  const computeClient = new InstanceGroupManagersClient();

  async function callSetInstanceTemplate() {
    // Construct request
    const request = {
      instanceGroupManager,
      instanceGroupManagersSetInstanceTemplateRequestResource,
      project,
      zone,
    };

    // Run request
    const response = await computeClient.setInstanceTemplate(request);
    console.log(response);
  }

  callSetInstanceTemplate();

setInstanceTemplate(request, options, callback)

setInstanceTemplate(request: protos.google.cloud.compute.v1.ISetInstanceTemplateInstanceGroupManagerRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.ISetInstanceTemplateInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.ISetInstanceTemplateInstanceGroupManagerRequest
options CallOptions
callback Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.ISetInstanceTemplateInstanceGroupManagerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setInstanceTemplate(request, callback)

setInstanceTemplate(request: protos.google.cloud.compute.v1.ISetInstanceTemplateInstanceGroupManagerRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.ISetInstanceTemplateInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.ISetInstanceTemplateInstanceGroupManagerRequest
callback Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.ISetInstanceTemplateInstanceGroupManagerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setTargetPools(request, options)

setTargetPools(request?: protos.google.cloud.compute.v1.ISetTargetPoolsInstanceGroupManagerRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.compute.v1.IOperation, null>,
        protos.google.cloud.compute.v1.IOperation | undefined,
        {} | undefined
    ]>;

Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.

Parameters
NameDescription
request protos.google.cloud.compute.v1.ISetTargetPoolsInstanceGroupManagerRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.compute.v1.IOperation, null>, protos.google.cloud.compute.v1.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. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. This method is considered to be in beta. This means while stable it is still a work-in-progress and under active development, and might get backwards-incompatible changes at any time. .promise() is not supported yet.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name of the managed instance group.
   */
  // const instanceGroupManager = 'abc123'
  /**
   *  The body resource for this request
   */
  // const instanceGroupManagersSetTargetPoolsRequestResource = {}
  /**
   *  Project ID for this request.
   */
  // const project = 'my-project'
  /**
   *  An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  The name of the zone where the managed instance group is located.
   */
  // const zone = 'abc123'

  // Imports the Compute library
  const {InstanceGroupManagersClient} = require('@google-cloud/compute').v1;

  // Instantiates a client
  const computeClient = new InstanceGroupManagersClient();

  async function callSetTargetPools() {
    // Construct request
    const request = {
      instanceGroupManager,
      instanceGroupManagersSetTargetPoolsRequestResource,
      project,
      zone,
    };

    // Run request
    const response = await computeClient.setTargetPools(request);
    console.log(response);
  }

  callSetTargetPools();

setTargetPools(request, options, callback)

setTargetPools(request: protos.google.cloud.compute.v1.ISetTargetPoolsInstanceGroupManagerRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.ISetTargetPoolsInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.ISetTargetPoolsInstanceGroupManagerRequest
options CallOptions
callback Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.ISetTargetPoolsInstanceGroupManagerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

setTargetPools(request, callback)

setTargetPools(request: protos.google.cloud.compute.v1.ISetTargetPoolsInstanceGroupManagerRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.ISetTargetPoolsInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.ISetTargetPoolsInstanceGroupManagerRequest
callback Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.ISetTargetPoolsInstanceGroupManagerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updatePerInstanceConfigs(request, options)

updatePerInstanceConfigs(request?: protos.google.cloud.compute.v1.IUpdatePerInstanceConfigsInstanceGroupManagerRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.compute.v1.IOperation, null>,
        protos.google.cloud.compute.v1.IOperation | undefined,
        {} | undefined
    ]>;

Inserts or updates per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.

Parameters
NameDescription
request protos.google.cloud.compute.v1.IUpdatePerInstanceConfigsInstanceGroupManagerRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.compute.v1.IOperation, null>, protos.google.cloud.compute.v1.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. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. This method is considered to be in beta. This means while stable it is still a work-in-progress and under active development, and might get backwards-incompatible changes at any time. .promise() is not supported yet.

Example

  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  The name of the managed instance group. It should conform to RFC1035.
   */
  // const instanceGroupManager = 'abc123'
  /**
   *  The body resource for this request
   */
  // const instanceGroupManagersUpdatePerInstanceConfigsReqResource = {}
  /**
   *  Project ID for this request.
   */
  // const project = 'my-project'
  /**
   *  An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'
  /**
   *  The name of the zone where the managed instance group is located. It should conform to RFC1035.
   */
  // const zone = 'abc123'

  // Imports the Compute library
  const {InstanceGroupManagersClient} = require('@google-cloud/compute').v1;

  // Instantiates a client
  const computeClient = new InstanceGroupManagersClient();

  async function callUpdatePerInstanceConfigs() {
    // Construct request
    const request = {
      instanceGroupManager,
      instanceGroupManagersUpdatePerInstanceConfigsReqResource,
      project,
      zone,
    };

    // Run request
    const response = await computeClient.updatePerInstanceConfigs(request);
    console.log(response);
  }

  callUpdatePerInstanceConfigs();

updatePerInstanceConfigs(request, options, callback)

updatePerInstanceConfigs(request: protos.google.cloud.compute.v1.IUpdatePerInstanceConfigsInstanceGroupManagerRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IUpdatePerInstanceConfigsInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.IUpdatePerInstanceConfigsInstanceGroupManagerRequest
options CallOptions
callback Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IUpdatePerInstanceConfigsInstanceGroupManagerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updatePerInstanceConfigs(request, callback)

updatePerInstanceConfigs(request: protos.google.cloud.compute.v1.IUpdatePerInstanceConfigsInstanceGroupManagerRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IUpdatePerInstanceConfigsInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.compute.v1.IUpdatePerInstanceConfigsInstanceGroupManagerRequest
callback Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IUpdatePerInstanceConfigsInstanceGroupManagerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void