Fleet Automation
Cancel a deployment
Cancel an active deployment and stop all pending operations. When you cancel a deployment:
- All pending operations on hosts that haven't started yet are stopped.
- Operations currently in progress on hosts may complete or be interrupted, depending on their current status.
- Configuration changes or package upgrades already applied to hosts are not rolled back.
After cancellation, you can view the final state of the deployment using the GET endpoint to see which hosts were successfully updated before the cancellation.
Only deployments with a pending or running status can be canceled. Returns a 400 if the deployment is not in a cancelable status. Returns a 404 if no deployment matches the specified ID or if you do not have access to it.
post/api/v2/fleet/deployments/{deployment_id}/cancel
Request
- Base URLhttps://api.datadoghq.com
- Auth
- API key in header DD-API-KEY and API key in header DD-APPLICATION-KEY
- or OAuth 2Authorization code/oauth2/v1/authorizeToken URL/oauth2/v1/token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
deployment_idstring required
The unique identifier of the deployment to cancel.
Response
OK
Example response
{
"data": {
"attributes": {
"message": "Cancellation has been requested; the deployment is stopping.",
"status": "stopping"
},
"id": "k7Q-3mX-p9Z",
"type": "deployment"
}
}Changes
Changes to this operation have not been checked yet.