Cancel a running deployment to apply configuration changes or recover from a failure. After you modify SQL code, add or remove parameters in the WITH clause, or change the deployment version, you must publish the deployment, cancel it, and restart it for the changes to take effect. If a deployment fails and cannot recover by reusing state data, cancel and restart it.
Prerequisites
The deployment is running.
If you want to allow other Alibaba Cloud accounts or RAM users to use your resources in fully managed Flink, you must grant them the required permissions, such as the permissions to cancel a deployment. For more information, see Grant permissions to an account.
Checkpoint retention
The system retains only the latest checkpoint while a deployment is running. When you cancel a deployment, the system does not automatically delete the checkpoint.
Procedure
Go to the Deployments page.
Log on to the Realtime Compute for Apache Flink console.
Find the workspace that you want to manage and click Console in the Actions column.
In the left-side navigation pane, click O&M > Deployments. On the Deployments page, find the desired deployment and click Cancel in the Actions column.

(Optional) In the Cancel this deployment dialog box, click More Strategies to expand the following options:
Option Description When to use Stop With Savepoint Creates a savepoint before cancellation. If not selected, the deployment enters the cancel process without creating a savepoint. Select this option to preserve state for a later restart, such as after code or parameter changes. Stop With Drain Permanently terminates the deployment. For more information, see Drain. Select this option only to permanently shut down a deployment with no plan to restart. ImportantDo not select Stop With Drain if you plan to restart the deployment later. Selecting this option may cause errors when the deployment is resumed.
Click OK.
Next steps
After cancellation, restart the deployment to apply your changes.