recreate_stack
Redeploy a Portainer stack by recreating it, capturing its definition for audit before changes. Use dry_run to preview, since the action has no undo.
Instructions
[WRITE][risk=high] Redeploy (recreate) a Portainer stack. No undo.
Captures the stack definition for audit before Portainer recreates it; there is no clean inverse for a redeploy. Requires a portainer target. Pass dry_run=True to preview.
Args: stack_id: Portainer stack id. endpoint_id: Endpoint id the stack runs on; omit to use the stack's own. dry_run: If True, preview without recreating. target: Target name from config; omit for the default.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | ||
| dry_run | No | ||
| stack_id | Yes | ||
| endpoint_id | No |