Deleting an Instance

You can delete an instance only if it is in running, shut_down or error state.

Before deleting an instance, consider the following options:

  • If you want to free the compute resources, then shut down the instance. See Shutting Down an Instance.

  • If you want to delete all the instances in an orchestration, then stop the orchestration. See Stopping an Orchestration.

  • If you want to delete only one of the instances in an orchestration, then use the CLI or REST API to delete the instance.

When an instance is deleted, the associated orchestration transitions to the warning status. You need to stop and start this orchestration if you want to associate it with a new instance.

Using the CLI or REST API

Use the following command to delete an instance in an orchestration:

oracle-compute delete instance name

For more information, see CLI Reference for Oracle Compute Cloud Service.

To delete an instance using the API, use the DELETE https://api.oc.example.com/instance/name method.

For more information, see REST API Reference for Oracle Compute Cloud Service.