UNPKG

@google-cloud/compute

Version:
565 lines 143 kB
import type * as gax from 'google-gax'; import type { Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback } from 'google-gax'; import { Transform } from 'stream'; import * as protos from '../../protos/protos'; /** * The RegionInstanceGroupManagers API. * @class * @memberof v1 */ export declare class RegionInstanceGroupManagersClient { private _terminated; private _opts; private _providedCustomServicePath; private _gaxModule; private _gaxGrpc; private _protos; private _defaults; private _universeDomain; private _servicePath; private _log; auth: gax.GoogleAuth; descriptors: Descriptors; warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: { [name: string]: Function; }; regionInstanceGroupManagersStub?: Promise<{ [name: string]: Function; }>; /** * Construct an instance of RegionInstanceGroupManagersClient. * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] * @param {string} [options.credentials.private_key] * @param {string} [options.email] - Account email address. Required when * using a .pem or .p12 keyFilename. * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or * .p12 key downloaded from the Google Developers Console. If you provide * a path to a JSON file, the projectId option below is not necessary. * NOTE: .pem and .p12 require you to specify options.email as well. * @param {number} [options.port] - The port on which to connect to * the remote host. * @param {string} [options.projectId] - The project ID from the Google * Developer's Console, e.g. 'grape-spaceship-123'. We will also check * the environment variable GCLOUD_PROJECT for your project ID. If your * app is running in an environment which supports * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. * For more information, please check the * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you * need to avoid loading the default gRPC version and want to use the fallback * HTTP implementation. Load only fallback version and pass it to the constructor: * ``` * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC * const client = new RegionInstanceGroupManagersClient({fallback: true}, gax); * ``` */ constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback); /** * 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 {Promise} A promise that resolves to an authenticated service stub. */ initialize(): Promise<{ [name: string]: Function; }>; /** * The DNS address for this API service. * @deprecated Use the apiEndpoint method of the client instance. * @returns {string} The DNS address for this service. */ static get servicePath(): string; /** * The DNS address for this API service - same as servicePath. * @deprecated Use the apiEndpoint method of the client instance. * @returns {string} The DNS address for this service. */ static get apiEndpoint(): string; /** * The DNS address for this API service. * @returns {string} The DNS address for this service. */ get apiEndpoint(): string; get universeDomain(): string; /** * The port for this API service. * @returns {number} The default port for this service. */ static get port(): number; /** * The scopes needed to make gRPC calls for every method defined * in this service. * @returns {string[]} List of default scopes. */ static get scopes(): string[]; getProjectId(): Promise<string>; getProjectId(callback: Callback<string, undefined, undefined>): void; /** * Flags the specified instances to be immediately 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. * * @param {Object} request * The request object that will be sent. * @param {string} request.instanceGroupManager * Name of the managed instance group. * @param {string} request.project * Project ID for this request. * @param {string} request.region * Name of the region scoping this request. * @param {google.cloud.compute.v1.RegionInstanceGroupManagersAbandonInstancesRequest} request.regionInstanceGroupManagersAbandonInstancesRequestResource * The body resource for this request * @param {string} request.requestId * 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). * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * 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 <caption>include:samples/generated/v1/region_instance_group_managers.abandon_instances.js</caption> * region_tag:compute_v1_generated_RegionInstanceGroupManagers_AbandonInstances_async */ abandonInstances(request?: protos.google.cloud.compute.v1.IAbandonInstancesRegionInstanceGroupManagerRequest, options?: CallOptions): Promise<[ LROperation<protos.google.cloud.compute.v1.IOperation, null>, protos.google.cloud.compute.v1.IOperation | undefined, {} | undefined ]>; abandonInstances(request: protos.google.cloud.compute.v1.IAbandonInstancesRegionInstanceGroupManagerRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IAbandonInstancesRegionInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void; abandonInstances(request: protos.google.cloud.compute.v1.IAbandonInstancesRegionInstanceGroupManagerRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IAbandonInstancesRegionInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void; /** * Apply updates to selected instances the managed instance group. * * @param {Object} request * The request object that will be sent. * @param {string} request.instanceGroupManager * The name of the managed instance group, should conform to RFC1035. * @param {string} request.project * Project ID for this request. * @param {string} request.region * Name of the region scoping this request, should conform to RFC1035. * @param {google.cloud.compute.v1.RegionInstanceGroupManagersApplyUpdatesRequest} request.regionInstanceGroupManagersApplyUpdatesRequestResource * The body resource for this request * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * 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 <caption>include:samples/generated/v1/region_instance_group_managers.apply_updates_to_instances.js</caption> * region_tag:compute_v1_generated_RegionInstanceGroupManagers_ApplyUpdatesToInstances_async */ applyUpdatesToInstances(request?: protos.google.cloud.compute.v1.IApplyUpdatesToInstancesRegionInstanceGroupManagerRequest, options?: CallOptions): Promise<[ LROperation<protos.google.cloud.compute.v1.IOperation, null>, protos.google.cloud.compute.v1.IOperation | undefined, {} | undefined ]>; applyUpdatesToInstances(request: protos.google.cloud.compute.v1.IApplyUpdatesToInstancesRegionInstanceGroupManagerRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IApplyUpdatesToInstancesRegionInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void; applyUpdatesToInstances(request: protos.google.cloud.compute.v1.IApplyUpdatesToInstancesRegionInstanceGroupManagerRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IApplyUpdatesToInstancesRegionInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void; /** * Creates instances with per-instance configurations in this regional 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. * * @param {Object} request * The request object that will be sent. * @param {string} request.instanceGroupManager * The name of the managed instance group. It should conform to RFC1035. * @param {string} request.project * Project ID for this request. * @param {string} request.region * The name of the region where the managed instance group is located. It should conform to RFC1035. * @param {google.cloud.compute.v1.RegionInstanceGroupManagersCreateInstancesRequest} request.regionInstanceGroupManagersCreateInstancesRequestResource * The body resource for this request * @param {string} request.requestId * 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). * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * 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 <caption>include:samples/generated/v1/region_instance_group_managers.create_instances.js</caption> * region_tag:compute_v1_generated_RegionInstanceGroupManagers_CreateInstances_async */ createInstances(request?: protos.google.cloud.compute.v1.ICreateInstancesRegionInstanceGroupManagerRequest, options?: CallOptions): Promise<[ LROperation<protos.google.cloud.compute.v1.IOperation, null>, protos.google.cloud.compute.v1.IOperation | undefined, {} | undefined ]>; createInstances(request: protos.google.cloud.compute.v1.ICreateInstancesRegionInstanceGroupManagerRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.ICreateInstancesRegionInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void; createInstances(request: protos.google.cloud.compute.v1.ICreateInstancesRegionInstanceGroupManagerRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.ICreateInstancesRegionInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void; /** * Deletes the specified managed instance group and all of the instances in that group. * * @param {Object} request * The request object that will be sent. * @param {string} request.instanceGroupManager * Name of the managed instance group to delete. * @param {string} request.project * Project ID for this request. * @param {string} request.region * Name of the region scoping this request. * @param {string} request.requestId * 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). * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * 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 <caption>include:samples/generated/v1/region_instance_group_managers.delete.js</caption> * region_tag:compute_v1_generated_RegionInstanceGroupManagers_Delete_async */ delete(request?: protos.google.cloud.compute.v1.IDeleteRegionInstanceGroupManagerRequest, options?: CallOptions): Promise<[ LROperation<protos.google.cloud.compute.v1.IOperation, null>, protos.google.cloud.compute.v1.IOperation | undefined, {} | undefined ]>; delete(request: protos.google.cloud.compute.v1.IDeleteRegionInstanceGroupManagerRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IDeleteRegionInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void; delete(request: protos.google.cloud.compute.v1.IDeleteRegionInstanceGroupManagerRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IDeleteRegionInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void; /** * Flags the specified instances in the managed instance group to be immediately deleted. 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. The deleteInstances operation is marked DONE if the deleteInstances request is successful. The underlying actions take additional time. 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. * * @param {Object} request * The request object that will be sent. * @param {string} request.instanceGroupManager * Name of the managed instance group. * @param {string} request.project * Project ID for this request. * @param {string} request.region * Name of the region scoping this request. * @param {google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest} request.regionInstanceGroupManagersDeleteInstancesRequestResource * The body resource for this request * @param {string} request.requestId * 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). * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * 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 <caption>include:samples/generated/v1/region_instance_group_managers.delete_instances.js</caption> * region_tag:compute_v1_generated_RegionInstanceGroupManagers_DeleteInstances_async */ deleteInstances(request?: protos.google.cloud.compute.v1.IDeleteInstancesRegionInstanceGroupManagerRequest, options?: CallOptions): Promise<[ LROperation<protos.google.cloud.compute.v1.IOperation, null>, protos.google.cloud.compute.v1.IOperation | undefined, {} | undefined ]>; deleteInstances(request: protos.google.cloud.compute.v1.IDeleteInstancesRegionInstanceGroupManagerRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IDeleteInstancesRegionInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void; deleteInstances(request: protos.google.cloud.compute.v1.IDeleteInstancesRegionInstanceGroupManagerRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IDeleteInstancesRegionInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void; /** * Deletes selected per-instance configurations for the managed instance group. * * @param {Object} request * The request object that will be sent. * @param {string} request.instanceGroupManager * The name of the managed instance group. It should conform to RFC1035. * @param {string} request.project * Project ID for this request. * @param {string} request.region * Name of the region scoping this request, should conform to RFC1035. * @param {google.cloud.compute.v1.RegionInstanceGroupManagerDeleteInstanceConfigReq} request.regionInstanceGroupManagerDeleteInstanceConfigReqResource * The body resource for this request * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * 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 <caption>include:samples/generated/v1/region_instance_group_managers.delete_per_instance_configs.js</caption> * region_tag:compute_v1_generated_RegionInstanceGroupManagers_DeletePerInstanceConfigs_async */ deletePerInstanceConfigs(request?: protos.google.cloud.compute.v1.IDeletePerInstanceConfigsRegionInstanceGroupManagerRequest, options?: CallOptions): Promise<[ LROperation<protos.google.cloud.compute.v1.IOperation, null>, protos.google.cloud.compute.v1.IOperation | undefined, {} | undefined ]>; deletePerInstanceConfigs(request: protos.google.cloud.compute.v1.IDeletePerInstanceConfigsRegionInstanceGroupManagerRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IDeletePerInstanceConfigsRegionInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void; deletePerInstanceConfigs(request: protos.google.cloud.compute.v1.IDeletePerInstanceConfigsRegionInstanceGroupManagerRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IDeletePerInstanceConfigsRegionInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void; /** * Returns all of the details about the specified managed instance group. * * @param {Object} request * The request object that will be sent. * @param {string} request.instanceGroupManager * Name of the managed instance group to return. * @param {string} request.project * Project ID for this request. * @param {string} request.region * Name of the region scoping this request. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.cloud.compute.v1.InstanceGroupManager|InstanceGroupManager}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1/region_instance_group_managers.get.js</caption> * region_tag:compute_v1_generated_RegionInstanceGroupManagers_Get_async */ get(request?: protos.google.cloud.compute.v1.IGetRegionInstanceGroupManagerRequest, options?: CallOptions): Promise<[ protos.google.cloud.compute.v1.IInstanceGroupManager, protos.google.cloud.compute.v1.IGetRegionInstanceGroupManagerRequest | undefined, {} | undefined ]>; get(request: protos.google.cloud.compute.v1.IGetRegionInstanceGroupManagerRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IInstanceGroupManager, protos.google.cloud.compute.v1.IGetRegionInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void; get(request: protos.google.cloud.compute.v1.IGetRegionInstanceGroupManagerRequest, callback: Callback<protos.google.cloud.compute.v1.IInstanceGroupManager, protos.google.cloud.compute.v1.IGetRegionInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void; /** * 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 regional managed instance group can contain up to 2000 instances. * * @param {Object} request * The request object that will be sent. * @param {google.cloud.compute.v1.InstanceGroupManager} request.instanceGroupManagerResource * The body resource for this request * @param {string} request.project * Project ID for this request. * @param {string} request.region * Name of the region scoping this request. * @param {string} request.requestId * 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). * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * 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 <caption>include:samples/generated/v1/region_instance_group_managers.insert.js</caption> * region_tag:compute_v1_generated_RegionInstanceGroupManagers_Insert_async */ insert(request?: protos.google.cloud.compute.v1.IInsertRegionInstanceGroupManagerRequest, options?: CallOptions): Promise<[ LROperation<protos.google.cloud.compute.v1.IOperation, null>, protos.google.cloud.compute.v1.IOperation | undefined, {} | undefined ]>; insert(request: protos.google.cloud.compute.v1.IInsertRegionInstanceGroupManagerRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IInsertRegionInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void; insert(request: protos.google.cloud.compute.v1.IInsertRegionInstanceGroupManagerRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IInsertRegionInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void; /** * 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. * * @param {Object} request * The request object that will be sent. * @param {string} request.instanceGroupManager * The name of the instance group manager. * @param {google.cloud.compute.v1.InstanceGroupManager} request.instanceGroupManagerResource * The body resource for this request * @param {string} request.project * Project ID for this request. * @param {string} request.region * Name of the region scoping this request. * @param {string} request.requestId * 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). * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * 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 <caption>include:samples/generated/v1/region_instance_group_managers.patch.js</caption> * region_tag:compute_v1_generated_RegionInstanceGroupManagers_Patch_async */ patch(request?: protos.google.cloud.compute.v1.IPatchRegionInstanceGroupManagerRequest, options?: CallOptions): Promise<[ LROperation<protos.google.cloud.compute.v1.IOperation, null>, protos.google.cloud.compute.v1.IOperation | undefined, {} | undefined ]>; patch(request: protos.google.cloud.compute.v1.IPatchRegionInstanceGroupManagerRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IPatchRegionInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void; patch(request: protos.google.cloud.compute.v1.IPatchRegionInstanceGroupManagerRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IPatchRegionInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void; /** * Inserts or patches per-instance configurations for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch. * * @param {Object} request * The request object that will be sent. * @param {string} request.instanceGroupManager * The name of the managed instance group. It should conform to RFC1035. * @param {string} request.project * Project ID for this request. * @param {string} request.region * Name of the region scoping this request, should conform to RFC1035. * @param {google.cloud.compute.v1.RegionInstanceGroupManagerPatchInstanceConfigReq} request.regionInstanceGroupManagerPatchInstanceConfigReqResource * The body resource for this request * @param {string} request.requestId * 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). * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * 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 <caption>include:samples/generated/v1/region_instance_group_managers.patch_per_instance_configs.js</caption> * region_tag:compute_v1_generated_RegionInstanceGroupManagers_PatchPerInstanceConfigs_async */ patchPerInstanceConfigs(request?: protos.google.cloud.compute.v1.IPatchPerInstanceConfigsRegionInstanceGroupManagerRequest, options?: CallOptions): Promise<[ LROperation<protos.google.cloud.compute.v1.IOperation, null>, protos.google.cloud.compute.v1.IOperation | undefined, {} | undefined ]>; patchPerInstanceConfigs(request: protos.google.cloud.compute.v1.IPatchPerInstanceConfigsRegionInstanceGroupManagerRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IPatchPerInstanceConfigsRegionInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void; patchPerInstanceConfigs(request: protos.google.cloud.compute.v1.IPatchPerInstanceConfigsRegionInstanceGroupManagerRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IPatchPerInstanceConfigsRegionInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void; /** * 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. * * @param {Object} request * The request object that will be sent. * @param {string} request.instanceGroupManager * Name of the managed instance group. * @param {string} request.project * Project ID for this request. * @param {string} request.region * Name of the region scoping this request. * @param {google.cloud.compute.v1.RegionInstanceGroupManagersRecreateRequest} request.regionInstanceGroupManagersRecreateRequestResource * The body resource for this request * @param {string} request.requestId * 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). * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * 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 <caption>include:samples/generated/v1/region_instance_group_managers.recreate_instances.js</caption> * region_tag:compute_v1_generated_RegionInstanceGroupManagers_RecreateInstances_async */ recreateInstances(request?: protos.google.cloud.compute.v1.IRecreateInstancesRegionInstanceGroupManagerRequest, options?: CallOptions): Promise<[ LROperation<protos.google.cloud.compute.v1.IOperation, null>, protos.google.cloud.compute.v1.IOperation | undefined, {} | undefined ]>; recreateInstances(request: protos.google.cloud.compute.v1.IRecreateInstancesRegionInstanceGroupManagerRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IRecreateInstancesRegionInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void; recreateInstances(request: protos.google.cloud.compute.v1.IRecreateInstancesRegionInstanceGroupManagerRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IRecreateInstancesRegionInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void; /** * Changes the intended size of 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 one or more instances. The resize operation is marked DONE if the resize request is successful. The underlying actions take additional time. You must separately verify the status of the creating or deleting actions 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. * * @param {Object} request * The request object that will be sent. * @param {string} request.instanceGroupManager * Name of the managed instance group. * @param {string} request.project * Project ID for this request. * @param {string} request.region * Name of the region scoping this request. * @param {string} request.requestId * 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). * @param {number} request.size * Number of instances that should exist in this instance group manager. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * 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 <caption>include:samples/generated/v1/region_instance_group_managers.resize.js</caption> * region_tag:compute_v1_generated_RegionInstanceGroupManagers_Resize_async */ resize(request?: protos.google.cloud.compute.v1.IResizeRegionInstanceGroupManagerRequest, options?: CallOptions): Promise<[ LROperation<protos.google.cloud.compute.v1.IOperation, null>, protos.google.cloud.compute.v1.IOperation | undefined, {} | undefined ]>; resize(request: protos.google.cloud.compute.v1.IResizeRegionInstanceGroupManagerRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IResizeRegionInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void; resize(request: protos.google.cloud.compute.v1.IResizeRegionInstanceGroupManagerRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IResizeRegionInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void; /** * Flags the specified instances in the managed instance group to be resumed. This method increases the targetSize and decreases the targetSuspendedSize of the managed instance group by the number of instances that you resume. The resumeInstances operation is marked DONE if the resumeInstances request is successful. The underlying actions take additional time. You must separately verify the status of the RESUMING action with the listmanagedinstances method. In this request, you can only specify instances that are suspended. For example, if an instance was previously suspended using the suspendInstances method, it can be resumed using the resumeInstances method. If a health check is attached to the managed instance group, the specified instances will be verified as healthy after they are resumed. You can specify a maximum of 1000 instances with this method per request. * * @param {Object} request * The request object that will be sent. * @param {string} request.instanceGroupManager * Name of the managed instance group. * @param {string} request.project * Project ID for this request. * @param {string} request.region * Name of the region scoping this request. * @param {google.cloud.compute.v1.RegionInstanceGroupManagersResumeInstancesRequest} request.regionInstanceGroupManagersResumeInstancesRequestResource * The body resource for this request * @param {string} request.requestId * 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). * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {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 {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * 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 <caption>include:samples/generated/v1/region_instance_group_managers.resume_instances.js</caption> * region_tag:compute_v1_generated_RegionInstanceGroupManagers_ResumeInstances_async */ resumeInstances(request?: protos.google.cloud.compute.v1.IResumeInstancesRegionInstanceGroupManagerRequest, options?: CallOptions): Promise<[ LROperation<protos.google.cloud.compute.v1.IOperation, null>, protos.google.cloud.compute.v1.IOperation | undefined, {} | undefined ]>; resumeInstances(request: protos.google.cloud.compute.v1.IResumeInstancesRegionInstanceGroupManagerRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IResumeInstancesRegionInstanceGroupManagerRequest | null | undefined, {} | null | undefined>): void; resumeInstances(request: protos.google.cloud.compute.v1.IResumeInstancesRegionInstanceGroupManagerRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IResumeInstancesRegionInstanceGroupManagerRequest | null | undefined, {} | null | unde