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 allows users to create a Docker secret via the Portainer API. It is useful in scenarios where you need to securely store sensitive data such as passwords, certificates, or keys within a Docker environment managed by Portainer. By creating secrets programmatically, you can automate deployment workflows and maintain secure configurations without manual intervention.
Practical examples include:
- Automating the creation of secrets during CI/CD pipelines.
- Managing secrets for multiple Docker endpoints from a centralized workflow.
- Integrating secret management into broader infrastructure automation tasks.
Properties
| Name | Meaning |
|---|---|
| EndpointID Name or ID | Selects the Docker endpoint (by name or ID) where the secret will be created. Options are loaded dynamically from available endpoints. |
| Body | The raw JSON string representing the secret's details to be sent in the request body. This should contain the necessary fields as per the Portainer API specification for creating a secret. |
Output
The node outputs the JSON response returned by the Portainer API after creating the secret. This typically includes details about the newly created secret such as its ID, name, creation timestamp, and other metadata.
No binary data output is involved.
Dependencies
- Requires an active connection to a Portainer instance with API access.
- Needs an API authentication token configured in the node credentials to authorize requests.
- The node dynamically loads available Docker endpoints from the Portainer API to populate the "EndpointID" property.
Troubleshooting
Common issues:
- Invalid or missing API credentials will cause authentication failures.
- Providing malformed JSON in the "Body" property may result in request errors.
- Selecting an invalid or inaccessible endpoint ID will cause the request to fail.
Error messages and resolutions:
- 401 Unauthorized: Check that the API key credential is valid and has sufficient permissions.
- 400 Bad Request: Verify the JSON structure in the "Body" property matches the expected schema for creating a secret.
- 404 Not Found: Ensure the selected endpoint ID exists and is accessible by the API user.