Actions107
- Node Actions
- Network Actions
- Container Actions
- Container List
- Container Create
- Container Inspect
- Container Top
- Container Logs
- Container Changes
- Container Export
- Container Stats
- Container Resize
- Container Start
- Container Stop
- Container Restart
- Container Kill
- Container Update
- Container Rename
- Container Pause
- Container Unpause
- Container Attach
- Container Attach Websocket
- Container Wait
- Container Delete
- Container Archive Info
- Container Archive
- Put Container Archive
- Container Prune
- Image Actions
- Volume Actions
- Swarm Actions
- Secret Actions
- System Actions
- Exec Actions
- Service Actions
- Task Actions
- Config Actions
- Plugin Actions
- Distribution Actions
- Session Actions
Overview
This node interacts with Docker containers through the Portainer API, specifically allowing you to resize an existing exec instance's TTY session. The "Exec Resize" operation adjusts the height and width of the terminal session associated with a running exec instance inside a container.
Common scenarios include:
- Dynamically resizing terminal sessions in automated workflows that manage containerized applications.
- Adjusting terminal dimensions for better display or interaction when connecting to container exec sessions programmatically.
- Integrating container management tasks into broader automation pipelines where terminal size needs to be controlled.
For example, if you have a container running a process that you interact with via an exec session, this node can resize the terminal window to fit your UI or script requirements.
Properties
| Name | Meaning |
|---|---|
| EndpointID Name or ID | Selects the Portainer endpoint to access Docker. Can choose from a list or specify an ID via expression. |
| Id | The unique identifier of the exec instance whose TTY session you want to resize. |
| H | Height of the TTY session in characters (number). |
| W | Width of the TTY session in characters (number). |
Output
The node outputs JSON data representing the response from the Portainer API after attempting to resize the exec instance's TTY session. This typically includes status information confirming whether the resize was successful.
No binary data output is involved in this operation.
Dependencies
- Requires access to a Portainer API endpoint configured with appropriate credentials (an API key or token).
- The node depends on the Portainer API being accessible at the specified URL and having the necessary permissions to perform exec operations.
- The
endpointIdmust correspond to a valid Portainer endpoint managing Docker environments.
Troubleshooting
- Invalid EndpointID: If the selected endpoint ID is incorrect or inaccessible, the node will fail to connect. Verify the endpoint exists and credentials are correct.
- Exec Instance Not Found: Providing an invalid or non-existent exec instance ID will cause errors. Ensure the exec ID corresponds to an active exec session.
- Invalid Dimensions: Setting height or width to zero or negative values may cause the API to reject the request. Use positive integers for both.
- API Authentication Errors: If authentication fails, check that the API key/token is valid and has sufficient permissions.
- Network Issues: Connectivity problems between n8n and the Portainer API endpoint will prevent execution.