pnap_bmc_api 1.0.0

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.
Files changed (114) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +196 -0
  4. data/Rakefile +10 -0
  5. data/VERSION +1 -0
  6. data/docs/ActionResult.md +18 -0
  7. data/docs/DeleteResult.md +20 -0
  8. data/docs/DeleteSshKeyResult.md +20 -0
  9. data/docs/Error.md +20 -0
  10. data/docs/IpBlocksConfiguration.md +20 -0
  11. data/docs/NetworkConfiguration.md +20 -0
  12. data/docs/OsConfiguration.md +24 -0
  13. data/docs/OsConfigurationMap.md +22 -0
  14. data/docs/OsConfigurationMapEsxi.md +22 -0
  15. data/docs/OsConfigurationMapProxmox.md +22 -0
  16. data/docs/OsConfigurationWindows.md +18 -0
  17. data/docs/PrivateNetworkConfiguration.md +22 -0
  18. data/docs/Quota.md +32 -0
  19. data/docs/QuotaEditLimitRequest.md +20 -0
  20. data/docs/QuotaEditLimitRequestDetails.md +22 -0
  21. data/docs/QuotaEditLimitRequestDetailsAllOf.md +18 -0
  22. data/docs/QuotasApi.md +217 -0
  23. data/docs/RelinquishIpBlock.md +18 -0
  24. data/docs/ResetResult.md +22 -0
  25. data/docs/SSHKeysApi.md +360 -0
  26. data/docs/Server.md +64 -0
  27. data/docs/ServerCreate.md +44 -0
  28. data/docs/ServerIpBlock.md +20 -0
  29. data/docs/ServerPatch.md +20 -0
  30. data/docs/ServerPrivateNetwork.md +24 -0
  31. data/docs/ServerReserve.md +18 -0
  32. data/docs/ServerReset.md +24 -0
  33. data/docs/ServersApi.md +1237 -0
  34. data/docs/SshKey.md +30 -0
  35. data/docs/SshKeyCreate.md +22 -0
  36. data/docs/SshKeyUpdate.md +20 -0
  37. data/docs/TagAssignment.md +26 -0
  38. data/docs/TagAssignmentRequest.md +20 -0
  39. data/lib/pnap_bmc_api/api/quotas_api.rb +212 -0
  40. data/lib/pnap_bmc_api/api/servers_api.rb +1159 -0
  41. data/lib/pnap_bmc_api/api/ssh_keys_api.rb +339 -0
  42. data/lib/pnap_bmc_api/api_client.rb +392 -0
  43. data/lib/pnap_bmc_api/api_error.rb +57 -0
  44. data/lib/pnap_bmc_api/configuration.rb +278 -0
  45. data/lib/pnap_bmc_api/models/action_result.rb +225 -0
  46. data/lib/pnap_bmc_api/models/delete_result.rb +240 -0
  47. data/lib/pnap_bmc_api/models/delete_ssh_key_result.rb +240 -0
  48. data/lib/pnap_bmc_api/models/error.rb +236 -0
  49. data/lib/pnap_bmc_api/models/ip_blocks_configuration.rb +283 -0
  50. data/lib/pnap_bmc_api/models/network_configuration.rb +228 -0
  51. data/lib/pnap_bmc_api/models/os_configuration.rb +266 -0
  52. data/lib/pnap_bmc_api/models/os_configuration_map.rb +237 -0
  53. data/lib/pnap_bmc_api/models/os_configuration_map_esxi.rb +257 -0
  54. data/lib/pnap_bmc_api/models/os_configuration_map_proxmox.rb +257 -0
  55. data/lib/pnap_bmc_api/models/os_configuration_windows.rb +237 -0
  56. data/lib/pnap_bmc_api/models/private_network_configuration.rb +244 -0
  57. data/lib/pnap_bmc_api/models/quota.rb +415 -0
  58. data/lib/pnap_bmc_api/models/quota_edit_limit_request.rb +259 -0
  59. data/lib/pnap_bmc_api/models/quota_edit_limit_request_details.rb +281 -0
  60. data/lib/pnap_bmc_api/models/quota_edit_limit_request_details_all_of.rb +225 -0
  61. data/lib/pnap_bmc_api/models/relinquish_ip_block.rb +222 -0
  62. data/lib/pnap_bmc_api/models/reset_result.rb +244 -0
  63. data/lib/pnap_bmc_api/models/server.rb +687 -0
  64. data/lib/pnap_bmc_api/models/server_create.rb +434 -0
  65. data/lib/pnap_bmc_api/models/server_ip_block.rb +235 -0
  66. data/lib/pnap_bmc_api/models/server_patch.rb +280 -0
  67. data/lib/pnap_bmc_api/models/server_private_network.rb +274 -0
  68. data/lib/pnap_bmc_api/models/server_reserve.rb +225 -0
  69. data/lib/pnap_bmc_api/models/server_reset.rb +255 -0
  70. data/lib/pnap_bmc_api/models/ssh_key.rb +315 -0
  71. data/lib/pnap_bmc_api/models/ssh_key_create.rb +283 -0
  72. data/lib/pnap_bmc_api/models/ssh_key_update.rb +268 -0
  73. data/lib/pnap_bmc_api/models/tag_assignment.rb +309 -0
  74. data/lib/pnap_bmc_api/models/tag_assignment_request.rb +235 -0
  75. data/lib/pnap_bmc_api/version.rb +19 -0
  76. data/lib/pnap_bmc_api.rb +72 -0
  77. data/pnap_bmc_api.gemspec +39 -0
  78. data/spec/api/quotas_api_spec.rb +71 -0
  79. data/spec/api/servers_api_spec.rb +249 -0
  80. data/spec/api/ssh_keys_api_spec.rb +95 -0
  81. data/spec/api_client_spec.rb +226 -0
  82. data/spec/configuration_spec.rb +42 -0
  83. data/spec/models/action_result_spec.rb +34 -0
  84. data/spec/models/delete_result_spec.rb +40 -0
  85. data/spec/models/delete_ssh_key_result_spec.rb +40 -0
  86. data/spec/models/error_spec.rb +40 -0
  87. data/spec/models/ip_blocks_configuration_spec.rb +44 -0
  88. data/spec/models/network_configuration_spec.rb +40 -0
  89. data/spec/models/os_configuration_map_esxi_spec.rb +46 -0
  90. data/spec/models/os_configuration_map_proxmox_spec.rb +46 -0
  91. data/spec/models/os_configuration_map_spec.rb +46 -0
  92. data/spec/models/os_configuration_spec.rb +52 -0
  93. data/spec/models/os_configuration_windows_spec.rb +34 -0
  94. data/spec/models/private_network_configuration_spec.rb +46 -0
  95. data/spec/models/quota_edit_limit_request_details_all_of_spec.rb +34 -0
  96. data/spec/models/quota_edit_limit_request_details_spec.rb +46 -0
  97. data/spec/models/quota_edit_limit_request_spec.rb +40 -0
  98. data/spec/models/quota_spec.rb +84 -0
  99. data/spec/models/relinquish_ip_block_spec.rb +34 -0
  100. data/spec/models/reset_result_spec.rb +46 -0
  101. data/spec/models/server_create_spec.rb +112 -0
  102. data/spec/models/server_ip_block_spec.rb +40 -0
  103. data/spec/models/server_patch_spec.rb +40 -0
  104. data/spec/models/server_private_network_spec.rb +52 -0
  105. data/spec/models/server_reserve_spec.rb +34 -0
  106. data/spec/models/server_reset_spec.rb +52 -0
  107. data/spec/models/server_spec.rb +172 -0
  108. data/spec/models/ssh_key_create_spec.rb +46 -0
  109. data/spec/models/ssh_key_spec.rb +70 -0
  110. data/spec/models/ssh_key_update_spec.rb +40 -0
  111. data/spec/models/tag_assignment_request_spec.rb +40 -0
  112. data/spec/models/tag_assignment_spec.rb +62 -0
  113. data/spec/spec_helper.rb +111 -0
  114. metadata +232 -0
