Recently I was tasked to create some kind of instant auto-removal of failed Aria Automation deployments for a given Cloud template.

This can be achieved through leveraging a custom day 2 operation using the Aria Automation Deployment API request controller. For this particular use-case we execute the deployment resource “delete” action.

The required REST call for this resource action is: POST /deployment/api/requests/{requestId}
The JSON body must be specified as follows: { “actionId”: “Deployment.Delete”}

To execute this action every time a deployment fails, we use an Extensibility subscription to be automatically triggered if the status of the deployment is “FAILED” and the event type equals “CREATE_DEPLOYMENT”.

In this example we will use Aria Orchestrator to create the custom action.