Skip to content

oracle-samples/oracle-functions-samples

Repository files navigation

Oracle Functions Samples

Oracle Functions logo

This repository provides examples demonstrating how to use Oracle Functions.

Setup

Basic Observability Guidance

How To

DescriptionPythonJava
Hello Worldsamplesample
List OCI Compute instancessamplesample
Control OCI Compute instances (start/stop/status)sample
List OCI compartmentssample
List objects in OCI Object Storagesamplesample
Read an object in OCI Object Storagesamplesample
Create an object in OCI Object Storagesamplesample
Create a PAR in OCI Object Storagesample
Copy object from one OCI Object Storage bucket to anothersample
Display an OCI Cloud Eventsample
Invoke another Function using the OCI SDKsample
Run a SQL statement against Autonomous DB using ORDSsample
Run a SQL statement against Autonomous DB using DB Clientsample
Publish a notification using ONSsample
Send an email using Email Delivery Servicesample
Decrypt cipher using Vault keyssample
Get a secret from Vaultsample
Write IAM policies that enables Functions in a tenancy to access resources in other tenanciessample
Trace a function with APM and add custom child spans using Zipkinsample

Functions and API Gateway

Oracle Cloud Functions and OCI API Gateway together enable developers to create serverless APIs and perform function based authorization.

DescriptionPythonJava
API Gateway Function authorizer for IDCSsample
Function that returns the API Gateway HTTP request information for testingsample
Validate an API keysample
BasicAuth Validation with IDCSsample

Using Service Connector Hub with Functions

DescriptionCode
Logging >> Service Connector Hub >> Functions
Move logs from OCI to Datadog using Service Connector Hub, Logging (Source), Functions (Target) and Datadogsample
Send SMS messages for logs using Service Connector Hub, Logging (Source), Functions (Target) and Syniverse SMSsample
>> Service Connector Hub >> Functions
Convert JSON to CSV format using Service Connector Hub, Streams (Source and Target) and Functions (Task)sample
Convert JSON to Parquet format using Service Connector Hub, Streams (Source and Target) and Functions (Task)sample

Other Use Cases

DescriptionCode
Provide the size of an image (Custom Dockerfile, image library)sample
Automatically load data from Object Storage into Autonomous DataWarehousesample
Automatically resize VM on High Memory Alerts (Notifications trigger a function)sample
Check if a compute instance is tagged correctly on provisioning, if not, stop itsample
Send SMS messages for monitoring alarms using Monitoring, Notifications Service, Functions and Syniverse SMSsample
Export a collection of historical metrics from Monitoring Service using the Monitoring Query Language (MQL)sample

Community-led Examples

DescriptionCodeBlog
Serverless SaaS Extensions using Oracle Functions, API Gateway and VBCSrepoblog
Function that demonstrates connectivity between Oracle SaaS applications with OICsample

Documentation

You can find the online documentation for Oracle Functions at docs.oracle.com and information about the Fn project at https://fnproject.io/.

Contributing

See CONTRIBUTING

Security

Please consult the security guide for our responsible security vulnerability disclosure process

License

See LICENSE