VMware Aria Automation Tools

 View Only

 Custom Deployment Delete Day2 action

Eugen Stelea's profile image
Eugen Stelea posted Jun 28, 2024 05:52 AM

Hi community,
I need a little help on an issue i face.
I need to create a custom Day2 action to delete a deployment, with an additional input field.
The default "Delete" action must be hidden to the end user, only the custom one must be visible.
I created a vRO workflow to delete the deployment using a REST API call. 
Everything works fine if both actions are enabled in the policy definition.
If i remove the default "Delete" action from the policy definition, i run into a permission issue.
This is the message i receive from the vRA REST host when attempting to delete the deployment:

{"message":"Action 'Deployment.Delete' is forbidden by access control policy. Contact your administrator if you want to be granted access.","statusCode":403,"errorCode":20031}

How can i hide the default "Delete" deployment button while preserving the delete deployment permissions?

Thank you!

Note: vRA version is 8.14.1

xian's profile image

I'd create a dedicated service user, and allow this user to delete deployments by a Day 2 Action policy.

Then use this user via REST API to delete deployment.