/oracle-functions-samples

Examples demonstrating how to use Oracle Functions

Universal Permissive License v1.0UPL-1.0

Oracle Functions Samples

Oracle Functions logo

This repository provides examples demonstrating how to use Oracle Functions.

Setup

Basic Observability Guidance

How To

Description Python Java
Hello World sample sample
List OCI Compute instances sample sample
Control OCI Compute instances (start/stop/status) sample
List OCI compartments sample
List objects in OCI Object Storage sample sample
Read an object in OCI Object Storage sample sample
Create an object in OCI Object Storage sample sample
Create a PAR in OCI Object Storage sample
Copy object from one OCI Object Storage bucket to another sample
Display an OCI Cloud Event sample
Invoke another Function using the OCI SDK sample
Run a SQL statement against Autonomous DB using ORDS sample
Run a SQL statement against Autonomous DB using DB Client sample
Publish a notification using ONS sample
Send an email using Email Delivery Service sample
Decrypt cipher using Vault keys sample
Get a secret from Vault sample
Write IAM policies that enables Functions in a tenancy to access resources in other tenancies sample
Trace a function with APM and add custom child spans using Zipkin sample

Functions and API Gateway

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

Description Python Java
API Gateway Function authorizer for IDCS sample
Function that returns the API Gateway HTTP request information for testing sample
Validate an API key sample
BasicAuth Validation with IDCS sample

Using Service Connector Hub with Functions

Description Code
Logging >> Service Connector Hub >> Functions
Move logs from OCI to Datadog using Service Connector Hub, Logging (Source), Functions (Target) and Datadog sample
Send SMS messages for logs using Service Connector Hub, Logging (Source), Functions (Target) and Syniverse SMS sample
Streaming >> 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

Description Code
Provide the size of an image (Custom Dockerfile, image library) sample
Automatically load data from Object Storage into Autonomous DataWarehouse sample
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 it sample
Send SMS messages for monitoring alarms using Monitoring, Notifications Service, Functions and Syniverse SMS sample
Export a collection of historical metrics from Monitoring Service using the Monitoring Query Language (MQL) sample

Community-led Examples

Description Code Blog
Serverless SaaS Extensions using Oracle Functions, API Gateway and VBCS repo blog
Function that demonstrates connectivity between Oracle SaaS applications with OIC sample

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

License

See LICENSE