@google-cloud/compute
Source: index.
The default export of the @google-cloud/compute package is the
Compute class.
See Compute and ClientConfig for client methods and configuration options.
Examples
Install the client library with <a href="https://www.npmjs.com/">npm</a>:
npm install --save @google-cloud/compute
Import the client library
const Compute = require('@google-cloud/compute');
Create a client that uses <a href="https://cloud.google.com/docs/authentication/production#providing_credentials_to_your_application">Application Default Credentials (ADC)</a>:
const compute = new Compute();
Create a client with <a href="https://cloud.google.com/docs/authentication/production#obtaining_and_providing_service_account_credentials_manually">explicit credentials</a>:
const compute = new Compute({
projectId: 'your-project-id',
keyFilename: '/path/to/keyfile.json'
});
include:samples/quickstart.js
region_tag:compute_engine_quickstart
Full quickstart example:
Properties
Firewall
Reference to the Firewall class.
- See also
- Firewall
HealthCheck
Reference to the HealthCheck class.
- See also
- HealthCheck
Image
Reference to the Image class.
- See also
- Image
Network
Reference to the Network class.
- See also
- Network
Operation
Reference to the Operation class.
- See also
- Operation
Project
Reference to the Project class.
- See also
- Project
Region
Reference to the Region class.
- See also
- Region
Rule
Reference to the Rule class.
- See also
- Rule
Service
Reference to the Service class.
- See also
- Service
Snapshot
Reference to the Snapshot class.
- See also
- Snapshot
Zone
Reference to the Zone class.
- See also
- Zone