@@ -0,0 +1,1237 @@
1
+ # BmcApi::ServersApi
2
+
3
+ All URIs are relative to *https://api.phoenixnap.com/bmc/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**delete_private_network**](ServersApi.md#delete_private_network) | **DELETE** /servers/{serverId}/network-configuration/private-network-configuration/private-networks/{privateNetworkId} | Removes the server from private network. |
8
+ | [**servers_get**](ServersApi.md#servers_get) | **GET** /servers | List servers. |
9
+ | [**servers_post**](ServersApi.md#servers_post) | **POST** /servers | Create new server. |
10
+ | [**servers_server_id_actions_deprovision_post**](ServersApi.md#servers_server_id_actions_deprovision_post) | **POST** /servers/{serverId}/actions/deprovision | Deprovision a server. |
11
+ | [**servers_server_id_actions_power_off_post**](ServersApi.md#servers_server_id_actions_power_off_post) | **POST** /servers/{serverId}/actions/power-off | Power off server. |
12
+ | [**servers_server_id_actions_power_on_post**](ServersApi.md#servers_server_id_actions_power_on_post) | **POST** /servers/{serverId}/actions/power-on | Power on server. |
13
+ | [**servers_server_id_actions_reboot_post**](ServersApi.md#servers_server_id_actions_reboot_post) | **POST** /servers/{serverId}/actions/reboot | Reboot server. |
14
+ | [**servers_server_id_actions_reserve_post**](ServersApi.md#servers_server_id_actions_reserve_post) | **POST** /servers/{serverId}/actions/reserve | Reserve server. |
15
+ | [**servers_server_id_actions_reset_post**](ServersApi.md#servers_server_id_actions_reset_post) | **POST** /servers/{serverId}/actions/reset | Reset server. |
16
+ | [**servers_server_id_actions_shutdown_post**](ServersApi.md#servers_server_id_actions_shutdown_post) | **POST** /servers/{serverId}/actions/shutdown | Shutdown server. |
17
+ | [**servers_server_id_delete**](ServersApi.md#servers_server_id_delete) | **DELETE** /servers/{serverId} | Delete server. |
18
+ | [**servers_server_id_get**](ServersApi.md#servers_server_id_get) | **GET** /servers/{serverId} | Get server. |
19
+ | [**servers_server_id_ip_blocks_ip_block_id_delete**](ServersApi.md#servers_server_id_ip_blocks_ip_block_id_delete) | **DELETE** /servers/{serverId}/network-configuration/ip-block-configurations/ip-blocks/{ipBlockId} | Unassign IP Block from Server. |
20
+ | [**servers_server_id_ip_blocks_post**](ServersApi.md#servers_server_id_ip_blocks_post) | **POST** /servers/{serverId}/network-configuration/ip-block-configurations/ip-blocks | Assign IP Block to Server. |
21
+ | [**servers_server_id_patch**](ServersApi.md#servers_server_id_patch) | **PATCH** /servers/{serverId} | Patch a Server. |
22
+ | [**servers_server_id_private_networks_post**](ServersApi.md#servers_server_id_private_networks_post) | **POST** /servers/{serverId}/network-configuration/private-network-configuration/private-networks | Adds the server to a private network. |
23
+ | [**servers_server_id_tags_put**](ServersApi.md#servers_server_id_tags_put) | **PUT** /servers/{serverId}/tags | Set server tags. |
24
+
25
+
26
+ ## delete_private_network
27
+
28
+ > String delete_private_network(server_id, private_network_id)
29
+
30
+ Removes the server from private network.
31
+
32
+ Removes the server from private network. <b>No actual configuration is performed on the operating system.</b> BMC configures exclusively the networking devices in the datacenter infrastructure. You are expected to perform network configuration changes in the operating system of this server. <b>This is an advanced network action that can make your server completely unavailable over any network. Make sure you are able to access this server over remote console in case of misconfiguration.</b>
33
+
34
+ ### Examples
35
+
36
+ ```ruby
37
+ require 'time'
38
+ require 'pnap_bmc_api'
39
+ # setup authorization
40
+ BmcApi.configure do |config|
41
+ # Configure OAuth2 access token for authorization: OAuth2
42
+ config.access_token = 'YOUR ACCESS TOKEN'
43
+ end
44
+
45
+ api_instance = BmcApi::ServersApi.new
46
+ server_id = 'e6afba51-7de8-4080-83ab-0f915570659c' # String | The server's ID.
47
+ private_network_id = '603f3b2cfcaf050643b89a4b' # String | The private network identifier.
48
+
49
+ begin
50
+ # Removes the server from private network.
51
+ result = api_instance.delete_private_network(server_id, private_network_id)
52
+ p result
53
+ rescue BmcApi::ApiError => e
54
+ puts "Error when calling ServersApi->delete_private_network: #{e}"
55
+ end
56
+ ```
57
+
58
+ #### Using the delete_private_network_with_http_info variant
59
+
60
+ This returns an Array which contains the response data, status code and headers.
61
+
62
+ > <Array(String, Integer, Hash)> delete_private_network_with_http_info(server_id, private_network_id)
63
+
64
+ ```ruby
65
+ begin
66
+ # Removes the server from private network.
67
+ data, status_code, headers = api_instance.delete_private_network_with_http_info(server_id, private_network_id)
68
+ p status_code # => 2xx
69
+ p headers # => { ... }
70
+ p data # => String
71
+ rescue BmcApi::ApiError => e
72
+ puts "Error when calling ServersApi->delete_private_network_with_http_info: #{e}"
73
+ end
74
+ ```
75
+
76
+ ### Parameters
77
+
78
+ | Name | Type | Description | Notes |
79
+ | ---- | ---- | ----------- | ----- |
80
+ | **server_id** | **String** | The server&#39;s ID. | |
81
+ | **private_network_id** | **String** | The private network identifier. | |
82
+
83
+ ### Return type
84
+
85
+ **String**
86
+
87
+ ### Authorization
88
+
89
+ [OAuth2](../README.md#OAuth2)
90
+
91
+ ### HTTP request headers
92
+
93
+ - **Content-Type**: Not defined
94
+ - **Accept**: application/json
95
+
96
+
97
+ ## servers_get
98
+
99
+ > <Array<Server>> servers_get(opts)
100
+
101
+ List servers.
102
+
103
+ List all servers owned by account.
104
+
105
+ ### Examples
106
+
107
+ ```ruby
108
+ require 'time'
109
+ require 'pnap_bmc_api'
110
+ # setup authorization
111
+ BmcApi.configure do |config|
112
+ # Configure OAuth2 access token for authorization: OAuth2
113
+ config.access_token = 'YOUR ACCESS TOKEN'
114
+ end
115
+
116
+ api_instance = BmcApi::ServersApi.new
117
+ opts = {
118
+ tag: ['inner_example'] # Array<String> | A list of query parameters related to tags in the form of tagName.tagValue
119
+ }
120
+
121
+ begin
122
+ # List servers.
123
+ result = api_instance.servers_get(opts)
124
+ p result
125
+ rescue BmcApi::ApiError => e
126
+ puts "Error when calling ServersApi->servers_get: #{e}"
127
+ end
128
+ ```
129
+
130
+ #### Using the servers_get_with_http_info variant
131
+
132
+ This returns an Array which contains the response data, status code and headers.
133
+
134
+ > <Array(<Array<Server>>, Integer, Hash)> servers_get_with_http_info(opts)
135
+
136
+ ```ruby
137
+ begin
138
+ # List servers.
139
+ data, status_code, headers = api_instance.servers_get_with_http_info(opts)
140
+ p status_code # => 2xx
141
+ p headers # => { ... }
142
+ p data # => <Array<Server>>
143
+ rescue BmcApi::ApiError => e
144
+ puts "Error when calling ServersApi->servers_get_with_http_info: #{e}"
145
+ end
146
+ ```
147
+
148
+ ### Parameters
149
+
150
+ | Name | Type | Description | Notes |
151
+ | ---- | ---- | ----------- | ----- |
152
+ | **tag** | [**Array&lt;String&gt;**](String.md) | A list of query parameters related to tags in the form of tagName.tagValue | [optional] |
153
+
154
+ ### Return type
155
+
156
+ [**Array&lt;Server&gt;**](Server.md)
157
+
158
+ ### Authorization
159
+
160
+ [OAuth2](../README.md#OAuth2)
161
+
162
+ ### HTTP request headers
163
+
164
+ - **Content-Type**: Not defined
165
+ - **Accept**: application/json
166
+
167
+
168
+ ## servers_post
169
+
170
+ > <Server> servers_post(opts)
171
+
172
+ Create new server.
173
+
174
+ Create (request) new server for account. Server DNS will be configured to access Google's public DNS at 8.8.8.8 .
175
+
176
+ ### Examples
177
+
178
+ ```ruby
179
+ require 'time'
180
+ require 'pnap_bmc_api'
181
+ # setup authorization
182
+ BmcApi.configure do |config|
183
+ # Configure OAuth2 access token for authorization: OAuth2
184
+ config.access_token = 'YOUR ACCESS TOKEN'
185
+ end
186
+
187
+ api_instance = BmcApi::ServersApi.new
188
+ opts = {
189
+ server_create: BmcApi::ServerCreate.new({hostname: 'my-server-1', os: 'ubuntu/bionic', type: 's1.c1.small', location: 'PHX'}) # ServerCreate |
190
+ }
191
+
192
+ begin
193
+ # Create new server.
194
+ result = api_instance.servers_post(opts)
195
+ p result
196
+ rescue BmcApi::ApiError => e
197
+ puts "Error when calling ServersApi->servers_post: #{e}"
198
+ end
199
+ ```
200
+
201
+ #### Using the servers_post_with_http_info variant
202
+
203
+ This returns an Array which contains the response data, status code and headers.
204
+
205
+ > <Array(<Server>, Integer, Hash)> servers_post_with_http_info(opts)
206
+
207
+ ```ruby
208
+ begin
209
+ # Create new server.
210
+ data, status_code, headers = api_instance.servers_post_with_http_info(opts)
211
+ p status_code # => 2xx
212
+ p headers # => { ... }
213
+ p data # => <Server>
214
+ rescue BmcApi::ApiError => e
215
+ puts "Error when calling ServersApi->servers_post_with_http_info: #{e}"
216
+ end
217
+ ```
218
+
219
+ ### Parameters
220
+
221
+ | Name | Type | Description | Notes |
222
+ | ---- | ---- | ----------- | ----- |
223
+ | **server_create** | [**ServerCreate**](ServerCreate.md) | | [optional] |
224
+
225
+ ### Return type
226
+
227
+ [**Server**](Server.md)
228
+
229
+ ### Authorization
230
+
231
+ [OAuth2](../README.md#OAuth2)
232
+
233
+ ### HTTP request headers
234
+
235
+ - **Content-Type**: application/json
236
+ - **Accept**: application/json
237
+
238
+
239
+ ## servers_server_id_actions_deprovision_post
240
+
241
+ > String servers_server_id_actions_deprovision_post(server_id, opts)
242
+
243
+ Deprovision a server.
244
+
245
+ Deprovision the server. Supports advanced deprovision configuration.
246
+
247
+ ### Examples
248
+
249
+ ```ruby
250
+ require 'time'
251
+ require 'pnap_bmc_api'
252
+ # setup authorization
253
+ BmcApi.configure do |config|
254
+ # Configure OAuth2 access token for authorization: OAuth2
255
+ config.access_token = 'YOUR ACCESS TOKEN'
256
+ end
257
+
258
+ api_instance = BmcApi::ServersApi.new
259
+ server_id = 'e6afba51-7de8-4080-83ab-0f915570659c' # String | The server's ID.
260
+ opts = {
261
+ relinquish_ip_block: BmcApi::RelinquishIpBlock.new # RelinquishIpBlock |
262
+ }
263
+
264
+ begin
265
+ # Deprovision a server.
266
+ result = api_instance.servers_server_id_actions_deprovision_post(server_id, opts)
267
+ p result
268
+ rescue BmcApi::ApiError => e
269
+ puts "Error when calling ServersApi->servers_server_id_actions_deprovision_post: #{e}"
270
+ end
271
+ ```
272
+
273
+ #### Using the servers_server_id_actions_deprovision_post_with_http_info variant
274
+
275
+ This returns an Array which contains the response data, status code and headers.
276
+
277
+ > <Array(String, Integer, Hash)> servers_server_id_actions_deprovision_post_with_http_info(server_id, opts)
278
+
279
+ ```ruby
280
+ begin
281
+ # Deprovision a server.
282
+ data, status_code, headers = api_instance.servers_server_id_actions_deprovision_post_with_http_info(server_id, opts)
283
+ p status_code # => 2xx
284
+ p headers # => { ... }
285
+ p data # => String
286
+ rescue BmcApi::ApiError => e
287
+ puts "Error when calling ServersApi->servers_server_id_actions_deprovision_post_with_http_info: #{e}"
288
+ end
289
+ ```
290
+
291
+ ### Parameters
292
+
293
+ | Name | Type | Description | Notes |
294
+ | ---- | ---- | ----------- | ----- |
295
+ | **server_id** | **String** | The server&#39;s ID. | |
296
+ | **relinquish_ip_block** | [**RelinquishIpBlock**](RelinquishIpBlock.md) | | [optional] |
297
+
298
+ ### Return type
299
+
300
+ **String**
301
+
302
+ ### Authorization
303
+
304
+ [OAuth2](../README.md#OAuth2)
305
+
306
+ ### HTTP request headers
307
+
308
+ - **Content-Type**: application/json
309
+ - **Accept**: application/json
310
+
311
+
312
+ ## servers_server_id_actions_power_off_post
313
+
314
+ > <ActionResult> servers_server_id_actions_power_off_post(server_id)
315
+
316
+ Power off server.
317
+
318
+ Power off specific server.
319
+
320
+ ### Examples
321
+
322
+ ```ruby
323
+ require 'time'
324
+ require 'pnap_bmc_api'
325
+ # setup authorization
326
+ BmcApi.configure do |config|
327
+ # Configure OAuth2 access token for authorization: OAuth2
328
+ config.access_token = 'YOUR ACCESS TOKEN'
329
+ end
330
+
331
+ api_instance = BmcApi::ServersApi.new
332
+ server_id = 'e6afba51-7de8-4080-83ab-0f915570659c' # String | The server's ID.
333
+
334
+ begin
335
+ # Power off server.
336
+ result = api_instance.servers_server_id_actions_power_off_post(server_id)
337
+ p result
338
+ rescue BmcApi::ApiError => e
339
+ puts "Error when calling ServersApi->servers_server_id_actions_power_off_post: #{e}"
340
+ end
341
+ ```
342
+
343
+ #### Using the servers_server_id_actions_power_off_post_with_http_info variant
344
+
345
+ This returns an Array which contains the response data, status code and headers.
346
+
347
+ > <Array(<ActionResult>, Integer, Hash)> servers_server_id_actions_power_off_post_with_http_info(server_id)
348
+
349
+ ```ruby
350
+ begin
351
+ # Power off server.
352
+ data, status_code, headers = api_instance.servers_server_id_actions_power_off_post_with_http_info(server_id)
353
+ p status_code # => 2xx
354
+ p headers # => { ... }
355
+ p data # => <ActionResult>
356
+ rescue BmcApi::ApiError => e
357
+ puts "Error when calling ServersApi->servers_server_id_actions_power_off_post_with_http_info: #{e}"
358
+ end
359
+ ```
360
+
361
+ ### Parameters
362
+
363
+ | Name | Type | Description | Notes |
364
+ | ---- | ---- | ----------- | ----- |
365
+ | **server_id** | **String** | The server&#39;s ID. | |
366
+
367
+ ### Return type
368
+
369
+ [**ActionResult**](ActionResult.md)
370
+
371
+ ### Authorization
372
+
373
+ [OAuth2](../README.md#OAuth2)
374
+
375
+ ### HTTP request headers
376
+
377
+ - **Content-Type**: Not defined
378
+ - **Accept**: application/json
379
+
380
+
381
+ ## servers_server_id_actions_power_on_post
382
+
383
+ > <ActionResult> servers_server_id_actions_power_on_post(server_id)
384
+
385
+ Power on server.
386
+
387
+ Power on specific server.
388
+
389
+ ### Examples
390
+
391
+ ```ruby
392
+ require 'time'
393
+ require 'pnap_bmc_api'
394
+ # setup authorization
395
+ BmcApi.configure do |config|
396
+ # Configure OAuth2 access token for authorization: OAuth2
397
+ config.access_token = 'YOUR ACCESS TOKEN'
398
+ end
399
+
400
+ api_instance = BmcApi::ServersApi.new
401
+ server_id = 'e6afba51-7de8-4080-83ab-0f915570659c' # String | The server's ID.
402
+
403
+ begin
404
+ # Power on server.
405
+ result = api_instance.servers_server_id_actions_power_on_post(server_id)
406
+ p result
407
+ rescue BmcApi::ApiError => e
408
+ puts "Error when calling ServersApi->servers_server_id_actions_power_on_post: #{e}"
409
+ end
410
+ ```
411
+
412
+ #### Using the servers_server_id_actions_power_on_post_with_http_info variant
413
+
414
+ This returns an Array which contains the response data, status code and headers.
415
+
416
+ > <Array(<ActionResult>, Integer, Hash)> servers_server_id_actions_power_on_post_with_http_info(server_id)
417
+
418
+ ```ruby
419
+ begin
420
+ # Power on server.
421
+ data, status_code, headers = api_instance.servers_server_id_actions_power_on_post_with_http_info(server_id)
422
+ p status_code # => 2xx
423
+ p headers # => { ... }
424
+ p data # => <ActionResult>
425
+ rescue BmcApi::ApiError => e
426
+ puts "Error when calling ServersApi->servers_server_id_actions_power_on_post_with_http_info: #{e}"
427
+ end
428
+ ```
429
+
430
+ ### Parameters
431
+
432
+ | Name | Type | Description | Notes |
433
+ | ---- | ---- | ----------- | ----- |
434
+ | **server_id** | **String** | The server&#39;s ID. | |
435
+
436
+ ### Return type
437
+
438
+ [**ActionResult**](ActionResult.md)
439
+
440
+ ### Authorization
441
+
442
+ [OAuth2](../README.md#OAuth2)
443
+
444
+ ### HTTP request headers
445
+
446
+ - **Content-Type**: Not defined
447
+ - **Accept**: application/json
448
+
449
+
450
+ ## servers_server_id_actions_reboot_post
451
+
452
+ > <ActionResult> servers_server_id_actions_reboot_post(server_id)
453
+
454
+ Reboot server.
455
+
456
+ Reboot specific server.
457
+
458
+ ### Examples
459
+
460
+ ```ruby
461
+ require 'time'
462
+ require 'pnap_bmc_api'
463
+ # setup authorization
464
+ BmcApi.configure do |config|
465
+ # Configure OAuth2 access token for authorization: OAuth2
466
+ config.access_token = 'YOUR ACCESS TOKEN'
467
+ end
468
+
469
+ api_instance = BmcApi::ServersApi.new
470
+ server_id = 'e6afba51-7de8-4080-83ab-0f915570659c' # String | The server's ID.
471
+
472
+ begin
473
+ # Reboot server.
474
+ result = api_instance.servers_server_id_actions_reboot_post(server_id)
475
+ p result
476
+ rescue BmcApi::ApiError => e
477
+ puts "Error when calling ServersApi->servers_server_id_actions_reboot_post: #{e}"
478
+ end
479
+ ```
480
+
481
+ #### Using the servers_server_id_actions_reboot_post_with_http_info variant
482
+
483
+ This returns an Array which contains the response data, status code and headers.
484
+
485
+ > <Array(<ActionResult>, Integer, Hash)> servers_server_id_actions_reboot_post_with_http_info(server_id)
486
+
487
+ ```ruby
488
+ begin
489
+ # Reboot server.
490
+ data, status_code, headers = api_instance.servers_server_id_actions_reboot_post_with_http_info(server_id)
491
+ p status_code # => 2xx
492
+ p headers # => { ... }
493
+ p data # => <ActionResult>
494
+ rescue BmcApi::ApiError => e
495
+ puts "Error when calling ServersApi->servers_server_id_actions_reboot_post_with_http_info: #{e}"
496
+ end
497
+ ```
498
+
499
+ ### Parameters
500
+
501
+ | Name | Type | Description | Notes |
502
+ | ---- | ---- | ----------- | ----- |
503
+ | **server_id** | **String** | The server&#39;s ID. | |
504
+
505
+ ### Return type
506
+
507
+ [**ActionResult**](ActionResult.md)
508
+
509
+ ### Authorization
510
+
511
+ [OAuth2](../README.md#OAuth2)
512
+
513
+ ### HTTP request headers
514
+
515
+ - **Content-Type**: Not defined
516
+ - **Accept**: application/json
517
+
518
+
519
+ ## servers_server_id_actions_reserve_post
520
+
521
+ > <Server> servers_server_id_actions_reserve_post(server_id, opts)
522
+
523
+ Reserve server.
524
+
525
+ Reserve specific server.
526
+
527
+ ### Examples
528
+
529
+ ```ruby
530
+ require 'time'
531
+ require 'pnap_bmc_api'
532
+ # setup authorization
533
+ BmcApi.configure do |config|
534
+ # Configure OAuth2 access token for authorization: OAuth2
535
+ config.access_token = 'YOUR ACCESS TOKEN'
536
+ end
537
+
538
+ api_instance = BmcApi::ServersApi.new
539
+ server_id = 'e6afba51-7de8-4080-83ab-0f915570659c' # String | The server's ID.
540
+ opts = {
541
+ server_reserve: BmcApi::ServerReserve.new({pricing_model: 'ONE_MONTH_RESERVATION'}) # ServerReserve |
542
+ }
543
+
544
+ begin
545
+ # Reserve server.
546
+ result = api_instance.servers_server_id_actions_reserve_post(server_id, opts)
547
+ p result
548
+ rescue BmcApi::ApiError => e
549
+ puts "Error when calling ServersApi->servers_server_id_actions_reserve_post: #{e}"
550
+ end
551
+ ```
552
+
553
+ #### Using the servers_server_id_actions_reserve_post_with_http_info variant
554
+
555
+ This returns an Array which contains the response data, status code and headers.
556
+
557
+ > <Array(<Server>, Integer, Hash)> servers_server_id_actions_reserve_post_with_http_info(server_id, opts)
558
+
559
+ ```ruby
560
+ begin
561
+ # Reserve server.
562
+ data, status_code, headers = api_instance.servers_server_id_actions_reserve_post_with_http_info(server_id, opts)
563
+ p status_code # => 2xx
564
+ p headers # => { ... }
565
+ p data # => <Server>
566
+ rescue BmcApi::ApiError => e
567
+ puts "Error when calling ServersApi->servers_server_id_actions_reserve_post_with_http_info: #{e}"
568
+ end
569
+ ```
570
+
571
+ ### Parameters
572
+
573
+ | Name | Type | Description | Notes |
574
+ | ---- | ---- | ----------- | ----- |
575
+ | **server_id** | **String** | The server&#39;s ID. | |
576
+ | **server_reserve** | [**ServerReserve**](ServerReserve.md) | | [optional] |
577
+
578
+ ### Return type
579
+
580
+ [**Server**](Server.md)
581
+
582
+ ### Authorization
583
+
584
+ [OAuth2](../README.md#OAuth2)
585
+
586
+ ### HTTP request headers
587
+
588
+ - **Content-Type**: application/json
589
+ - **Accept**: application/json
590
+
591
+
592
+ ## servers_server_id_actions_reset_post
593
+
594
+ > <ResetResult> servers_server_id_actions_reset_post(server_id, opts)
595
+
596
+ Reset server.
597
+
598
+ Reset specific server.
599
+
600
+ ### Examples
601
+
602
+ ```ruby
603
+ require 'time'
604
+ require 'pnap_bmc_api'
605
+ # setup authorization
606
+ BmcApi.configure do |config|
607
+ # Configure OAuth2 access token for authorization: OAuth2
608
+ config.access_token = 'YOUR ACCESS TOKEN'
609
+ end
610
+
611
+ api_instance = BmcApi::ServersApi.new
612
+ server_id = 'e6afba51-7de8-4080-83ab-0f915570659c' # String | The server's ID.
613
+ opts = {
614
+ server_reset: BmcApi::ServerReset.new # ServerReset |
615
+ }
616
+
617
+ begin
618
+ # Reset server.
619
+ result = api_instance.servers_server_id_actions_reset_post(server_id, opts)
620
+ p result
621
+ rescue BmcApi::ApiError => e
622
+ puts "Error when calling ServersApi->servers_server_id_actions_reset_post: #{e}"
623
+ end
624
+ ```
625
+
626
+ #### Using the servers_server_id_actions_reset_post_with_http_info variant
627
+
628
+ This returns an Array which contains the response data, status code and headers.
629
+
630
+ > <Array(<ResetResult>, Integer, Hash)> servers_server_id_actions_reset_post_with_http_info(server_id, opts)
631
+
632
+ ```ruby
633
+ begin
634
+ # Reset server.
635
+ data, status_code, headers = api_instance.servers_server_id_actions_reset_post_with_http_info(server_id, opts)
636
+ p status_code # => 2xx
637
+ p headers # => { ... }
638
+ p data # => <ResetResult>
639
+ rescue BmcApi::ApiError => e
640
+ puts "Error when calling ServersApi->servers_server_id_actions_reset_post_with_http_info: #{e}"
641
+ end
642
+ ```
643
+
644
+ ### Parameters
645
+
646
+ | Name | Type | Description | Notes |
647
+ | ---- | ---- | ----------- | ----- |
648
+ | **server_id** | **String** | The server&#39;s ID. | |
649
+ | **server_reset** | [**ServerReset**](ServerReset.md) | | [optional] |
650
+
651
+ ### Return type
652
+
653
+ [**ResetResult**](ResetResult.md)
654
+
655
+ ### Authorization
656
+
657
+ [OAuth2](../README.md#OAuth2)
658
+
659
+ ### HTTP request headers
660
+
661
+ - **Content-Type**: application/json
662
+ - **Accept**: application/json
663
+
664
+
665
+ ## servers_server_id_actions_shutdown_post
666
+
667
+ > <ActionResult> servers_server_id_actions_shutdown_post(server_id)
668
+
669
+ Shutdown server.
670
+
671
+ Shut down specific server.
672
+
673
+ ### Examples
674
+
675
+ ```ruby
676
+ require 'time'
677
+ require 'pnap_bmc_api'
678
+ # setup authorization
679
+ BmcApi.configure do |config|
680
+ # Configure OAuth2 access token for authorization: OAuth2
681
+ config.access_token = 'YOUR ACCESS TOKEN'
682
+ end
683
+
684
+ api_instance = BmcApi::ServersApi.new
685
+ server_id = 'e6afba51-7de8-4080-83ab-0f915570659c' # String | The server's ID.
686
+
687
+ begin
688
+ # Shutdown server.
689
+ result = api_instance.servers_server_id_actions_shutdown_post(server_id)
690
+ p result
691
+ rescue BmcApi::ApiError => e
692
+ puts "Error when calling ServersApi->servers_server_id_actions_shutdown_post: #{e}"
693
+ end
694
+ ```
695
+
696
+ #### Using the servers_server_id_actions_shutdown_post_with_http_info variant
697
+
698
+ This returns an Array which contains the response data, status code and headers.
699
+
700
+ > <Array(<ActionResult>, Integer, Hash)> servers_server_id_actions_shutdown_post_with_http_info(server_id)
701
+
702
+ ```ruby
703
+ begin
704
+ # Shutdown server.
705
+ data, status_code, headers = api_instance.servers_server_id_actions_shutdown_post_with_http_info(server_id)
706
+ p status_code # => 2xx
707
+ p headers # => { ... }
708
+ p data # => <ActionResult>
709
+ rescue BmcApi::ApiError => e
710
+ puts "Error when calling ServersApi->servers_server_id_actions_shutdown_post_with_http_info: #{e}"
711
+ end
712
+ ```
713
+
714
+ ### Parameters
715
+
716
+ | Name | Type | Description | Notes |
717
+ | ---- | ---- | ----------- | ----- |
718
+ | **server_id** | **String** | The server&#39;s ID. | |
719
+
720
+ ### Return type
721
+
722
+ [**ActionResult**](ActionResult.md)
723
+
724
+ ### Authorization
725
+
726
+ [OAuth2](../README.md#OAuth2)
727
+
728
+ ### HTTP request headers
729
+
730
+ - **Content-Type**: Not defined
731
+ - **Accept**: application/json
732
+
733
+
734
+ ## servers_server_id_delete
735
+
736
+ > <DeleteResult> servers_server_id_delete(server_id)
737
+
738
+ Delete server.
739
+
740
+ Deprovision specific server. Any IP blocks assigned to this server will also be relinquished and deleted. Deprecated: see /servers/{serverId}/actions/deprovision
741
+
742
+ ### Examples
743
+
744
+ ```ruby
745
+ require 'time'
746
+ require 'pnap_bmc_api'
747
+ # setup authorization
748
+ BmcApi.configure do |config|
749
+ # Configure OAuth2 access token for authorization: OAuth2
750
+ config.access_token = 'YOUR ACCESS TOKEN'
751
+ end
752
+
753
+ api_instance = BmcApi::ServersApi.new
754
+ server_id = 'e6afba51-7de8-4080-83ab-0f915570659c' # String | The server's ID.
755
+
756
+ begin
757
+ # Delete server.
758
+ result = api_instance.servers_server_id_delete(server_id)
759
+ p result
760
+ rescue BmcApi::ApiError => e
761
+ puts "Error when calling ServersApi->servers_server_id_delete: #{e}"
762
+ end
763
+ ```
764
+
765
+ #### Using the servers_server_id_delete_with_http_info variant
766
+
767
+ This returns an Array which contains the response data, status code and headers.
768
+
769
+ > <Array(<DeleteResult>, Integer, Hash)> servers_server_id_delete_with_http_info(server_id)
770
+
771
+ ```ruby
772
+ begin
773
+ # Delete server.
774
+ data, status_code, headers = api_instance.servers_server_id_delete_with_http_info(server_id)
775
+ p status_code # => 2xx
776
+ p headers # => { ... }
777
+ p data # => <DeleteResult>
778
+ rescue BmcApi::ApiError => e
779
+ puts "Error when calling ServersApi->servers_server_id_delete_with_http_info: #{e}"
780
+ end
781
+ ```
782
+
783
+ ### Parameters
784
+
785
+ | Name | Type | Description | Notes |
786
+ | ---- | ---- | ----------- | ----- |
787
+ | **server_id** | **String** | The server&#39;s ID. | |
788
+
789
+ ### Return type
790
+
791
+ [**DeleteResult**](DeleteResult.md)
792
+
793
+ ### Authorization
794
+
795
+ [OAuth2](../README.md#OAuth2)
796
+
797
+ ### HTTP request headers
798
+
799
+ - **Content-Type**: Not defined
800
+ - **Accept**: application/json
801
+
802
+
803
+ ## servers_server_id_get
804
+
805
+ > <Server> servers_server_id_get(server_id)
806
+
807
+ Get server.
808
+
809
+ Get server properties.
810
+
811
+ ### Examples
812
+
813
+ ```ruby
814
+ require 'time'
815
+ require 'pnap_bmc_api'
816
+ # setup authorization
817
+ BmcApi.configure do |config|
818
+ # Configure OAuth2 access token for authorization: OAuth2
819
+ config.access_token = 'YOUR ACCESS TOKEN'
820
+ end
821
+
822
+ api_instance = BmcApi::ServersApi.new
823
+ server_id = 'e6afba51-7de8-4080-83ab-0f915570659c' # String | The server's ID.
824
+
825
+ begin
826
+ # Get server.
827
+ result = api_instance.servers_server_id_get(server_id)
828
+ p result
829
+ rescue BmcApi::ApiError => e
830
+ puts "Error when calling ServersApi->servers_server_id_get: #{e}"
831
+ end
832
+ ```
833
+
834
+ #### Using the servers_server_id_get_with_http_info variant
835
+
836
+ This returns an Array which contains the response data, status code and headers.
837
+
838
+ > <Array(<Server>, Integer, Hash)> servers_server_id_get_with_http_info(server_id)
839
+
840
+ ```ruby
841
+ begin
842
+ # Get server.
843
+ data, status_code, headers = api_instance.servers_server_id_get_with_http_info(server_id)
844
+ p status_code # => 2xx
845
+ p headers # => { ... }
846
+ p data # => <Server>
847
+ rescue BmcApi::ApiError => e
848
+ puts "Error when calling ServersApi->servers_server_id_get_with_http_info: #{e}"
849
+ end
850
+ ```
851
+
852
+ ### Parameters
853
+
854
+ | Name | Type | Description | Notes |
855
+ | ---- | ---- | ----------- | ----- |
856
+ | **server_id** | **String** | The server&#39;s ID. | |
857
+
858
+ ### Return type
859
+
860
+ [**Server**](Server.md)
861
+
862
+ ### Authorization
863
+
864
+ [OAuth2](../README.md#OAuth2)
865
+
866
+ ### HTTP request headers
867
+
868
+ - **Content-Type**: Not defined
869
+ - **Accept**: application/json
870
+
871
+
872
+ ## servers_server_id_ip_blocks_ip_block_id_delete
873
+
874
+ > String servers_server_id_ip_blocks_ip_block_id_delete(server_id, ip_block_id, opts)
875
+
876
+ Unassign IP Block from Server.
877
+
878
+ Removes the IP block from the server. <b>No actual configuration is performed on the operating system.</b> BMC configures exclusively the networking devices in the datacenter infrastructure. You are expected to perform network configuration changes in the operating system of this server. <b>This is an advanced network action that can make your server completely unavailable over any network. Make sure you are able to access this server over remote console in case of misconfiguration.</b>
879
+
880
+ ### Examples
881
+
882
+ ```ruby
883
+ require 'time'
884
+ require 'pnap_bmc_api'
885
+ # setup authorization
886
+ BmcApi.configure do |config|
887
+ # Configure OAuth2 access token for authorization: OAuth2
888
+ config.access_token = 'YOUR ACCESS TOKEN'
889
+ end
890
+
891
+ api_instance = BmcApi::ServersApi.new
892
+ server_id = 'e6afba51-7de8-4080-83ab-0f915570659c' # String | The server's ID.
893
+ ip_block_id = '6047127fed34ecc3ba8402d2' # String | The IP Block identifier.
894
+ opts = {
895
+ relinquish_ip_block: BmcApi::RelinquishIpBlock.new # RelinquishIpBlock |
896
+ }
897
+
898
+ begin
899
+ # Unassign IP Block from Server.
900
+ result = api_instance.servers_server_id_ip_blocks_ip_block_id_delete(server_id, ip_block_id, opts)
901
+ p result
902
+ rescue BmcApi::ApiError => e
903
+ puts "Error when calling ServersApi->servers_server_id_ip_blocks_ip_block_id_delete: #{e}"
904
+ end
905
+ ```
906
+
907
+ #### Using the servers_server_id_ip_blocks_ip_block_id_delete_with_http_info variant
908
+
909
+ This returns an Array which contains the response data, status code and headers.
910
+
911
+ > <Array(String, Integer, Hash)> servers_server_id_ip_blocks_ip_block_id_delete_with_http_info(server_id, ip_block_id, opts)
912
+
913
+ ```ruby
914
+ begin
915
+ # Unassign IP Block from Server.
916
+ data, status_code, headers = api_instance.servers_server_id_ip_blocks_ip_block_id_delete_with_http_info(server_id, ip_block_id, opts)
917
+ p status_code # => 2xx
918
+ p headers # => { ... }
919
+ p data # => String
920
+ rescue BmcApi::ApiError => e
921
+ puts "Error when calling ServersApi->servers_server_id_ip_blocks_ip_block_id_delete_with_http_info: #{e}"
922
+ end
923
+ ```
924
+
925
+ ### Parameters
926
+
927
+ | Name | Type | Description | Notes |
928
+ | ---- | ---- | ----------- | ----- |
929
+ | **server_id** | **String** | The server&#39;s ID. | |
930
+ | **ip_block_id** | **String** | The IP Block identifier. | |
931
+ | **relinquish_ip_block** | [**RelinquishIpBlock**](RelinquishIpBlock.md) | | [optional] |
932
+
933
+ ### Return type
934
+
935
+ **String**
936
+
937
+ ### Authorization
938
+
939
+ [OAuth2](../README.md#OAuth2)
940
+
941
+ ### HTTP request headers
942
+
943
+ - **Content-Type**: application/json
944
+ - **Accept**: application/json
945
+
946
+
947
+ ## servers_server_id_ip_blocks_post
948
+
949
+ > <ServerIpBlock> servers_server_id_ip_blocks_post(server_id, opts)
950
+
951
+ Assign IP Block to Server.
952
+
953
+ Adds an IP block to this server. <b>No actual configuration is performed on the operating system.</b> BMC configures exclusively the networking devices in the datacenter infrastructure. You are expected to perform network configuration changes in the operating system of this server.
954
+
955
+ ### Examples
956
+
957
+ ```ruby
958
+ require 'time'
959
+ require 'pnap_bmc_api'
960
+ # setup authorization
961
+ BmcApi.configure do |config|
962
+ # Configure OAuth2 access token for authorization: OAuth2
963
+ config.access_token = 'YOUR ACCESS TOKEN'
964
+ end
965
+
966
+ api_instance = BmcApi::ServersApi.new
967
+ server_id = 'e6afba51-7de8-4080-83ab-0f915570659c' # String | The server's ID.
968
+ opts = {
969
+ server_ip_block: BmcApi::ServerIpBlock.new({id: '60473a6115e34466c9f8f083'}) # ServerIpBlock |
970
+ }
971
+
972
+ begin
973
+ # Assign IP Block to Server.
974
+ result = api_instance.servers_server_id_ip_blocks_post(server_id, opts)
975
+ p result
976
+ rescue BmcApi::ApiError => e
977
+ puts "Error when calling ServersApi->servers_server_id_ip_blocks_post: #{e}"
978
+ end
979
+ ```
980
+
981
+ #### Using the servers_server_id_ip_blocks_post_with_http_info variant
982
+
983
+ This returns an Array which contains the response data, status code and headers.
984
+
985
+ > <Array(<ServerIpBlock>, Integer, Hash)> servers_server_id_ip_blocks_post_with_http_info(server_id, opts)
986
+
987
+ ```ruby
988
+ begin
989
+ # Assign IP Block to Server.
990
+ data, status_code, headers = api_instance.servers_server_id_ip_blocks_post_with_http_info(server_id, opts)
991
+ p status_code # => 2xx
992
+ p headers # => { ... }
993
+ p data # => <ServerIpBlock>
994
+ rescue BmcApi::ApiError => e
995
+ puts "Error when calling ServersApi->servers_server_id_ip_blocks_post_with_http_info: #{e}"
996
+ end
997
+ ```
998
+
999
+ ### Parameters
1000
+
1001
+ | Name | Type | Description | Notes |
1002
+ | ---- | ---- | ----------- | ----- |
1003
+ | **server_id** | **String** | The server&#39;s ID. | |
1004
+ | **server_ip_block** | [**ServerIpBlock**](ServerIpBlock.md) | | [optional] |
1005
+
1006
+ ### Return type
1007
+
1008
+ [**ServerIpBlock**](ServerIpBlock.md)
1009
+
1010
+ ### Authorization
1011
+
1012
+ [OAuth2](../README.md#OAuth2)
1013
+
1014
+ ### HTTP request headers
1015
+
1016
+ - **Content-Type**: application/json
1017
+ - **Accept**: application/json
1018
+
1019
+
1020
+ ## servers_server_id_patch
1021
+
1022
+ > <Server> servers_server_id_patch(server_id, opts)
1023
+
1024
+ Patch a Server.
1025
+
1026
+ Any changes to the hostname or description using the BMC API will reflect solely in the BMC API and portal. The changes are intended to keep the BMC data up to date with your server. We do not have access to your server's settings. Local changes to the server's hostname will not be reflected in the API or portal.
1027
+
1028
+ ### Examples
1029
+
1030
+ ```ruby
1031
+ require 'time'
1032
+ require 'pnap_bmc_api'
1033
+ # setup authorization
1034
+ BmcApi.configure do |config|
1035
+ # Configure OAuth2 access token for authorization: OAuth2
1036
+ config.access_token = 'YOUR ACCESS TOKEN'
1037
+ end
1038
+
1039
+ api_instance = BmcApi::ServersApi.new
1040
+ server_id = 'e6afba51-7de8-4080-83ab-0f915570659c' # String | The server's ID.
1041
+ opts = {
1042
+ server_patch: BmcApi::ServerPatch.new # ServerPatch |
1043
+ }
1044
+
1045
+ begin
1046
+ # Patch a Server.
1047
+ result = api_instance.servers_server_id_patch(server_id, opts)
1048
+ p result
1049
+ rescue BmcApi::ApiError => e
1050
+ puts "Error when calling ServersApi->servers_server_id_patch: #{e}"
1051
+ end
1052
+ ```
1053
+
1054
+ #### Using the servers_server_id_patch_with_http_info variant
1055
+
1056
+ This returns an Array which contains the response data, status code and headers.
1057
+
1058
+ > <Array(<Server>, Integer, Hash)> servers_server_id_patch_with_http_info(server_id, opts)
1059
+
1060
+ ```ruby
1061
+ begin
1062
+ # Patch a Server.
1063
+ data, status_code, headers = api_instance.servers_server_id_patch_with_http_info(server_id, opts)
1064
+ p status_code # => 2xx
1065
+ p headers # => { ... }
1066
+ p data # => <Server>
1067
+ rescue BmcApi::ApiError => e
1068
+ puts "Error when calling ServersApi->servers_server_id_patch_with_http_info: #{e}"
1069
+ end
1070
+ ```
1071
+
1072
+ ### Parameters
1073
+
1074
+ | Name | Type | Description | Notes |
1075
+ | ---- | ---- | ----------- | ----- |
1076
+ | **server_id** | **String** | The server&#39;s ID. | |
1077
+ | **server_patch** | [**ServerPatch**](ServerPatch.md) | | [optional] |
1078
+
1079
+ ### Return type
1080
+
1081
+ [**Server**](Server.md)
1082
+
1083
+ ### Authorization
1084
+
1085
+ [OAuth2](../README.md#OAuth2)
1086
+
1087
+ ### HTTP request headers
1088
+
1089
+ - **Content-Type**: application/json
1090
+ - **Accept**: application/json
1091
+
1092
+
1093
+ ## servers_server_id_private_networks_post
1094
+
1095
+ > <ServerPrivateNetwork> servers_server_id_private_networks_post(server_id, opts)
1096
+
1097
+ Adds the server to a private network.
1098
+
1099
+ Adds the server to a private network.
1100
+
1101
+ ### Examples
1102
+
1103
+ ```ruby
1104
+ require 'time'
1105
+ require 'pnap_bmc_api'
1106
+ # setup authorization
1107
+ BmcApi.configure do |config|
1108
+ # Configure OAuth2 access token for authorization: OAuth2
1109
+ config.access_token = 'YOUR ACCESS TOKEN'
1110
+ end
1111
+
1112
+ api_instance = BmcApi::ServersApi.new
1113
+ server_id = 'e6afba51-7de8-4080-83ab-0f915570659c' # String | The server's ID.
1114
+ opts = {
1115
+ server_private_network: BmcApi::ServerPrivateNetwork.new({id: '603f3b2cfcaf050643b89a4b'}) # ServerPrivateNetwork |
1116
+ }
1117
+
1118
+ begin
1119
+ # Adds the server to a private network.
1120
+ result = api_instance.servers_server_id_private_networks_post(server_id, opts)
1121
+ p result
1122
+ rescue BmcApi::ApiError => e
1123
+ puts "Error when calling ServersApi->servers_server_id_private_networks_post: #{e}"
1124
+ end
1125
+ ```
1126
+
1127
+ #### Using the servers_server_id_private_networks_post_with_http_info variant
1128
+
1129
+ This returns an Array which contains the response data, status code and headers.
1130
+
1131
+ > <Array(<ServerPrivateNetwork>, Integer, Hash)> servers_server_id_private_networks_post_with_http_info(server_id, opts)
1132
+
1133
+ ```ruby
1134
+ begin
1135
+ # Adds the server to a private network.
1136
+ data, status_code, headers = api_instance.servers_server_id_private_networks_post_with_http_info(server_id, opts)
1137
+ p status_code # => 2xx
1138
+ p headers # => { ... }
1139
+ p data # => <ServerPrivateNetwork>
1140
+ rescue BmcApi::ApiError => e
1141
+ puts "Error when calling ServersApi->servers_server_id_private_networks_post_with_http_info: #{e}"
1142
+ end
1143
+ ```
1144
+
1145
+ ### Parameters
1146
+
1147
+ | Name | Type | Description | Notes |
1148
+ | ---- | ---- | ----------- | ----- |
1149
+ | **server_id** | **String** | The server&#39;s ID. | |
1150
+ | **server_private_network** | [**ServerPrivateNetwork**](ServerPrivateNetwork.md) | | [optional] |
1151
+
1152
+ ### Return type
1153
+
1154
+ [**ServerPrivateNetwork**](ServerPrivateNetwork.md)
1155
+
1156
+ ### Authorization
1157
+
1158
+ [OAuth2](../README.md#OAuth2)
1159
+
1160
+ ### HTTP request headers
1161
+
1162
+ - **Content-Type**: application/json
1163
+ - **Accept**: application/json
1164
+
1165
+
1166
+ ## servers_server_id_tags_put
1167
+
1168
+ > <Server> servers_server_id_tags_put(server_id, opts)
1169
+
1170
+ Set server tags.
1171
+
1172
+ Set tags for server.
1173
+
1174
+ ### Examples
1175
+
1176
+ ```ruby
1177
+ require 'time'
1178
+ require 'pnap_bmc_api'
1179
+ # setup authorization
1180
+ BmcApi.configure do |config|
1181
+ # Configure OAuth2 access token for authorization: OAuth2
1182
+ config.access_token = 'YOUR ACCESS TOKEN'
1183
+ end
1184
+
1185
+ api_instance = BmcApi::ServersApi.new
1186
+ server_id = 'e6afba51-7de8-4080-83ab-0f915570659c' # String | The server's ID.
1187
+ opts = {
1188
+ tag_assignment_request: [BmcApi::TagAssignmentRequest.new({name: 'Environment'})] # Array<TagAssignmentRequest> |
1189
+ }
1190
+
1191
+ begin
1192
+ # Set server tags.
1193
+ result = api_instance.servers_server_id_tags_put(server_id, opts)
1194
+ p result
1195
+ rescue BmcApi::ApiError => e
1196
+ puts "Error when calling ServersApi->servers_server_id_tags_put: #{e}"
1197
+ end
1198
+ ```
1199
+
1200
+ #### Using the servers_server_id_tags_put_with_http_info variant
1201
+
1202
+ This returns an Array which contains the response data, status code and headers.
1203
+
1204
+ > <Array(<Server>, Integer, Hash)> servers_server_id_tags_put_with_http_info(server_id, opts)
1205
+
1206
+ ```ruby
1207
+ begin
1208
+ # Set server tags.
1209
+ data, status_code, headers = api_instance.servers_server_id_tags_put_with_http_info(server_id, opts)
1210
+ p status_code # => 2xx
1211
+ p headers # => { ... }
1212
+ p data # => <Server>
1213
+ rescue BmcApi::ApiError => e
1214
+ puts "Error when calling ServersApi->servers_server_id_tags_put_with_http_info: #{e}"
1215
+ end
1216
+ ```
1217
+
1218
+ ### Parameters
1219
+
1220
+ | Name | Type | Description | Notes |
1221
+ | ---- | ---- | ----------- | ----- |
1222
+ | **server_id** | **String** | The server&#39;s ID. | |
1223
+ | **tag_assignment_request** | [**Array&lt;TagAssignmentRequest&gt;**](TagAssignmentRequest.md) | | [optional] |
1224
+
1225
+ ### Return type
1226
+
1227
+ [**Server**](Server.md)
1228
+
1229
+ ### Authorization
1230
+
1231
+ [OAuth2](../README.md#OAuth2)
1232
+
1233
+ ### HTTP request headers
1234
+
1235
+ - **Content-Type**: application/json
1236
+ - **Accept**: application/json
1237
+