Skip to content

Commit 6491658

Browse files
author
cp6
committed
Updated examples
Updated examples
1 parent dc85e22 commit 6491658

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

example.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,19 @@
2828
$vultr->serverCreateOptions();
2929
//For all options
3030

31+
32+
//Create instance from snapshot:
33+
$vultr->serverCreateDC('syd');//Sydney Australia location
34+
$vultr->serverCreatePlan('vc2-2c-4gb');
35+
$vultr->serverCreateType('SNAPSHOT', 'YQrb72d9-ded9-4f68-a5cg-7d4f96a534de');//Deploy with my snapshot id:YQrb72d9-ded9-4f68-a5cg-7d4f96a534de
36+
$vultr->serverCreateLabel('Created with API x2');//label instance as "Created with API"
37+
echo $vultr->serverCreate();//Creates instance/server with parameters set above (returns subid)
38+
39+
3140
//DC, plan and type are required
3241

33-
$vultr->serverCreateDC(19);//Sydney Australia location
34-
$vultr->serverCreatePlan(202);//(2048 MB RAM,55 GB SSD,2.00 TB BW)
42+
$vultr->serverCreateDC('syd');//Sydney Australia location
43+
$vultr->serverCreatePlan('vc2-2c-4gb');
3544
$vultr->serverCreateType('ISO', 146817);//Deploy with my custom ISO id:146817
3645
$vultr->serverCreateLabel('Created with API');//label instance as "Created with API"
37-
echo $vultr->serverCreate();//Creates instance/server with parameters set above (returns subid)
38-
46+
echo $vultr->serverCreate();//Creates instance/server with parameters set above (returns subid)

0 commit comments

Comments
 (0)