Update/recreate an instance from a new/updated template.
Signature
VastAI.update_instance(
id: int,
template_id: Optional[int] = None,
template_hash_id: Optional[str] = None,
image: Optional[str] = None,
args: Optional[str] = None,
env: Optional[loads] = None,
onstart: Optional[str] = None
) -> dict
Parameters
new template ID to associate with the instance
new template hash ID to associate with the instance
new image UUID for the instance
new arguments for the instance
new environment variables for the instance
new onstart script for the instance
Returns
dict
Example
from vastai import VastAI
client = VastAI(api_key="YOUR_API_KEY")
result = client.update_instance(id=12345)
print(result)