Simple example here of leveraging OIC to interact with OCI Notifications -
So what does the OCI Notification Service offer us?
The Oracle Cloud Infrastructure Notifications service broadcasts messages to distributed components through a publish-subscribe pattern, delivering secure, highly reliable, low latency and durable messages for applications hosted on Oracle Cloud Infrastructure and externally. Use Notifications to get notified when event rules are triggered or alarms are breached, or to directly publish a message.
More details here
Create the Notification Artifacts
So off I go to OCI -
I create a Topic -
I add a Subscription -
Note the supported protocols -
I choose Email and enter my email address - I then receive an email asking me to confirm -
I click on Confirm Subscription - thus activating the subscription in OCI -
Ok, so that's the Notification setup complete.
There are a couple of more steps I need to execute in OCI, before creating the integration in OIC
Generate API Key in OCI
I downloaded GIT - started GITBash and entered the commands to create the private and public keys -
The keys were stored in the following directory -
I uploaded the public key to OCI and, as they say, the rest is history.
Create the connection in OIC
The REST API for Notifications is relatively simple -
Here is the link to the REST API doc.
Now the integration is simple -
REST trigger and then the Invoke to Publish a Message -
SendNotification is configured as follows -
Map as follows -
Note: I hardcode the topic ocid here.
Now to a test -
I receive the email -
No comments:
Post a Comment