Detaching an Instance from an Instance Pool

Detach an instance from an instance pool when you no longer want to manage the instance as part of the pool.

When you detach an instance from a pool, you can choose whether to delete the instance or to retain it. You can also choose whether to replace the detached instance by creating an instance in the pool. If you don't replace the detached instance, then the pool size decreases.

    1. Navigate to the Instance pools list page. If you need help finding the list page, see Listing Instance Pools.
    2. Select the name of the instance pool from which you want to detach an instance to display the details page.
    3. Navigate to Attached instances.
      • In the Resources section, select Attached instances.
    4. For the instance that you want to detach, from the actions menu (3 dots) select Detach instance.
      • Select Permanently terminate (delete) this instance and its attached boot volume to delete the instance and its boot volume.
      • Select Replace the instance with a new instance, using the pool's instance configuration as a template for the instance. If you want the pool to remain the same size after you detach the instance, then you can provision a replacement instance.
    5. Select Detach (or Detach and terminate, if you're also deleting the instance).
    Tip

    To track the progress of the operation and troubleshoot errors that occur during instance creation, use the associated work request.
  • Use the instance-pool-instance detach command to detach an instance from an instance pool.

    oci compute-management instance-pool-instance detach --instance-id <INSTANCE_OCID> --instance-pool-id <INSTANCE_POOL_OCID>
    oci compute-management instance-pool detach --from-json <file://path/to/file.json>

    <file://path/to/file.json> is the path to a JSON file that defines the instance details. For information about how to generate an example of the JSON file, see Advanced JSON Options.

    For a complete list of flags and variable options for the Compute service CLI commands, see the command line reference for Compute.

  • For information about using the API and signing requests, see REST API documentation and Security Credentials. For information about SDKs, see SDKs and the CLI.

    Use the DetachInstancePoolInstance operation to detach an instance from an instance pool.