Google Compute Engine: Node.js Client

release level npm version

Google Compute Engine Client Library for Node.js

A comprehensive list of changes in each version may be found in the CHANGELOG.

Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in Client Libraries Explained.

Table of contents:

Quickstart

Before you begin

  1. Select or create a Cloud Platform project.
  2. Enable billing for your project.
  3. Enable the Google Compute Engine API.
  4. Set up authentication with a service account so you can access the API from your local workstation.

Installing the client library

npm install @google-cloud/compute

Using the client library

/**
 * TODO(developer): Uncomment and replace these variables before running the sample.
 */
// const projectId = 'YOUR_PROJECT_ID';

const compute = require('@google-cloud/compute');

// List all instances in the specified project.
async function listAllInstances() {
  const instancesClient = new compute.InstancesClient();

  //Use the `maxResults` parameter to limit the number of results that the API returns per response page.
  const aggListRequest = instancesClient.aggregatedListAsync({
    project: projectId,
    maxResults: 5,
  });

  console.log('Instances found:');

  // Despite using the `maxResults` parameter, you don't need to handle the pagination
  // yourself. The returned object handles pagination automatically,
  // requesting next pages as you iterate over the results.
  for await (const [zone, instancesObject] of aggListRequest) {
    const instances = instancesObject.instances;

    if (instances && instances.length > 0) {
      console.log(` ${zone}`);
      for (const instance of instances) {
        console.log(` - ${instance.name} (${instance.machineType})`);
      }
    }
  }
}

listAllInstances();

Samples

Samples are in the samples/ directory. Each sample's README.md has instructions for running its sample.

