capabilities.work

OCI Terminate Compute Instance Safely

A 3-step recipe with Oracle. We can help you get access.

Recipe · 3 steps

OCI Terminate Compute Instance Safely

with Oracle · IT Infrastructure Management

Terminate a compute instance while preserving its boot volume.

  1. Read the instance to confirm it exists and capture its ETag for optimistic concurrency control on the terminate call.
  2. List the volume attachments in the compartment filtered to this instance so the attached block volumes are recorded before termination.
  3. Terminate the instance, preserving the boot volume, guarded by the ETag captured when reading the instance.
What you'll need to have ready
  • compartmentId: The OCID of the compartment containing the instance.
  • instanceId: The OCID of the instance to terminate.
  • authToken: OCI request-signing bearer credential for the Authorization header.
For your developer

Arazzo workflow oracle:terminate-instance-safely, 3 operations: GetInstance → ListVolumeAttachments → TerminateInstance. Specs on APIs.io.