Actions10
Overview
This node integrates with Google Cloud Workstations via the Google IDX API, enabling management and interaction with cloud-based development environments. It supports operations such as starting, stopping, resetting, live monitoring, running commands, and retrieving status of workstations within a specified Google Cloud project.
Common scenarios include:
- Automating workstation lifecycle management in CI/CD pipelines.
- Monitoring live workstation statuses for operational insights.
- Executing remote commands on workstations for maintenance or setup.
- Generating access tokens to securely connect to workstations.
Practical example: A developer can use this node to start a specific workstation before running integration tests, then stop it afterward to save costs.
Properties
| Name | Meaning |
|---|---|
| Project ID | Select or enter your Google Cloud project ID. This identifies the GCP project containing the workstations. Options: From List (searchable list of projects), or manual ID entry. |
Note: The operation parameter is also used internally to select the action but is not listed here as an input property since it was provided by the user context.
Output
The node outputs JSON objects representing the results of the requested operation. The structure varies by operation:
- liveWorkstation: Returns an array of workstation statuses with fields like
statusCode,status(e.g., "running", "stopped", "accessToken-exp"), and workstation name. - startWorkstation, stopWorkstation, generateAccessToken: Outputs the raw response from the Google IDX API for the respective action.
- getWorkstation: Returns detailed information about a specific workstation.
- resetWorkstation: Returns a simple confirmation JSON
{ status: "reset-complete" }. - workstationInitialization: Provides aggregated data including total users, total items, and a nested map of workspaces grouped by user.
- getStatusWorkstation: Outputs categorized lists of workstations by their state (
STATE_STARTING,STATE_RUNNING,STATE_STOPPED). - manualWorkstation: Processes custom commands and returns corresponding JSON objects describing the action taken.
- runCommandWorkstation: Returns execution details including timestamps, access token, project info, exit code, stdout, and stderr from the command run inside a Docker container using gcloud CLI.
If binary data were output, it would represent files or streams related to workstation interactions, but this node primarily deals with JSON responses.
Dependencies
- Requires an OAuth2 API credential configured for Google IDX API access.
- Uses Google Cloud Workstations API endpoints.
- Depends on the presence of the
gcloudCLI and Docker if running commands inside containers. - Node uses internal helper methods for OAuth2 requests and concurrency control.
- Environment must allow executing shell commands (
child_process.exec) for command execution operations.
Troubleshooting
- Missing or invalid Project ID: Operations requiring a project ID will fail if not provided or invalid. Ensure the correct project ID is selected or entered.
- Authentication errors: If OAuth2 credentials are missing or expired, requests to Google APIs will fail. Refresh or reconfigure credentials.
- Command execution failures: Running commands requires Docker and gcloud CLI properly installed and accessible. Errors during command execution will include stderr and exit codes.
- Invalid manual command format: The
manualWorkstationoperation expects commands matching a strict regex pattern. Invalid formats throw descriptive errors. - API rate limits or transient errors: The node retries certain HTTP 503/504 errors with exponential backoff, but persistent failures will be logged or returned as errors.
- Unsupported operations: Attempting an unsupported operation throws an error indicating the operation is not supported.