SDK for Ruby Cloud Shell Quick Start
This quick start shows you how to quickly get started running sample code with the Oracle Cloud Infrastructure SDK for Ruby using Cloud Shell.
The OCI SDK for Ruby is installed in the cloud shell environment and automatically added to the GEM_PATH
.
- Sign in to the Console.
- Click the Cloud Shell icon in the Console header. Note that Cloud Shell runs commands against the region selected in the Console's Region selection menu when Cloud Shell was started.
- Create a file named
list_users_example.rb
with the following code, which lists the users in the tenancy:require 'oci' api = OCI::Identity::IdentityClient.new() response = api.list_users(OCI.config.tenancy) response.data.each { |user| puts user.name }
- Run the example:
ruby list_users_example.rb