Symptoms:
{
"message": "Policy not supported for creating an existing entry that is waiting for clean up.",
"statusCode": 400,
"errorCode": 50019
}
Aria Automation 8.18.1
This is because there is another existing policy in Aria Automation that uses this ID.
This is the expected behavior,you need to delete the policy first.
After deletion,the policy will remain in a soft-deleted state and won't be removed from the database until all the dependent decisions are removed.
You can check the decisions of the policy in Service Broker -> Content and Policies -> Enforcement.
Search for "lease policy", all results listed are decisions.
Once all these decisions are deleted the policy is physically deleted from the DB and you will be able to create a new one with the same ID.