/oci-shell-scripts

OCI shell scripts utils

Primary LanguageShell

Shell utils for OCI Command Line Interface and API

  • ocurl.sh wrap the oci-curl.sh script provided by Oracle, adding profile selection.
  • oci-show-regions.sh list subscribed regions using the default configuration in your CLI profile
  • oci-show-profiles.sh list the available profiles in your ~/.oci/config file

ocurl

Add profile-based configuration and better url handling to the oci-curl sample code provided in OCI documentation. Use either the profile name provided in input, the OCI_CLI_PROFILE environment variable if it is set and not empty, or the DEFAULT profile.

Usage:

ocurl [-h] | [-p PROFILE] [-f CONFIG_PATH] [file-to-send-as-body] [extra-curl-args]

examples:

ocurl iaas.us-ashburn-1.oraclecloud.com get "/20160918/instances?compartmentId=some-compartment-ocid"

ocurl -p MYCONFIG iaas.us-ashburn-1.oraclecloud.com get "/20160918/instances?compartmentId=some-compartment-ocid"

ocurl iaas.us-ashburn-1.oraclecloud.com post ./request.json "/20160918/vcns"