1and1 1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +2 -0
- data/1and1-1.0.gem +0 -0
- data/1and1.gemspec +20 -0
- data/Gemfile +4 -0
- data/LICENSE +201 -0
- data/README.md +499 -0
- data/docs/reference.md +2447 -0
- data/examples/dvd_examples.rb +15 -0
- data/examples/example_app.rb +100 -0
- data/examples/firewall_examples.rb +137 -0
- data/examples/image_examples.rb +48 -0
- data/examples/load_balancer_examples.rb +145 -0
- data/examples/log_examples.rb +15 -0
- data/examples/monitoring_center_examples.rb +15 -0
- data/examples/monitoring_policy_examples.rb +343 -0
- data/examples/private_network_examples.rb +86 -0
- data/examples/public_ip_examples.rb +42 -0
- data/examples/role_examples.rb +113 -0
- data/examples/server_appliance_examples.rb +15 -0
- data/examples/server_examples.rb +438 -0
- data/examples/shared_storage_examples.rb +108 -0
- data/examples/usage_examples.rb +6 -0
- data/examples/user_examples.rb +113 -0
- data/examples/vpn_examples.rb +56 -0
- data/lib/1and1/datacenter.rb +73 -0
- data/lib/1and1/dvd.rb +73 -0
- data/lib/1and1/firewall.rb +427 -0
- data/lib/1and1/image.rb +231 -0
- data/lib/1and1/load_balancer.rb +448 -0
- data/lib/1and1/log.rb +77 -0
- data/lib/1and1/monitoring_center.rb +84 -0
- data/lib/1and1/monitoring_policy.rb +598 -0
- data/lib/1and1/oneandone.rb +57 -0
- data/lib/1and1/ping.rb +41 -0
- data/lib/1and1/ping_auth.rb +41 -0
- data/lib/1and1/pricing.rb +41 -0
- data/lib/1and1/private_network.rb +333 -0
- data/lib/1and1/public_ip.rb +192 -0
- data/lib/1and1/role.rb +381 -0
- data/lib/1and1/server.rb +1208 -0
- data/lib/1and1/server_appliance.rb +73 -0
- data/lib/1and1/shared_storage.rb +379 -0
- data/lib/1and1/usage.rb +58 -0
- data/lib/1and1/user.rb +374 -0
- data/lib/1and1/vpn.rb +249 -0
- data/lib/oneandone.rb +27 -0
- data/sphinx/Makefile +192 -0
- data/sphinx/_build/doctrees/dvds.doctree +0 -0
- data/sphinx/_build/doctrees/environment.pickle +0 -0
- data/sphinx/_build/doctrees/firewalls.doctree +0 -0
- data/sphinx/_build/doctrees/images.doctree +0 -0
- data/sphinx/_build/doctrees/index.doctree +0 -0
- data/sphinx/_build/doctrees/load_balancers.doctree +0 -0
- data/sphinx/_build/doctrees/logs.doctree +0 -0
- data/sphinx/_build/doctrees/monitoring_center.doctree +0 -0
- data/sphinx/_build/doctrees/monitoring_policies.doctree +0 -0
- data/sphinx/_build/doctrees/private_networks.doctree +0 -0
- data/sphinx/_build/doctrees/public_ips.doctree +0 -0
- data/sphinx/_build/doctrees/server_appliances.doctree +0 -0
- data/sphinx/_build/doctrees/servers.doctree +0 -0
- data/sphinx/_build/doctrees/shared_storages.doctree +0 -0
- data/sphinx/_build/doctrees/usages.doctree +0 -0
- data/sphinx/_build/doctrees/users.doctree +0 -0
- data/sphinx/_build/html/.buildinfo +4 -0
- data/sphinx/_build/html/_sources/dvds.txt +42 -0
- data/sphinx/_build/html/_sources/firewalls.txt +189 -0
- data/sphinx/_build/html/_sources/images.txt +101 -0
- data/sphinx/_build/html/_sources/index.txt +499 -0
- data/sphinx/_build/html/_sources/load_balancers.txt +231 -0
- data/sphinx/_build/html/_sources/logs.txt +55 -0
- data/sphinx/_build/html/_sources/monitoring_center.txt +55 -0
- data/sphinx/_build/html/_sources/monitoring_policies.txt +288 -0
- data/sphinx/_build/html/_sources/private_networks.txt +146 -0
- data/sphinx/_build/html/_sources/public_ips.txt +78 -0
- data/sphinx/_build/html/_sources/server_appliances.txt +42 -0
- data/sphinx/_build/html/_sources/servers.txt +630 -0
- data/sphinx/_build/html/_sources/shared_storages.txt +160 -0
- data/sphinx/_build/html/_sources/usages.txt +45 -0
- data/sphinx/_build/html/_sources/users.txt +172 -0
- data/sphinx/_build/html/_static/ajax-loader.gif +0 -0
- data/sphinx/_build/html/_static/alabaster.css +585 -0
- data/sphinx/_build/html/_static/basic.css +599 -0
- data/sphinx/_build/html/_static/comment-bright.png +0 -0
- data/sphinx/_build/html/_static/comment-close.png +0 -0
- data/sphinx/_build/html/_static/comment.png +0 -0
- data/sphinx/_build/html/_static/doctools.js +263 -0
- data/sphinx/_build/html/_static/down-pressed.png +0 -0
- data/sphinx/_build/html/_static/down.png +0 -0
- data/sphinx/_build/html/_static/file.png +0 -0
- data/sphinx/_build/html/_static/jquery-1.11.1.js +10308 -0
- data/sphinx/_build/html/_static/jquery.js +4 -0
- data/sphinx/_build/html/_static/minus.png +0 -0
- data/sphinx/_build/html/_static/plus.png +0 -0
- data/sphinx/_build/html/_static/pygments.css +63 -0
- data/sphinx/_build/html/_static/searchtools.js +651 -0
- data/sphinx/_build/html/_static/underscore-1.3.1.js +999 -0
- data/sphinx/_build/html/_static/underscore.js +31 -0
- data/sphinx/_build/html/_static/up-pressed.png +0 -0
- data/sphinx/_build/html/_static/up.png +0 -0
- data/sphinx/_build/html/_static/websupport.js +808 -0
- data/sphinx/_build/html/dvds.html +151 -0
- data/sphinx/_build/html/firewalls.html +397 -0
- data/sphinx/_build/html/genindex.html +114 -0
- data/sphinx/_build/html/images.html +236 -0
- data/sphinx/_build/html/index.html +571 -0
- data/sphinx/_build/html/load_balancers.html +409 -0
- data/sphinx/_build/html/logs.html +160 -0
- data/sphinx/_build/html/monitoring_center.html +160 -0
- data/sphinx/_build/html/monitoring_policies.html +530 -0
- data/sphinx/_build/html/objects.inv +0 -0
- data/sphinx/_build/html/private_networks.html +316 -0
- data/sphinx/_build/html/public_ips.html +215 -0
- data/sphinx/_build/html/rb-modindex.html +106 -0
- data/sphinx/_build/html/search.html +99 -0
- data/sphinx/_build/html/searchindex.js +1 -0
- data/sphinx/_build/html/server_appliances.html +153 -0
- data/sphinx/_build/html/servers.html +994 -0
- data/sphinx/_build/html/shared_storages.html +349 -0
- data/sphinx/_build/html/usages.html +140 -0
- data/sphinx/_build/html/users.html +363 -0
- data/sphinx/conf.py +287 -0
- data/sphinx/dvds.rst +42 -0
- data/sphinx/firewalls.rst +189 -0
- data/sphinx/images.rst +101 -0
- data/sphinx/index.rst +499 -0
- data/sphinx/load_balancers.rst +231 -0
- data/sphinx/logs.rst +55 -0
- data/sphinx/make.bat +263 -0
- data/sphinx/monitoring_center.rst +55 -0
- data/sphinx/monitoring_policies.rst +288 -0
- data/sphinx/private_networks.rst +146 -0
- data/sphinx/public_ips.rst +78 -0
- data/sphinx/server_appliances.rst +42 -0
- data/sphinx/servers.rst +630 -0
- data/sphinx/shared_storages.rst +160 -0
- data/sphinx/usages.rst +45 -0
- data/sphinx/users.rst +172 -0
- data/test/mock-api/add-firewall.json +66 -0
- data/test/mock-api/add-hdd.json +49 -0
- data/test/mock-api/add-lb.json +71 -0
- data/test/mock-api/add-new-ip.json +18 -0
- data/test/mock-api/add-pn.json +66 -0
- data/test/mock-api/add-port-mp.json +81 -0
- data/test/mock-api/add-process-mp.json +20 -0
- data/test/mock-api/add-rule-fp.json +33 -0
- data/test/mock-api/add-rule-lb.json +40 -0
- data/test/mock-api/add-server-ip.json +66 -0
- data/test/mock-api/add-server-mp.json +66 -0
- data/test/mock-api/assign-ip-fp.json +32 -0
- data/test/mock-api/assign-server-lb.json +39 -0
- data/test/mock-api/attach-server-pn.json +14 -0
- data/test/mock-api/attach-server-storage.json +24 -0
- data/test/mock-api/change-api-key.json +15 -0
- data/test/mock-api/change-password.json +5 -0
- data/test/mock-api/change-server-status.json +70 -0
- data/test/mock-api/clone-server.json +29 -0
- data/test/mock-api/create-fp.json +26 -0
- data/test/mock-api/create-image.json +30 -0
- data/test/mock-api/create-lb.json +33 -0
- data/test/mock-api/create-mp.json +81 -0
- data/test/mock-api/create-pn.json +11 -0
- data/test/mock-api/create-public-ip.json +10 -0
- data/test/mock-api/create-server.json +34 -0
- data/test/mock-api/create-snapshot.json +74 -0
- data/test/mock-api/create-storage.json +13 -0
- data/test/mock-api/create-user.json +14 -0
- data/test/mock-api/delete-fp.json +26 -0
- data/test/mock-api/delete-image.json +26 -0
- data/test/mock-api/delete-ip.json +15 -0
- data/test/mock-api/delete-lb.json +33 -0
- data/test/mock-api/delete-mp.json +71 -0
- data/test/mock-api/delete-pn.json +11 -0
- data/test/mock-api/delete-public-ip.json +10 -0
- data/test/mock-api/delete-rule-fp.json +26 -0
- data/test/mock-api/delete-server.json +50 -0
- data/test/mock-api/delete-snapshot.json +74 -0
- data/test/mock-api/delete-storage.json +24 -0
- data/test/mock-api/delete-user.json +15 -0
- data/test/mock-api/detach-server-lb.json +33 -0
- data/test/mock-api/detach-server-mp.json +65 -0
- data/test/mock-api/detach-server-storage.json +19 -0
- data/test/mock-api/edit-image.json +26 -0
- data/test/mock-api/eject-dvd.json +66 -0
- data/test/mock-api/fixed-server-flavors.json +70 -0
- data/test/mock-api/get-appliance.json +16 -0
- data/test/mock-api/get-dvd.json +9 -0
- data/test/mock-api/get-firewall.json +26 -0
- data/test/mock-api/get-fixed-server.json +17 -0
- data/test/mock-api/get-fp-rule.json +7 -0
- data/test/mock-api/get-hardware.json +13 -0
- data/test/mock-api/get-hdd.json +5 -0
- data/test/mock-api/get-image.json +26 -0
- data/test/mock-api/get-lb-rule.json +7 -0
- data/test/mock-api/get-lb-server.json +5 -0
- data/test/mock-api/get-load-balancer.json +33 -0
- data/test/mock-api/get-log.json +23 -0
- data/test/mock-api/get-monitoring-center.json +161 -0
- data/test/mock-api/get-mp-port.json +7 -0
- data/test/mock-api/get-mp-process.json +6 -0
- data/test/mock-api/get-mp-server.json +4 -0
- data/test/mock-api/get-mp.json +65 -0
- data/test/mock-api/get-pn-server.json +4 -0
- data/test/mock-api/get-private-network.json +20 -0
- data/test/mock-api/get-public-ip.json +10 -0
- data/test/mock-api/get-server-dvd.json +4 -0
- data/test/mock-api/get-server-image.json +4 -0
- data/test/mock-api/get-server-ip-fp.json +4 -0
- data/test/mock-api/get-server-ip.json +8 -0
- data/test/mock-api/get-server-pn.json +16 -0
- data/test/mock-api/get-server-status.json +4 -0
- data/test/mock-api/get-server-storage.json +5 -0
- data/test/mock-api/get-server.json +44 -0
- data/test/mock-api/get-storage.json +19 -0
- data/test/mock-api/get-usage.json +161 -0
- data/test/mock-api/get-user-api-key.json +3 -0
- data/test/mock-api/get-user-api.json +7 -0
- data/test/mock-api/get-user.json +15 -0
- data/test/mock-api/list-appliances.json +66 -0
- data/test/mock-api/list-credentials.json +5 -0
- data/test/mock-api/list-dvds.json +128 -0
- data/test/mock-api/list-firewalls.json +54 -0
- data/test/mock-api/list-fp-rules.json +16 -0
- data/test/mock-api/list-hdds.json +7 -0
- data/test/mock-api/list-images.json +54 -0
- data/test/mock-api/list-lb-rules.json +16 -0
- data/test/mock-api/list-lb-servers.json +12 -0
- data/test/mock-api/list-load-balancers.json +68 -0
- data/test/mock-api/list-logs.json +49 -0
- data/test/mock-api/list-monitoring-center-usages.json +90 -0
- data/test/mock-api/list-mp-ports.json +16 -0
- data/test/mock-api/list-mp-processes.json +14 -0
- data/test/mock-api/list-mp-servers.json +10 -0
- data/test/mock-api/list-mps.json +152 -0
- data/test/mock-api/list-pn-servers.json +10 -0
- data/test/mock-api/list-private-networks.json +24 -0
- data/test/mock-api/list-public-ips.json +44 -0
- data/test/mock-api/list-server-fps.json +4 -0
- data/test/mock-api/list-server-ips-fp.json +7 -0
- data/test/mock-api/list-server-ips.json +10 -0
- data/test/mock-api/list-server-lbs.json +6 -0
- data/test/mock-api/list-server-pns.json +6 -0
- data/test/mock-api/list-servers.json +66 -0
- data/test/mock-api/list-snapshots.json +7 -0
- data/test/mock-api/list-storages.json +47 -0
- data/test/mock-api/list-usages.json +144 -0
- data/test/mock-api/list-user-ips.json +5 -0
- data/test/mock-api/list-users.json +31 -0
- data/test/mock-api/load-dvd.json +63 -0
- data/test/mock-api/modify-fp.json +26 -0
- data/test/mock-api/modify-lb.json +33 -0
- data/test/mock-api/modify-mp.json +81 -0
- data/test/mock-api/modify-pn.json +20 -0
- data/test/mock-api/modify-port-mp.json +81 -0
- data/test/mock-api/modify-process-mp.json +73 -0
- data/test/mock-api/modify-public-ip.json +10 -0
- data/test/mock-api/modify-server-hardware.json +44 -0
- data/test/mock-api/modify-server-hdd.json +54 -0
- data/test/mock-api/modify-server.json +44 -0
- data/test/mock-api/modify-storage.json +19 -0
- data/test/mock-api/modify-user-api.json +15 -0
- data/test/mock-api/modify-user.json +15 -0
- data/test/mock-api/reinstall-image.json +52 -0
- data/test/mock-api/remove-firewall-policy.json +26 -0
- data/test/mock-api/remove-hdd.json +54 -0
- data/test/mock-api/remove-ip-fp.json +26 -0
- data/test/mock-api/remove-lb.json +66 -0
- data/test/mock-api/remove-pn.json +71 -0
- data/test/mock-api/remove-port-mp.json +73 -0
- data/test/mock-api/remove-process-mp.json +66 -0
- data/test/mock-api/remove-rule-lb.json +33 -0
- data/test/mock-api/remove-server-ip.json +58 -0
- data/test/mock-api/remove-server-pn.json +16 -0
- data/test/mock-api/restore-snapshot.json +55 -0
- data/test/mock-api/storage-servers.json +12 -0
- data/test/test_mock_dvd.rb +55 -0
- data/test/test_mock_firewall.rb +309 -0
- data/test/test_mock_image.rb +123 -0
- data/test/test_mock_load_balancer.rb +312 -0
- data/test/test_mock_log.rb +55 -0
- data/test/test_mock_monitoring_center.rb +55 -0
- data/test/test_mock_monitoring_policy.rb +587 -0
- data/test/test_mock_private_network.rb +206 -0
- data/test/test_mock_public_ip.rb +118 -0
- data/test/test_mock_server.rb +929 -0
- data/test/test_mock_server_appliance.rb +55 -0
- data/test/test_mock_shared_storage.rb +256 -0
- data/test/test_mock_usage.rb +34 -0
- data/test/test_mock_user.rb +270 -0
- metadata +360 -0
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
Load Balancers
|
|
2
|
+
*****************
|
|
3
|
+
|
|
4
|
+
.. rb:class:: OneAndOne::LoadBalancer()
|
|
5
|
+
|
|
6
|
+
The :rb:class:`LoadBalancer` class allows a user to perform actions against the 1and1 API.
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
.. rb:method:: list(page: nil, per_page: nil, sort: nil, q: nil, fields: nil)
|
|
10
|
+
|
|
11
|
+
Return a list of all load balancers.
|
|
12
|
+
|
|
13
|
+
:param page: Allows the use of pagination. Indicate which page to start on.
|
|
14
|
+
:type page: ``int``
|
|
15
|
+
|
|
16
|
+
:param per_page: Number of items per page.
|
|
17
|
+
:type per_page: ``int``
|
|
18
|
+
|
|
19
|
+
:param sort: ``sort: 'name'`` retrieves a list of elements sorted
|
|
20
|
+
alphabetically. ``sort: 'creation_date'`` retrieves a list of elements
|
|
21
|
+
sorted by their creation date in descending order.
|
|
22
|
+
:type sort: ``str``
|
|
23
|
+
|
|
24
|
+
:param q: ``q`` is for query. Use this parameter to return only the items
|
|
25
|
+
that match your search query.
|
|
26
|
+
:type q: ``str``
|
|
27
|
+
|
|
28
|
+
:param fields: Returns only the parameters requested.
|
|
29
|
+
(i.e. fields: 'id, name, description, hardware.ram')
|
|
30
|
+
:type fields: ``str``
|
|
31
|
+
|
|
32
|
+
:rtype: JSON
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
.. rb:method:: create(name: nil, description: nil, health_check_test: nil, health_check_interval: nil, persistence: nil, persistence_time: nil, method: nil, rules: nil, health_check_path: nil, health_check_parse: nil)
|
|
36
|
+
|
|
37
|
+
Create a load balancer.
|
|
38
|
+
|
|
39
|
+
:param name: load balancer name.
|
|
40
|
+
:type name: ``str``
|
|
41
|
+
|
|
42
|
+
:param description: load balancer description.
|
|
43
|
+
:type description: ``str``
|
|
44
|
+
|
|
45
|
+
:param health_check_test: possible values are ``"NONE"`` or ``"TCP"``.
|
|
46
|
+
:type health_check_test: ``str``
|
|
47
|
+
|
|
48
|
+
:param health_check_interval: Health check period in seconds. Can range between ``5`` and ``300`` seconds.
|
|
49
|
+
:type health_check_interval: ``int``
|
|
50
|
+
|
|
51
|
+
:param persistence: enable or disable persistence.
|
|
52
|
+
:type persistence: ``bool``
|
|
53
|
+
|
|
54
|
+
:param persistence_time: Persistence time in seconds. Required if persistence is enabled. Can range from ``30`` to ``1200`` seconds
|
|
55
|
+
:type persistence_time: ``int``
|
|
56
|
+
|
|
57
|
+
:param method: balancing procedure. Possible values are ``"ROUND_ROBIN"`` or ``"LEAST_CONNECTIONS"``.
|
|
58
|
+
:type method: ``str``
|
|
59
|
+
|
|
60
|
+
:param rules: takes an array of "rule" objects to be added to the load balancer.
|
|
61
|
+
:type rules: ``array``
|
|
62
|
+
|
|
63
|
+
:param health_check_path: Url to call for checking. Required for HTTP health check.
|
|
64
|
+
:type health_check_path: ``str``
|
|
65
|
+
|
|
66
|
+
:param health_check_parse: Regular expression to check. Required for HTTP health check.
|
|
67
|
+
:type health_check_parse: ``str``
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
.. rb:method:: get(load_balancer_id: @id)
|
|
71
|
+
|
|
72
|
+
Returns the current specs of a load balancer.
|
|
73
|
+
|
|
74
|
+
:param load_balancer_id: the unique identifier for the load balancer.
|
|
75
|
+
:type load_balancer_id: ``str``
|
|
76
|
+
|
|
77
|
+
:rtype: JSON
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
.. rb:method:: modify(load_balancer_id: @id, name: nil, description: nil, health_check_test: nil, health_check_interval: nil, persistence: nil, persistence_time: nil, method: nil, health_check_path: nil, health_check_parse: nil)
|
|
81
|
+
|
|
82
|
+
Modify a load balancer.
|
|
83
|
+
|
|
84
|
+
:param load_balancer_id: the unique identifier for the load balancer.
|
|
85
|
+
:type load_balancer_id: ``str``
|
|
86
|
+
|
|
87
|
+
:param name: load balancer name.
|
|
88
|
+
:type name: ``str``
|
|
89
|
+
|
|
90
|
+
:param description: load balancer description.
|
|
91
|
+
:type description: ``str``
|
|
92
|
+
|
|
93
|
+
:param health_check_test: possible values are ``"NONE"``,``"TCP"``, or ``"HTTP"``.
|
|
94
|
+
:type health_check_test: ``str``
|
|
95
|
+
|
|
96
|
+
:param health_check_interval: Health check period in seconds.
|
|
97
|
+
:type health_check_interval: ``int``
|
|
98
|
+
|
|
99
|
+
:param persistence: enable or disable persistnece.
|
|
100
|
+
:type persistence: ``bool``
|
|
101
|
+
|
|
102
|
+
:param persistence_time: Persistence time in seconds. Required if persistence is enabled.
|
|
103
|
+
:type persistence_time: ``int``
|
|
104
|
+
|
|
105
|
+
:param method: balancing procedure. possible values are ``"ROUND_ROBIN"`` or ``"LEAST_CONNECTIONS"``.
|
|
106
|
+
:type method: ``str``
|
|
107
|
+
|
|
108
|
+
:param health_check_path: Url to call for checking. Required for HTTP health check.
|
|
109
|
+
:type health_check_path: ``str``
|
|
110
|
+
|
|
111
|
+
:param health_check_parse: Regular expression to check. Required for HTTP health check.
|
|
112
|
+
:type health_check_parse: ``str``
|
|
113
|
+
|
|
114
|
+
:rtype: JSON
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
.. rb:method:: delete(load_balancer_id: @id)
|
|
118
|
+
|
|
119
|
+
Delete a load balancer.
|
|
120
|
+
|
|
121
|
+
:param load_balancer_id: the unique identifier for the load balancer.
|
|
122
|
+
:type load_balancer_id: ``str``
|
|
123
|
+
|
|
124
|
+
:rtype: JSON
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
.. rb:method:: ips(load_balancer_id: @id)
|
|
128
|
+
|
|
129
|
+
Returns a list of the IP's assigned to a load balancer.
|
|
130
|
+
|
|
131
|
+
Delete a load balancer.
|
|
132
|
+
|
|
133
|
+
:param load_balancer_id: the unique identifier for the load balancer.
|
|
134
|
+
:type load_balancer_id: ``str``
|
|
135
|
+
|
|
136
|
+
:rtype: JSON
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
.. rb:method:: ip(load_balancer_id: @id, ip_id: nil)
|
|
140
|
+
|
|
141
|
+
Returns information about an IP assigned to a load balancer.
|
|
142
|
+
|
|
143
|
+
:param load_balancer_id: the unique identifier for the load balancer.
|
|
144
|
+
:type load_balancer_id: ``str``
|
|
145
|
+
|
|
146
|
+
:param ip_id: the unique identifier for the IP.
|
|
147
|
+
:type ip_id: ``str``
|
|
148
|
+
|
|
149
|
+
:rtype: JSON
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
.. rb:method:: remove_ip(load_balancer_id: @id, ip_id: nil)
|
|
153
|
+
|
|
154
|
+
Remove an IP from a load balancer.
|
|
155
|
+
|
|
156
|
+
:param load_balancer_id: the unique identifier for the load balancer.
|
|
157
|
+
:type load_balancer_id: ``str``
|
|
158
|
+
|
|
159
|
+
:param ip_id: the unique identifier for the IP.
|
|
160
|
+
:type ip_id: ``str``
|
|
161
|
+
|
|
162
|
+
:rtype: JSON
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
.. rb:method:: add_ips(load_balancer_id: @id, ips: nil)
|
|
166
|
+
|
|
167
|
+
Assign IP's to a load balancer.
|
|
168
|
+
|
|
169
|
+
:param load_balancer_id: the unique identifier for the load balancer.
|
|
170
|
+
:type load_balancer_id: ``str``
|
|
171
|
+
|
|
172
|
+
:param ips: takes an array of IP strings to be added to the load balancer.
|
|
173
|
+
:type ips: ``array``
|
|
174
|
+
|
|
175
|
+
:rtype: JSON
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
.. rb:method:: rules(load_balancer_id: @id)
|
|
179
|
+
|
|
180
|
+
Returns a list of the load balancer's rules.
|
|
181
|
+
|
|
182
|
+
:param load_balancer_id: the unique identifier for the load balancer.
|
|
183
|
+
:type load_balancer_id: ``str``
|
|
184
|
+
|
|
185
|
+
:rtype: JSON
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
.. rb:method:: rule(load_balancer_id: @id, rule_id: nil)
|
|
189
|
+
|
|
190
|
+
Returns information about a load balancer's rule.
|
|
191
|
+
|
|
192
|
+
:param load_balancer_id: the unique identifier for the load balancer.
|
|
193
|
+
:type load_balancer_id: ``str``
|
|
194
|
+
|
|
195
|
+
:param rule_id: the unique identifier for the rule.
|
|
196
|
+
:type rule_id: ``str``
|
|
197
|
+
|
|
198
|
+
:rtype: JSON
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
.. rb:method:: add_rules(load_balancer_id: @id, rules: nil)
|
|
202
|
+
|
|
203
|
+
Add rules to a load balancer.
|
|
204
|
+
|
|
205
|
+
:param load_balancer_id: the unique identifier for the load balancer.
|
|
206
|
+
:type load_balancer_id: ``str``
|
|
207
|
+
|
|
208
|
+
:param rules: takes an array of "rule" objects to be added to the load balancer.
|
|
209
|
+
:type rules: ``array``
|
|
210
|
+
|
|
211
|
+
:rtype: JSON
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
.. rb:method:: remove_rule(load_balancer_id: @id, rule_id: nil)
|
|
215
|
+
|
|
216
|
+
Remove a load balancer's rule.
|
|
217
|
+
|
|
218
|
+
:param load_balancer_id: the unique identifier for the load balancer.
|
|
219
|
+
:type load_balancer_id: ``str``
|
|
220
|
+
|
|
221
|
+
:param rule_id: the unique identifier for the rule.
|
|
222
|
+
:type rule_id: ``str``
|
|
223
|
+
|
|
224
|
+
:rtype: JSON
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
.. rb:method:: wait_for()
|
|
228
|
+
|
|
229
|
+
Polls the load balancer until an "ACTIVE" state is returned. Use this when chaining actions.
|
|
230
|
+
|
|
231
|
+
:rtype: ``nil``
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
Logs
|
|
2
|
+
*****************
|
|
3
|
+
|
|
4
|
+
.. rb:class:: OneAndOne::Log()
|
|
5
|
+
|
|
6
|
+
The :rb:class:`Log` class allows a user to perform actions against the 1and1 API.
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
.. rb:method:: list(page: nil, per_page: nil, sort: nil, q: nil, fields: nil, period: 'LAST_24H', start_date: nil, end_date: nil)
|
|
10
|
+
|
|
11
|
+
List all logs by time period.
|
|
12
|
+
|
|
13
|
+
:param page: Allows the use of pagination. Indicate which page to start on.
|
|
14
|
+
:type page: ``int``
|
|
15
|
+
|
|
16
|
+
:param per_page: Number of items per page.
|
|
17
|
+
:type per_page: ``int``
|
|
18
|
+
|
|
19
|
+
:param sort: ``sort: 'name'`` retrieves a list of elements sorted
|
|
20
|
+
alphabetically. ``sort: 'creation_date'`` retrieves a list of elements
|
|
21
|
+
sorted by their creation date in descending order.
|
|
22
|
+
:type sort: ``str``
|
|
23
|
+
|
|
24
|
+
:param q: ``q`` is for query. Use this parameter to return only the items
|
|
25
|
+
that match your search query.
|
|
26
|
+
:type q: ``str``
|
|
27
|
+
|
|
28
|
+
:param fields: Returns only the parameters requested.
|
|
29
|
+
(i.e. fields: 'id, name, description, hardware.ram')
|
|
30
|
+
:type fields: ``str``
|
|
31
|
+
|
|
32
|
+
:param period: the time range of logs to be shown. Possible values are
|
|
33
|
+
``'LAST_HOUR'``, ``'LAST_24H'``, ``'LAST_7D'``, ``'LAST_30D'``,
|
|
34
|
+
``'LAST_365D'``, or ``'CUSTOM'``
|
|
35
|
+
:type period: ``str``
|
|
36
|
+
|
|
37
|
+
:param start_date: start point. Only required if using ``'CUSTOM'`` for the
|
|
38
|
+
``period`` parameter. *Format:* ``2015-19-05T00:05:00Z``
|
|
39
|
+
:type start_date: ``str``
|
|
40
|
+
|
|
41
|
+
:param end_date: end point. Only required if using ``'CUSTOM'`` for the
|
|
42
|
+
``period`` parameter. *Format:* ``2015-19-05T00:10:00Z``
|
|
43
|
+
:type end_date: ``str``
|
|
44
|
+
|
|
45
|
+
:rtype: JSON
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
.. rb:method:: get(log_id: nil)
|
|
49
|
+
|
|
50
|
+
Returns information about a log
|
|
51
|
+
|
|
52
|
+
:param log_id: the unique identifier for the log.
|
|
53
|
+
:type log_id: ``str``
|
|
54
|
+
|
|
55
|
+
:rtype: JSON
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
Monitoring Center
|
|
2
|
+
*****************
|
|
3
|
+
|
|
4
|
+
.. rb:class:: OneAndOne::MonitoringCenter()
|
|
5
|
+
|
|
6
|
+
The :rb:class:`MonitoringCenter` class allows a user to perform actions against the 1and1 API.
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
.. rb:method:: list(page: nil, per_page: nil, sort: nil, q: nil, fields: nil)
|
|
10
|
+
|
|
11
|
+
List all usages and alerts of monitoring servers.
|
|
12
|
+
|
|
13
|
+
:param page: Allows the use of pagination. Indicate which page to start on.
|
|
14
|
+
:type page: ``int``
|
|
15
|
+
|
|
16
|
+
:param per_page: Number of items per page.
|
|
17
|
+
:type per_page: ``int``
|
|
18
|
+
|
|
19
|
+
:param sort: ``sort: 'name'`` retrieves a list of elements sorted
|
|
20
|
+
alphabetically. ``sort: 'creation_date'`` retrieves a list of elements
|
|
21
|
+
sorted by their creation date in descending order.
|
|
22
|
+
:type sort: ``str``
|
|
23
|
+
|
|
24
|
+
:param q: ``q`` is for query. Use this parameter to return only the items
|
|
25
|
+
that match your search query.
|
|
26
|
+
:type q: ``str``
|
|
27
|
+
|
|
28
|
+
:param fields: Returns only the parameters requested.
|
|
29
|
+
(i.e. fields: 'id, name, description, hardware.ram')
|
|
30
|
+
:type fields: ``str``
|
|
31
|
+
|
|
32
|
+
:rtype: JSON
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
.. rb:method:: get(server_id: nil, period: nil, start_date: nil, end_date: nil)
|
|
36
|
+
|
|
37
|
+
Returns the usage of the resources for the specified time range.
|
|
38
|
+
|
|
39
|
+
:param server_id: the unique identifier for the server.
|
|
40
|
+
:type server_id: ``str``
|
|
41
|
+
|
|
42
|
+
:param period: the time range of logs to be shown. Possible values are
|
|
43
|
+
``'LAST_HOUR'``, ``'LAST_24H'``, ``'LAST_7D'``, ``'LAST_30D'``,
|
|
44
|
+
``'LAST_365D'``, or ``'CUSTOM'``
|
|
45
|
+
:type period: ``str``
|
|
46
|
+
|
|
47
|
+
:param start_date: start point. Only required if using ``'CUSTOM'`` for the
|
|
48
|
+
``period`` parameter. *Format:* ``2015-19-05T00:05:00Z``
|
|
49
|
+
:type start_date: ``str``
|
|
50
|
+
|
|
51
|
+
:param end_date: end point. Only required if using ``'CUSTOM'`` for the
|
|
52
|
+
``period`` parameter. *Format:* ``2015-19-05T00:10:00Z``
|
|
53
|
+
:type end_date: ``str``
|
|
54
|
+
|
|
55
|
+
:rtype: JSON
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
Monitoring Policies
|
|
2
|
+
*****************
|
|
3
|
+
|
|
4
|
+
.. rb:class:: OneAndOne::MonitoringPolicy()
|
|
5
|
+
|
|
6
|
+
The :rb:class:`MonitoringPolicy` class allows a user to perform actions against the 1and1 API.
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
.. rb:method:: list(page: nil, per_page: nil, sort: nil, q: nil, fields: nil)
|
|
10
|
+
|
|
11
|
+
Return a list of all monitoring policies.
|
|
12
|
+
|
|
13
|
+
:param page: Allows the use of pagination. Indicate which page to start on.
|
|
14
|
+
:type page: ``int``
|
|
15
|
+
|
|
16
|
+
:param per_page: Number of items per page.
|
|
17
|
+
:type per_page: ``int``
|
|
18
|
+
|
|
19
|
+
:param sort: ``sort: 'name'`` retrieves a list of elements sorted
|
|
20
|
+
alphabetically. ``sort: 'creation_date'`` retrieves a list of elements
|
|
21
|
+
sorted by their creation date in descending order.
|
|
22
|
+
:type sort: ``str``
|
|
23
|
+
|
|
24
|
+
:param q: ``q`` is for query. Use this parameter to return only the items
|
|
25
|
+
that match your search query.
|
|
26
|
+
:type q: ``str``
|
|
27
|
+
|
|
28
|
+
:param fields: Returns only the parameters requested.
|
|
29
|
+
(i.e. fields: 'id, name, description, hardware.ram')
|
|
30
|
+
:type fields: ``str``
|
|
31
|
+
|
|
32
|
+
:rtype: JSON
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
.. rb:method:: create(name: nil, description: nil, email: nil, agent: nil, thresholds: nil, ports: nil, processes: nil)
|
|
36
|
+
|
|
37
|
+
Create a monitoring policy.
|
|
38
|
+
|
|
39
|
+
:param name: monitoring policy name.
|
|
40
|
+
:type name: ``str``
|
|
41
|
+
|
|
42
|
+
:param description: monitoring policy description.
|
|
43
|
+
:type description: ``str``
|
|
44
|
+
|
|
45
|
+
:param email: user's email.
|
|
46
|
+
:type email: ``str``
|
|
47
|
+
|
|
48
|
+
:param agent: set true for using agent.
|
|
49
|
+
:type agent: ``bool``
|
|
50
|
+
|
|
51
|
+
:param thresholds: a "thresholds hash" that sets warning and critical limits for ``cpu``, ``ram``, ``disk``, ``transfer``, and ``internal_ping``.
|
|
52
|
+
:type thresholds: ``hash``
|
|
53
|
+
|
|
54
|
+
:param ports: an array of "port hashes".
|
|
55
|
+
:type ports: ``array``
|
|
56
|
+
|
|
57
|
+
:param processes: an array of "process hashes".
|
|
58
|
+
:type processes: ``array``
|
|
59
|
+
|
|
60
|
+
:rtype: JSON
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
.. rb:method:: get(monitoring_policy_id: @id)
|
|
64
|
+
|
|
65
|
+
Returns a monitoring policy's current specs.
|
|
66
|
+
|
|
67
|
+
:param monitoring_policy_id: the unique identifier for the monitoring policy.
|
|
68
|
+
:type monitoring_policy_id: ``str``
|
|
69
|
+
|
|
70
|
+
:rtype: JSON
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
.. rb:method:: modify(monitoring_policy_id: @id, name: nil, description: nil, email: nil, thresholds: nil)
|
|
74
|
+
|
|
75
|
+
Modify a monitoring policy.
|
|
76
|
+
|
|
77
|
+
:param monitoring_policy_id: the unique identifier for the monitoring policy.
|
|
78
|
+
:type monitoring_policy_id: ``str``
|
|
79
|
+
|
|
80
|
+
:param name: monitoring policy name.
|
|
81
|
+
:type name: ``str``
|
|
82
|
+
|
|
83
|
+
:param description: monitoring policy description.
|
|
84
|
+
:type description: ``str``
|
|
85
|
+
|
|
86
|
+
:param email: user's email.
|
|
87
|
+
:type email: ``str``
|
|
88
|
+
|
|
89
|
+
:param thresholds: a "thresholds hash" that sets warning and critical limits for ``cpu``, ``ram``, ``disk``, ``transfer``, and ``internal_ping``.
|
|
90
|
+
:type thresholds: ``hash``
|
|
91
|
+
|
|
92
|
+
:rtype: JSON
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
.. rb:method:: delete(monitoring_policy_id: @id)
|
|
96
|
+
|
|
97
|
+
Delete a monitoring policy.
|
|
98
|
+
|
|
99
|
+
:param monitoring_policy_id: the unique identifier for the monitoring policy.
|
|
100
|
+
:type monitoring_policy_id: ``str``
|
|
101
|
+
|
|
102
|
+
:rtype: JSON
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
.. rb:method:: ports(monitoring_policy_id: @id)
|
|
106
|
+
|
|
107
|
+
List a monitoring policy's ports.
|
|
108
|
+
|
|
109
|
+
:param monitoring_policy_id: the unique identifier for the monitoring policy.
|
|
110
|
+
:type monitoring_policy_id: ``str``
|
|
111
|
+
|
|
112
|
+
:rtype: JSON
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
.. rb:method:: add_ports(monitoring_policy_id: @id, ports: nil)
|
|
116
|
+
|
|
117
|
+
Add ports to a monitoring policy.
|
|
118
|
+
|
|
119
|
+
:param monitoring_policy_id: the unique identifier for the monitoring policy.
|
|
120
|
+
:type monitoring_policy_id: ``str``
|
|
121
|
+
|
|
122
|
+
:param ports: an array of "port hashes".
|
|
123
|
+
:type ports: ``array``
|
|
124
|
+
|
|
125
|
+
:rtype: JSON
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
.. rb:method:: port(monitoring_policy_id: @id, port_id: nil)
|
|
129
|
+
|
|
130
|
+
Returns information about a monitoring policy's port.
|
|
131
|
+
|
|
132
|
+
:param monitoring_policy_id: the unique identifier for the monitoring policy.
|
|
133
|
+
:type monitoring_policy_id: ``str``
|
|
134
|
+
|
|
135
|
+
:param port_id: the unique identifier for the port.
|
|
136
|
+
:type port_id: ``str``
|
|
137
|
+
|
|
138
|
+
:rtype: JSON
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
.. rb:method:: modify_port(monitoring_policy_id: @id, port_id: nil, new_port: nil)
|
|
142
|
+
|
|
143
|
+
Modify a monitoring policy's port.
|
|
144
|
+
|
|
145
|
+
:param monitoring_policy_id: the unique identifier for the monitoring policy.
|
|
146
|
+
:type monitoring_policy_id: ``str``
|
|
147
|
+
|
|
148
|
+
:param port_id: the unique identifier for the port.
|
|
149
|
+
:type port_id: ``str``
|
|
150
|
+
|
|
151
|
+
:param new_port: takes a "port hash",
|
|
152
|
+
:type new_port: ``hash``
|
|
153
|
+
|
|
154
|
+
:rtype: JSON
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
.. rb:method:: delete_port(monitoring_policy_id: @id, port_id: nil)
|
|
158
|
+
|
|
159
|
+
Delete a monitoring policy's port.
|
|
160
|
+
|
|
161
|
+
:param monitoring_policy_id: the unique identifier for the monitoring policy.
|
|
162
|
+
:type monitoring_policy_id: ``str``
|
|
163
|
+
|
|
164
|
+
:param port_id: the unique identifier for the port.
|
|
165
|
+
:type port_id: ``str``
|
|
166
|
+
|
|
167
|
+
:rtype: JSON
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
.. rb:method:: processes(monitoring_policy_id: @id)
|
|
171
|
+
|
|
172
|
+
List a monitoring policy's processes.
|
|
173
|
+
|
|
174
|
+
:param monitoring_policy_id: the unique identifier for the monitoring policy.
|
|
175
|
+
:type monitoring_policy_id: ``str``
|
|
176
|
+
|
|
177
|
+
:rtype: JSON
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
.. rb:method:: process(monitoring_policy_id: @id, process_id: nil)
|
|
181
|
+
|
|
182
|
+
Returns information about a monitoring policy's process.
|
|
183
|
+
|
|
184
|
+
:param monitoring_policy_id: the unique identifier for the monitoring policy.
|
|
185
|
+
:type monitoring_policy_id: ``str``
|
|
186
|
+
|
|
187
|
+
:param process_id: the unique identifier for the process.
|
|
188
|
+
:type process_id: ``str``
|
|
189
|
+
|
|
190
|
+
:rtype: JSON
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
.. rb:method:: add_processes(monitoring_policy_id: @id, processes: nil)
|
|
194
|
+
|
|
195
|
+
Add processes to a monitoring policy.
|
|
196
|
+
|
|
197
|
+
:param monitoring_policy_id: the unique identifier for the monitoring policy.
|
|
198
|
+
:type monitoring_policy_id: ``str``
|
|
199
|
+
|
|
200
|
+
:param processes: an array of "process hashes".
|
|
201
|
+
:type processes: ``array``
|
|
202
|
+
|
|
203
|
+
:rtype: JSON
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
.. rb:method:: modify_process(monitoring_policy_id: @id, process_id: nil, new_process: nil)
|
|
207
|
+
|
|
208
|
+
Modify a monitoring policy's process.
|
|
209
|
+
|
|
210
|
+
:param monitoring_policy_id: the unique identifier for the monitoring policy.
|
|
211
|
+
:type monitoring_policy_id: ``str``
|
|
212
|
+
|
|
213
|
+
:param process_id: the unique identifier for the process.
|
|
214
|
+
:type process_id: ``str``
|
|
215
|
+
|
|
216
|
+
:param new_process: takes a "process hash",
|
|
217
|
+
:type new_process: ``hash``
|
|
218
|
+
|
|
219
|
+
:rtype: JSON
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
.. rb:method:: delete_process(monitoring_policy_id: @id, process_id: nil)
|
|
223
|
+
|
|
224
|
+
Delete a monitoring policy's process.
|
|
225
|
+
|
|
226
|
+
:param monitoring_policy_id: the unique identifier for the monitoring policy.
|
|
227
|
+
:type monitoring_policy_id: ``str``
|
|
228
|
+
|
|
229
|
+
:param process_id: the unique identifier for the process.
|
|
230
|
+
:type process_id: ``str``
|
|
231
|
+
|
|
232
|
+
:rtype: JSON
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
.. rb:method:: servers(monitoring_policy_id: @id)
|
|
236
|
+
|
|
237
|
+
List a monitoring policy's servers.
|
|
238
|
+
|
|
239
|
+
:param monitoring_policy_id: the unique identifier for the monitoring policy.
|
|
240
|
+
:type monitoring_policy_id: ``str``
|
|
241
|
+
|
|
242
|
+
:rtype: JSON
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
.. rb:method:: server(monitoring_policy_id: @id, server_id: nil)
|
|
246
|
+
|
|
247
|
+
Returns information about a monitoring policy's server.
|
|
248
|
+
|
|
249
|
+
:param monitoring_policy_id: the unique identifier for the monitoring policy.
|
|
250
|
+
:type monitoring_policy_id: ``str``
|
|
251
|
+
|
|
252
|
+
:param server_id: the unique identifier for the server.
|
|
253
|
+
:type server_id: ``str``
|
|
254
|
+
|
|
255
|
+
:rtype: JSON
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
.. rb:method:: add_servers(monitoring_policy_id: @id, servers: nil)
|
|
259
|
+
|
|
260
|
+
Add servers to a monitoring policy.
|
|
261
|
+
|
|
262
|
+
:param monitoring_policy_id: the unique identifier for the monitoring policy.
|
|
263
|
+
:type monitoring_policy_id: ``str``
|
|
264
|
+
|
|
265
|
+
:param servers: an array of server ID strings.
|
|
266
|
+
:type servers: ``array``
|
|
267
|
+
|
|
268
|
+
:rtype: JSON
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
.. rb:method:: remove_server(monitoring_policy_id: @id, server_id: nil)
|
|
272
|
+
|
|
273
|
+
Remove a server from a monitoring policy.
|
|
274
|
+
|
|
275
|
+
:param monitoring_policy_id: the unique identifier for the monitoring policy.
|
|
276
|
+
:type monitoring_policy_id: ``str``
|
|
277
|
+
|
|
278
|
+
:param server_id: the unique identifier for the server.
|
|
279
|
+
:type server_id: ``str``
|
|
280
|
+
|
|
281
|
+
:rtype: JSON
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
.. rb:method:: wait_for()
|
|
285
|
+
|
|
286
|
+
Polls the monitoring policy until an "ACTIVE" state is returned. Use this when chaining actions.
|
|
287
|
+
|
|
288
|
+
:rtype: ``nil``
|