Sample Source Code Try it
Accelerator_types.aggregated_list source code Open in Cloud Shell
Accelerator_types.get source code Open in Cloud Shell
Accelerator_types.list source code Open in Cloud Shell
Addresses.aggregated_list source code Open in Cloud Shell
Addresses.delete source code Open in Cloud Shell
Addresses.get source code Open in Cloud Shell
Addresses.insert source code Open in Cloud Shell
Addresses.list source code Open in Cloud Shell
Addresses.move source code Open in Cloud Shell
Addresses.set_labels source code Open in Cloud Shell
Autoscalers.aggregated_list source code Open in Cloud Shell
Autoscalers.delete source code Open in Cloud Shell
Autoscalers.get source code Open in Cloud Shell
Autoscalers.insert source code Open in Cloud Shell
Autoscalers.list source code Open in Cloud Shell
Autoscalers.patch source code Open in Cloud Shell
Autoscalers.update source code Open in Cloud Shell
Backend_buckets.add_signed_url_key source code Open in Cloud Shell
Backend_buckets.delete source code Open in Cloud Shell
Backend_buckets.delete_signed_url_key source code Open in Cloud Shell
Backend_buckets.get source code Open in Cloud Shell
Backend_buckets.get_iam_policy source code Open in Cloud Shell
Backend_buckets.insert source code Open in Cloud Shell
Backend_buckets.list source code Open in Cloud Shell
Backend_buckets.patch source code Open in Cloud Shell
Backend_buckets.set_edge_security_policy source code Open in Cloud Shell
Backend_buckets.set_iam_policy source code Open in Cloud Shell
Backend_buckets.test_iam_permissions source code Open in Cloud Shell
Backend_buckets.update source code Open in Cloud Shell
Backend_services.add_signed_url_key source code Open in Cloud Shell
Backend_services.aggregated_list source code Open in Cloud Shell
Backend_services.delete source code Open in Cloud Shell
Backend_services.delete_signed_url_key source code Open in Cloud Shell
Backend_services.get source code Open in Cloud Shell
Backend_services.get_health source code Open in Cloud Shell
Backend_services.get_iam_policy source code Open in Cloud Shell
Backend_services.insert source code Open in Cloud Shell
Backend_services.list source code Open in Cloud Shell
Backend_services.list_usable source code Open in Cloud Shell
Backend_services.patch source code Open in Cloud Shell
Backend_services.set_edge_security_policy source code Open in Cloud Shell
Backend_services.set_iam_policy source code Open in Cloud Shell
Backend_services.set_security_policy source code Open in Cloud Shell
Backend_services.test_iam_permissions source code Open in Cloud Shell
Backend_services.update source code Open in Cloud Shell
Disk_types.aggregated_list source code Open in Cloud Shell
Disk_types.get source code Open in Cloud Shell
Disk_types.list source code Open in Cloud Shell
Disks.add_resource_policies source code Open in Cloud Shell
Disks.aggregated_list source code Open in Cloud Shell
Disks.bulk_insert source code Open in Cloud Shell
Disks.create_snapshot source code Open in Cloud Shell
Disks.delete source code Open in Cloud Shell
Disks.get source code Open in Cloud Shell
Disks.get_iam_policy source code Open in Cloud Shell
Disks.insert source code Open in Cloud Shell
Disks.list source code Open in Cloud Shell
Disks.remove_resource_policies source code Open in Cloud Shell
Disks.resize source code Open in Cloud Shell
Disks.set_iam_policy source code Open in Cloud Shell
Disks.set_labels source code Open in Cloud Shell
Disks.start_async_replication source code Open in Cloud Shell
Disks.stop_async_replication source code Open in Cloud Shell
Disks.stop_group_async_replication source code Open in Cloud Shell
Disks.test_iam_permissions source code Open in Cloud Shell
Disks.update source code Open in Cloud Shell
External_vpn_gateways.delete source code Open in Cloud Shell
External_vpn_gateways.get source code Open in Cloud Shell
External_vpn_gateways.insert source code Open in Cloud Shell
External_vpn_gateways.list source code Open in Cloud Shell
External_vpn_gateways.set_labels source code Open in Cloud Shell
External_vpn_gateways.test_iam_permissions source code Open in Cloud Shell
Firewall_policies.add_association source code Open in Cloud Shell
Firewall_policies.add_rule source code Open in Cloud Shell
Firewall_policies.clone_rules source code Open in Cloud Shell
Firewall_policies.delete source code Open in Cloud Shell
Firewall_policies.get source code Open in Cloud Shell
Firewall_policies.get_association source code Open in Cloud Shell
Firewall_policies.get_iam_policy source code Open in Cloud Shell
Firewall_policies.get_rule source code Open in Cloud Shell
Firewall_policies.insert source code Open in Cloud Shell
Firewall_policies.list source code Open in Cloud Shell
Firewall_policies.list_associations source code Open in Cloud Shell
Firewall_policies.move source code Open in Cloud Shell
Firewall_policies.patch source code Open in Cloud Shell
Firewall_policies.patch_rule source code Open in Cloud Shell
Firewall_policies.remove_association source code Open in Cloud Shell
Firewall_policies.remove_rule source code Open in Cloud Shell
Firewall_policies.set_iam_policy source code Open in Cloud Shell
Firewall_policies.test_iam_permissions source code Open in Cloud Shell
Firewalls.delete source code Open in Cloud Shell
Firewalls.get source code Open in Cloud Shell
Firewalls.insert source code Open in Cloud Shell
Firewalls.list source code Open in Cloud Shell
Firewalls.patch source code Open in Cloud Shell
Firewalls.update source code Open in Cloud Shell
Forwarding_rules.aggregated_list source code Open in Cloud Shell
Forwarding_rules.delete source code Open in Cloud Shell
Forwarding_rules.get source code Open in Cloud Shell
Forwarding_rules.insert source code Open in Cloud Shell
Forwarding_rules.list source code Open in Cloud Shell
Forwarding_rules.patch source code Open in Cloud Shell
Forwarding_rules.set_labels source code Open in Cloud Shell
Forwarding_rules.set_target source code Open in Cloud Shell
Global_addresses.delete source code Open in Cloud Shell
Global_addresses.get source code Open in Cloud Shell
Global_addresses.insert source code Open in Cloud Shell
Global_addresses.list source code Open in Cloud Shell
Global_addresses.move source code Open in Cloud Shell
Global_addresses.set_labels source code Open in Cloud Shell
Global_forwarding_rules.delete source code Open in Cloud Shell
Global_forwarding_rules.get source code Open in Cloud Shell
Global_forwarding_rules.insert source code Open in Cloud Shell
Global_forwarding_rules.list source code Open in Cloud Shell
Global_forwarding_rules.patch source code Open in Cloud Shell
Global_forwarding_rules.set_labels source code Open in Cloud Shell
Global_forwarding_rules.set_target source code Open in Cloud Shell
Global_network_endpoint_groups.attach_network_endpoints source code Open in Cloud Shell
Global_network_endpoint_groups.delete source code Open in Cloud Shell
Global_network_endpoint_groups.detach_network_endpoints source code Open in Cloud Shell
Global_network_endpoint_groups.get source code Open in Cloud Shell
Global_network_endpoint_groups.insert source code Open in Cloud Shell
Global_network_endpoint_groups.list source code Open in Cloud Shell
Global_network_endpoint_groups.list_network_endpoints source code Open in Cloud Shell
Global_operations.aggregated_list source code Open in Cloud Shell
Global_operations.delete source code Open in Cloud Shell
Global_operations.get source code Open in Cloud Shell
Global_operations.list source code Open in Cloud Shell
Global_operations.wait source code Open in Cloud Shell
Global_organization_operations.delete source code Open in Cloud Shell
Global_organization_operations.get source code Open in Cloud Shell
Global_organization_operations.list source code Open in Cloud Shell
Global_public_delegated_prefixes.delete source code Open in Cloud Shell
Global_public_delegated_prefixes.get source code Open in Cloud Shell
Global_public_delegated_prefixes.insert source code Open in Cloud Shell
Global_public_delegated_prefixes.list source code Open in Cloud Shell
Global_public_delegated_prefixes.patch source code Open in Cloud Shell
Health_checks.aggregated_list source code Open in Cloud Shell
Health_checks.delete source code Open in Cloud Shell
Health_checks.get source code Open in Cloud Shell
Health_checks.insert source code Open in Cloud Shell
Health_checks.list source code Open in Cloud Shell
Health_checks.patch source code Open in Cloud Shell
Health_checks.update source code Open in Cloud Shell
Image_family_views.get source code Open in Cloud Shell
Images.delete source code Open in Cloud Shell
Images.deprecate source code Open in Cloud Shell
Images.get source code Open in Cloud Shell
Images.get_from_family source code Open in Cloud Shell
Images.get_iam_policy source code Open in Cloud Shell
Images.insert source code Open in Cloud Shell
Images.list source code Open in Cloud Shell
Images.patch source code Open in Cloud Shell
Images.set_iam_policy source code Open in Cloud Shell
Images.set_labels source code Open in Cloud Shell
Images.test_iam_permissions source code Open in Cloud Shell
Instance_group_manager_resize_requests.cancel source code Open in Cloud Shell
Instance_group_manager_resize_requests.delete source code Open in Cloud Shell
Instance_group_manager_resize_requests.get source code Open in Cloud Shell
Instance_group_manager_resize_requests.insert source code Open in Cloud Shell
Instance_group_manager_resize_requests.list source code Open in Cloud Shell
Instance_group_managers.abandon_instances source code Open in Cloud Shell
Instance_group_managers.aggregated_list source code Open in Cloud Shell
Instance_group_managers.apply_updates_to_instances source code Open in Cloud Shell
Instance_group_managers.create_instances source code Open in Cloud Shell
Instance_group_managers.delete source code Open in Cloud Shell
Instance_group_managers.delete_instances source code Open in Cloud Shell
Instance_group_managers.delete_per_instance_configs source code Open in Cloud Shell
Instance_group_managers.get source code Open in Cloud Shell
Instance_group_managers.insert source code Open in Cloud Shell
Instance_group_managers.list source code Open in Cloud Shell
Instance_group_managers.list_errors source code Open in Cloud Shell
Instance_group_managers.list_managed_instances source code Open in Cloud Shell
Instance_group_managers.list_per_instance_configs source code Open in Cloud Shell
Instance_group_managers.patch source code Open in Cloud Shell
Instance_group_managers.patch_per_instance_configs source code Open in Cloud Shell
Instance_group_managers.recreate_instances source code Open in Cloud Shell
Instance_group_managers.resize source code Open in Cloud Shell
Instance_group_managers.set_instance_template source code Open in Cloud Shell
Instance_group_managers.set_target_pools source code Open in Cloud Shell
Instance_group_managers.update_per_instance_configs source code Open in Cloud Shell
Instance_groups.add_instances source code Open in Cloud Shell
Instance_groups.aggregated_list source code Open in Cloud Shell
Instance_groups.delete source code Open in Cloud Shell
Instance_groups.get source code Open in Cloud Shell
Instance_groups.insert source code Open in Cloud Shell
Instance_groups.list source code Open in Cloud Shell
Instance_groups.list_instances source code Open in Cloud Shell
Instance_groups.remove_instances source code Open in Cloud Shell
Instance_groups.set_named_ports source code Open in Cloud Shell
Instance_settings_service.get source code Open in Cloud Shell
Instance_settings_service.patch source code Open in Cloud Shell
Instance_templates.aggregated_list source code Open in Cloud Shell
Instance_templates.delete source code Open in Cloud Shell
Instance_templates.get source code Open in Cloud Shell
Instance_templates.get_iam_policy source code Open in Cloud Shell
Instance_templates.insert source code Open in Cloud Shell
Instance_templates.list source code Open in Cloud Shell
Instance_templates.set_iam_policy source code Open in Cloud Shell
Instance_templates.test_iam_permissions source code Open in Cloud Shell
Instances.add_access_config source code Open in Cloud Shell
Instances.add_resource_policies source code Open in Cloud Shell
Instances.aggregated_list source code Open in Cloud Shell
Instances.attach_disk source code Open in Cloud Shell
Instances.bulk_insert source code Open in Cloud Shell
Instances.delete source code Open in Cloud Shell
Instances.delete_access_config source code Open in Cloud Shell
Instances.detach_disk source code Open in Cloud Shell
Instances.get source code Open in Cloud Shell
Instances.get_effective_firewalls source code Open in Cloud Shell
Instances.get_guest_attributes source code Open in Cloud Shell
Instances.get_iam_policy source code Open in Cloud Shell
Instances.get_screenshot source code Open in Cloud Shell
Instances.get_serial_port_output source code Open in Cloud Shell
Instances.get_shielded_instance_identity source code Open in Cloud Shell
Instances.insert source code Open in Cloud Shell
Instances.list source code Open in Cloud Shell
Instances.list_referrers source code Open in Cloud Shell
Instances.perform_maintenance source code Open in Cloud Shell
Instances.remove_resource_policies source code Open in Cloud Shell
Instances.reset source code Open in Cloud Shell
Instances.resume source code Open in Cloud Shell
Instances.send_diagnostic_interrupt source code Open in Cloud Shell
Instances.set_deletion_protection source code Open in Cloud Shell
Instances.set_disk_auto_delete source code Open in Cloud Shell
Instances.set_iam_policy source code Open in Cloud Shell
Instances.set_labels source code Open in Cloud Shell
Instances.set_machine_resources source code Open in Cloud Shell
Instances.set_machine_type source code Open in Cloud Shell
Instances.set_metadata source code Open in Cloud Shell
Instances.set_min_cpu_platform source code Open in Cloud Shell
Instances.set_name source code Open in Cloud Shell
Instances.set_scheduling source code Open in Cloud Shell
Instances.set_security_policy source code Open in Cloud Shell
Instances.set_service_account source code Open in Cloud Shell
Instances.set_shielded_instance_integrity_policy source code Open in Cloud Shell
Instances.set_tags source code Open in Cloud Shell
Instances.simulate_maintenance_event source code Open in Cloud Shell
Instances.start source code Open in Cloud Shell
Instances.start_with_encryption_key source code Open in Cloud Shell
Instances.stop source code Open in Cloud Shell
Instances.suspend source code Open in Cloud Shell
Instances.test_iam_permissions source code Open in Cloud Shell
Instances.update source code Open in Cloud Shell
Instances.update_access_config source code Open in Cloud Shell
Instances.update_display_device source code Open in Cloud Shell
Instances.update_network_interface source code Open in Cloud Shell
Instances.update_shielded_instance_config source code Open in Cloud Shell
Instant_snapshots.aggregated_list source code Open in Cloud Shell
Instant_snapshots.delete source code Open in Cloud Shell
Instant_snapshots.get source code Open in Cloud Shell
Instant_snapshots.get_iam_policy source code Open in Cloud Shell
Instant_snapshots.insert source code Open in Cloud Shell
Instant_snapshots.list source code Open in Cloud Shell
Instant_snapshots.set_iam_policy source code Open in Cloud Shell
Instant_snapshots.set_labels source code Open in Cloud Shell
Instant_snapshots.test_iam_permissions source code Open in Cloud Shell
Interconnect_attachments.aggregated_list source code Open in Cloud Shell
Interconnect_attachments.delete source code Open in Cloud Shell
Interconnect_attachments.get source code Open in Cloud Shell
Interconnect_attachments.insert source code Open in Cloud Shell
Interconnect_attachments.list source code Open in Cloud Shell
Interconnect_attachments.patch source code Open in Cloud Shell
Interconnect_attachments.set_labels source code Open in Cloud Shell
Interconnect_locations.get source code Open in Cloud Shell
Interconnect_locations.list source code Open in Cloud Shell
Interconnect_remote_locations.get source code Open in Cloud Shell
Interconnect_remote_locations.list source code Open in Cloud Shell
Interconnects.delete source code Open in Cloud Shell
Interconnects.get source code Open in Cloud Shell
Interconnects.get_diagnostics source code Open in Cloud Shell
Interconnects.get_macsec_config source code Open in Cloud Shell
Interconnects.insert source code Open in Cloud Shell
Interconnects.list source code Open in Cloud Shell
Interconnects.patch source code Open in Cloud Shell
Interconnects.set_labels source code Open in Cloud Shell
License_codes.get source code Open in Cloud Shell
License_codes.test_iam_permissions source code Open in Cloud Shell
Licenses.delete source code Open in Cloud Shell
Licenses.get source code Open in Cloud Shell
Licenses.get_iam_policy source code Open in Cloud Shell
Licenses.insert source code Open in Cloud Shell
Licenses.list source code Open in Cloud Shell
Licenses.set_iam_policy source code Open in Cloud Shell
Licenses.test_iam_permissions source code Open in Cloud Shell
Machine_images.delete source code Open in Cloud Shell
Machine_images.get source code Open in Cloud Shell
Machine_images.get_iam_policy source code Open in Cloud Shell
Machine_images.insert source code Open in Cloud Shell
Machine_images.list source code Open in Cloud Shell
Machine_images.set_iam_policy source code Open in Cloud Shell
Machine_images.test_iam_permissions source code Open in Cloud Shell
Machine_types.aggregated_list source code Open in Cloud Shell
Machine_types.get source code Open in Cloud Shell
Machine_types.list source code Open in Cloud Shell
Network_attachments.aggregated_list source code Open in Cloud Shell
Network_attachments.delete source code Open in Cloud Shell
Network_attachments.get source code Open in Cloud Shell
Network_attachments.get_iam_policy source code Open in Cloud Shell
Network_attachments.insert source code Open in Cloud Shell
Network_attachments.list source code Open in Cloud Shell
Network_attachments.patch source code Open in Cloud Shell
Network_attachments.set_iam_policy source code Open in Cloud Shell
Network_attachments.test_iam_permissions source code Open in Cloud Shell
Network_edge_security_services.aggregated_list source code Open in Cloud Shell
Network_edge_security_services.delete source code Open in Cloud Shell
Network_edge_security_services.get source code Open in Cloud Shell
Network_edge_security_services.insert source code Open in Cloud Shell
Network_edge_security_services.patch source code Open in Cloud Shell
Network_endpoint_groups.aggregated_list source code Open in Cloud Shell
Network_endpoint_groups.attach_network_endpoints source code Open in Cloud Shell
Network_endpoint_groups.delete source code Open in Cloud Shell
Network_endpoint_groups.detach_network_endpoints source code Open in Cloud Shell
Network_endpoint_groups.get source code Open in Cloud Shell
Network_endpoint_groups.insert source code Open in Cloud Shell
Network_endpoint_groups.list source code Open in Cloud Shell
Network_endpoint_groups.list_network_endpoints source code Open in Cloud Shell
Network_endpoint_groups.test_iam_permissions source code Open in Cloud Shell
Network_firewall_policies.add_association source code Open in Cloud Shell
Network_firewall_policies.add_rule source code Open in Cloud Shell
Network_firewall_policies.clone_rules source code Open in Cloud Shell
Network_firewall_policies.delete source code Open in Cloud Shell
Network_firewall_policies.get source code Open in Cloud Shell
Network_firewall_policies.get_association source code Open in Cloud Shell
Network_firewall_policies.get_iam_policy source code Open in Cloud Shell
Network_firewall_policies.get_rule source code Open in Cloud Shell
Network_firewall_policies.insert source code Open in Cloud Shell
Network_firewall_policies.list source code Open in Cloud Shell
Network_firewall_policies.patch source code Open in Cloud Shell
Network_firewall_policies.patch_rule source code Open in Cloud Shell
Network_firewall_policies.remove_association source code Open in Cloud Shell
Network_firewall_policies.remove_rule source code Open in Cloud Shell
Network_firewall_policies.set_iam_policy source code Open in Cloud Shell
Network_firewall_policies.test_iam_permissions source code Open in Cloud Shell
Networks.add_peering source code Open in Cloud Shell
Networks.delete source code Open in Cloud Shell
Networks.get source code Open in Cloud Shell
Networks.get_effective_firewalls source code Open in Cloud Shell
Networks.insert source code Open in Cloud Shell
Networks.list source code Open in Cloud Shell
Networks.list_peering_routes source code Open in Cloud Shell
Networks.patch source code Open in Cloud Shell
Networks.remove_peering source code Open in Cloud Shell
Networks.switch_to_custom_mode source code Open in Cloud Shell
Networks.update_peering source code Open in Cloud Shell
Node_groups.add_nodes source code Open in Cloud Shell
Node_groups.aggregated_list source code Open in Cloud Shell
Node_groups.delete source code Open in Cloud Shell
Node_groups.delete_nodes source code Open in Cloud Shell
Node_groups.get source code Open in Cloud Shell
Node_groups.get_iam_policy source code Open in Cloud Shell
Node_groups.insert source code Open in Cloud Shell
Node_groups.list source code Open in Cloud Shell
Node_groups.list_nodes source code Open in Cloud Shell
Node_groups.patch source code Open in Cloud Shell
Node_groups.perform_maintenance source code Open in Cloud Shell
Node_groups.set_iam_policy source code Open in Cloud Shell
Node_groups.set_node_template source code Open in Cloud Shell
Node_groups.simulate_maintenance_event source code Open in Cloud Shell
Node_groups.test_iam_permissions source code Open in Cloud Shell
Node_templates.aggregated_list source code Open in Cloud Shell
Node_templates.delete source code Open in Cloud Shell
Node_templates.get source code Open in Cloud Shell
Node_templates.get_iam_policy source code Open in Cloud Shell
Node_templates.insert source code Open in Cloud Shell
Node_templates.list source code Open in Cloud Shell
Node_templates.set_iam_policy source code Open in Cloud Shell
Node_templates.test_iam_permissions source code Open in Cloud Shell
Node_types.aggregated_list source code Open in Cloud Shell
Node_types.get source code Open in Cloud Shell
Node_types.list source code Open in Cloud Shell
Packet_mirrorings.aggregated_list source code Open in Cloud Shell
Packet_mirrorings.delete source code Open in Cloud Shell
Packet_mirrorings.get source code Open in Cloud Shell
Packet_mirrorings.insert source code Open in Cloud Shell
Packet_mirrorings.list source code Open in Cloud Shell
Packet_mirrorings.patch source code Open in Cloud Shell
Packet_mirrorings.test_iam_permissions source code Open in Cloud Shell
Projects.disable_xpn_host source code Open in Cloud Shell
Projects.disable_xpn_resource source code Open in Cloud Shell
Projects.enable_xpn_host source code Open in Cloud Shell
Projects.enable_xpn_resource source code Open in Cloud Shell
Projects.get source code Open in Cloud Shell
Projects.get_xpn_host source code Open in Cloud Shell
Projects.get_xpn_resources source code Open in Cloud Shell
Projects.list_xpn_hosts source code Open in Cloud Shell
Projects.move_disk source code Open in Cloud Shell
Projects.move_instance source code Open in Cloud Shell
Projects.set_cloud_armor_tier source code Open in Cloud Shell
Projects.set_common_instance_metadata source code Open in Cloud Shell
Projects.set_default_network_tier source code Open in Cloud Shell
Projects.set_usage_export_bucket source code Open in Cloud Shell
Public_advertised_prefixes.announce source code Open in Cloud Shell
Public_advertised_prefixes.delete source code Open in Cloud Shell
Public_advertised_prefixes.get source code Open in Cloud Shell
Public_advertised_prefixes.insert source code Open in Cloud Shell
Public_advertised_prefixes.list source code Open in Cloud Shell
Public_advertised_prefixes.patch source code Open in Cloud Shell
Public_advertised_prefixes.withdraw source code Open in Cloud Shell
Public_delegated_prefixes.aggregated_list source code Open in Cloud Shell
Public_delegated_prefixes.announce source code Open in Cloud Shell
Public_delegated_prefixes.delete source code Open in Cloud Shell
Public_delegated_prefixes.get source code Open in Cloud Shell
Public_delegated_prefixes.insert source code Open in Cloud Shell
Public_delegated_prefixes.list source code Open in Cloud Shell
Public_delegated_prefixes.patch source code Open in Cloud Shell
Public_delegated_prefixes.withdraw source code Open in Cloud Shell
Region_autoscalers.delete source code Open in Cloud Shell
Region_autoscalers.get source code Open in Cloud Shell
Region_autoscalers.insert source code Open in Cloud Shell
Region_autoscalers.list source code Open in Cloud Shell
Region_autoscalers.patch source code Open in Cloud Shell
Region_autoscalers.update source code Open in Cloud Shell
Region_backend_services.delete source code Open in Cloud Shell
Region_backend_services.get source code Open in Cloud Shell
Region_backend_services.get_health source code Open in Cloud Shell
Region_backend_services.get_iam_policy source code Open in Cloud Shell
Region_backend_services.insert source code Open in Cloud Shell
Region_backend_services.list source code Open in Cloud Shell
Region_backend_services.list_usable source code Open in Cloud Shell
Region_backend_services.patch source code Open in Cloud Shell
Region_backend_services.set_iam_policy source code Open in Cloud Shell
Region_backend_services.set_security_policy source code Open in Cloud Shell
Region_backend_services.test_iam_permissions source code Open in Cloud Shell
Region_backend_services.update source code Open in Cloud Shell
Region_commitments.aggregated_list source code Open in Cloud Shell
Region_commitments.get source code Open in Cloud Shell
Region_commitments.insert source code Open in Cloud Shell
Region_commitments.list source code Open in Cloud Shell
Region_commitments.update source code Open in Cloud Shell
Region_disk_types.get source code Open in Cloud Shell
Region_disk_types.list source code Open in Cloud Shell
Region_disks.add_resource_policies source code Open in Cloud Shell
Region_disks.bulk_insert source code Open in Cloud Shell
Region_disks.create_snapshot source code Open in Cloud Shell
Region_disks.delete source code Open in Cloud Shell
Region_disks.get source code Open in Cloud Shell
Region_disks.get_iam_policy source code Open in Cloud Shell
Region_disks.insert source code Open in Cloud Shell
Region_disks.list source code Open in Cloud Shell
Region_disks.remove_resource_policies source code Open in Cloud Shell
Region_disks.resize source code Open in Cloud Shell
Region_disks.set_iam_policy source code Open in Cloud Shell
Region_disks.set_labels source code Open in Cloud Shell
Region_disks.start_async_replication source code Open in Cloud Shell
Region_disks.stop_async_replication source code Open in Cloud Shell
Region_disks.stop_group_async_replication source code Open in Cloud Shell
Region_disks.test_iam_permissions source code Open in Cloud Shell
Region_disks.update source code Open in Cloud Shell
Region_health_check_services.delete source code Open in Cloud Shell
Region_health_check_services.get source code Open in Cloud Shell
Region_health_check_services.insert source code Open in Cloud Shell
Region_health_check_services.list source code Open in Cloud Shell
Region_health_check_services.patch source code Open in Cloud Shell
Region_health_checks.delete source code Open in Cloud Shell
Region_health_checks.get source code Open in Cloud Shell
Region_health_checks.insert source code Open in Cloud Shell
Region_health_checks.list source code Open in Cloud Shell
Region_health_checks.patch source code Open in Cloud Shell
Region_health_checks.update source code Open in Cloud Shell
Region_instance_group_managers.abandon_instances source code Open in Cloud Shell
Region_instance_group_managers.apply_updates_to_instances source code Open in Cloud Shell
Region_instance_group_managers.create_instances source code Open in Cloud Shell
Region_instance_group_managers.delete source code Open in Cloud Shell
Region_instance_group_managers.delete_instances source code Open in Cloud Shell
Region_instance_group_managers.delete_per_instance_configs source code Open in Cloud Shell
Region_instance_group_managers.get source code Open in Cloud Shell
Region_instance_group_managers.insert source code Open in Cloud Shell
Region_instance_group_managers.list source code Open in Cloud Shell
Region_instance_group_managers.list_errors source code Open in Cloud Shell
Region_instance_group_managers.list_managed_instances source code Open in Cloud Shell
Region_instance_group_managers.list_per_instance_configs source code Open in Cloud Shell
Region_instance_group_managers.patch source code Open in Cloud Shell
Region_instance_group_managers.patch_per_instance_configs source code Open in Cloud Shell
Region_instance_group_managers.recreate_instances source code Open in Cloud Shell
Region_instance_group_managers.resize source code Open in Cloud Shell
Region_instance_group_managers.set_instance_template source code Open in Cloud Shell
Region_instance_group_managers.set_target_pools source code Open in Cloud Shell
Region_instance_group_managers.update_per_instance_configs source code Open in Cloud Shell
Region_instance_groups.get source code Open in Cloud Shell
Region_instance_groups.list source code Open in Cloud Shell
Region_instance_groups.list_instances source code Open in Cloud Shell
Region_instance_groups.set_named_ports source code Open in Cloud Shell
Region_instance_templates.delete source code Open in Cloud Shell
Region_instance_templates.get source code Open in Cloud Shell
Region_instance_templates.insert source code Open in Cloud Shell
Region_instance_templates.list source code Open in Cloud Shell
Region_instances.bulk_insert source code Open in Cloud Shell
Region_instant_snapshots.delete source code Open in Cloud Shell
Region_instant_snapshots.get source code Open in Cloud Shell
Region_instant_snapshots.get_iam_policy source code Open in Cloud Shell
Region_instant_snapshots.insert source code Open in Cloud Shell
Region_instant_snapshots.list source code Open in Cloud Shell
Region_instant_snapshots.set_iam_policy source code Open in Cloud Shell
Region_instant_snapshots.set_labels source code Open in Cloud Shell
Region_instant_snapshots.test_iam_permissions source code Open in Cloud Shell
Region_network_endpoint_groups.attach_network_endpoints source code Open in Cloud Shell
Region_network_endpoint_groups.delete source code Open in Cloud Shell
Region_network_endpoint_groups.detach_network_endpoints source code Open in Cloud Shell
Region_network_endpoint_groups.get source code Open in Cloud Shell
Region_network_endpoint_groups.insert source code Open in Cloud Shell
Region_network_endpoint_groups.list source code Open in Cloud Shell
Region_network_endpoint_groups.list_network_endpoints source code Open in Cloud Shell
Region_network_firewall_policies.add_association source code Open in Cloud Shell
Region_network_firewall_policies.add_rule source code Open in Cloud Shell
Region_network_firewall_policies.clone_rules source code Open in Cloud Shell
Region_network_firewall_policies.delete source code Open in Cloud Shell
Region_network_firewall_policies.get source code Open in Cloud Shell
Region_network_firewall_policies.get_association source code Open in Cloud Shell
Region_network_firewall_policies.get_effective_firewalls source code Open in Cloud Shell
Region_network_firewall_policies.get_iam_policy source code Open in Cloud Shell
Region_network_firewall_policies.get_rule source code Open in Cloud Shell
Region_network_firewall_policies.insert source code Open in Cloud Shell
Region_network_firewall_policies.list source code Open in Cloud Shell
Region_network_firewall_policies.patch source code Open in Cloud Shell
Region_network_firewall_policies.patch_rule source code Open in Cloud Shell
Region_network_firewall_policies.remove_association source code Open in Cloud Shell
Region_network_firewall_policies.remove_rule source code Open in Cloud Shell
Region_network_firewall_policies.set_iam_policy source code Open in Cloud Shell
Region_network_firewall_policies.test_iam_permissions source code Open in Cloud Shell
Region_notification_endpoints.delete source code Open in Cloud Shell
Region_notification_endpoints.get source code Open in Cloud Shell
Region_notification_endpoints.insert source code Open in Cloud Shell
Region_notification_endpoints.list source code Open in Cloud Shell
Region_operations.delete source code Open in Cloud Shell
Region_operations.get source code Open in Cloud Shell
Region_operations.list source code Open in Cloud Shell
Region_operations.wait source code Open in Cloud Shell
Region_security_policies.add_rule source code Open in Cloud Shell
Region_security_policies.delete source code Open in Cloud Shell
Region_security_policies.get source code Open in Cloud Shell
Region_security_policies.get_rule source code Open in Cloud Shell
Region_security_policies.insert source code Open in Cloud Shell
Region_security_policies.list source code Open in Cloud Shell
Region_security_policies.patch source code Open in Cloud Shell
Region_security_policies.patch_rule source code Open in Cloud Shell
Region_security_policies.remove_rule source code Open in Cloud Shell
Region_ssl_certificates.delete source code Open in Cloud Shell
Region_ssl_certificates.get source code Open in Cloud Shell
Region_ssl_certificates.insert source code Open in Cloud Shell
Region_ssl_certificates.list source code Open in Cloud Shell
Region_ssl_policies.delete source code Open in Cloud Shell
Region_ssl_policies.get source code Open in Cloud Shell
Region_ssl_policies.insert source code Open in Cloud Shell
Region_ssl_policies.list source code Open in Cloud Shell
Region_ssl_policies.list_available_features source code Open in Cloud Shell
Region_ssl_policies.patch source code Open in Cloud Shell
Region_target_http_proxies.delete source code Open in Cloud Shell
Region_target_http_proxies.get source code Open in Cloud Shell
Region_target_http_proxies.insert source code Open in Cloud Shell
Region_target_http_proxies.list source code Open in Cloud Shell
Region_target_http_proxies.set_url_map source code Open in Cloud Shell
Region_target_https_proxies.delete source code Open in Cloud Shell
Region_target_https_proxies.get source code Open in Cloud Shell
Region_target_https_proxies.insert source code Open in Cloud Shell
Region_target_https_proxies.list source code Open in Cloud Shell
Region_target_https_proxies.patch source code Open in Cloud Shell
Region_target_https_proxies.set_ssl_certificates source code Open in Cloud Shell
Region_target_https_proxies.set_url_map source code Open in Cloud Shell
Region_target_tcp_proxies.delete source code Open in Cloud Shell
Region_target_tcp_proxies.get source code Open in Cloud Shell
Region_target_tcp_proxies.insert source code Open in Cloud Shell
Region_target_tcp_proxies.list source code Open in Cloud Shell
Region_url_maps.delete source code Open in Cloud Shell
Region_url_maps.get source code Open in Cloud Shell
Region_url_maps.insert source code Open in Cloud Shell
Region_url_maps.list source code Open in Cloud Shell
Region_url_maps.patch source code Open in Cloud Shell
Region_url_maps.update source code Open in Cloud Shell
Region_url_maps.validate source code Open in Cloud Shell
Region_zones.list source code Open in Cloud Shell
Regions.get source code Open in Cloud Shell
Regions.list source code Open in Cloud Shell
Reservations.aggregated_list source code Open in Cloud Shell
Reservations.delete source code Open in Cloud Shell
Reservations.get source code Open in Cloud Shell
Reservations.get_iam_policy source code Open in Cloud Shell
Reservations.insert source code Open in Cloud Shell
Reservations.list source code Open in Cloud Shell
Reservations.resize source code Open in Cloud Shell
Reservations.set_iam_policy source code Open in Cloud Shell
Reservations.test_iam_permissions source code Open in Cloud Shell
Reservations.update source code Open in Cloud Shell
Resource_policies.aggregated_list source code Open in Cloud Shell
Resource_policies.delete source code Open in Cloud Shell
Resource_policies.get source code Open in Cloud Shell
Resource_policies.get_iam_policy source code Open in Cloud Shell
Resource_policies.insert source code Open in Cloud Shell
Resource_policies.list source code Open in Cloud Shell
Resource_policies.patch source code Open in Cloud Shell
Resource_policies.set_iam_policy source code Open in Cloud Shell
Resource_policies.test_iam_permissions source code Open in Cloud Shell
Routers.aggregated_list source code Open in Cloud Shell
Routers.delete source code Open in Cloud Shell
Routers.get source code Open in Cloud Shell
Routers.get_nat_ip_info source code Open in Cloud Shell
Routers.get_nat_mapping_info source code Open in Cloud Shell
Routers.get_router_status source code Open in Cloud Shell
Routers.insert source code Open in Cloud Shell
Routers.list source code Open in Cloud Shell
Routers.patch source code Open in Cloud Shell
Routers.preview source code Open in Cloud Shell
Routers.update source code Open in Cloud Shell
Routes.delete source code Open in Cloud Shell
Routes.get source code Open in Cloud Shell
Routes.insert source code Open in Cloud Shell
Routes.list source code Open in Cloud Shell
Security_policies.add_rule source code Open in Cloud Shell
Security_policies.aggregated_list source code Open in Cloud Shell
Security_policies.delete source code Open in Cloud Shell
Security_policies.get source code Open in Cloud Shell
Security_policies.get_rule source code Open in Cloud Shell
Security_policies.insert source code Open in Cloud Shell
Security_policies.list source code Open in Cloud Shell
Security_policies.list_preconfigured_expression_sets source code Open in Cloud Shell
Security_policies.patch source code Open in Cloud Shell
Security_policies.patch_rule source code Open in Cloud Shell
Security_policies.remove_rule source code Open in Cloud Shell
Security_policies.set_labels source code Open in Cloud Shell
Service_attachments.aggregated_list source code Open in Cloud Shell
Service_attachments.delete source code Open in Cloud Shell
Service_attachments.get source code Open in Cloud Shell
Service_attachments.get_iam_policy source code Open in Cloud Shell
Service_attachments.insert source code Open in Cloud Shell
Service_attachments.list source code Open in Cloud Shell
Service_attachments.patch source code Open in Cloud Shell
Service_attachments.set_iam_policy source code Open in Cloud Shell
Service_attachments.test_iam_permissions source code Open in Cloud Shell
Snapshot_settings_service.get source code Open in Cloud Shell
Snapshot_settings_service.patch source code Open in Cloud Shell
Snapshots.delete source code Open in Cloud Shell
Snapshots.get source code Open in Cloud Shell
Snapshots.get_iam_policy source code Open in Cloud Shell
Snapshots.insert source code Open in Cloud Shell
Snapshots.list source code Open in Cloud Shell
Snapshots.set_iam_policy source code Open in Cloud Shell
Snapshots.set_labels source code Open in Cloud Shell
Snapshots.test_iam_permissions source code Open in Cloud Shell
Ssl_certificates.aggregated_list source code Open in Cloud Shell
Ssl_certificates.delete source code Open in Cloud Shell
Ssl_certificates.get source code Open in Cloud Shell
Ssl_certificates.insert source code Open in Cloud Shell
Ssl_certificates.list source code Open in Cloud Shell
Ssl_policies.aggregated_list source code Open in Cloud Shell
Ssl_policies.delete source code Open in Cloud Shell
Ssl_policies.get source code Open in Cloud Shell
Ssl_policies.insert source code Open in Cloud Shell
Ssl_policies.list source code Open in Cloud Shell
Ssl_policies.list_available_features source code Open in Cloud Shell
Ssl_policies.patch source code Open in Cloud Shell
Storage_pool_types.aggregated_list source code Open in Cloud Shell
Storage_pool_types.get source code Open in Cloud Shell
Storage_pool_types.list source code Open in Cloud Shell
Storage_pools.aggregated_list source code Open in Cloud Shell
Storage_pools.delete source code Open in Cloud Shell
Storage_pools.get source code Open in Cloud Shell
Storage_pools.get_iam_policy source code Open in Cloud Shell
Storage_pools.insert source code Open in Cloud Shell
Storage_pools.list source code Open in Cloud Shell
Storage_pools.list_disks source code Open in Cloud Shell
Storage_pools.set_iam_policy source code Open in Cloud Shell
Storage_pools.test_iam_permissions source code Open in Cloud Shell
Storage_pools.update source code Open in Cloud Shell
Subnetworks.aggregated_list source code Open in Cloud Shell
Subnetworks.delete source code Open in Cloud Shell
Subnetworks.expand_ip_cidr_range source code Open in Cloud Shell
Subnetworks.get source code Open in Cloud Shell
Subnetworks.get_iam_policy source code Open in Cloud Shell
Subnetworks.insert source code Open in Cloud Shell
Subnetworks.list source code Open in Cloud Shell
Subnetworks.list_usable source code Open in Cloud Shell
Subnetworks.patch source code Open in Cloud Shell
Subnetworks.set_iam_policy source code Open in Cloud Shell
Subnetworks.set_private_ip_google_access source code Open in Cloud Shell
Subnetworks.test_iam_permissions source code Open in Cloud Shell
Target_grpc_proxies.delete source code Open in Cloud Shell
Target_grpc_proxies.get source code Open in Cloud Shell
Target_grpc_proxies.insert source code Open in Cloud Shell
Target_grpc_proxies.list source code Open in Cloud Shell
Target_grpc_proxies.patch source code Open in Cloud Shell
Target_http_proxies.aggregated_list source code Open in Cloud Shell
Target_http_proxies.delete source code Open in Cloud Shell
Target_http_proxies.get source code Open in Cloud Shell
Target_http_proxies.insert source code Open in Cloud Shell
Target_http_proxies.list source code Open in Cloud Shell
Target_http_proxies.patch source code Open in Cloud Shell
Target_http_proxies.set_url_map source code Open in Cloud Shell
Target_https_proxies.aggregated_list source code Open in Cloud Shell
Target_https_proxies.delete source code Open in Cloud Shell
Target_https_proxies.get source code Open in Cloud Shell
Target_https_proxies.insert source code Open in Cloud Shell
Target_https_proxies.list source code Open in Cloud Shell
Target_https_proxies.patch source code Open in Cloud Shell
Target_https_proxies.set_certificate_map source code Open in Cloud Shell
Target_https_proxies.set_quic_override source code Open in Cloud Shell
Target_https_proxies.set_ssl_certificates source code Open in Cloud Shell
Target_https_proxies.set_ssl_policy source code Open in Cloud Shell
Target_https_proxies.set_url_map source code Open in Cloud Shell
Target_instances.aggregated_list source code Open in Cloud Shell
Target_instances.delete source code Open in Cloud Shell
Target_instances.get source code Open in Cloud Shell
Target_instances.insert source code Open in Cloud Shell
Target_instances.list source code Open in Cloud Shell
Target_instances.set_security_policy source code Open in Cloud Shell
Target_pools.add_health_check source code Open in Cloud Shell
Target_pools.add_instance source code Open in Cloud Shell
Target_pools.aggregated_list source code Open in Cloud Shell
Target_pools.delete source code Open in Cloud Shell
Target_pools.get source code Open in Cloud Shell
Target_pools.get_health source code Open in Cloud Shell
Target_pools.insert source code Open in Cloud Shell
Target_pools.list source code Open in Cloud Shell
Target_pools.remove_health_check source code Open in Cloud Shell
Target_pools.remove_instance source code Open in Cloud Shell
Target_pools.set_backup source code Open in Cloud Shell
Target_pools.set_security_policy source code Open in Cloud Shell
Target_ssl_proxies.delete source code Open in Cloud Shell
Target_ssl_proxies.get source code Open in Cloud Shell
Target_ssl_proxies.insert source code Open in Cloud Shell
Target_ssl_proxies.list source code Open in Cloud Shell
Target_ssl_proxies.set_backend_service source code Open in Cloud Shell
Target_ssl_proxies.set_certificate_map source code Open in Cloud Shell
Target_ssl_proxies.set_proxy_header source code Open in Cloud Shell
Target_ssl_proxies.set_ssl_certificates source code Open in Cloud Shell
Target_ssl_proxies.set_ssl_policy source code Open in Cloud Shell
Target_tcp_proxies.aggregated_list source code Open in Cloud Shell
Target_tcp_proxies.delete source code Open in Cloud Shell
Target_tcp_proxies.get source code Open in Cloud Shell
Target_tcp_proxies.insert source code Open in Cloud Shell
Target_tcp_proxies.list source code Open in Cloud Shell
Target_tcp_proxies.set_backend_service source code Open in Cloud Shell
Target_tcp_proxies.set_proxy_header source code Open in Cloud Shell
Target_vpn_gateways.aggregated_list source code Open in Cloud Shell
Target_vpn_gateways.delete source code Open in Cloud Shell
Target_vpn_gateways.get source code Open in Cloud Shell
Target_vpn_gateways.insert source code Open in Cloud Shell
Target_vpn_gateways.list source code Open in Cloud Shell
Target_vpn_gateways.set_labels source code Open in Cloud Shell
Url_maps.aggregated_list source code Open in Cloud Shell
Url_maps.delete source code Open in Cloud Shell
Url_maps.get source code Open in Cloud Shell
Url_maps.insert source code Open in Cloud Shell
Url_maps.invalidate_cache source code Open in Cloud Shell
Url_maps.list source code Open in Cloud Shell
Url_maps.patch source code Open in Cloud Shell
Url_maps.update source code Open in Cloud Shell
Url_maps.validate source code Open in Cloud Shell
Vpn_gateways.aggregated_list source code Open in Cloud Shell
Vpn_gateways.delete source code Open in Cloud Shell
Vpn_gateways.get source code Open in Cloud Shell
Vpn_gateways.get_status source code Open in Cloud Shell
Vpn_gateways.insert source code Open in Cloud Shell
Vpn_gateways.list source code Open in Cloud Shell
Vpn_gateways.set_labels source code Open in Cloud Shell
Vpn_gateways.test_iam_permissions source code Open in Cloud Shell
Vpn_tunnels.aggregated_list source code Open in Cloud Shell
Vpn_tunnels.delete source code Open in Cloud Shell
Vpn_tunnels.get source code Open in Cloud Shell
Vpn_tunnels.insert source code Open in Cloud Shell
Vpn_tunnels.list source code Open in Cloud Shell
Vpn_tunnels.set_labels source code Open in Cloud Shell
Zone_operations.delete source code Open in Cloud Shell
Zone_operations.get source code Open in Cloud Shell
Zone_operations.list source code Open in Cloud Shell
Zone_operations.wait source code Open in Cloud Shell
Zones.get source code Open in Cloud Shell
Zones.list source code Open in Cloud Shell
Addresses.aggregated_list source code Open in Cloud Shell
Addresses.delete source code Open in Cloud Shell
Addresses.insert source code Open in Cloud Shell
Addresses.list source code Open in Cloud Shell
Region_operations.get source code Open in Cloud Shell
Region_operations.wait source code Open in Cloud Shell
Quickstart source code Open in Cloud Shell

