1 | <?php |
||
21 | class LinodeApi extends BaseLinodeApi |
||
22 | { |
||
23 | /** |
||
24 | * Issues a boot job for the provided ConfigID. If no ConfigID is provided boots the last used |
||
25 | * configuration profile, or the first configuration profile if this Linode has never been booted. |
||
26 | * |
||
27 | * @param int $LinodeID [required] |
||
28 | * @param int $ConfigID [optional] The ConfigID to boot, available from linode.config.list(). |
||
29 | * |
||
30 | * @return array |
||
31 | */ |
||
32 | 1 | public function boot($LinodeID, $ConfigID = null) |
|
39 | |||
40 | /** |
||
41 | * Creates a Linode and assigns you full privileges. There is a 75-linodes-per-hour limiter. |
||
42 | * |
||
43 | * @param int $DatacenterID [required] The DatacenterID from avail.datacenters() where you wish to place this new Linode |
||
44 | * @param int $PlanID [required] The desired PlanID available from avail.LinodePlans() |
||
45 | * @param int $PaymentTerm [optional] Subscription term in months for prepaid customers. One of: 1, 12, or 24 |
||
46 | * |
||
47 | * @return array |
||
48 | */ |
||
49 | 2 | public function create($DatacenterID, $PlanID, $PaymentTerm = null) |
|
57 | |||
58 | /** |
||
59 | * Immediately removes a Linode from your account and issues a pro-rated credit back to your account, |
||
60 | * if applicable. To prevent accidental deletes, this requires the Linode has no Disk images. You |
||
61 | * must first delete its disk images.". |
||
62 | * |
||
63 | * @param int $LinodeID [required] The LinodeID to delete |
||
64 | * @param bool $skipChecks [optional] Skips the safety checks and will always delete the Linode |
||
65 | * |
||
66 | * @return array |
||
67 | */ |
||
68 | 1 | public function delete($LinodeID, $skipChecks = null) |
|
75 | |||
76 | /** |
||
77 | * Creates a new Linode, assigns you full privileges, and then clones the specified LinodeID to the new |
||
78 | * Linode. There is a limit of 5 active clone operations per source Linode. It is recommended that the |
||
79 | * source Linode be powered down during the clone. |
||
80 | * |
||
81 | * @param int $LinodeID [required] The LinodeID that you want cloned |
||
82 | * @param int $DatacenterID [required] The DatacenterID from avail.datacenters() where you wish to place this new Linode |
||
83 | * @param int $PlanID [required] The desired PlanID available from avail.LinodePlans() |
||
84 | * @param int $PaymentTerm [optional] Subscription term in months for prepaid customers. One of: 1, 12, or 24 |
||
85 | * |
||
86 | * @return array |
||
87 | */ |
||
88 | 1 | public function duplicate($LinodeID, $DatacenterID, $PlanID, $PaymentTerm = null) |
|
97 | |||
98 | /** |
||
99 | * Returns a list of all Linodes user has access or delete to, including some properties. Status |
||
100 | * values are -1: Being Created, 0: Brand New, 1: Running, and 2: Powered Off. |
||
101 | * |
||
102 | * @param int $LinodeID [optional] Limits the list to the specified LinodeID |
||
103 | * |
||
104 | * @return array |
||
105 | */ |
||
106 | 1 | public function getList($LinodeID = null) |
|
112 | |||
113 | /** |
||
114 | * Changes a Linode's hypervisor from Xen to KVM. |
||
115 | * |
||
116 | * @param int $LinodeID [required] The LinodeID to migrate to KVM. |
||
117 | * |
||
118 | * @return array |
||
119 | */ |
||
120 | public function kvmify($LinodeID) |
||
126 | |||
127 | /** |
||
128 | * Upgrades a Linode to its next generation. |
||
129 | * |
||
130 | * @param int $LinodeID [required] |
||
131 | * |
||
132 | * @return array |
||
133 | */ |
||
134 | 1 | public function mutate($LinodeID) |
|
140 | |||
141 | /** |
||
142 | * Issues a shutdown, and then boot job for a given LinodeID. |
||
143 | * |
||
144 | * @param int $LinodeID [required] |
||
145 | * @param int $ConfigID [optional] |
||
146 | * |
||
147 | * @return array |
||
148 | */ |
||
149 | 1 | public function reboot($LinodeID, $ConfigID = null) |
|
156 | |||
157 | /** |
||
158 | * Resizes a Linode from one plan to another. Immediately shuts the Linode down, charges/credits the |
||
159 | * account, and issue a migration to another host server. |
||
160 | * |
||
161 | * @param int $LinodeID [required] |
||
162 | * @param int $PlanID [required] The desired PlanID available from avail.LinodePlans() |
||
163 | * |
||
164 | * @return array |
||
165 | */ |
||
166 | 1 | public function resize($LinodeID, $PlanID) |
|
173 | |||
174 | /** |
||
175 | * Issues a shutdown job for a given LinodeID. |
||
176 | * |
||
177 | * @param int $LinodeID [required] |
||
178 | * |
||
179 | * @return array |
||
180 | */ |
||
181 | 1 | public function shutdown($LinodeID) |
|
187 | |||
188 | /** |
||
189 | * Updates a Linode's properties. |
||
190 | * |
||
191 | * @param int $LinodeID [required] |
||
192 | * @param string $Label [optional] This Linode's label |
||
193 | * @param string $lpm_displayGroup [optional] Display group in the Linode list inside the Linode Manager |
||
194 | * @param bool $Alert_cpu_enabled [optional] Enable the cpu usage email alert |
||
195 | * @param int $Alert_cpu_threshold [optional] CPU Alert threshold, percentage 0-800 |
||
196 | * @param bool $Alert_diskio_enabled [optional] Enable the disk IO email alert |
||
197 | * @param int $Alert_diskio_threshold [optional] IO ops/sec |
||
198 | * @param bool $Alert_bwin_enabled [optional] Enable the incoming bandwidth email alert |
||
199 | * @param int $Alert_bwin_threshold [optional] Mb/sec |
||
200 | * @param bool $Alert_bwout_enabled [optional] Enable the outgoing bandwidth email alert |
||
201 | * @param int $Alert_bwout_threshold [optional] Mb/sec |
||
202 | * @param bool $Alert_bwquota_enabled [optional] Enable the bw quote email alert |
||
203 | * @param int $Alert_bwquota_threshold [optional] Percentage of monthly bw quota |
||
204 | * @param int $backupWindow [optional] |
||
205 | * @param int $backupWeeklyDay [optional] |
||
206 | * @param bool $watchdog [optional] Enable the Lassie shutdown watchdog |
||
207 | * @param bool $ms_ssh_disabled [optional] |
||
208 | * @param string $ms_ssh_user [optional] |
||
209 | * @param string $ms_ssh_ip [optional] |
||
210 | * @param int $ms_ssh_port [optional] |
||
211 | * |
||
212 | * @return array |
||
213 | */ |
||
214 | 1 | public function update($LinodeID, $Label = null, $lpm_displayGroup = null, $Alert_cpu_enabled = null, $Alert_cpu_threshold = null, $Alert_diskio_enabled = null, $Alert_diskio_threshold = null, $Alert_bwin_enabled = null, $Alert_bwin_threshold = null, $Alert_bwout_enabled = null, $Alert_bwout_threshold = null, $Alert_bwquota_enabled = null, $Alert_bwquota_threshold = null, $backupWindow = null, $backupWeeklyDay = null, $watchdog = null, $ms_ssh_disabled = null, $ms_ssh_user = null, $ms_ssh_ip = null, $ms_ssh_port = null) |
|
239 | |||
240 | /** |
||
241 | * Generates a console token starting a web console LISH session for the requesting IP. |
||
242 | * |
||
243 | * @param int $LinodeID [required] |
||
244 | * |
||
245 | * @return array |
||
246 | */ |
||
247 | 1 | public function webConsoleToken($LinodeID) |
|
253 | } |
||
254 |