### OCI CLI Installation Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst Instructions for installing the OCI CLI, including support for script directory options and Homebrew installation. ```APIDOC ## OCI CLI Installation ### Description Instructions for installing the OCI CLI with support for script directory options on various operating systems and via Homebrew. ### Method Installation script execution ### Endpoint N/A (Local Installation) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```bash # For non-interactive installations on Mac, Linux, and Windows ./install.sh --script-dir # Linux/Mac .\install.ps1 -ScriptDir # Windows # Using Homebrew brew update && brew install oci-cli ``` ### Response #### Success Response (Installation Complete) Installation completes successfully. #### Response Example N/A ``` -------------------------------- ### OCI CLI Autocomplete Setup Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst Command to set up OCI CLI autocomplete, creating a symlink to the current CLI version's script. ```APIDOC ## Setup Autocomplete ### Description Configures shell autocompletion for the OCI CLI. This command creates a symbolic link pointing to the `oci_autocomplete.sh` script of the current CLI version. ### Method Setup ### Endpoint oci setup autocomplete ### Parameters (No specific parameters are typically required for basic setup. Refer to OCI CLI documentation for advanced configuration options.) ### Response (The command typically provides output indicating successful setup or instructions for shell configuration.) ### Response Example ```bash Run the following command in your shell: source /path/to/your/oci_autocomplete.sh ``` ``` -------------------------------- ### Non-interactive Linux OCI CLI Installation Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst Example of a non-interactive installation for the OCI CLI on Linux systems using install.sh. Supports various options for customization. ```bash ./install.sh --accept-all-defaults --python-install-location --optional-features [db] --install-dir --exec-dir --update-path-and-enable-tab-completion --rc-file-path --oci-cli-version --help ``` -------------------------------- ### Install 'o' Wrapper Script on Linux/macOS Source: https://github.com/oracle/oci-cli/blob/master/scripts/examples/project_o/README.md Installs the 'o' wrapper script by downloading it from GitHub, making it executable, and placing it in the user's PATH. It also downloads the 'oci_commands' file for 'o' to use. ```bash src=https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/examples/project_o && curl -so o $src/o && chmod +x o && curl -so $HOME/.oci/oci_commands $src/oci_commands [ -d $HOME/bin ] && ( mv o $HOME/bin && printf "\no installed in $HOME/bin/o\n" ) || ( where=$(which oci) && to=${where%ci} && [ -w $to ] && ( mv o $to && printf "\no installed in $to\n" ) || printf "\n$to: not writable\nTry:\n sudo mv o $to\nor\n mkdir $HOME/bin && mv o $HOME/bin\n" ) ``` -------------------------------- ### OCI Setup Configuration Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst Commands for configuring OCI CLI settings, including how to indicate no passphrase for RSA keys. ```APIDOC ## OCI Setup Config ### Description Configures the OCI CLI settings. For RSA keys, 'N/A' is now used to indicate no passphrase, replacing an empty string. ### Method CLI Command ### Endpoint oci setup config ## OCI Setup Keys ### Description Manages OCI CLI keys. The indication for no passphrase for RSA keys has changed from an empty string to 'N/A'. ### Method CLI Command ### Endpoint oci setup keys ``` -------------------------------- ### Example: List Subnets with Resource Names Source: https://github.com/oracle/oci-cli/blob/master/scripts/examples/project_o/README.md Demonstrates how 'o' transforms a simplified command using resource names ('subn', 'sales', 'west') into a full 'oci' command with OCIDs and the '--all' flag. ```bash $ o list subn -c sales -v west -a ``` -------------------------------- ### Example: Formatted Compute Instance Output Source: https://github.com/oracle/oci-cli/blob/master/scripts/examples/project_o/README.md Presents the human-readable output generated by 'o' for compute instances, displaying selected details like display name, shape, OCPUs, and lifecycle state. ```text display-name shape ocpus lifecycle-state atos VM.Standard.E4.Flex 1.0 STOPPED cron VM.Standard.A1.Flex 1.0 RUNNING zara VM.Standard2.4 4.0 RUNNING humans VM.Standard2.1 1.0 STOPPED robotics VM.Standard.E2.1 1.0 RUNNING ``` -------------------------------- ### OCI CLI: Generate Parameter JSON Example Source: https://context7.com/oracle/oci-cli/llms.txt Demonstrates generating a JSON example for specific parameters of a command, such as the `agent-config` for launching an instance. This helps in understanding the required JSON structure for complex parameters. ```bash oci compute instance launch --generate-param-json-input agent-config ``` -------------------------------- ### Example: Human-Readable Output Formatting Source: https://github.com/oracle/oci-cli/blob/master/scripts/examples/project_o/README.md Illustrates 'o's ability to format output for human readability, selecting specific fields (name, shape, ocpus, state) from a list of compute instances. ```bash $ o -o name#shape#shape-conf.ocpus#state list comp inst -c kevco. ``` -------------------------------- ### Example: OCI Command Generated by 'o' Source: https://github.com/oracle/oci-cli/blob/master/scripts/examples/project_o/README.md Shows the expanded 'oci' command that 'o' generates from a simplified input, including compartment and VCN OCIDs, and the '--all' flag. ```bash $ oci network subnet list \ --compartment-id ocid1.compartment.oc1..aaaaaaaaid7ybnzph4hmx46tohdg6cnclyc343hkevcosxwcsmycxamcujfa \ --vcn-id ocid1.vcn.oc1.iad.aaaaaaaaxlfwxbld5nvhzgkot7p5dj52qv52lesn3kevcocemubg5uy6pj5q --all ``` -------------------------------- ### Install OCI CLI using Homebrew Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst This snippet shows how to install the OCI CLI using the Homebrew package manager on macOS and Linux systems. It requires Homebrew to be installed and updated. ```bash brew update && brew install oci-cli ``` -------------------------------- ### Non-interactive Windows OCI CLI Installation Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst Example of a non-interactive installation for the OCI CLI on Windows systems using install.ps1. Supports various options for customization. ```powershell .\install.ps1 -AcceptAllDefaults -PythonInstallLocation -OptionalFeatures [db] -UpdatePathAndEnableTabCompletion -OciCliVersion ``` -------------------------------- ### OCI CLI Command Shortcuts with 'o' Source: https://github.com/oracle/oci-cli/blob/master/scripts/examples/project_o/README.md Illustrates how 'o' simplifies common OCI CLI commands by accepting shorter inputs and providing shortcuts for structured search queries. Examples include compartment and lifecycle state filtering. ```bash # Example of shortcut for structured search o structured-search --query-text "query all resources where (c = sales || c = kevco) && l != terminated" ``` -------------------------------- ### Install OCI CLI using pip Source: https://context7.com/oracle/oci-cli/llms.txt Installs the OCI CLI using the Python package installer (pip). This method requires Python and pip to be installed and configured. ```bash pip install oci-cli ``` -------------------------------- ### OCI CLI Bulk Upload: Basic File Upload Source: https://github.com/oracle/oci-cli/blob/master/services/object_storage/docs/inline-help/os.txt This example demonstrates the basic usage of the 'oci os object bulk-upload' command to upload all files from a specified local directory to an OCI Object Storage bucket. It requires the namespace, bucket name, and the source directory path. ```bash oci os object bulk-upload -ns mynamespace -bn mybucket --src-dir path/to/upload/directory ``` -------------------------------- ### Interactively Configure OCI CLI Source: https://context7.com/oracle/oci-cli/llms.txt Initiates an interactive setup process to create the OCI CLI configuration file. This involves providing user OCID, tenancy OCID, region, and optionally generating API signing keys. ```bash # Start the interactive config setup oci setup config # Example prompts and responses: # Enter a location for your config [/home/user/.oci/config]: # Enter a user OCID: ocid1.user.oc1..aaaaaaaexample # Enter a tenancy OCID: ocid1.tenancy.oc1..aaaaaaaexample # Enter a region by index or name: us-phoenix-1 # Do you want to generate a new API Signing RSA key pair? [Y/n]: Y # Enter a directory for your keys to be created [/home/user/.oci]: # Enter a name for your key [oci_api_key]: # Enter a passphrase for your private key: # After setup, test your configuration: oci iam user get --user-id ocid1.user.oc1..aaaaaaaexample ``` -------------------------------- ### Install OCI CLI on Windows (Non-Interactive) Source: https://github.com/oracle/oci-cli/blob/master/scripts/install/README.rst Downloads the install.ps1 script to the local directory and then executes it with the -AcceptAllDefaults option for non-interactive installation on Windows. This bypasses user prompts for automated setups. ```powershell (New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.ps1') > install.ps1 .\install.ps1 -AcceptAllDefaults ``` -------------------------------- ### OCI CLI Advanced JSON Options Example Source: https://github.com/oracle/oci-cli/blob/master/services/object_storage/docs/inline-help/os.txt Demonstrates how to use a JSON file to provide input for OCI CLI commands, specifically for the object restore command. This allows for complex configurations and managing multiple options efficiently. The key names in the JSON should match command option names (converted to camelCase), and values can be JSON arrays for multi-value options. ```json { "namespaceName": "mynamespace", "bucketName": "mybucket", "name": "myfile.txt", "hours": 72 } ``` -------------------------------- ### Install OCI CLI on Fedora Linux Source: https://github.com/oracle/oci-cli/blob/master/README.rst This command installs the OCI CLI on Fedora Linux using the dnf package manager. It installs the oci-cli package. ```bash sudo dnf install oci-cli ``` -------------------------------- ### Install OCI CLI with Script Directory Option Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst This snippet demonstrates how to use the script directory option for non-interactive installations of the OCI CLI on Mac, Linux, and Windows. It specifies a custom directory for installation scripts. ```bash ./install.sh --script-dir ``` ```powershell .\install.ps1 -ScriptDir ``` -------------------------------- ### OCI CLI: Help Option Source: https://github.com/oracle/oci-cli/blob/master/services/object_storage/docs/inline-help/os.txt This snippet shows the standard help options for OCI CLI commands. Using '-?', '-h', or '--help' provides detailed information about a specific command, including its usage, options, and examples. ```bash --help ``` -------------------------------- ### Install OCI CLI on Windows using PowerShell Source: https://github.com/oracle/oci-cli/blob/master/README.rst This command installs the OCI CLI on Windows by executing a PowerShell script. It bypasses execution policy restrictions and downloads the installation script. ```powershell powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.ps1'))" ``` -------------------------------- ### Corrected Help Text for Object Storage Bucket Get (OCI CLI) Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst The help text for the '--fields' parameter in the 'oci os bucket get' command has been corrected in the Object Storage Service to accurately reflect its usage. ```bash oci os bucket get --bucket-name --fields ``` -------------------------------- ### OCI CLI: Budgets Processing Period Start Offset Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst Allows setting an offset to start budget processing in the Budgets service. This provides flexibility in defining budget calculation periods. ```bash oci budgets budget create --budget-processing-period-start-offset ``` ```bash oci budgets budget update --budget-processing-period-start-offset ``` -------------------------------- ### Install OCI CLI on Mac OS X using Homebrew Source: https://github.com/oracle/oci-cli/blob/master/README.rst This command installs the OCI CLI on macOS using the Homebrew package manager. Ensure Homebrew is installed before running this command. ```bash brew install oci-cli ``` -------------------------------- ### Download and Install 'o' Script Source: https://github.com/oracle/oci-cli/blob/master/scripts/examples/project_o/README.md This snippet shows how to download the 'o' script using curl and add it to your system's PATH. It also mentions the requirement for PATHEXT to include '.PY' for execution on Windows. ```bash curl -o o.py https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/examples/project_o/o ``` -------------------------------- ### Control Digital Assistant Instances (OCI CLI) Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst Commands to start and stop Oracle Digital Assistant (ODA) instances. Requires appropriate permissions to manage ODA resources. ```bash oci oda instance start ``` ```bash oci oda instance stop ``` -------------------------------- ### Install OCI CLI on macOS/Linux (Non-Interactive) Source: https://github.com/oracle/oci-cli/blob/master/scripts/install/README.rst Downloads the install.sh script locally and then executes it with the --accept-all-defaults option for non-interactive installation on macOS and Linux. This is useful for automated deployments where user prompts should be skipped. ```bash curl -L -O https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh ./install.sh --accept-all-defaults ``` -------------------------------- ### Setup OCI CLI Autocomplete Source: https://context7.com/oracle/oci-cli/llms.txt Enables tab completion for OCI CLI commands and parameters in your shell. This typically involves running a wizard that configures your shell's profile file. ```bash # Run the autocomplete setup wizard oci setup autocomplete # For bash shells, this will: # 1. Create a symlink to the completion script # 2. Add source command to your .bashrc or .bash_profile # 3. Restart terminal or source the rc file to activate # Test autocomplete by typing: oci ``` -------------------------------- ### Install OCI CLI on Windows (Interactive) Source: https://github.com/oracle/oci-cli/blob/master/scripts/install/README.rst Installs the OCI CLI on Windows using the install.ps1 script executed from an elevated PowerShell console. It first sets the execution policy and then downloads and runs the script interactively. ```powershell Set-ExecutionPolicy RemoteSigned powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.ps1'))" ``` -------------------------------- ### Install OCI CLI on macOS/Linux (Interactive) Source: https://github.com/oracle/oci-cli/blob/master/scripts/install/README.rst Executes the install.sh script directly from GitHub to install the OCI CLI on macOS and Linux systems in interactive mode. This method ensures the latest script version is used and prompts the user for configuration. ```bash bash -c "$(curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh)" ``` -------------------------------- ### Install 'o' Wrapper Script on Windows Source: https://github.com/oracle/oci-cli/blob/master/scripts/examples/project_o/README.md Downloads the 'o' wrapper script for Windows. Users need to manually copy the downloaded 'o.py' file to a location in their PATH and potentially update PATHEXT to execute it as 'o'. ```bash curl -so o.py https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/examples/project_o/o ``` -------------------------------- ### Create OCI Instance Configuration with Boot Volume Size Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst Command to create an OCI instance configuration, allowing specification of the boot volume size in GB. Requires instance details. ```bash oci compute-management instance-configuration create --instance-details ``` -------------------------------- ### List and Manage OCI Compute Instances Source: https://context7.com/oracle/oci-cli/llms.txt Commands for managing OCI compute instances, including listing, launching, starting, stopping, rebooting, and terminating instances. Requires compartment and instance OCIDs. ```bash # List all instances in a compartment oci compute instance list --compartment-id ocid1.compartment.oc1..aaaaaaaexample # List instances with specific lifecycle state oci compute instance list \ --compartment-id ocid1.compartment.oc1..aaaaaaaexample \ --lifecycle-state RUNNING # Get detailed instance information oci compute instance get --instance-id ocid1.instance.oc1.phx.aaaaaaaexample # Launch a new instance oci compute instance launch \ --compartment-id ocid1.compartment.oc1..aaaaaaaexample \ --availability-domain "AD-1" \ --shape "VM.Standard.E4.Flex" \ --shape-config '{"ocpus": 2, "memoryInGBs": 16}' \ --subnet-id ocid1.subnet.oc1.phx.aaaaaaaexample \ --image-id ocid1.image.oc1.phx.aaaaaaaexample \ --display-name "my-instance" # Start/Stop/Reboot instances oci compute instance action --instance-id ocid1.instance.oc1.phx.aaaaaaaexample --action START oci compute instance action --instance-id ocid1.instance.oc1.phx.aaaaaaaexample --action STOP oci compute instance action --instance-id ocid1.instance.oc1.phx.aaaaaaaexample --action SOFTRESET # Terminate an instance oci compute instance terminate --instance-id ocid1.instance.oc1.phx.aaaaaaaexample --force ``` -------------------------------- ### Manage Object Storage Replication Policies Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst Introduces support for Cross-Region Replication in the Object Storage Service. Includes commands to create, delete, get, list replication policies, list replication sources, and make buckets writable. ```bash oci os replication create-replication-policy ``` ```bash oci os replication delete-replication-policy ``` ```bash oci os replication get-replication-policy ``` ```bash oci os replication list-replication-policies ``` ```bash oci os replication list-replication-sources ``` ```bash oci os replication make-bucket-writable ``` -------------------------------- ### Create Exadata Database from Backup Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst Introduces functionality to create Exadata databases directly from a backup. This streamlines the process of restoring or provisioning Exadata databases. ```bash oci db database create-database-from-backup ``` -------------------------------- ### OCI CLI Bulk Upload: Prefixing Object Names Source: https://github.com/oracle/oci-cli/blob/master/services/object_storage/docs/inline-help/os.txt This example shows how to upload files in bulk while prefixing their names in Object Storage. The '--object-prefix' option allows you to group uploaded files under a specific path within the bucket, which is useful for organization and avoiding name collisions. ```bash oci os object bulk-upload -ns mynamespace -bn mybucket --src-dir path/to/upload/directory --object-prefix my-prefix/ ``` -------------------------------- ### Manage DB Home Resources (OCI CLI) Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst Provides commands to create, get, delete, and list DB Home resources within the Oracle Cloud Infrastructure Database service. Requires specifying DB System OCID or DB Home OCID. ```bash oci db db-home create --db-system-id --db-version ``` ```bash oci db db-home get --db-home-id ``` ```bash oci db db-home delete --db-home-id ``` ```bash oci db db-home list --compartment-id ``` -------------------------------- ### OCI CLI: Configure Instance Platform Configuration (AMD_MILAN_BM) Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst Enables configuration of the platform settings for launching an Instance, specifically supporting the AMD_MILAN_BM type with NUMA node configuration. This allows for fine-grained control over compute instance hardware. ```bash oci compute instance launch --platform-config '{"type":"AMD_MILAN_BM","numaNodesPerSocket":"NPS1"}' ``` -------------------------------- ### Install OCI CLI on Oracle Linux 7 Source: https://github.com/oracle/oci-cli/blob/master/README.rst This command installs the OCI CLI on Oracle Linux 7 using the yum package manager. It specifically installs the python36-oci-cli package. ```bash sudo yum install python36-oci-cli ``` -------------------------------- ### Manage Database Console Connections Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst Provides commands for managing console connections to database systems. This includes creating, deleting, getting, and listing console connections, requiring specific IDs and node information. ```bash oci db console-connection create --db-node-id --public-key ``` ```bash oci db console-connection delete --console-connection-id --db-node-id --force ``` ```bash oci db console-connection get --console-connection-id --db-node-id ``` ```bash oci db console-connection list --db-node-id --all-pages ``` -------------------------------- ### POST /oci db system launch-from-backup Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst Launches a database system from a backup. This command supports IPv6 address. ```APIDOC ## POST /oci db system launch-from-backup ### Description Launches a database system from a backup. ### Method POST ### Endpoint /oci db system launch-from-backup ### Parameters #### Request Body - **private-ip-v6** (string) - Optional - IPv6 address. ### Request Example ```json { "private-ip-v6": "2001:db8::1" } ``` ### Response #### Success Response (200) - **dbSystem** (object) - The launched database system. #### Response Example ```json { "dbSystem": { "id": "ocid1.dbsystem.uniqueID", "hostname": "hostname" } } ``` ``` -------------------------------- ### OCI Fleet Application Management Onboarding Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst This set of commands provides functionality for managing the onboarding process within the Fleet Application Management Service. It includes operations to get onboarding status, enable policies, manage settings, update, and delete onboarding configurations. ```bash oci fleet-apps-management fleet-apps-management-admin onboarding get oci fleet-apps-management fleet-apps-management-admin onboarding enable-latest-policy oci fleet-apps-management fleet-apps-management-admin onboarding manage-settings oci fleet-apps-management fleet-apps-management-admin onboarding update oci fleet-apps-management fleet-apps-management-admin onboarding delete ``` -------------------------------- ### OCI Object Storage Object Operations Source: https://github.com/oracle/oci-cli/blob/master/services/object_storage/docs/inline-help/os.txt This section provides an overview and specific examples of various OCI CLI commands for managing objects within an Object Storage bucket, including bulk operations, individual object management, and restore functionalities. ```APIDOC ## OCI Object Storage Object Management Commands ### Description This document outlines the various commands available in the OCI CLI for managing objects within an Object Storage bucket. These commands cover bulk operations, individual object retrieval, modification, deletion, and restoration. ### Method Various (GET, POST, PUT, DELETE, etc. - specific to each command) ### Endpoint N/A (CLI commands) ### Commands Overview - **bulk-delete**: Deletes all objects in a bucket matching specified criteria. - **bulk-download**: Downloads all objects matching specified criteria from a bucket. - **bulk-upload**: Uploads all files from a directory to a bucket. - **copy**: Creates a request to copy an object within the same or a different bucket. - **delete**: Deletes a single object. - **get**: Retrieves the metadata and body of an object. - **head**: Retrieves the user-defined metadata and entity tag of an object. - **list**: Lists the objects within a bucket. - **put**: Creates a new object or overwrites an existing one. - **rename**: Renames an object within a bucket. - **restore**: Restores one or more specified objects. - **restore-status**: Retrieves the restore status for an object. - **resume-put**: Resumes a previously interrupted multipart put operation. ### Parameters (General for Object Commands) #### Query Parameters - **-ns, --namespace-name** (TEXT) - Required - The Object Storage namespace. - **-bn, --bucket-name** (TEXT) - Required - The name of the bucket. - **--object-name** (TEXT) - Required for single object operations - The name of the object. - **--prefix** (TEXT) - Optional - Filters objects by a specified prefix (used in bulk operations and list). - **--region** (TEXT) - Optional - The OCI region. - **--compartment-id** (TEXT) - Optional - The compartment OCID. - **--from-json** (TEXT) - Optional - Provide input using a JSON document from a file. - **-?, -h, --help** - Displays detailed help information. ### Example: Bulk Delete Objects by Prefix #### Description Deletes all objects in a specified bucket that match a given prefix. #### Method `oci os object bulk-delete` #### Endpoint N/A (CLI command) #### Parameters ##### Query Parameters - **-ns, --namespace-name** (TEXT) - Required - The Object Storage namespace. - **-bn, --bucket-name** (TEXT) - Required - The name of the bucket. - **--prefix** (TEXT) - Required - The prefix to match objects for deletion. #### Request Example ```bash oci os object bulk-delete -ns "your_namespace" -bn "your_bucket" --prefix "logs/" ``` #### Response ##### Success Response (200) Indicates the successful initiation or completion of the bulk delete operation. ##### Response Example (CLI command output indicating success) ``` -------------------------------- ### Initialize 'o' Wrapper Script Source: https://github.com/oracle/oci-cli/blob/master/scripts/examples/project_o/README.md Initializes the 'o' wrapper script by generating the 'oci_commands' file, which contains a list of all possible 'oci' commands and their usage details. This process can take a couple of minutes. ```bash o oci_commands ``` -------------------------------- ### Manage Database Upgrade History (OCI CLI) Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst These commands provide functionality to list, get, and manage the history of database upgrades within the Database Service. This includes initiating upgrades and rolling them back. ```bash oci db database list-upgrade-history ``` ```bash oci db upgrade-history get ``` ```bash oci db database upgrade ``` ```bash oci db database upgrade-rollback ``` ```bash oci db database upgrade-with-database-software-image ``` ```bash oci db database upgrade-with-db-home ``` ```bash oci db database upgrade-with-db-version ``` -------------------------------- ### Create OCI Autonomous Database with Preview Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst Command to create an OCI Autonomous Database, with support for preview versions. Requires a boolean flag to accept service terms for preview versions. ```bash oci db autonomous-database create --is-preview-version-with-service-terms-accepted [boolean] ``` -------------------------------- ### Offline Installation of OCI CLI on Windows Source: https://github.com/oracle/oci-cli/blob/master/README.rst This command performs an offline installation of the OCI CLI on Windows after downloading the necessary zip file. It requires the install.ps1 script to be present in the current directory. ```powershell install.ps1 -OfflineInstall ``` -------------------------------- ### Create Database with Specified DB Home (OCI CLI) Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst Allows creating a new database by specifying an existing DB Home OCID, ensuring the database is associated with the correct home. ```bash oci db database create --db-home-id ``` -------------------------------- ### Offline Installation of OCI CLI on Linux Source: https://github.com/oracle/oci-cli/blob/master/README.rst This command performs an offline installation of the OCI CLI on Linux after downloading the necessary zip file. It requires the install.sh script to be present in the current directory. ```bash bash install.sh --offline-install ``` -------------------------------- ### POST /oci stack-monitoring resource-type create-system-format-resource-type Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst Creates a system format resource type. This command supports new optional parameters. ```APIDOC ## POST /oci stack-monitoring resource-type create-system-format-resource-type ### Description Creates a system format resource type. ### Method POST ### Endpoint /oci stack-monitoring resource-type create-system-format-resource-type ### Parameters #### Request Body - **[parameters]** (object) - Optional - New optional parameters. ### Request Example ```json { "parameter1": "value1", "parameter2": "value2" } ``` ### Response #### Success Response (200) - **[response]** (object) - Response object. #### Response Example ```json { "result": "success" } ``` ``` -------------------------------- ### Get OCI CLI Help Source: https://github.com/oracle/oci-cli/blob/master/README.rst These commands display the help information for the OCI CLI, providing details on available commands and options. The '-h' flag is a shorthand for '--help'. ```bash oci --help ``` ```bash oci -h ``` -------------------------------- ### oci os object restore-status Source: https://github.com/oracle/oci-cli/blob/master/services/object_storage/docs/inline-help/os.txt Gets the restore status for an object. ```APIDOC ## GET /oci/os/object/restore-status ### Description Gets the restore status for an object. ### Method GET ### Endpoint /oci/os/object/restore-status ### Parameters #### Query Parameters - **namespace_name** (TEXT) - Optional - The top-level namespace used for the request. If not provided, this parameter will be obtained internally using a call to 'oci os ns get' - **bucket_name** (TEXT) - Required - The name of the bucket. Example: `my-bucket` - **name** (TEXT) - Required - The name of the object to check the restore status for. Example: `myfile.txt` ### Request Example ```json { "namespace_name": "example_namespace", "bucket_name": "my-bucket", "name": "myfile.txt" } ``` ### Response #### Success Response (200) - **restore_status** (string) - The current restore status of the object (e.g., 'restored', 'restoring', 'not_restored'). #### Response Example ```json { "restore_status": "restored" } ``` ``` -------------------------------- ### Configure Runtime Configuration for Notebook Sessions Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst Commands to create and update notebook sessions in the OCI Data Science service, with support for specifying runtime configuration details using the `--runtime-config-details` parameter. ```bash oci data-science notebook-session create --runtime-config-details oci data-science notebook-session update --runtime-config-details ``` -------------------------------- ### OCI CLI: List Instances as Table Source: https://context7.com/oracle/oci-cli/llms.txt Demonstrates how to format the output of the `oci compute instance list` command into a human-readable table. This is useful for quick visual inspection of resource information. ```bash oci compute instance list \ --compartment-id ocid1.compartment.oc1..aaaaaaaexample \ --output table ``` -------------------------------- ### Service Catalog Service - Configuration Get Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst Retrieves the configuration for the Service Catalog service. ```APIDOC ## GET /service-catalog/Configuration configuration get ### Description Retrieves the configuration settings for the Service Catalog service. ### Method GET ### Endpoint /service-catalog/Configuration configuration get ### Parameters *Specific parameters depend on the individual command.* ### Request Example ```bash oci service-catalog configuration get --compartment-id ``` ### Response #### Success Response (200) - **configuration** (object) - The configuration details of the Service Catalog. #### Response Example ```json { "example": "{\"configuration\": {\"defaultRegion\": \"us-phoenix-1\"}}" } ``` ``` -------------------------------- ### Manage OneSubscription Service Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst Entry point for interacting with the OneSubscription service in OCI. ```bash oci onesubscription ``` -------------------------------- ### OCI OS Object Get Source: https://github.com/oracle/oci-cli/blob/master/services/object_storage/docs/inline-help/os.txt Retrieves an object from an OCI Object Storage bucket. ```APIDOC ## GET /oci/os/object ### Description Retrieves an object from an Oracle Cloud Infrastructure Object Storage bucket. This command requires specifying the bucket and object names. ### Method GET ### Endpoint /oci/os/object ### Parameters #### Query Parameters - **namespace-name** (TEXT) - Optional - The Object Storage namespace. If not provided, it's obtained internally. - **bucket-name** (TEXT) - Required - The name of the bucket. - **object-name** (TEXT) - Required - The name of the object to retrieve. - **--output** (TEXT) - Optional - Specifies the output format (e.g., json, text, table). Default is json. - **--query** (TEXT) - Optional - JMESPath query to filter the response. ### Request Example ```bash oci os object get --namespace-name "your-namespace" --bucket-name "your-bucket" --object-name "path/to/your/object.txt" ``` ### Response #### Success Response (200) Returns the content of the specified object. The format depends on the object's content type and the output format specified. #### Response Example ```json { "data": "" } ``` (Note: Actual response content will be the object's data, not this JSON structure unless explicitly formatted as JSON.) ``` -------------------------------- ### OS Management Hub Windows Updates API Source: https://github.com/oracle/oci-cli/blob/master/tests/resources/json_ignore_command_list.txt APIs for installing Windows updates in OS Management Hub. ```APIDOC ## OS Management Hub Windows Updates API ### Description APIs for installing all Windows updates in a compartment or for specific managed instances and instance groups. ### Method POST ### Endpoint /os-management-hub/managed-instance/install-windows-updates /os-management-hub/managed-instance-group/install-windows-updates /os-management-hub/install-all-windows-updates-in-compartment ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) Details about the Windows update operation. #### Response Example None ``` -------------------------------- ### Create Exadata Infrastructure (OCI CLI) Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst Command to create Exadata infrastructure. The corporate proxy field is now optional, simplifying the creation process. ```bash oci db exadata-infrastructure create --corporate-proxy ``` -------------------------------- ### Data Science Model Group Get Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst Retrieves details of a specific Data Science Model Group resource. ```APIDOC ## GET /data-science/model-group/{modelGroupId} ### Description Retrieves the details of a specific Data Science Model Group resource based on its OCID. ### Method GET ### Endpoint /data-science/model-group/{modelGroupId} ### Parameters #### Path Parameters - **modelGroupId** (string) - Required - The OCID of the model group to retrieve. ### Request Example ```bash oci data-science model-group get --model-group-id "ocid1.modelgroup.oc1..exampleuniqueID" ``` ### Response #### Success Response (200) - **modelGroup** (object) - Details of the model group. - **id** (string) - The OCID of the model group. - **displayName** (string) - The display name of the model group. #### Response Example ```json { "modelGroup": { "id": "ocid1.modelgroup.oc1..exampleuniqueID", "displayName": "MyModelGroup" } } ``` ``` -------------------------------- ### Manage Network Monitoring Service Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst Entry point for interacting with the Network Monitoring service in OCI. ```bash oci vn-monitoring ``` -------------------------------- ### POST /oci db system launch-from-db-system Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst Launches a database system from a DB system. This command supports IPv6 address. ```APIDOC ## POST /oci db system launch-from-db-system ### Description Launches a database system from a DB system. ### Method POST ### Endpoint /oci db system launch-from-db-system ### Parameters #### Request Body - **private-ip-v6** (string) - Optional - IPv6 address. ### Request Example ```json { "private-ip-v6": "2001:db8::1" } ``` ### Response #### Success Response (200) - **dbSystem** (object) - The launched database system. #### Response Example ```json { "dbSystem": { "id": "ocid1.dbsystem.uniqueID", "hostname": "hostname" } } ``` ``` -------------------------------- ### Manage OCI Block Volumes with CLI Source: https://context7.com/oracle/oci-cli/llms.txt Commands for creating, listing, getting details, resizing, creating backups, restoring from backups, and deleting OCI Block Volumes. Requires compartment OCID and availability domain for creation. ```bash # Create a block volume oci bv volume create \ --compartment-id ocid1.compartment.oc1..aaaaaaaexample \ --availability-domain "AD-1" \ --display-name "my-data-volume" \ --size-in-gbs 100 # List volumes oci bv volume list --compartment-id ocid1.compartment.oc1..aaaaaaaexample # Get volume details oci bv volume get --volume-id ocid1.volume.oc1.phx.aaaaaaaexample # Resize a volume oci bv volume update \ --volume-id ocid1.volume.oc1.phx.aaaaaaaexample \ --size-in-gbs 200 # Create volume backup oci bv backup create \ --volume-id ocid1.volume.oc1.phx.aaaaaaaexample \ --display-name "my-volume-backup" # Restore from backup oci bv volume create \ --compartment-id ocid1.compartment.oc1..aaaaaaaexample \ --availability-domain "AD-1" \ --volume-backup-id ocid1.volumebackup.oc1.phx.aaaaaaaexample # Delete a volume oci bv volume delete --volume-id ocid1.volume.oc1.phx.aaaaaaaexample --force ``` -------------------------------- ### Manage EmWarehouse Service Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst Entry point for interacting with the EmWarehouse service in OCI. ```bash oci em-warehouse ``` -------------------------------- ### Manage Database Scheduling Policies (OCI CLI) Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst A comprehensive set of OCI CLI commands for managing database scheduling policies. This includes operations for changing compartments, creating, deleting, getting, listing, and updating scheduling policies, with various parameters for configuration. ```bash oci db scheduling-policy change-compartment --compartment-id | -c, --scheduling-policy-id, -? | -h | --help ``` ```bash oci db scheduling-policy create --cadence, --compartment-id | -c, --display-name, --cadence-start-month, --defined-tags, --freeform-tags, -? | -h | --help ``` ```bash oci db scheduling-policy delete --scheduling-policy-id, --force, -? | -h | --help ``` ```bash oci db scheduling-policy get --scheduling-policy-id, -? | -h | --help ``` ```bash oci db scheduling-policy list --compartment-id | -c, --all, --display-name, -? | -h | --help ``` ```bash oci db scheduling-policy update --scheduling-policy-id, --cadence, --cadence-start-month, --display-name, --defined-tags, --force, --freeform-tags, -? | -h | --help ``` -------------------------------- ### GET /oci jms jms-plugin list Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst Lists JMS plugins. This command retrieves a list of JMS plugins, with an optional parameter for agent type. ```APIDOC ## GET /oci jms jms-plugin list ### Description Lists JMS plugins. ### Method GET ### Endpoint /oci jms jms-plugin list ### Parameters #### Query Parameters - **agent-type** (string) - Optional - Filter by agent type. ### Response #### Success Response (200) - **plugins** (array) - A list of JMS plugins. #### Response Example ```json { "plugins": [ { "id": "ocid1.plugin.uniqueID", "name": "Plugin Name", "agentType": "AGENT_TYPE" } ] } ``` ``` -------------------------------- ### GET /oci db maintenance-run list Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst Lists maintenance runs. This command retrieves a list of maintenance runs, with an optional parameter for local ADG. ```APIDOC ## GET /oci db maintenance-run list ### Description Lists maintenance runs. ### Method GET ### Endpoint /oci db maintenance-run list ### Parameters #### Query Parameters - **is-local-adg** (boolean) - Optional - Filter by local ADG. ### Response #### Success Response (200) - **maintenanceRuns** (array) - A list of maintenance runs. #### Response Example ```json { "maintenanceRuns": [ { "id": "ocid1.maintenancerun.uniqueID", "status": "SUCCEEDED", "startTime": "2024-01-01T00:00:00.000Z" } ] } ``` ``` -------------------------------- ### Manage Autonomous Databases with OCI CLI Source: https://context7.com/oracle/oci-cli/llms.txt Commands for creating, listing, retrieving details, starting, stopping, scaling, and downloading wallets for Oracle Autonomous Databases. Requires compartment OCID, database OCID, and specific database configuration parameters. ```bash # Create an Autonomous Database oci db autonomous-database create \ --compartment-id ocid1.compartment.oc1..aaaaaaaexample \ --db-name "MYATP" \ --display-name "my-autonomous-db" \ --admin-password "MySecureP@ss123" \ --cpu-core-count 1 \ --data-storage-size-in-tbs 1 \ --db-workload OLTP ``` ```bash # List Autonomous Databases oci db autonomous-database list --compartment-id ocid1.compartment.oc1..aaaaaaaexample ``` ```bash # Get database details oci db autonomous-database get \ --autonomous-database-id ocid1.autonomousdatabase.oc1.phx.aaaaaaaexample ``` ```bash # Start/Stop database oci db autonomous-database start \ --autonomous-database-id ocid1.autonomousdatabase.oc1.phx.aaaaaaaexample oci db autonomous-database stop \ --autonomous-database-id ocid1.autonomousdatabase.oc1.phx.aaaaaaaexample ``` ```bash # Scale database oci db autonomous-database update \ --autonomous-database-id ocid1.autonomousdatabase.oc1.phx.aaaaaaaexample \ --cpu-core-count 2 \ --data-storage-size-in-tbs 2 ``` ```bash # Download wallet oci db autonomous-database generate-wallet \ --autonomous-database-id ocid1.autonomousdatabase.oc1.phx.aaaaaaaexample \ --password "WalletP@ss123" \ --file /path/to/wallet.zip ``` -------------------------------- ### Executing OCI Commands with 'o' Source: https://github.com/oracle/oci-cli/blob/master/scripts/examples/project_o/README.md Explains how 'o' translates user input into full OCI commands, including option and parameter expansion. It details how to execute the generated command using 'go' or '.' and force execution with '!'. ```bash # Execute the generated OCI command o go # or o . # Force execution if 'o' is unsure o ! # Get usage synopsis with global parameters o help # Run oci command with --help o --help go ``` -------------------------------- ### oci os preauth-request get Source: https://github.com/oracle/oci-cli/blob/master/services/object_storage/docs/inline-help/os.txt Retrieves details of a pre-authenticated request for an Object Storage bucket. Requires the bucket name and the pre-authenticated request ID. ```APIDOC ## GET /oci/os/preauth-request ### Description Gets the pre-authenticated request for the bucket. ### Method GET ### Endpoint /oci/os/preauth-request ### Parameters #### Path Parameters None #### Query Parameters - **namespace-name** (TEXT) - Optional - The Object Storage namespace used for the request. If not provided, this parameter will be obtained internally using a call to 'oci os ns get'. - **bucket-name** (TEXT) - Required - The name of the bucket. Avoid entering confidential information. Example: `my-new-bucket1` - **par-id** (TEXT) - Required - The unique identifier for the pre-authenticated request. This can be used to manage operations against the pre-authenticated request, such as GET or DELETE. #### Request Body None ### Request Example ```bash oci os preauth-request get --bucket-name "my-bucket" --par-id "example-par-id" ``` ### Response #### Success Response (200) - **access-uri** (string) - The URI to access the pre-authenticated request. - **bucket-name** (string) - The name of the bucket. - **created-by** (string) - The user who created the pre-authenticated request. - **expires-at** (string) - The expiration date and time of the pre-authenticated request. - **id** (string) - The unique identifier of the pre-authenticated request. - **name** (string) - The name of the pre-authenticated request. - **object-name** (string) - The name of the object associated with the pre-authenticated request, if applicable. - **operation** (string) - The operation permitted by the pre-authenticated request (e.g., 'GET', 'PUT'). - **time-created** (string) - The date and time the pre-authenticated request was created. #### Response Example ```json { "access-uri": "https://objectstorage.us-ashburn-1.oraclecloud.com/n/my-namespace/b/my-bucket/o/my-object?uploadId=...", "bucket-name": "my-bucket", "created-by": "user@example.com", "expires-at": "2023-10-27T10:00:00Z", "id": "example-par-id", "name": "my-preauth-request", "object-name": "my-object", "operation": "GET", "time-created": "2023-10-26T10:00:00Z" } ``` ``` -------------------------------- ### OCI CLI Bulk Upload: Forcing Object Overwrite Source: https://github.com/oracle/oci-cli/blob/master/services/object_storage/docs/inline-help/os.txt This example illustrates how to force the overwrite of existing objects in Object Storage during a bulk upload. Using the '--overwrite' flag bypasses the check for existing files, allowing for faster uploads and resolving name collisions by replacing existing objects with new ones. ```bash oci os object bulk-upload -ns mynamespace -bn mybucket --src-dir path/to/upload/directory --overwrite ``` -------------------------------- ### Get DRG Redundancy Status (OCI CLI) Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst Retrieves the redundancy status for a Dynamic Routing Gateway (DRG) in the Oracle Cloud Infrastructure Networking service. ```bash oci network drg-redundancy-status get --drg-id ``` -------------------------------- ### Manage Marketplace Service (OCI CLI) Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst Entry point for managing resources within the Oracle Cloud Infrastructure Marketplace Service. ```bash oci marketplace ``` -------------------------------- ### Database Service - Autonomous Database Data Guard Changes Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst Updates to response fields for 'get' and 'update' commands, and new commands for cross-region Data Guard. ```APIDOC ## GET /oci/db/autonomous-database/get ### Description Retrieves details of an autonomous database, with updated Data Guard fields. ### Method GET ### Endpoint oci db autonomous-database get ### Response #### Success Response (200) - **isLocalDataGuardEnabled** (boolean) - Indicates whether the Autonomous Database has local (in-region) Data Guard enabled. - **isRemoteDataGuardEnabled** (boolean) - Indicates whether the Autonomous Database has Cross Region Data Guard enabled. - **localStandbyDb** (object) - Autonomous Data Guard standby database details. ## PUT /oci/db/autonomous-database/update ### Description Updates an autonomous database, with updated Data Guard fields. ### Method PUT ### Endpoint oci db autonomous-database update ### Response #### Success Response (200) - **isLocalDataGuardEnabled** (boolean) - Indicates whether the Autonomous Database has local (in-region) Data Guard enabled. ## POST /oci/db/autonomous-database/create-adb-cross-region-data-guard-details ### Description Creates cross-region Data Guard details for an autonomous database. ### Method POST ### Endpoint oci db autonomous-database create-adb-cross-region-data-guard-details ## DELETE /oci/db/autonomous-database/delete ### Description Deletes an autonomous database, including the ability to delete a standby instance for Cross Region Data Guard. ### Method DELETE ### Endpoint oci db autonomous-database delete ``` -------------------------------- ### POST /oci db system launch-from-database Source: https://github.com/oracle/oci-cli/blob/master/CHANGELOG.rst Launches a database system from a database. This command supports IPv6 address. ```APIDOC ## POST /oci db system launch-from-database ### Description Launches a database system from a database. ### Method POST ### Endpoint /oci db system launch-from-database ### Parameters #### Request Body - **private-ip-v6** (string) - Optional - IPv6 address. ### Request Example ```json { "private-ip-v6": "2001:db8::1" } ``` ### Response #### Success Response (200) - **dbSystem** (object) - The launched database system. #### Response Example ```json { "dbSystem": { "id": "ocid1.dbsystem.uniqueID", "hostname": "hostname" } } ``` ```