Sentinel policy that restricts resource deletion in TF-Cloud

I was trying to create a sentinel policy to restrict the deletion of resources in TF-Cloud based on the TF plan output. Please help me if I am missing something with the code?
import “tfplan”

Deny deletion of all resources

deny_deletion = rule {
all tfplan.resources as _, resource {
resource.change.actions contains “delete”

main = rule {