Python
from gcore import Gcore client = Gcore( api_key="My API Key", ) task_id_list = client.cloud.instances.action( instance_id="instance_id", project_id=0, region_id=0, action="start", ) print(task_id_list.tasks)
{ "tasks": [ "d478ae29-dedc-4869-82f0-96104425f565" ] }
The action can be one of: start, stop, reboot, powercycle, suspend or resume. Suspend and resume are not available for bare metal instances.
"start"
Was this page helpful?