SDK for Go

The Oracle Cloud Infrastructure SDK for Go enables you to write code to manage Oracle Cloud Infrastructure resources.

This SDK and sample is dual-licensed under the Universal Permissive License 1.0 and the Apache License 2.0; third-party content is separately licensed as described in the code.

Download: Download the SDK from GitHub.

Documentation: The reference documentation is available from Oracle here and at


Cloud Shell: The SDK for Go is pre-configured with your credentials and ready to use immediately from within Cloud Shell. For more information on using the SDK for Go from within Cloud Shell, see SDK for Go Cloud Shell Quick Start.

Oracle Linux Cloud Developer image: The SDK for Go is pre-installed on the Oracle Linux Cloud Developer platform image. For more information, see Oracle Linux Cloud Developer.

Services Supported

  • AI Language
  • Analytics Cloud
  • Announcements
  • API Gateway
  • Application Migration
  • Application Performance Monitoring
  • Audit
  • Autoscaling (Compute)
  • Bastion
  • Big Data
  • Blockchain Platform
  • Budgets
  • Compute Instance Agent (Oracle Cloud Agent)
  • Container Engine for Kubernetes
  • Content and Experience
  • Core Services (Networking, Compute, Block Volume)
  • Cloud Guard
  • Data Catalog
  • Data Flow
  • Data Integration
  • Data Safe
  • Data Science
  • Data Transfer
  • Database
  • Database Management
  • Database Migration
  • Digital Assistant
  • DNS
  • Email Delivery
  • Events
  • File Storage
  • Functions
  • Generic Artifacts
  • GoldenGate
  • Health Checks
  • IAM
  • Integration Cloud
  • Java Management
  • Key Management (for the Vault service)
  • Limits
  • Load Balancing
  • Logging
  • Logging Analytics
  • Logging Search
  • Logging Ingestion
  • Management Agent Cloud
  • Management Dashboard
  • Marketplace
  • Monitoring
  • MySQL Database
  • Network Load Balancing
  • Networking Topology
  • NoSQL Database Cloud
  • Notifications
  • Object Storage
  • OCI Registry
  • Operations Insights
  • Operator Access Control
  • Optimizer
  • Organizations
  • OS Management
  • Quotas
  • Resource Manager
  • Roving Edge Infrastructure
  • Search
  • Secret Management (for the Vault service)
  • Service Catalog
  • Service Connector Hub
  • Streaming
  • Support Management
  • Usage
  • VMWare Solution
  • Vulnerability Scanning
  • Web Application Acceleration and Security
  • Work Requests (Compute, Database)

Installing with yum

If you're using Oracle Linux 7 or 8, you can use yum to install the OCI SDK for Go. GoLang 1.16.3 will also be installed.

For Oracle Linux 7:

sudo yum-config-manager --enable ol7_developer
sudo yum install go-oci-sdk
For Oracle Linux 8:
sudo yum-config-manager --enable ol8_developer
sudo yum install go-oci-sdk

The OCI Go SDK will be located in/usr/share/gocode/src/

Golang 1.16.3 enables the go module by default, even when no go.mod is present. You need to turn the go module off to ensure that the OCI Go SDK can be referenced from the filesystem where yum installed the Go SDK. To do so, set the following environment variables:
export GOPATH=/usr/share/gocode
export GO111MODULE=off