The Google Compute Engine Node.js Client API Reference documentation also contains samples.

Supported Node.js Versions

Our client libraries follow the Node.js release schedule. Libraries are compatible with all current active and maintenance versions of Node.js. If you are using an end-of-life version of Node.js, we recommend that you update as soon as possible to an actively supported LTS version.

Google's client libraries support legacy versions of Node.js runtimes on a best-efforts basis with the following warnings:

  • Legacy versions are not tested in continuous integration.
  • Some security patches and features cannot be backported.
  • Dependencies cannot be kept up-to-date.

Client libraries targeting some end-of-life versions of Node.js are available, and can be installed through npm dist-tags. The dist-tags follow the naming convention legacy-(version). For example, npm install @google-cloud/compute@legacy-8 installs client libraries for versions compatible with Node.js 8.

Versioning

This library follows Semantic Versioning.

This library is considered to be stable. The code surface will not change in backwards-incompatible ways unless absolutely necessary (e.g. because of critical security issues) or with an extensive deprecation period. Issues and requests against stable libraries are addressed with the highest priority.

More Information: Google Cloud Platform Launch Stages

Contributing

Contributions welcome! See the Contributing Guide.

Please note that this README.md, the samples/README.md, and a variety of configuration files in this repository (including .nycrc and tsconfig.json) are generated from a central template. To edit one of these files, make an edit to its templates in directory.

License

Apache Version 2.0

See LICENSE