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
Secret → Delete
AI-generatedOverview
This node operation deletes a Docker Swarm secret in a specified environment using the Portainer API. It is useful for managing secrets in Docker Swarm clusters, allowing users to remove secrets that are no longer needed or should be revoked. For example, a user can automate the cleanup of outdated secrets in their Docker environment.
Use Case Examples
- Automate deletion of a secret after it is rotated or expired.
- Remove secrets that are no longer used by any services in a Docker Swarm cluster.
Properties
| Name | Meaning |
|---|---|
| Environment ID | The ID of the environment/endpoint in Portainer where the secret exists. |
| Secret ID | The ID of the Docker Swarm secret to be deleted. |
| Force Delete | Whether to force deletion even if the secret is currently in use. |
Output
JSON
body- The response body from the Portainer API after attempting to delete the secret, typically empty on success or containing error details on failure.
Dependencies
- Requires an API key credential for Portainer API authentication.
Troubleshooting
- Ensure the Environment ID and Secret ID are correct and exist in the Portainer environment.
- If deletion fails due to the secret being in use, try enabling the 'Force Delete' option to override this restriction.
- Check API key permissions to ensure the user has rights to delete secrets in the specified environment.
- Verify network connectivity and that the Portainer API endpoint URL is correctly configured.
Links
- Portainer API - Delete Secret - Official Portainer API documentation for deleting Docker Swarm secrets.