This creates a single-clause policy, writes
~/.esper/data/policies/login-policy.json, and submits it to Esper.
--action, --entity, and --mitigation accept UUIDs or local data names.
Use --file for multi-clause or advanced policy payloads.
Apply policy (idempotent)
esper policy apply --file ./policy.json
The apply command creates or updates based on policy_id presence in the JSON:
With policy_id: Updates existing policy
Without policy_id: Creates new policy
Best PracticeUse apply in CI/CD pipelines for declarative policy management.