Skip to content

Event Target for Oracle Cloud

This event Target sends and receives CloudEvents over HTTP and calls a targeted Oracle Cloud Service.

Prerequisite(s)

  • Oracle API signing key

Oracle API Signing Key

You can find the steps to obtain an API signing key in the Oracle Developer Guide.

Consult the Secrets guide for more information about how to add the Oracle API signing key as a secret.

Deploying an Instance of the Target

Open the Bridge creation screen and add a Target of type Oracle.

In the Target creation form, provide a name for the event Target and add the following information:

  • Oracle Secrets: Reference to a TriggerMesh secret containing the Oracle API signing key as discussed in the prerequisites.
  • Oracle Tenancy: The OCID of tenant that holds the service being invoked.
  • Oracle Username: The OCID of the user that owns the API key discussed in the prerequisites, and will be invoking the service.
  • Oracle Region: The Oracle Cloud region hosting the service.
  • Function: The OCID of the Oracle Cloud function being invoked.

After clicking the Save button, the console will self-navigate to the Bridge editor. Proceed by adding the remaining components to the Bridge.

After submitting the Bridge, and allowing for some configuration time, a green check mark on the main Bridges page indicates that the Bridge with a Datadog event Target was successfully created.

Supported Oracle Cloud Service Events

Functions

The Oracle Cloud Functions event Target is designed to allow for free-form JSON objects to be passed directly to the function and rely on the Oracle Cloud function to perform whatever action is desired.

The function itself can return a freeform JSON object that can be processed by another event trigger. The CloudEvent type will always be functions.oracletargets.targets.triggermesh.io with the function OCID defined as a part of the CloudEvent source and a metadata ID used to uniquify the specific event that called the function.

Oracle Function Example

curl -vvv http://oracletarget \
  -X POST \
  -H 'Content-Type: application/json' \
  -H 'Ce-Specversion: 1.0' \
  -H 'Ce-Id: foo-1' \
  -H 'Ce-Type: testfunc.functions.oracle.triggermesh.io' \
  -H 'Ce-Source: h2g2.guide' \
  -d '{"message": "A new user wants to say something: hello from triggermesh"}'

[...]
< HTTP/2 200
< ce-id: 9ab5e1f0-9713-405e-816c-1ba2739a7358
< ce-source: ocid1.fnapp.oc1.phx.aaaaaaaaaehdhsmharxvyp4pvnsgsnd35am5u7ckjzivwmsmove37eckjika
< ce-specversion: 1.0
< ce-subject: ocid1.fnfunc.oc1.phx.aaaaaaaaaajrgy4on66e6krko73h2im5qaiiagecg5hmbcqib2kpbzlcy3bq
< ce-time: 2020-08-03T19:04:55.381594978Z
< ce-type: functions.oracletargets.targets.triggermesh.io
< content-length: 86
< content-type: application/json
< date: Mon, 03 Aug 2020 19:04:55 GMT
< x-envoy-upstream-service-time: 1497
< server: istio-envoy
<
* Connection #0 to host oracletarget left intact
{"processed":{"message": "A new user wants to say something: hello from triggermesh"}}