Actions86
- Config Actions
- Container Actions
- Edge Group Actions
- Edge Stack Actions
- Environment Actions
- Image Actions
- Network Actions
- Node Actions
- Registry Actions
- Secret Actions
- Service Actions
- Setting Actions
- Stack Actions
- System Actions
- Team Actions
- Template Actions
- User Actions
- Volume Actions
- Webhook Actions
Node → Update
AI-generatedOverview
This node operation updates a Docker Swarm node within a specified environment in Portainer. It allows users to modify the node's role, availability, and labels by sending an update request to the Portainer API. This is useful for managing the configuration and status of nodes in a Docker Swarm cluster, such as changing a node's role from worker to manager or adjusting its availability status.
Use Case Examples
- Updating a node's role and availability in a Docker Swarm cluster to manage workload distribution.
- Modifying node labels to organize and filter nodes within the Portainer environment.
Properties
| Name | Meaning |
|---|---|
| Environment ID | The ID of the environment/endpoint in Portainer where the node exists. |
| Node ID | The unique identifier of the Docker Swarm node to update. |
| Version | The object version number required for the update operation to ensure concurrency control. |
| Role | The new role to assign to the node (e.g., manager or worker). |
| Availability | The availability status of the node (e.g., active, pause, drain). |
| Labels | Optional labels to assign to the node for organizational purposes, provided as a JSON object. |
Output
JSON
body- The JSON response from the Portainer API after updating the node, typically containing the updated node details or status.
Dependencies
- Portainer API with an API key credential for authentication
Troubleshooting
- Ensure the Environment ID and Node ID are correct and correspond to existing resources in Portainer.
- Verify that the version number matches the current version of the node object to avoid update conflicts.
- Check that the API key credential has sufficient permissions to perform node updates.
- If SSL issues occur, consider enabling the option to ignore SSL certificate validation in the request options.
Links
- Portainer API Documentation - Update a Node - Official documentation for the Portainer API endpoint to update a Docker Swarm node.