OCI Notifications are subscription topics for sending messages to channels like email, rest or pager when things happen.


Example
In the following example we are sending a notification when the start job of an autonomous database fails, for example if the database is already started.
# oci db autonomous-database start --autonomous-database-id ocid1.autonomousdatabase.oc1.eu-frankfurt-1.abtheljr3....6kfsvmxnge2q || { # send notification as it failed oci ons message publish --topic-id ocid1.onstopic.oc1.eu-frankfurt-1.aaaaaaa...enmktkzyla --title "ATP start failed" --body "Take a look at the build job logs"; # exiting saying it failed exit 1; } #
That’s all folks! Hope it helps 🙂