Portainer icon

Portainer

Trabalhe com dados da API do Portainer para gerenciar Docker

Overview

This node integrates with the Portainer API to manage Docker containers and other Docker-related resources. Specifically, the Container - Pause operation allows you to pause a running Docker container on a specified environment (endpoint) managed by Portainer.

Pausing a container suspends all processes within it without stopping or terminating the container, which can be useful for temporarily freeing up system resources or debugging without losing the container's state.

Common scenarios:

  • Temporarily pausing a container during maintenance windows.
  • Suspending resource-intensive containers without stopping them.
  • Debugging or troubleshooting containerized applications by freezing their state.

Example usage:

  • Pause a web server container before deploying updates.
  • Pause background worker containers during off-peak hours to save resources.

Properties

Name Meaning
Environment ID The ID of the Portainer environment/endpoint where the container is running.
Container ID The unique identifier of the Docker container to pause.

Output

The node outputs the JSON response returned by the Portainer API after attempting to pause the container. This typically includes status information about the container or an empty response if the operation was successful.

No binary data output is involved in this operation.

Dependencies

  • Requires a configured Portainer API credential with:

    • Base URL of the Portainer instance.
    • An API key/token for authentication.
  • The node sends HTTP POST requests to the Portainer API endpoint corresponding to the container pause action.

Troubleshooting

  • Common issues:

    • Invalid or missing Environment ID or Container ID will cause the request to fail.
    • Insufficient permissions or invalid API key may result in authorization errors.
    • Trying to pause a container that is not running or already paused may return an error.
  • Error messages:

    • 404 Not Found: The specified container or environment does not exist.
    • 403 Forbidden: API key lacks permission to perform the pause operation.
    • 409 Conflict: Container cannot be paused in its current state.
  • Resolutions:

    • Verify the Environment ID and Container ID are correct.
    • Ensure the API key has sufficient privileges.
    • Confirm the container is running before attempting to pause.

Links and References

Discussion