MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/nodejs-docs-samples / _startInstances

Function _startInstances

functions/billing/index.js:208–221  ·  view source on GitHub ↗
(projectId, zone, instanceNames)

Source from the content-addressed store, hash-verified

206 * @return {Promise} Response from stopping instances
207 */
208const _startInstances = async (projectId, zone, instanceNames) => {
209 if (!instanceNames.length) {
210 return 'No stopped instances were found.';
211 }
212 await Promise.all(
213 instanceNames.map(instanceName => {
214 return instancesClient.start({
215 project: projectId,
216 zone: zone,
217 instance: instanceName,
218 });
219 })
220 );
221};
222
223// Helper function used in tests
224exports.listRunningInstances = async () => {

Callers 1

index.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected