@google-cloud/compute
Version:
Google Compute Engine Client Library for Node.js
787 lines • 162 kB
TypeScript
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 InstanceGroupManagers API.
* @class
* @memberof v1
*/
export declare class InstanceGroupManagersClient {
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;
};
instanceGroupManagersStub?: Promise<{
[name: string]: Function;
}>;
/**
* Construct an instance of InstanceGroupManagersClient.
*
* @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 InstanceGroupManagersClient({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 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 thetargetSize of the managed instance group by the
* number of instances that you abandon. This operation is marked asDONE 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 thelistmanagedinstances
* 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
* The name of the managed instance group.
* @param {google.cloud.compute.v1.InstanceGroupManagersAbandonInstancesRequest} request.instanceGroupManagersAbandonInstancesRequestResource
* The body resource for this request
* @param {string} request.project
* Project ID 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 {string} request.zone
* The name of thezone where the managed
* instance group is located.
* @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/instance_group_managers.abandon_instances.js</caption>
* region_tag:compute_v1_generated_InstanceGroupManagers_AbandonInstances_async
*/
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
]>;
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;
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;
/**
* Applies changes to selected instances on the managed instance group.
* This method can be used to apply new overrides and/or new versions.
*
* @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 {google.cloud.compute.v1.InstanceGroupManagersApplyUpdatesRequest} request.instanceGroupManagersApplyUpdatesRequestResource
* The body resource for this request
* @param {string} request.project
* Project ID for this request.
* @param {string} request.zone
* The name of thezone
* where the managed instance group is located. Should conform to RFC1035.
* @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/instance_group_managers.apply_updates_to_instances.js</caption>
* region_tag:compute_v1_generated_InstanceGroupManagers_ApplyUpdatesToInstances_async
*/
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
]>;
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;
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;
/**
* Creates instances with per-instance configurations in this managed instance
* group. Instances are created using the current instance template. Thecreate instances operation is marked DONE if thecreateInstances request is successful. The underlying actions
* take additional time. You must separately verify the status of thecreating 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 {google.cloud.compute.v1.InstanceGroupManagersCreateInstancesRequest} request.instanceGroupManagersCreateInstancesRequestResource
* The body resource for this request
* @param {string} request.project
* Project ID 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 {string} request.zone
* The name of thezone
* where the managed instance group is located.
* It should conform to RFC1035.
* @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/instance_group_managers.create_instances.js</caption>
* region_tag:compute_v1_generated_InstanceGroupManagers_CreateInstances_async
*/
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
]>;
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;
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;
/**
* 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.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.instanceGroupManager
* The name of the managed instance group to delete.
* @param {string} request.project
* Project ID 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 {string} request.zone
* The name of thezone where the managed
* instance group is located.
* @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/instance_group_managers.delete.js</caption>
* region_tag:compute_v1_generated_InstanceGroupManagers_Delete_async
*/
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
]>;
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;
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;
/**
* 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 thetargetSize 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 thelistmanagedinstances
* 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
* The name of the managed instance group.
* @param {google.cloud.compute.v1.InstanceGroupManagersDeleteInstancesRequest} request.instanceGroupManagersDeleteInstancesRequestResource
* The body resource for this request
* @param {string} request.project
* Project ID 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 {string} request.zone
* The name of thezone where the managed
* instance group is located.
* @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/instance_group_managers.delete_instances.js</caption>
* region_tag:compute_v1_generated_InstanceGroupManagers_DeleteInstances_async
*/
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
]>;
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;
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;
/**
* 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 {google.cloud.compute.v1.InstanceGroupManagersDeletePerInstanceConfigsReq} request.instanceGroupManagersDeletePerInstanceConfigsReqResource
* The body resource for this request
* @param {string} request.project
* Project ID for this request.
* @param {string} request.zone
* The name of thezone
* where the managed instance
* group is located.
* It should conform to RFC1035.
* @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/instance_group_managers.delete_per_instance_configs.js</caption>
* region_tag:compute_v1_generated_InstanceGroupManagers_DeletePerInstanceConfigs_async
*/
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
]>;
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;
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;
/**
* 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
* The name of the managed instance group.
* @param {string} request.project
* Project ID for this request.
* @param {string} request.zone
* The name of thezone where the managed
* instance group is located.
* @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/instance_group_managers.get.js</caption>
* region_tag:compute_v1_generated_InstanceGroupManagers_Get_async
*/
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
]>;
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;
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;
/**
* 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 thelistmanagedinstances
* 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.
*
* @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.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 {string} request.zone
* The name of the zone
* where you want to create the managed instance group.
* @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/instance_group_managers.insert.js</caption>
* region_tag:compute_v1_generated_InstanceGroupManagers_Insert_async
*/
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
]>;
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;
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;
/**
* 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 thelistManagedInstances
* method. This method supportsPATCH
* semantics and uses theJSON 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, seeUpdating 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.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 {string} request.zone
* The name of the zone where
* you want to create the managed instance group.
* @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/instance_group_managers.patch.js</caption>
* region_tag:compute_v1_generated_InstanceGroupManagers_Patch_async
*/
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
]>;
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;
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;
/**
* 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 {google.cloud.compute.v1.InstanceGroupManagersPatchPerInstanceConfigsReq} request.instanceGroupManagersPatchPerInstanceConfigsReqResource
* The body resource for this request
* @param {string} request.project
* Project ID 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 {string} request.zone
* The name of thezone
* where the managed instance group is located.
* It should conform to RFC1035.
* @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/instance_group_managers.patch_per_instance_configs.js</caption>
* region_tag:compute_v1_generated_InstanceGroupManagers_PatchPerInstanceConfigs_async
*/
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
]>;
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;
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;
/**
* 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 itscurrentAction 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
* The name of the managed instance group.
* @param {google.cloud.compute.v1.InstanceGroupManagersRecreateInstancesRequest} request.instanceGroupManagersRecreateInstancesRequestResource
* The body resource for this request
* @param {string} request.project
* Project ID 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 {string} request.zone
* The name of thezone where the managed
* instance group is located.
* @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/instance_group_managers.recreate_instances.js</caption>
* region_tag:compute_v1_generated_InstanceGroupManagers_RecreateInstances_async
*/
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
]>;
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;
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;
/**
* 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 markedDONE 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 thelistmanagedinstances
* 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.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.instanceGroupManager
* The name of the managed instance group.
* @param {string} request.project
* Project ID 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 {number} request.size
* 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.
* @param {string} request.zone
* The name of thezone where the managed
* instance group is located.
* @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/instance_group_managers.resize.js</caption>
* region_tag:compute_v1_generated_InstanceGroupManagers_Resize_async
*/
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
]>;
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;
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;
/**
* Flags the specified instances in the managed instance group to be
* resumed. This method increases thetargetSize 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 theRESUMING action with thelistmanagedinstances
* 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
* The name of the managed instance group.
* @param {google.cloud.compute.v1.InstanceGroupManagersResumeInstancesRequest} request.instanceGroupManagersResumeInstancesRequestResource
* The body resource for this request
* @param {string} request.project
* Project ID 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 se