|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
//---------------------------------------------------------------------- |
|
4
|
|
|
// |
|
5
|
|
|
// Copyright (C) 2015-2017 Artem Rodygin |
|
6
|
|
|
// |
|
7
|
|
|
// This file is part of Linode API Client Library for PHP. |
|
8
|
|
|
// |
|
9
|
|
|
// You should have received a copy of the MIT License along with |
|
10
|
|
|
// the library. If not, see <http://opensource.org/licenses/MIT>. |
|
11
|
|
|
// |
|
12
|
|
|
//---------------------------------------------------------------------- |
|
13
|
|
|
|
|
14
|
|
|
namespace Linode; |
|
15
|
|
|
|
|
16
|
|
|
/** |
|
17
|
|
|
* This class is autogenerated. |
|
18
|
|
|
* |
|
19
|
|
|
* @version Linode API v3.3 |
|
20
|
|
|
*/ |
|
21
|
|
|
class NodeBalancerApi extends BaseLinodeApi |
|
22
|
|
|
{ |
|
23
|
|
|
/** |
|
24
|
|
|
* @param int $DatacenterID [required] The DatacenterID from avail.datacenters() where you wish to place this new NodeBalancer |
|
25
|
|
|
* @param string $Label [optional] This NodeBalancer's label |
|
26
|
|
|
* @param int $ClientConnThrottle [optional] To help mitigate abuse, throttle connections per second, per client IP. 0 to disable. Max of 20. |
|
27
|
|
|
* |
|
28
|
|
|
* @return array |
|
29
|
|
|
*/ |
|
30
|
1 |
|
public function create($DatacenterID, $Label = null, $ClientConnThrottle = null) |
|
31
|
|
|
{ |
|
32
|
1 |
|
return $this->call('nodebalancer.create', [ |
|
|
|
|
|
|
33
|
1 |
|
'DatacenterID' => $DatacenterID, |
|
34
|
1 |
|
'Label' => $Label, |
|
35
|
1 |
|
'ClientConnThrottle' => $ClientConnThrottle, |
|
36
|
|
|
]); |
|
37
|
|
|
} |
|
38
|
|
|
|
|
39
|
|
|
/** |
|
40
|
|
|
* Immediately removes a NodeBalancer from your account and issues a pro-rated credit back to your |
|
41
|
|
|
* account, if applicable. |
|
42
|
|
|
* |
|
43
|
|
|
* @param int $NodeBalancerID [required] The NodeBalancerID to delete |
|
44
|
|
|
* |
|
45
|
|
|
* @return array |
|
46
|
|
|
*/ |
|
47
|
1 |
|
public function delete($NodeBalancerID) |
|
48
|
|
|
{ |
|
49
|
1 |
|
return $this->call('nodebalancer.delete', [ |
|
|
|
|
|
|
50
|
1 |
|
'NodeBalancerID' => $NodeBalancerID, |
|
51
|
|
|
]); |
|
52
|
|
|
} |
|
53
|
|
|
|
|
54
|
|
|
/** |
|
55
|
|
|
* Returns a list of NodeBalancers this user has access or delete to, including their properties. |
|
56
|
|
|
* |
|
57
|
|
|
* @param int $NodeBalancerID [optional] Limits the list to the specified NodeBalancerID |
|
58
|
|
|
* |
|
59
|
|
|
* @return array |
|
60
|
|
|
*/ |
|
61
|
1 |
|
public function getList($NodeBalancerID = null) |
|
62
|
|
|
{ |
|
63
|
1 |
|
return $this->call('nodebalancer.list', [ |
|
|
|
|
|
|
64
|
1 |
|
'NodeBalancerID' => $NodeBalancerID, |
|
65
|
|
|
]); |
|
66
|
|
|
} |
|
67
|
|
|
|
|
68
|
|
|
/** |
|
69
|
|
|
* Updates a NodeBalancer's properties. |
|
70
|
|
|
* |
|
71
|
|
|
* @param int $NodeBalancerID [required] |
|
72
|
|
|
* @param string $Label [optional] This NodeBalancer's label |
|
73
|
|
|
* @param int $ClientConnThrottle [optional] To help mitigate abuse, throttle connections per second, per client IP. 0 to disable. Max of 20. |
|
74
|
|
|
* |
|
75
|
|
|
* @return array |
|
76
|
|
|
*/ |
|
77
|
1 |
|
public function update($NodeBalancerID, $Label = null, $ClientConnThrottle = null) |
|
78
|
|
|
{ |
|
79
|
1 |
|
return $this->call('nodebalancer.update', [ |
|
|
|
|
|
|
80
|
1 |
|
'NodeBalancerID' => $NodeBalancerID, |
|
81
|
1 |
|
'Label' => $Label, |
|
82
|
1 |
|
'ClientConnThrottle' => $ClientConnThrottle, |
|
83
|
|
|
]); |
|
84
|
|
|
} |
|
85
|
|
|
} |
|
86
|
|
|
|