@maxim_mazurok/gapi.client.compute-v1
v0.0.20241202
Published
TypeScript typings for Compute Engine API v1
Downloads
7,283
Readme
TypeScript typings for Compute Engine API v1
Creates and runs virtual machines on Google Cloud Platform. For detailed description please check documentation.
Installing
Install typings for Compute Engine API:
npm install @types/gapi.client.compute-v1 --save-dev
Usage
You need to initialize Google API client in your code:
gapi.load('client', () => {
// now we can use gapi.client
// ...
});
Then load api client wrapper:
gapi.client.load(
'https://www.googleapis.com/discovery/v1/apis/compute/v1/rest',
() => {
// now we can use:
// gapi.client.compute
}
);
// Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
gapi.client.load('compute', 'v1', () => {
// now we can use:
// gapi.client.compute
});
Don't forget to authenticate your client before sending any request to resources:
// declare client_id registered in Google Developers Console
var client_id = '',
scope = [
// See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
'https://www.googleapis.com/auth/cloud-platform',
// View and manage your Google Compute Engine resources
'https://www.googleapis.com/auth/compute',
// View your Google Compute Engine resources
'https://www.googleapis.com/auth/compute.readonly',
// Manage your data and permissions in Cloud Storage and see the email address for your Google Account
'https://www.googleapis.com/auth/devstorage.full_control',
// View your data in Google Cloud Storage
'https://www.googleapis.com/auth/devstorage.read_only',
// Manage your data in Cloud Storage and see the email address of your Google Account
'https://www.googleapis.com/auth/devstorage.read_write',
],
immediate = true;
// ...
gapi.auth.authorize(
{client_id: client_id, scope: scope, immediate: immediate},
authResult => {
if (authResult && !authResult.error) {
/* handle successful authorization */
} else {
/* handle authorization error */
}
}
);
After that you can use Compute Engine API resources:
/*
Retrieves an aggregated list of accelerator types. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true`.
*/
await gapi.client.compute.acceleratorTypes.aggregatedList({ project: "project", });
/*
Returns the specified accelerator type.
*/
await gapi.client.compute.acceleratorTypes.get({ acceleratorType: "acceleratorType", project: "project", zone: "zone", });
/*
Retrieves a list of accelerator types that are available to the specified project.
*/
await gapi.client.compute.acceleratorTypes.list({ project: "project", zone: "zone", });
/*
Retrieves an aggregated list of addresses. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true`.
*/
await gapi.client.compute.addresses.aggregatedList({ project: "project", });
/*
Deletes the specified address resource.
*/
await gapi.client.compute.addresses.delete({ address: "address", project: "project", region: "region", });
/*
Returns the specified address resource.
*/
await gapi.client.compute.addresses.get({ address: "address", project: "project", region: "region", });
/*
Creates an address resource in the specified project by using the data included in the request.
*/
await gapi.client.compute.addresses.insert({ project: "project", region: "region", });
/*
Retrieves a list of addresses contained within the specified region.
*/
await gapi.client.compute.addresses.list({ project: "project", region: "region", });
/*
Moves the specified address resource.
*/
await gapi.client.compute.addresses.move({ address: "address", project: "project", region: "region", });
/*
Sets the labels on an Address. To learn more about labels, read the Labeling Resources documentation.
*/
await gapi.client.compute.addresses.setLabels({ project: "project", region: "region", resource: "resource", });
/*
Retrieves an aggregated list of autoscalers. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true`.
*/
await gapi.client.compute.autoscalers.aggregatedList({ project: "project", });
/*
Deletes the specified autoscaler.
*/
await gapi.client.compute.autoscalers.delete({ autoscaler: "autoscaler", project: "project", zone: "zone", });
/*
Returns the specified autoscaler resource.
*/
await gapi.client.compute.autoscalers.get({ autoscaler: "autoscaler", project: "project", zone: "zone", });
/*
Creates an autoscaler in the specified project using the data included in the request.
*/
await gapi.client.compute.autoscalers.insert({ project: "project", zone: "zone", });
/*
Retrieves a list of autoscalers contained within the specified zone.
*/
await gapi.client.compute.autoscalers.list({ project: "project", zone: "zone", });
/*
Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
*/
await gapi.client.compute.autoscalers.patch({ project: "project", zone: "zone", });
/*
Updates an autoscaler in the specified project using the data included in the request.
*/
await gapi.client.compute.autoscalers.update({ project: "project", zone: "zone", });
/*
Adds a key for validating requests with signed URLs for this backend bucket.
*/
await gapi.client.compute.backendBuckets.addSignedUrlKey({ backendBucket: "backendBucket", project: "project", });
/*
Deletes the specified BackendBucket resource.
*/
await gapi.client.compute.backendBuckets.delete({ backendBucket: "backendBucket", project: "project", });
/*
Deletes a key for validating requests with signed URLs for this backend bucket.
*/
await gapi.client.compute.backendBuckets.deleteSignedUrlKey({ backendBucket: "backendBucket", keyName: "keyName", project: "project", });
/*
Returns the specified BackendBucket resource.
*/
await gapi.client.compute.backendBuckets.get({ backendBucket: "backendBucket", project: "project", });
/*
Gets the access control policy for a resource. May be empty if no such policy or resource exists.
*/
await gapi.client.compute.backendBuckets.getIamPolicy({ project: "project", resource: "resource", });
/*
Creates a BackendBucket resource in the specified project using the data included in the request.
*/
await gapi.client.compute.backendBuckets.insert({ project: "project", });
/*
Retrieves the list of BackendBucket resources available to the specified project.
*/
await gapi.client.compute.backendBuckets.list({ project: "project", });
/*
Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
*/
await gapi.client.compute.backendBuckets.patch({ backendBucket: "backendBucket", project: "project", });
/*
Sets the edge security policy for the specified backend bucket.
*/
await gapi.client.compute.backendBuckets.setEdgeSecurityPolicy({ backendBucket: "backendBucket", project: "project", });
/*
Sets the access control policy on the specified resource. Replaces any existing policy.
*/
await gapi.client.compute.backendBuckets.setIamPolicy({ project: "project", resource: "resource", });
/*
Returns permissions that a caller has on the specified resource.
*/
await gapi.client.compute.backendBuckets.testIamPermissions({ project: "project", resource: "resource", });
/*
Updates the specified BackendBucket resource with the data included in the request.
*/
await gapi.client.compute.backendBuckets.update({ backendBucket: "backendBucket", project: "project", });
/*
Adds a key for validating requests with signed URLs for this backend service.
*/
await gapi.client.compute.backendServices.addSignedUrlKey({ backendService: "backendService", project: "project", });
/*
Retrieves the list of all BackendService resources, regional and global, available to the specified project. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true`.
*/
await gapi.client.compute.backendServices.aggregatedList({ project: "project", });
/*
Deletes the specified BackendService resource.
*/
await gapi.client.compute.backendServices.delete({ backendService: "backendService", project: "project", });
/*
Deletes a key for validating requests with signed URLs for this backend service.
*/
await gapi.client.compute.backendServices.deleteSignedUrlKey({ backendService: "backendService", keyName: "keyName", project: "project", });
/*
Returns the specified BackendService resource.
*/
await gapi.client.compute.backendServices.get({ backendService: "backendService", project: "project", });
/*
Gets the most recent health check results for this BackendService. Example request body: { "group": "/zones/us-east1-b/instanceGroups/lb-backend-example" }
*/
await gapi.client.compute.backendServices.getHealth({ backendService: "backendService", project: "project", });
/*
Gets the access control policy for a resource. May be empty if no such policy or resource exists.
*/
await gapi.client.compute.backendServices.getIamPolicy({ project: "project", resource: "resource", });
/*
Creates a BackendService resource in the specified project using the data included in the request. For more information, see Backend services overview .
*/
await gapi.client.compute.backendServices.insert({ project: "project", });
/*
Retrieves the list of BackendService resources available to the specified project.
*/
await gapi.client.compute.backendServices.list({ project: "project", });
/*
Retrieves a list of all usable backend services in the specified project.
*/
await gapi.client.compute.backendServices.listUsable({ project: "project", });
/*
Patches the specified BackendService resource with the data included in the request. For more information, see Backend services overview. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
*/
await gapi.client.compute.backendServices.patch({ backendService: "backendService", project: "project", });
/*
Sets the edge security policy for the specified backend service.
*/
await gapi.client.compute.backendServices.setEdgeSecurityPolicy({ backendService: "backendService", project: "project", });
/*
Sets the access control policy on the specified resource. Replaces any existing policy.
*/
await gapi.client.compute.backendServices.setIamPolicy({ project: "project", resource: "resource", });
/*
Sets the Google Cloud Armor security policy for the specified backend service. For more information, see Google Cloud Armor Overview
*/
await gapi.client.compute.backendServices.setSecurityPolicy({ backendService: "backendService", project: "project", });
/*
Returns permissions that a caller has on the specified resource.
*/
await gapi.client.compute.backendServices.testIamPermissions({ project: "project", resource: "resource", });
/*
Updates the specified BackendService resource with the data included in the request. For more information, see Backend services overview.
*/
await gapi.client.compute.backendServices.update({ backendService: "backendService", project: "project", });
/*
Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.
*/
await gapi.client.compute.disks.addResourcePolicies({ disk: "disk", project: "project", zone: "zone", });
/*
Retrieves an aggregated list of persistent disks. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true`.
*/
await gapi.client.compute.disks.aggregatedList({ project: "project", });
/*
Bulk create a set of disks.
*/
await gapi.client.compute.disks.bulkInsert({ project: "project", zone: "zone", });
/*
Creates a snapshot of a specified persistent disk. For regular snapshot creation, consider using snapshots.insert instead, as that method supports more features, such as creating snapshots in a project different from the source disk project.
*/
await gapi.client.compute.disks.createSnapshot({ disk: "disk", project: "project", zone: "zone", });
/*
Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.
*/
await gapi.client.compute.disks.delete({ disk: "disk", project: "project", zone: "zone", });
/*
Returns the specified persistent disk.
*/
await gapi.client.compute.disks.get({ disk: "disk", project: "project", zone: "zone", });
/*
Gets the access control policy for a resource. May be empty if no such policy or resource exists.
*/
await gapi.client.compute.disks.getIamPolicy({ project: "project", resource: "resource", zone: "zone", });
/*
Creates a persistent disk in the specified project using the data in the request. You can create a disk from a source (sourceImage, sourceSnapshot, or sourceDisk) or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.
*/
await gapi.client.compute.disks.insert({ project: "project", zone: "zone", });
/*
Retrieves a list of persistent disks contained within the specified zone.
*/
await gapi.client.compute.disks.list({ project: "project", zone: "zone", });
/*
Removes resource policies from a disk.
*/
await gapi.client.compute.disks.removeResourcePolicies({ disk: "disk", project: "project", zone: "zone", });
/*
Resizes the specified persistent disk. You can only increase the size of the disk.
*/
await gapi.client.compute.disks.resize({ disk: "disk", project: "project", zone: "zone", });
/*
Sets the access control policy on the specified resource. Replaces any existing policy.
*/
await gapi.client.compute.disks.setIamPolicy({ project: "project", resource: "resource", zone: "zone", });
/*
Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation.
*/
await gapi.client.compute.disks.setLabels({ project: "project", resource: "resource", zone: "zone", });
/*
Starts asynchronous replication. Must be invoked on the primary disk.
*/
await gapi.client.compute.disks.startAsyncReplication({ disk: "disk", project: "project", zone: "zone", });
/*
Stops asynchronous replication. Can be invoked either on the primary or on the secondary disk.
*/
await gapi.client.compute.disks.stopAsyncReplication({ disk: "disk", project: "project", zone: "zone", });
/*
Stops asynchronous replication for a consistency group of disks. Can be invoked either in the primary or secondary scope.
*/
await gapi.client.compute.disks.stopGroupAsyncReplication({ project: "project", zone: "zone", });
/*
Returns permissions that a caller has on the specified resource.
*/
await gapi.client.compute.disks.testIamPermissions({ project: "project", resource: "resource", zone: "zone", });
/*
Updates the specified disk with the data included in the request. The update is performed only on selected fields included as part of update-mask. Only the following fields can be modified: user_license.
*/
await gapi.client.compute.disks.update({ disk: "disk", project: "project", zone: "zone", });
/*
Retrieves an aggregated list of disk types. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true`.
*/
await gapi.client.compute.diskTypes.aggregatedList({ project: "project", });
/*
Returns the specified disk type.
*/
await gapi.client.compute.diskTypes.get({ diskType: "diskType", project: "project", zone: "zone", });
/*
Retrieves a list of disk types available to the specified project.
*/
await gapi.client.compute.diskTypes.list({ project: "project", zone: "zone", });
/*
Deletes the specified externalVpnGateway.
*/
await gapi.client.compute.externalVpnGateways.delete({ externalVpnGateway: "externalVpnGateway", project: "project", });
/*
Returns the specified externalVpnGateway. Get a list of available externalVpnGateways by making a list() request.
*/
await gapi.client.compute.externalVpnGateways.get({ externalVpnGateway: "externalVpnGateway", project: "project", });
/*
Creates a ExternalVpnGateway in the specified project using the data included in the request.
*/
await gapi.client.compute.externalVpnGateways.insert({ project: "project", });
/*
Retrieves the list of ExternalVpnGateway available to the specified project.
*/
await gapi.client.compute.externalVpnGateways.list({ project: "project", });
/*
Sets the labels on an ExternalVpnGateway. To learn more about labels, read the Labeling Resources documentation.
*/
await gapi.client.compute.externalVpnGateways.setLabels({ project: "project", resource: "resource", });
/*
Returns permissions that a caller has on the specified resource.
*/
await gapi.client.compute.externalVpnGateways.testIamPermissions({ project: "project", resource: "resource", });
/*
Inserts an association for the specified firewall policy.
*/
await gapi.client.compute.firewallPolicies.addAssociation({ firewallPolicy: "firewallPolicy", });
/*
Inserts a rule into a firewall policy.
*/
await gapi.client.compute.firewallPolicies.addRule({ firewallPolicy: "firewallPolicy", });
/*
Copies rules to the specified firewall policy.
*/
await gapi.client.compute.firewallPolicies.cloneRules({ firewallPolicy: "firewallPolicy", });
/*
Deletes the specified policy.
*/
await gapi.client.compute.firewallPolicies.delete({ firewallPolicy: "firewallPolicy", });
/*
Returns the specified firewall policy.
*/
await gapi.client.compute.firewallPolicies.get({ firewallPolicy: "firewallPolicy", });
/*
Gets an association with the specified name.
*/
await gapi.client.compute.firewallPolicies.getAssociation({ firewallPolicy: "firewallPolicy", });
/*
Gets the access control policy for a resource. May be empty if no such policy or resource exists.
*/
await gapi.client.compute.firewallPolicies.getIamPolicy({ resource: "resource", });
/*
Gets a rule of the specified priority.
*/
await gapi.client.compute.firewallPolicies.getRule({ firewallPolicy: "firewallPolicy", });
/*
Creates a new policy in the specified project using the data included in the request.
*/
await gapi.client.compute.firewallPolicies.insert({ });
/*
Lists all the policies that have been configured for the specified folder or organization.
*/
await gapi.client.compute.firewallPolicies.list({ });
/*
Lists associations of a specified target, i.e., organization or folder.
*/
await gapi.client.compute.firewallPolicies.listAssociations({ });
/*
Moves the specified firewall policy.
*/
await gapi.client.compute.firewallPolicies.move({ firewallPolicy: "firewallPolicy", });
/*
Patches the specified policy with the data included in the request.
*/
await gapi.client.compute.firewallPolicies.patch({ firewallPolicy: "firewallPolicy", });
/*
Patches a rule of the specified priority.
*/
await gapi.client.compute.firewallPolicies.patchRule({ firewallPolicy: "firewallPolicy", });
/*
Removes an association for the specified firewall policy.
*/
await gapi.client.compute.firewallPolicies.removeAssociation({ firewallPolicy: "firewallPolicy", });
/*
Deletes a rule of the specified priority.
*/
await gapi.client.compute.firewallPolicies.removeRule({ firewallPolicy: "firewallPolicy", });
/*
Sets the access control policy on the specified resource. Replaces any existing policy.
*/
await gapi.client.compute.firewallPolicies.setIamPolicy({ resource: "resource", });
/*
Returns permissions that a caller has on the specified resource.
*/
await gapi.client.compute.firewallPolicies.testIamPermissions({ resource: "resource", });
/*
Deletes the specified firewall.
*/
await gapi.client.compute.firewalls.delete({ firewall: "firewall", project: "project", });
/*
Returns the specified firewall.
*/
await gapi.client.compute.firewalls.get({ firewall: "firewall", project: "project", });
/*
Creates a firewall rule in the specified project using the data included in the request.
*/
await gapi.client.compute.firewalls.insert({ project: "project", });
/*
Retrieves the list of firewall rules available to the specified project.
*/
await gapi.client.compute.firewalls.list({ project: "project", });
/*
Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
*/
await gapi.client.compute.firewalls.patch({ firewall: "firewall", project: "project", });
/*
Updates the specified firewall rule with the data included in the request. Note that all fields will be updated if using PUT, even fields that are not specified. To update individual fields, please use PATCH instead.
*/
await gapi.client.compute.firewalls.update({ firewall: "firewall", project: "project", });
/*
Retrieves an aggregated list of forwarding rules. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true`.
*/
await gapi.client.compute.forwardingRules.aggregatedList({ project: "project", });
/*
Deletes the specified ForwardingRule resource.
*/
await gapi.client.compute.forwardingRules.delete({ forwardingRule: "forwardingRule", project: "project", region: "region", });
/*
Returns the specified ForwardingRule resource.
*/
await gapi.client.compute.forwardingRules.get({ forwardingRule: "forwardingRule", project: "project", region: "region", });
/*
Creates a ForwardingRule resource in the specified project and region using the data included in the request.
*/
await gapi.client.compute.forwardingRules.insert({ project: "project", region: "region", });
/*
Retrieves a list of ForwardingRule resources available to the specified project and region.
*/
await gapi.client.compute.forwardingRules.list({ project: "project", region: "region", });
/*
Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.
*/
await gapi.client.compute.forwardingRules.patch({ forwardingRule: "forwardingRule", project: "project", region: "region", });
/*
Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation.
*/
await gapi.client.compute.forwardingRules.setLabels({ project: "project", region: "region", resource: "resource", });
/*
Changes target URL for forwarding rule. The new target should be of the same type as the old target.
*/
await gapi.client.compute.forwardingRules.setTarget({ forwardingRule: "forwardingRule", project: "project", region: "region", });
/*
Deletes the specified address resource.
*/
await gapi.client.compute.globalAddresses.delete({ address: "address", project: "project", });
/*
Returns the specified address resource.
*/
await gapi.client.compute.globalAddresses.get({ address: "address", project: "project", });
/*
Creates an address resource in the specified project by using the data included in the request.
*/
await gapi.client.compute.globalAddresses.insert({ project: "project", });
/*
Retrieves a list of global addresses.
*/
await gapi.client.compute.globalAddresses.list({ project: "project", });
/*
Moves the specified address resource from one project to another project.
*/
await gapi.client.compute.globalAddresses.move({ address: "address", project: "project", });
/*
Sets the labels on a GlobalAddress. To learn more about labels, read the Labeling Resources documentation.
*/
await gapi.client.compute.globalAddresses.setLabels({ project: "project", resource: "resource", });
/*
Deletes the specified GlobalForwardingRule resource.
*/
await gapi.client.compute.globalForwardingRules.delete({ forwardingRule: "forwardingRule", project: "project", });
/*
Returns the specified GlobalForwardingRule resource. Gets a list of available forwarding rules by making a list() request.
*/
await gapi.client.compute.globalForwardingRules.get({ forwardingRule: "forwardingRule", project: "project", });
/*
Creates a GlobalForwardingRule resource in the specified project using the data included in the request.
*/
await gapi.client.compute.globalForwardingRules.insert({ project: "project", });
/*
Retrieves a list of GlobalForwardingRule resources available to the specified project.
*/
await gapi.client.compute.globalForwardingRules.list({ project: "project", });
/*
Updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.
*/
await gapi.client.compute.globalForwardingRules.patch({ forwardingRule: "forwardingRule", project: "project", });
/*
Sets the labels on the specified resource. To learn more about labels, read the Labeling resources documentation.
*/
await gapi.client.compute.globalForwardingRules.setLabels({ project: "project", resource: "resource", });
/*
Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target.
*/
await gapi.client.compute.globalForwardingRules.setTarget({ forwardingRule: "forwardingRule", project: "project", });
/*
Attach a network endpoint to the specified network endpoint group.
*/
await gapi.client.compute.globalNetworkEndpointGroups.attachNetworkEndpoints({ networkEndpointGroup: "networkEndpointGroup", project: "project", });
/*
Deletes the specified network endpoint group.Note that the NEG cannot be deleted if there are backend services referencing it.
*/
await gapi.client.compute.globalNetworkEndpointGroups.delete({ networkEndpointGroup: "networkEndpointGroup", project: "project", });
/*
Detach the network endpoint from the specified network endpoint group.
*/
await gapi.client.compute.globalNetworkEndpointGroups.detachNetworkEndpoints({ networkEndpointGroup: "networkEndpointGroup", project: "project", });
/*
Returns the specified network endpoint group.
*/
await gapi.client.compute.globalNetworkEndpointGroups.get({ networkEndpointGroup: "networkEndpointGroup", project: "project", });
/*
Creates a network endpoint group in the specified project using the parameters that are included in the request.
*/
await gapi.client.compute.globalNetworkEndpointGroups.insert({ project: "project", });
/*
Retrieves the list of network endpoint groups that are located in the specified project.
*/
await gapi.client.compute.globalNetworkEndpointGroups.list({ project: "project", });
/*
Lists the network endpoints in the specified network endpoint group.
*/
await gapi.client.compute.globalNetworkEndpointGroups.listNetworkEndpoints({ networkEndpointGroup: "networkEndpointGroup", project: "project", });
/*
Retrieves an aggregated list of all operations. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true`.
*/
await gapi.client.compute.globalOperations.aggregatedList({ project: "project", });
/*
Deletes the specified Operations resource.
*/
await gapi.client.compute.globalOperations.delete({ operation: "operation", project: "project", });
/*
Retrieves the specified Operations resource.
*/
await gapi.client.compute.globalOperations.get({ operation: "operation", project: "project", });
/*
Retrieves a list of Operation resources contained within the specified project.
*/
await gapi.client.compute.globalOperations.list({ project: "project", });
/*
Waits for the specified Operation resource to return as `DONE` or for the request to approach the 2 minute deadline, and retrieves the specified Operation resource. This method differs from the `GET` method in that it waits for no more than the default deadline (2 minutes) and then returns the current state of the operation, which might be `DONE` or still in progress. This method is called on a best-effort basis. Specifically: - In uncommon cases, when the server is overloaded, the request might return before the default deadline is reached, or might return after zero seconds. - If the default deadline is reached, there is no guarantee that the operation is actually done when the method returns. Be prepared to retry if the operation is not `DONE`.
*/
await gapi.client.compute.globalOperations.wait({ operation: "operation", project: "project", });
/*
Deletes the specified Operations resource.
*/
await gapi.client.compute.globalOrganizationOperations.delete({ operation: "operation", });
/*
Retrieves the specified Operations resource. Gets a list of operations by making a `list()` request.
*/
await gapi.client.compute.globalOrganizationOperations.get({ operation: "operation", });
/*
Retrieves a list of Operation resources contained within the specified organization.
*/
await gapi.client.compute.globalOrganizationOperations.list({ });
/*
Deletes the specified global PublicDelegatedPrefix.
*/
await gapi.client.compute.globalPublicDelegatedPrefixes.delete({ project: "project", publicDelegatedPrefix: "publicDelegatedPrefix", });
/*
Returns the specified global PublicDelegatedPrefix resource.
*/
await gapi.client.compute.globalPublicDelegatedPrefixes.get({ project: "project", publicDelegatedPrefix: "publicDelegatedPrefix", });
/*
Creates a global PublicDelegatedPrefix in the specified project using the parameters that are included in the request.
*/
await gapi.client.compute.globalPublicDelegatedPrefixes.insert({ project: "project", });
/*
Lists the global PublicDelegatedPrefixes for a project.
*/
await gapi.client.compute.globalPublicDelegatedPrefixes.list({ project: "project", });
/*
Patches the specified global PublicDelegatedPrefix resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
*/
await gapi.client.compute.globalPublicDelegatedPrefixes.patch({ project: "project", publicDelegatedPrefix: "publicDelegatedPrefix", });
/*
Retrieves the list of all HealthCheck resources, regional and global, available to the specified project. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true`.
*/
await gapi.client.compute.healthChecks.aggregatedList({ project: "project", });
/*
Deletes the specified HealthCheck resource.
*/
await gapi.client.compute.healthChecks.delete({ healthCheck: "healthCheck", project: "project", });
/*
Returns the specified HealthCheck resource.
*/
await gapi.client.compute.healthChecks.get({ healthCheck: "healthCheck", project: "project", });
/*
Creates a HealthCheck resource in the specified project using the data included in the request.
*/
await gapi.client.compute.healthChecks.insert({ project: "project", });
/*
Retrieves the list of HealthCheck resources available to the specified project.
*/
await gapi.client.compute.healthChecks.list({ project: "project", });
/*
Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
*/
await gapi.client.compute.healthChecks.patch({ healthCheck: "healthCheck", project: "project", });
/*
Updates a HealthCheck resource in the specified project using the data included in the request.
*/
await gapi.client.compute.healthChecks.update({ healthCheck: "healthCheck", project: "project", });
/*
Deletes the specified HttpHealthCheck resource.
*/
await gapi.client.compute.httpHealthChecks.delete({ httpHealthCheck: "httpHealthCheck", project: "project", });
/*
Returns the specified HttpHealthCheck resource.
*/
await gapi.client.compute.httpHealthChecks.get({ httpHealthCheck: "httpHealthCheck", project: "project", });
/*
Creates a HttpHealthCheck resource in the specified project using the data included in the request.
*/
await gapi.client.compute.httpHealthChecks.insert({ project: "project", });
/*
Retrieves the list of HttpHealthCheck resources available to the specified project.
*/
await gapi.client.compute.httpHealthChecks.list({ project: "project", });
/*
Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
*/
await gapi.client.compute.httpHealthChecks.patch({ httpHealthCheck: "httpHealthCheck", project: "project", });
/*
Updates a HttpHealthCheck resource in the specified project using the data included in the request.
*/
await gapi.client.compute.httpHealthChecks.update({ httpHealthCheck: "httpHealthCheck", project: "project", });
/*
Deletes the specified HttpsHealthCheck resource.
*/
await gapi.client.compute.httpsHealthChecks.delete({ httpsHealthCheck: "httpsHealthCheck", project: "project", });
/*
Returns the specified HttpsHealthCheck resource.
*/
await gapi.client.compute.httpsHealthChecks.get({ httpsHealthCheck: "httpsHealthCheck", project: "project", });
/*
Creates a HttpsHealthCheck resource in the specified project using the data included in the request.
*/
await gapi.client.compute.httpsHealthChecks.insert({ project: "project", });
/*
Retrieves the list of HttpsHealthCheck resources available to the specified project.
*/
await gapi.client.compute.httpsHealthChecks.list({ project: "project", });
/*
Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
*/
await gapi.client.compute.httpsHealthChecks.patch({ httpsHealthCheck: "httpsHealthCheck", project: "project", });
/*
Updates a HttpsHealthCheck resource in the specified project using the data included in the request.
*/
await gapi.client.compute.httpsHealthChecks.update({ httpsHealthCheck: "httpsHealthCheck", project: "project", });
/*
Returns the latest image that is part of an image family, is not deprecated and is rolled out in the specified zone.
*/
await gapi.client.compute.imageFamilyViews.get({ family: "family", project: "project", zone: "zone", });
/*
Deletes the specified image.
*/
await gapi.client.compute.images.delete({ image: "image", project: "project", });
/*
Sets the deprecation status of an image. If an empty request body is given, clears the deprecation status instead.
*/
await gapi.client.compute.images.deprecate({ image: "image", project: "project", });
/*
Returns the specified image.
*/
await gapi.client.compute.images.get({ image: "image", project: "project", });
/*
Returns the latest image that is part of an image family and is not deprecated. For more information on image families, see Public image families documentation.
*/
await gapi.client.compute.images.getFromFamily({ family: "family", project: "project", });
/*
Gets the access control policy for a resource. May be empty if no such policy or resource exists.
*/
await gapi.client.compute.images.getIamPolicy({ project: "project", resource: "resource", });
/*
Creates an image in the specified project using the data included in the request.
*/
await gapi.client.compute.images.insert({ project: "project", });
/*
Retrieves the list of custom images available to the specified project. Custom images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.
*/
await gapi.client.compute.images.list({ project: "project", });
/*
Patches the specified image with the data included in the request. Only the following fields can be modified: family, description, deprecation status.
*/
await gapi.client.compute.images.patch({ image: "image", project: "project", });
/*
Sets the access control policy on the specified resource. Replaces any existing policy.
*/
await gapi.client.compute.images.setIamPolicy({ project: "project", resource: "resource", });
/*
Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.
*/
await gapi.client.compute.images.setLabels({ project: "project", resource: "resource", });
/*
Returns permissions that a caller has on the specified resource.
*/
await gapi.client.compute.images.testIamPermissions({ project: "project", resource: "resource", });
/*
Cancels the specified resize request and removes it from the queue. Cancelled resize request does no longer wait for the resources to be provisioned. Cancel is only possible for requests that are accepted in the queue.
*/
await gapi.client.compute.instanceGroupManagerResizeRequests.cancel({ instanceGroupManager: "instanceGroupManager", project: "project", resizeRequest: "resizeRequest", zone: "zone", });
/*
Deletes the specified, inactive resize request. Requests that are still active cannot be deleted. Deleting request does not delete instances that were provisioned previously.
*/
await gapi.client.compute.instanceGroupManagerResizeRequests.delete({ instanceGroupManager: "instanceGroupManager", project: "project", resizeRequest: "resizeRequest", zone: "zone", });
/*
Returns all of the details about the specified resize request.
*/
await gapi.client.compute.instanceGroupManagerResizeRequests.get({ instanceGroupManager: "instanceGroupManager", project: "project", resizeRequest: "resizeRequest", zone: "zone", });
/*
Creates a new resize request that starts provisioning VMs immediately or queues VM creation.
*/
await gapi.client.compute.instanceGroupManagerResizeRequests.insert({ instanceGroupManager: "instanceGroupManager", project: "project", zone: "zone", });
/*
Retrieves a list of resize requests that are contained in the managed instance group.
*/
await gapi.client.compute.instanceGroupManagerResizeRequests.list({ instanceGroupManager: "instanceGroupManager", project: "project", zone: "zone", });
/*
Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
*/
await gapi.client.compute.instanceGroupManagers.abandonInstances({ instanceGroupManager: "instanceGroupManager", project: "project", zone: "zone", });
/*
Retrieves the list of managed instance groups and groups them by zone. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true`.
*/
await gapi.client.compute.instanceGroupManagers.aggregatedList({ project: "project", });
/*
Applies changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions.
*/
await gapi.client.compute.instanceGroupManagers.applyUpdatesToInstances({ instanceGroupManager: "instanceGroupManager", project: "project", zone: "zone", });
/*
Creates instances with per-instance configurations in this managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.
*/
await gapi.client.compute.instanceGroupManagers.createInstances({ instanceGroupManager: "instanceGroupManager", project: "project", zone: "zone", });
/*
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.
*/
await gapi.client.compute.instanceGroupManagers.delete({ instanceGroupManager: "instanceGroupManager", project: "project", zone: "zone", });
/*
Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.
*/
await gapi.client.compute.instanceGroupManagers.deleteInstances({ instanceGroupManager: "instanceGroupManager", project: "project", zone: "zone", });
/*
Deletes selected per-instance configurations for the managed instance group.
*/
await gapi.client.compute.instanceGroupManagers.deletePerInstanceConfigs({ instanceGroupManager: "instanceGroupManager", project: "project", zone: "zone", });
/*
Returns all of the details about the specified managed instance group.
*/
await gapi.client.compute.instanceGroupManagers.get({ instanceGroupManager: "instanceGroupManager", project: "project", zone: "zone", });
/*
Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method. A managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.
*/
await gapi.client.compute.instanceGroupManagers.insert({ project: "project", zone: "zone", });
/*
Retrieves a list of managed instance groups that are contained within the specified project and zone.
*/
await gapi.client.compute.instanceGroupManagers.list({ project: "project", zone: "zone", });
/*
Lists all errors thrown by actions on instances for a given managed instance group. The filter and orderBy query parameters are not supported.
*/
await gapi.client.compute.instanceGroupManagers.listErrors({ instanceGroupManager: "instanceGroupManager", project: "project", zone: "zone", });
/*
Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. The orderBy query parameter is not supported. The `pageToken` query parameter is supported only if the group's `listManagedInstancesResults` field is set to `PAGINATED`.
*/
await gapi.client.compute.instanceGroupManagers.listManagedInstances({ instanceGroupManager: "instanceGroupManager", project: "project", zone: "zone", });
/*
Lists all of the per-instance configurations defined for the managed instance group. The orderBy query parameter is not supported.
*/
await gapi.client.compute.instanceGroupManagers.listPerInstanceConfigs({ instanceGroupManager: "instanceGroupManager", project: "project", zone: "zone", });
/*
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.
*/
await gapi.client.compute.instanceGroupManagers.patch({ instanceGroupManager: "instanceGroupManager", project: "project", zone: "zone", });
/*
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.
*/
await gapi.client.compute.instanceGroupManagers.patchPerInstanceConfigs({ instanceGroupManager: "instanceGroupManager", project: "project", zone: "zone", });
/*
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.
*/
await gapi.client.compute.instanceGroupManagers.recreateInstances({ instanceGroupManager: "instanceGroupManager", project: "project", zone: "zone", });
/*
Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method. When resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the selection including: + The status of the VM instance. + The health of the VM instance. + The instance template version the VM is based on. + For regional managed instance groups, the location of the VM instance. This list is subject to change. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
*/
await gapi.client.compute.instanceGroupManagers.resize({ instanceGroupManager: "instanceGroupManager", project: "project", size: 1, zone: "zone", });
/*
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.
*/
await gapi.client.compute.instanceGroupManagers.resumeInstances({ instanceGroupManager: "instanceGroupManager", project: "project", zone: "zone", });
/*
Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group's updatePolicy.type to PROACTIVE.
*/
await gapi.client.compute.instanceGroupManagers.setInstanceTemplate({ instanceGroupManager: "instanceGroupManager", project: "project", zone: "zone", });
/*
Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.
*/
await gapi.client.compute.instanceGroupManagers.setTargetPools({ instanceGroupManager: "instanceGroupManager", project: "project", zone: "zone", });
/*
Flags the specified instances in the managed instance group to be started. This method increases the targetSize and decreases the targetStoppedSize of the managed instance group by the number of instances that you start. The startInstances operation is marked DONE if the startInstances request is successful. The underlying actions take additional time. You must separately verify the status of the STARTING action with the listmanagedinstances method. In this request, you can only specify instances that are stopped. For example, if an instance was previously stopped using the stopInstances method, it can be started using the startInstances method. If a health check is attached to the managed instance group, the specified instances will be verified as healthy after they are started. You can specify a maximum of 1000 instances with this method per request.
*/
await gapi.client.compute.instanceGroupManagers.startInstances({ instanceGroupManager: "instanceGroupManager", project: "project", zone: "zone", });
/*
Flags the specified instances in the managed instance group to be immediately stopped. You can only specify instances that are running in this request. This method reduces the targetSize and increases the targetStoppedSize of the managed instance group by the number of instances that you stop. The stopInstances operation is marked DONE if the stopInstances request is successful. The underlying actions take additional time. You must separately verify the status of the STOPPING action with the listmanagedinstances method. If the standbyPolicy.initialDelaySec field is set, the group delays stopping the instances until initialDelaySec have passed from instance.creationTimestamp (that is, when the instance was created). This delay gives your application time to set itself up and initialize on the instance. If more than initialDelaySec seconds have passed since instance.creationTimestamp when this method is called, there will be zero delay. 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 stopped. Stopped instances can be started using the startInstances method. You can specify a maximum of 1000 instances with this method per request.
*/
await gapi.client.compute.instanceGroupManagers.stopInstances({ instanceGroupManager: "instanceGroupManager", project: "project", zone: "zone", });
/*
Flags the specified instances in the managed instance group to be immediately suspended. You can only specify instances that are running in this request. This method reduces the targetSize and increases the targetSuspendedSize of the managed instance group by the number of instances that you suspend. The suspendInstances operation is marked DONE if the suspendInstances request is successful. The underlying actions take additional time. You must separately verify the status of the SUSPENDING action with the listmanagedinstances method. If the standbyPolicy.initialDelaySec field is set, the group delays suspension of the instances until initialDelaySec have passed from instance.creationTimestamp (that is, when the instance was created). This delay gives your application time to set itself up and initialize on the instance. If more than initialDelaySec seconds have passed since instance.creationTimestamp when this method is called, there will be zero delay. 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 suspended. Suspended instances can be resumed using the resumeInstances method. You can specify a maximum of 1000 instances with this method per request.
*/
await gapi.client.compute.instanceGroupManagers.suspendInstances({ instanceGroupManager: "instanceGroupManager", project: "project", zone: "zone", });
/*
Inserts or updates per-instance configurations for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.
*/
await gapi.client.compute.instanceGroupManagers.updatePerInstanceConfigs({ instanceGroupManager: "instanceGroupManager", project: "project", zone: "zone", });
/*
Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.
*/
await gapi.client.compute.instanceGroups.addInstances({ instanceGroup: "instanceGroup", project: "project", zone: "zone", });
/*
Retrieves the list of instance groups and sorts them by zone. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true`.
*/
await gapi.client.compute.instanceGroups.aggregatedList({ project: "project", });
/*
Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information.
*/
await gapi.client.compute.instanceGroups.delete({ instanceGroup: "instanceGroup", project: "project", zone: "zone", });
/*
Returns the specified zonal instance group. Get a list of available zonal instance groups by making a list() request. For managed instance groups, use the instanceGroupManagers or regionInstanceGroupManagers methods instead.
*/
await gapi.client.compute.instanceGroups.get({ instanceGroup: "instanceGroup", project: "project", zone: "zone", });
/*
Creates an instance group in the specified project using the parameters that are included in the request.
*/
await gapi.client.compute.instanceGroups.insert({ project: "project", zone: "zone", });
/*
Retrieves the list of zonal instance group resources contained within the specified zone. For managed instance groups, use the instanceGroupManagers or regionInstanceGroupManagers methods instead.
*/
await gapi.client.compute.instanceGroups.list({ project: "project", zone: "zone", });
/*
Lists the instances in the specified instance group. The orderBy query parameter is not supported. The filter query parameter is supported, but only for expressions that use `eq` (equal) or `ne` (not equal) operators.
*/
await gapi.client.compute.instanceGroups.listInstances({ instanceGroup: "instanceGroup", project: "project", zone: "zone", });
/*
Removes one or more instances from the specified instance group, but does not delete those 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 before the VM instance is removed or deleted.
*/
await gapi.client.compute.instanceGroups.removeInstances({ instanceGroup: "instanceGroup", project: "project", zone: "zone", });
/*
Sets the named ports for the specified instance group.
*/
await gapi.client.compute.instanceGroups.setNamedPorts({ instanceGroup: "instanceGroup", project: "project", zone: "zone", });
/*
Adds an access config to an instance's network interface.
*/
await gapi.client.compute.instances.addAccessConfig({ instance: "instance", networkInterface: "networkInterface", project: "project", zone: "zone", });
/*
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.
*/
await gapi.client.compute.instances.addResourcePolicies({ instance: "instance", project: "project", zone: "zone", });
/*
Retrieves an aggregated list of all of the instances in your project across all regions and zones. The performance of this method degrades when a filter is specified on a project that has a very large number of instances. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true`.
*/
await gapi.client.compute.instances.aggregatedList({ project: "project", });
/*
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.
*/
await gapi.client.compute.instances.attachDisk({ instance: "instance", project: "project", zone: "zone", });
/*
Creates multiple instances. Count specifies the number of instances to create. For more information, see About bulk creation of VMs.
*/
await gapi.client.compute.instances.bulkInsert({ project: "project", zone: "zone", });
/*
Deletes the specified Instance resource. For more information, see Deleting an instance.
*/
await gapi.client.compute.instances.delete({ instance: "instance", project: "project", zone: "zone", });
/*
Deletes an access config from an instance's network interface.
*/
await gapi.client.compute.instances.deleteAccessConfig({ accessConfig: "accessConfig", instance: "instance", networkInterface: "networkInterface", project: "project", zone: "zone", });
/*
Detaches a disk from an instance.
*/
await gapi.client.compute.instances.detachDisk({ deviceName: "deviceName", instance: "instance", project: "project", zone: "zone", });
/*
Returns the specified Instance resource.
*/
await gapi.client.compute.instances.get({ instance: "instance", project: "project", zone: "zone", });
/*
Returns effective firewalls applied to an interface of the instance.
*/
await gapi.client.compute.instances.getEffectiveFirewalls({ instance: "instance", networkInterface: "networkInterface", project: "project", zone: "zone", });
/*
Returns the specified guest attributes entry.
*/
await gapi.client.compute.instances.getGuestAttributes({ instance: "instance", project: "project", zone: "zone", });
/*
Gets the access control policy for a resource. May be empty if no such policy or resource exists.
*/
await gapi.client.compute.instances.getIamPolicy({ project: "project", resource: "resource", zone: "zone", });
/*
Returns the screenshot from the specified instance.
*/
await gapi.client.compute.instances.getScreenshot({ instance: "instance", project: "project", zone: "zone", });
/*
Returns the last 1 MB of serial port output from the specified instance.
*/
await gapi.client.compute.instances.getSerialPortOutput({ instance: "instance", project: "project", zone: "zone", });
/*
Returns the Shielded Instance Identity of an instance
*/
await gapi.client.compute.instances.getShieldedInstanceIdentity({ instance: "instance", project: "project", zone: "zone", });
/*
Creates an instance resource in the specified project using the data included in the request.
*/
await gapi.client.compute.instances.insert({ project: "project", zone: "zone", });
/*
Retrieves the list of instances contained within the specified zone.
*/
await gapi.client.compute.instances.list({ project: "project", zone: "zone", });
/*
Retrieves a list of resources that refer to the VM instance specified in the request. For example, if the VM instance is part of a managed or unmanaged instance group, the referrers list includes the instance group. For more information, read Viewing referrers to VM instances.
*/
await gapi.client.compute.instances.listReferrers({ instance: "instance", project: "project", zone: "zone", });
/*
Perform a manual maintenance on the instance.
*/
await gapi.client.compute.instances.performMaintenance({ instance: "instance", project: "project", zone: "zone", });
/*
Removes resource policies from an instance.
*/
await gapi.client.compute.instances.removeResourcePolicies({ instance: "instance", project: "project", zone: "zone", });
/*
Performs a reset on the instance. This is a hard reset. The VM does not do a graceful shutdown. For more information, see Resetting an instance.
*/
await gapi.client.compute.instances.reset({ instance: "instance", project: "project", zone: "zone", });
/*
Resumes an instance that was suspended using the instances().suspend method.
*/
await gapi.client.compute.instances.resume({ instance: "instance", project: "project", zone: "zone", });
/*
Sends diagnostic interrupt to the instance.
*/
await gapi.client.compute.instances.sendDiagnosticInterrupt({ instance: "instance", project: "project", zone: "zone", });
/*
Sets deletion protection on the instance.
*/
await gapi.client.compute.instances.setDeletionProtection({ project: "project", resource: "resource", zone: "zone", });
/*
Sets the auto-delete flag for a disk attached to an instance.
*/
await gapi.client.compute.instances.setDiskAutoDelete({ autoDelete: , deviceName: "deviceName", instance: "instance", project: "project", zone: "zone", });
/*
Sets the access control policy on the specified resource. Replaces any existing policy.
*/
await gapi.client.compute.instances.setIamPolicy({ project: "project", resource: "resource", zone: "zone", });
/*
Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.
*/
await gapi.client.compute.instances.setLabels({ instance: "instance", project: "project", zone: "zone", });
/*
Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.
*/
await gapi.client.compute.instances.setMachineResources({ instance: "instance", project: "project", zone: "zone", });
/*
Changes the machine type for a stopped instance to the machine type specified in the request.
*/
await gapi.client.compute.instances.setMachineType({ instance: "instance", project: "project", zone: "zone", });
/*
Sets metadata for the specified instance to the data included in the request.
*/
await gapi.client.compute.instances.setMetadata({ instance: "instance", project: "project", zone: "zone", });
/*
Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.
*/
await gapi.client.compute.instances.setMinCpuPlatform({ instance: "instance", project: "project", zone: "zone", });
/*
Sets name of an instance.
*/
await gapi.client.compute.instances.setName({ instance: "instance", project: "project", zone: "zone", });
/*
Sets an instance's scheduling options. You can only call this method on a stopped instance, that is, a VM instance that is in a `TERMINATED` state. See Instance Life Cycle for more information on the possible instance states. For more information about setting scheduling options for a VM, see Set VM host maintenance policy.
*/
await gapi.client.compute.instances.setScheduling({ instance: "instance", project: "project", zone: "zone", });
/*
Sets the Google Cloud Armor security policy for the specified instance. For more information, see Google Cloud Armor Overview
*/
await gapi.client.compute.instances.setSecurityPolicy({ instance: "instance", project: "project", zone: "zone", });
/*
Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.
*/
await gapi.client.compute.instances.setServiceAccount({ instance: "instance", project: "project", zone: "zone", });
/*
Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
*/
await gapi.client.compute.instances.setShieldedInstanceIntegrityPolicy({ instance: "instance", project: "project", zone: "zone", });
/*
Sets network tags for the specified instance to the data included in the request.
*/
await gapi.client.compute.instances.setTags({ instance: "instance", project: "project", zone: "zone", });
/*
Simulates a host maintenance event on a VM. For more information, see Simulate a host maintenance event.
*/
await gapi.client.compute.instances.simulateMaintenanceEvent({ instance: "instance", project: "project", zone: "zone", });
/*
Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.
*/
await gapi.client.compute.instances.start