UNPKG

@google-cloud/compute

Version:
649 lines 183 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 Instances API. * @class * @memberof v1 */ export declare class InstancesClient { 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; }; instancesStub?: Promise<{ [name: string]: Function; }>; /** * Construct an instance of InstancesClient. * * @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 InstancesClient({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; /** * Adds an access config to an instance's network interface. * * @param {Object} request * The request object that will be sent. * @param {google.cloud.compute.v1.AccessConfig} request.accessConfigResource * The body resource for this request * @param {string} request.instance * The instance name for this request. * @param {string} request.networkInterface * The name of the network interface to add to this instance. * @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 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/instances.add_access_config.js</caption> * region_tag:compute_v1_generated_Instances_AddAccessConfig_async */ addAccessConfig(request?: protos.google.cloud.compute.v1.IAddAccessConfigInstanceRequest, options?: CallOptions): Promise<[ LROperation<protos.google.cloud.compute.v1.IOperation, null>, protos.google.cloud.compute.v1.IOperation | undefined, {} | undefined ]>; addAccessConfig(request: protos.google.cloud.compute.v1.IAddAccessConfigInstanceRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IAddAccessConfigInstanceRequest | null | undefined, {} | null | undefined>): void; addAccessConfig(request: protos.google.cloud.compute.v1.IAddAccessConfigInstanceRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IAddAccessConfigInstanceRequest | null | undefined, {} | null | undefined>): void; /** * Adds existing resource policies to an instance. You can only add one policy right now which will be applied to this instance for scheduling live migrations. * * @param {Object} request * The request object that will be sent. * @param {string} request.instance * The instance name for this request. * @param {google.cloud.compute.v1.InstancesAddResourcePoliciesRequest} request.instancesAddResourcePoliciesRequestResource * 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 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/instances.add_resource_policies.js</caption> * region_tag:compute_v1_generated_Instances_AddResourcePolicies_async */ addResourcePolicies(request?: protos.google.cloud.compute.v1.IAddResourcePoliciesInstanceRequest, options?: CallOptions): Promise<[ LROperation<protos.google.cloud.compute.v1.IOperation, null>, protos.google.cloud.compute.v1.IOperation | undefined, {} | undefined ]>; addResourcePolicies(request: protos.google.cloud.compute.v1.IAddResourcePoliciesInstanceRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IAddResourcePoliciesInstanceRequest | null | undefined, {} | null | undefined>): void; addResourcePolicies(request: protos.google.cloud.compute.v1.IAddResourcePoliciesInstanceRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IAddResourcePoliciesInstanceRequest | null | undefined, {} | null | undefined>): void; /** * Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance. * * @param {Object} request * The request object that will be sent. * @param {google.cloud.compute.v1.AttachedDisk} request.attachedDiskResource * The body resource for this request * @param {boolean} request.forceAttach * Whether to force attach the regional disk even if it's currently attached to another instance. If you try to force attach a zonal disk to an instance, you will receive an error. * @param {string} request.instance * The instance name 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 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/instances.attach_disk.js</caption> * region_tag:compute_v1_generated_Instances_AttachDisk_async */ attachDisk(request?: protos.google.cloud.compute.v1.IAttachDiskInstanceRequest, options?: CallOptions): Promise<[ LROperation<protos.google.cloud.compute.v1.IOperation, null>, protos.google.cloud.compute.v1.IOperation | undefined, {} | undefined ]>; attachDisk(request: protos.google.cloud.compute.v1.IAttachDiskInstanceRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IAttachDiskInstanceRequest | null | undefined, {} | null | undefined>): void; attachDisk(request: protos.google.cloud.compute.v1.IAttachDiskInstanceRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IAttachDiskInstanceRequest | null | undefined, {} | null | undefined>): void; /** * Creates multiple instances. Count specifies the number of instances to create. For more information, see About bulk creation of VMs. * * @param {Object} request * The request object that will be sent. * @param {google.cloud.compute.v1.BulkInsertInstanceResource} request.bulkInsertInstanceResourceResource * 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 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/instances.bulk_insert.js</caption> * region_tag:compute_v1_generated_Instances_BulkInsert_async */ bulkInsert(request?: protos.google.cloud.compute.v1.IBulkInsertInstanceRequest, options?: CallOptions): Promise<[ LROperation<protos.google.cloud.compute.v1.IOperation, null>, protos.google.cloud.compute.v1.IOperation | undefined, {} | undefined ]>; bulkInsert(request: protos.google.cloud.compute.v1.IBulkInsertInstanceRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IBulkInsertInstanceRequest | null | undefined, {} | null | undefined>): void; bulkInsert(request: protos.google.cloud.compute.v1.IBulkInsertInstanceRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IBulkInsertInstanceRequest | null | undefined, {} | null | undefined>): void; /** * Deletes the specified Instance resource. For more information, see Deleting an instance. * * @param {Object} request * The request object that will be sent. * @param {string} request.instance * Name of the instance resource 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 the zone 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/instances.delete.js</caption> * region_tag:compute_v1_generated_Instances_Delete_async */ delete(request?: protos.google.cloud.compute.v1.IDeleteInstanceRequest, 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.IDeleteInstanceRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IDeleteInstanceRequest | null | undefined, {} | null | undefined>): void; delete(request: protos.google.cloud.compute.v1.IDeleteInstanceRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IDeleteInstanceRequest | null | undefined, {} | null | undefined>): void; /** * Deletes an access config from an instance's network interface. * * @param {Object} request * The request object that will be sent. * @param {string} request.accessConfig * The name of the access config to delete. * @param {string} request.instance * The instance name for this request. * @param {string} request.networkInterface * The name of the network interface. * @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 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/instances.delete_access_config.js</caption> * region_tag:compute_v1_generated_Instances_DeleteAccessConfig_async */ deleteAccessConfig(request?: protos.google.cloud.compute.v1.IDeleteAccessConfigInstanceRequest, options?: CallOptions): Promise<[ LROperation<protos.google.cloud.compute.v1.IOperation, null>, protos.google.cloud.compute.v1.IOperation | undefined, {} | undefined ]>; deleteAccessConfig(request: protos.google.cloud.compute.v1.IDeleteAccessConfigInstanceRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IDeleteAccessConfigInstanceRequest | null | undefined, {} | null | undefined>): void; deleteAccessConfig(request: protos.google.cloud.compute.v1.IDeleteAccessConfigInstanceRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IDeleteAccessConfigInstanceRequest | null | undefined, {} | null | undefined>): void; /** * Detaches a disk from an instance. * * @param {Object} request * The request object that will be sent. * @param {string} request.deviceName * The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names. * @param {string} request.instance * Instance name 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 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/instances.detach_disk.js</caption> * region_tag:compute_v1_generated_Instances_DetachDisk_async */ detachDisk(request?: protos.google.cloud.compute.v1.IDetachDiskInstanceRequest, options?: CallOptions): Promise<[ LROperation<protos.google.cloud.compute.v1.IOperation, null>, protos.google.cloud.compute.v1.IOperation | undefined, {} | undefined ]>; detachDisk(request: protos.google.cloud.compute.v1.IDetachDiskInstanceRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IDetachDiskInstanceRequest | null | undefined, {} | null | undefined>): void; detachDisk(request: protos.google.cloud.compute.v1.IDetachDiskInstanceRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IDetachDiskInstanceRequest | null | undefined, {} | null | undefined>): void; /** * Returns the specified Instance resource. * * @param {Object} request * The request object that will be sent. * @param {string} request.instance * Name of the instance resource to return. * @param {string} request.project * Project ID for this request. * @param {string} request.zone * The name of the zone 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 {@link protos.google.cloud.compute.v1.Instance|Instance}. * 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/instances.get.js</caption> * region_tag:compute_v1_generated_Instances_Get_async */ get(request?: protos.google.cloud.compute.v1.IGetInstanceRequest, options?: CallOptions): Promise<[ protos.google.cloud.compute.v1.IInstance, protos.google.cloud.compute.v1.IGetInstanceRequest | undefined, {} | undefined ]>; get(request: protos.google.cloud.compute.v1.IGetInstanceRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IInstance, protos.google.cloud.compute.v1.IGetInstanceRequest | null | undefined, {} | null | undefined>): void; get(request: protos.google.cloud.compute.v1.IGetInstanceRequest, callback: Callback<protos.google.cloud.compute.v1.IInstance, protos.google.cloud.compute.v1.IGetInstanceRequest | null | undefined, {} | null | undefined>): void; /** * Returns effective firewalls applied to an interface of the instance. * * @param {Object} request * The request object that will be sent. * @param {string} request.instance * Name of the instance scoping this request. * @param {string} request.networkInterface * The name of the network interface to get the effective firewalls. * @param {string} request.project * Project ID for this request. * @param {string} request.zone * The name of the zone 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 {@link protos.google.cloud.compute.v1.InstancesGetEffectiveFirewallsResponse|InstancesGetEffectiveFirewallsResponse}. * 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/instances.get_effective_firewalls.js</caption> * region_tag:compute_v1_generated_Instances_GetEffectiveFirewalls_async */ getEffectiveFirewalls(request?: protos.google.cloud.compute.v1.IGetEffectiveFirewallsInstanceRequest, options?: CallOptions): Promise<[ protos.google.cloud.compute.v1.IInstancesGetEffectiveFirewallsResponse, protos.google.cloud.compute.v1.IGetEffectiveFirewallsInstanceRequest | undefined, {} | undefined ]>; getEffectiveFirewalls(request: protos.google.cloud.compute.v1.IGetEffectiveFirewallsInstanceRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IInstancesGetEffectiveFirewallsResponse, protos.google.cloud.compute.v1.IGetEffectiveFirewallsInstanceRequest | null | undefined, {} | null | undefined>): void; getEffectiveFirewalls(request: protos.google.cloud.compute.v1.IGetEffectiveFirewallsInstanceRequest, callback: Callback<protos.google.cloud.compute.v1.IInstancesGetEffectiveFirewallsResponse, protos.google.cloud.compute.v1.IGetEffectiveFirewallsInstanceRequest | null | undefined, {} | null | undefined>): void; /** * Returns the specified guest attributes entry. * * @param {Object} request * The request object that will be sent. * @param {string} request.instance * Name of the instance scoping this request. * @param {string} request.project * Project ID for this request. * @param {string} request.queryPath * Specifies the guest attributes path to be queried. * @param {string} request.variableKey * Specifies the key for the guest attributes entry. * @param {string} request.zone * The name of the zone 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 {@link protos.google.cloud.compute.v1.GuestAttributes|GuestAttributes}. * 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/instances.get_guest_attributes.js</caption> * region_tag:compute_v1_generated_Instances_GetGuestAttributes_async */ getGuestAttributes(request?: protos.google.cloud.compute.v1.IGetGuestAttributesInstanceRequest, options?: CallOptions): Promise<[ protos.google.cloud.compute.v1.IGuestAttributes, protos.google.cloud.compute.v1.IGetGuestAttributesInstanceRequest | undefined, {} | undefined ]>; getGuestAttributes(request: protos.google.cloud.compute.v1.IGetGuestAttributesInstanceRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IGuestAttributes, protos.google.cloud.compute.v1.IGetGuestAttributesInstanceRequest | null | undefined, {} | null | undefined>): void; getGuestAttributes(request: protos.google.cloud.compute.v1.IGetGuestAttributesInstanceRequest, callback: Callback<protos.google.cloud.compute.v1.IGuestAttributes, protos.google.cloud.compute.v1.IGetGuestAttributesInstanceRequest | null | undefined, {} | null | undefined>): void; /** * Gets the access control policy for a resource. May be empty if no such policy or resource exists. * * @param {Object} request * The request object that will be sent. * @param {number} request.optionsRequestedPolicyVersion * Requested IAM Policy version. * @param {string} request.project * Project ID for this request. * @param {string} request.resource * Name or id of the resource for this request. * @param {string} request.zone * The name of the zone 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 {@link protos.google.cloud.compute.v1.Policy|Policy}. * 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/instances.get_iam_policy.js</caption> * region_tag:compute_v1_generated_Instances_GetIamPolicy_async */ getIamPolicy(request?: protos.google.cloud.compute.v1.IGetIamPolicyInstanceRequest, options?: CallOptions): Promise<[ protos.google.cloud.compute.v1.IPolicy, protos.google.cloud.compute.v1.IGetIamPolicyInstanceRequest | undefined, {} | undefined ]>; getIamPolicy(request: protos.google.cloud.compute.v1.IGetIamPolicyInstanceRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IPolicy, protos.google.cloud.compute.v1.IGetIamPolicyInstanceRequest | null | undefined, {} | null | undefined>): void; getIamPolicy(request: protos.google.cloud.compute.v1.IGetIamPolicyInstanceRequest, callback: Callback<protos.google.cloud.compute.v1.IPolicy, protos.google.cloud.compute.v1.IGetIamPolicyInstanceRequest | null | undefined, {} | null | undefined>): void; /** * Returns the screenshot from the specified instance. * * @param {Object} request * The request object that will be sent. * @param {string} request.instance * Name of the instance scoping this request. * @param {string} request.project * Project ID for this request. * @param {string} request.zone * The name of the zone 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 {@link protos.google.cloud.compute.v1.Screenshot|Screenshot}. * 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/instances.get_screenshot.js</caption> * region_tag:compute_v1_generated_Instances_GetScreenshot_async */ getScreenshot(request?: protos.google.cloud.compute.v1.IGetScreenshotInstanceRequest, options?: CallOptions): Promise<[ protos.google.cloud.compute.v1.IScreenshot, protos.google.cloud.compute.v1.IGetScreenshotInstanceRequest | undefined, {} | undefined ]>; getScreenshot(request: protos.google.cloud.compute.v1.IGetScreenshotInstanceRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IScreenshot, protos.google.cloud.compute.v1.IGetScreenshotInstanceRequest | null | undefined, {} | null | undefined>): void; getScreenshot(request: protos.google.cloud.compute.v1.IGetScreenshotInstanceRequest, callback: Callback<protos.google.cloud.compute.v1.IScreenshot, protos.google.cloud.compute.v1.IGetScreenshotInstanceRequest | null | undefined, {} | null | undefined>): void; /** * Returns the last 1 MB of serial port output from the specified instance. * * @param {Object} request * The request object that will be sent. * @param {string} request.instance * Name of the instance for this request. * @param {number} request.port * Specifies which COM or serial port to retrieve data from. * @param {string} request.project * Project ID for this request. * @param {number} request.start * Specifies the starting byte position of the output to return. To start with the first byte of output to the specified port, omit this field or set it to `0`. If the output for that byte position is available, this field matches the `start` parameter sent with the request. If the amount of serial console output exceeds the size of the buffer (1 MB), the oldest output is discarded and is no longer available. If the requested start position refers to discarded output, the start position is adjusted to the oldest output still available, and the adjusted start position is returned as the `start` property value. You can also provide a negative start position, which translates to the most recent number of bytes written to the serial port. For example, -3 is interpreted as the most recent 3 bytes written to the serial console. Note that the negative start is bounded by the retained buffer size, and the returned serial console output will not exceed the max buffer size. * @param {string} request.zone * The name of the zone 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 {@link protos.google.cloud.compute.v1.SerialPortOutput|SerialPortOutput}. * 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/instances.get_serial_port_output.js</caption> * region_tag:compute_v1_generated_Instances_GetSerialPortOutput_async */ getSerialPortOutput(request?: protos.google.cloud.compute.v1.IGetSerialPortOutputInstanceRequest, options?: CallOptions): Promise<[ protos.google.cloud.compute.v1.ISerialPortOutput, protos.google.cloud.compute.v1.IGetSerialPortOutputInstanceRequest | undefined, {} | undefined ]>; getSerialPortOutput(request: protos.google.cloud.compute.v1.IGetSerialPortOutputInstanceRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.ISerialPortOutput, protos.google.cloud.compute.v1.IGetSerialPortOutputInstanceRequest | null | undefined, {} | null | undefined>): void; getSerialPortOutput(request: protos.google.cloud.compute.v1.IGetSerialPortOutputInstanceRequest, callback: Callback<protos.google.cloud.compute.v1.ISerialPortOutput, protos.google.cloud.compute.v1.IGetSerialPortOutputInstanceRequest | null | undefined, {} | null | undefined>): void; /** * Returns the Shielded Instance Identity of an instance * * @param {Object} request * The request object that will be sent. * @param {string} request.instance * Name or id of the instance scoping this request. * @param {string} request.project * Project ID for this request. * @param {string} request.zone * The name of the zone 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 {@link protos.google.cloud.compute.v1.ShieldedInstanceIdentity|ShieldedInstanceIdentity}. * 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/instances.get_shielded_instance_identity.js</caption> * region_tag:compute_v1_generated_Instances_GetShieldedInstanceIdentity_async */ getShieldedInstanceIdentity(request?: protos.google.cloud.compute.v1.IGetShieldedInstanceIdentityInstanceRequest, options?: CallOptions): Promise<[ protos.google.cloud.compute.v1.IShieldedInstanceIdentity, protos.google.cloud.compute.v1.IGetShieldedInstanceIdentityInstanceRequest | undefined, {} | undefined ]>; getShieldedInstanceIdentity(request: protos.google.cloud.compute.v1.IGetShieldedInstanceIdentityInstanceRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IShieldedInstanceIdentity, protos.google.cloud.compute.v1.IGetShieldedInstanceIdentityInstanceRequest | null | undefined, {} | null | undefined>): void; getShieldedInstanceIdentity(request: protos.google.cloud.compute.v1.IGetShieldedInstanceIdentityInstanceRequest, callback: Callback<protos.google.cloud.compute.v1.IShieldedInstanceIdentity, protos.google.cloud.compute.v1.IGetShieldedInstanceIdentityInstanceRequest | null | undefined, {} | null | undefined>): void; /** * Creates an instance resource in the specified project using the data included in the request. * * @param {Object} request * The request object that will be sent. * @param {google.cloud.compute.v1.Instance} request.instanceResource * 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.sourceInstanceTemplate * Specifies instance template to create the instance. This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: - https://www.googleapis.com/compute/v1/projects/project /global/instanceTemplates/instanceTemplate - projects/project/global/instanceTemplates/instanceTemplate - global/instanceTemplates/instanceTemplate * @param {string} request.sourceMachineImage * Specifies the machine image to use to create the instance. This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to a machine image: - https://www.googleapis.com/compute/v1/projects/project/global/global /machineImages/machineImage - projects/project/global/global/machineImages/machineImage - global/machineImages/machineImage * @param {string} request.zone * The name of the zone 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/instances.insert.js</caption> * region_tag:compute_v1_generated_Instances_Insert_async */ insert(request?: protos.google.cloud.compute.v1.IInsertInstanceRequest, 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.IInsertInstanceRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IInsertInstanceRequest | null | undefined, {} | null | undefined>): void; insert(request: protos.google.cloud.compute.v1.IInsertInstanceRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IInsertInstanceRequest | null | undefined, {} | null | undefined>): void; /** * Perform a manual maintenance on the instance. * * @param {Object} request * The request object that will be sent. * @param {string} request.instance * Name of the instance scoping 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 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/instances.perform_maintenance.js</caption> * region_tag:compute_v1_generated_Instances_PerformMaintenance_async */ performMaintenance(request?: protos.google.cloud.compute.v1.IPerformMaintenanceInstanceRequest, options?: CallOptions): Promise<[ LROperation<protos.google.cloud.compute.v1.IOperation, null>, protos.google.cloud.compute.v1.IOperation | undefined, {} | undefined ]>; performMaintenance(request: protos.google.cloud.compute.v1.IPerformMaintenanceInstanceRequest, options: CallOptions, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IPerformMaintenanceInstanceRequest | null | undefined, {} | null | undefined>): void; performMaintenance(request: protos.google.cloud.compute.v1.IPerformMaintenanceInstanceRequest, callback: Callback<protos.google.cloud.compute.v1.IOperation, protos.google.cloud.compute.v1.IPerformMaintenanceInstanceRequest | null | undefined, {} | null | undefined>): void; /** * Removes resource policies from an instance. * * @param {Object} request * The request object that will be sent. * @param {string} request.instance * The instance name for this request. * @param {google.cloud.compute.v1.InstancesRemoveResourcePoliciesRequest} request.instancesRemo