An API token is required, along with a project ID and a pre-created port in the target region.
REGION_ID is the numeric ID of a region that supports Basic VMs. Query the regions API and filter for regions where has_basic_vm is true.
Step 1. Select an image
Only Linux images are accepted. Query the images endpoint for the target region and save the ID of the chosen image.Step 2. List Basic VM flavors
Basic VM flavors use theg1s-shared-* or g2s-shared-* naming scheme. Query the standard flavors endpoint and filter by name prefix.
FLAVOR_NAME to the chosen flavor.
Step 3. Create the Basic VM
Passregion_id in the request body. The boot disk is created with the flavor, and the request does not accept volume fields.
GET /cloud/v1/tasks/{task_id} every 5 seconds until state is FINISHED, then read the instance ID from created_resources.
Step 4. Get Basic VM details
The response includesboot_volume_id for the system-managed local disk. That disk is destroyed together with the VM on delete.
Step 5. Update the Basic VM
Rename the VM or replace its interface list. Updatinginterfaces[] replaces the whole list, and the interface order stays as it was at creation.
state is FINISHED.
Step 6. Delete the Basic VM
Deleting a Basic VM also destroys its system-managed boot disk. Ports attached to the VM are detached and are not deleted.state is FINISHED.