Class: Ionoscloud::NicApi
- Inherits:
-
Object
- Object
- Ionoscloud::NicApi
- Defined in:
- lib/ionoscloud/api/nic_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#datacenters_servers_nics_delete(datacenter_id, server_id, nic_id, opts = {}) ⇒ Object
Delete a Nic Deletes the specified NIC.
-
#datacenters_servers_nics_delete_with_http_info(datacenter_id, server_id, nic_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Delete a Nic Deletes the specified NIC.
-
#datacenters_servers_nics_find_by_id(datacenter_id, server_id, nic_id, opts = {}) ⇒ Nic
Retrieve a Nic Retrieves the attributes of a given NIC.
-
#datacenters_servers_nics_find_by_id_with_http_info(datacenter_id, server_id, nic_id, opts = {}) ⇒ Array<(Nic, Integer, Hash)>
Retrieve a Nic Retrieves the attributes of a given NIC.
-
#datacenters_servers_nics_firewallrules_delete(datacenter_id, server_id, nic_id, firewallrule_id, opts = {}) ⇒ Object
Delete a Firewall Rule Removes the specific Firewall Rule.
-
#datacenters_servers_nics_firewallrules_delete_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Delete a Firewall Rule Removes the specific Firewall Rule.
-
#datacenters_servers_nics_firewallrules_find_by_id(datacenter_id, server_id, nic_id, firewallrule_id, opts = {}) ⇒ FirewallRule
Retrieve a Firewall Rule Retrieves the attributes of a given Firewall Rule.
-
#datacenters_servers_nics_firewallrules_find_by_id_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, opts = {}) ⇒ Array<(FirewallRule, Integer, Hash)>
Retrieve a Firewall Rule Retrieves the attributes of a given Firewall Rule.
-
#datacenters_servers_nics_firewallrules_get(datacenter_id, server_id, nic_id, opts = {}) ⇒ FirewallRules
List Firewall Rules Retrieves a list of firewall rules associated with a particular NIC.
-
#datacenters_servers_nics_firewallrules_get_with_http_info(datacenter_id, server_id, nic_id, opts = {}) ⇒ Array<(FirewallRules, Integer, Hash)>
List Firewall Rules Retrieves a list of firewall rules associated with a particular NIC.
-
#datacenters_servers_nics_firewallrules_patch(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, opts = {}) ⇒ FirewallRule
Partially modify a Firewall Rule You can use update attributes of a resource.
-
#datacenters_servers_nics_firewallrules_patch_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, opts = {}) ⇒ Array<(FirewallRule, Integer, Hash)>
Partially modify a Firewall Rule You can use update attributes of a resource.
-
#datacenters_servers_nics_firewallrules_post(datacenter_id, server_id, nic_id, firewallrule, opts = {}) ⇒ FirewallRule
Create a Firewall Rule This will add a Firewall Rule to the NIC.
-
#datacenters_servers_nics_firewallrules_post_with_http_info(datacenter_id, server_id, nic_id, firewallrule, opts = {}) ⇒ Array<(FirewallRule, Integer, Hash)>
Create a Firewall Rule This will add a Firewall Rule to the NIC.
-
#datacenters_servers_nics_firewallrules_put(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, opts = {}) ⇒ FirewallRule
Modify a Firewall Rule You can use update attributes of a resource.
-
#datacenters_servers_nics_firewallrules_put_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, opts = {}) ⇒ Array<(FirewallRule, Integer, Hash)>
Modify a Firewall Rule You can use update attributes of a resource.
-
#datacenters_servers_nics_get(datacenter_id, server_id, opts = {}) ⇒ Nics
List Nics Retrieves a list of NICs.
-
#datacenters_servers_nics_get_with_http_info(datacenter_id, server_id, opts = {}) ⇒ Array<(Nics, Integer, Hash)>
List Nics Retrieves a list of NICs.
-
#datacenters_servers_nics_patch(datacenter_id, server_id, nic_id, nic, opts = {}) ⇒ Nic
Partially modify a Nic You can use update attributes of a Nic.
-
#datacenters_servers_nics_patch_with_http_info(datacenter_id, server_id, nic_id, nic, opts = {}) ⇒ Array<(Nic, Integer, Hash)>
Partially modify a Nic You can use update attributes of a Nic.
-
#datacenters_servers_nics_post(datacenter_id, server_id, nic, opts = {}) ⇒ Nic
Create a Nic Adds a NIC to the target server.
-
#datacenters_servers_nics_post_with_http_info(datacenter_id, server_id, nic, opts = {}) ⇒ Array<(Nic, Integer, Hash)>
Create a Nic Adds a NIC to the target server.
-
#datacenters_servers_nics_put(datacenter_id, server_id, nic_id, nic, opts = {}) ⇒ Nic
Modify a Nic You can use update attributes of a Nic.
-
#datacenters_servers_nics_put_with_http_info(datacenter_id, server_id, nic_id, nic, opts = {}) ⇒ Array<(Nic, Integer, Hash)>
Modify a Nic You can use update attributes of a Nic.
-
#initialize(api_client = ApiClient.default) ⇒ NicApi
constructor
A new instance of NicApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ NicApi
Returns a new instance of NicApi.
19 20 21 |
# File 'lib/ionoscloud/api/nic_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/ionoscloud/api/nic_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#datacenters_servers_nics_delete(datacenter_id, server_id, nic_id, opts = {}) ⇒ Object
Delete a Nic Deletes the specified NIC.
32 33 34 35 |
# File 'lib/ionoscloud/api/nic_api.rb', line 32 def datacenters_servers_nics_delete(datacenter_id, server_id, nic_id, opts = {}) data, _status_code, _headers = datacenters_servers_nics_delete_with_http_info(datacenter_id, server_id, nic_id, opts) data end |
#datacenters_servers_nics_delete_with_http_info(datacenter_id, server_id, nic_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Delete a Nic Deletes the specified NIC.
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/ionoscloud/api/nic_api.rb', line 47 def datacenters_servers_nics_delete_with_http_info(datacenter_id, server_id, nic_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NicApi.datacenters_servers_nics_delete ...' end # verify the required parameter 'datacenter_id' is set if @api_client.config.client_side_validation && datacenter_id.nil? fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling NicApi.datacenters_servers_nics_delete" end # verify the required parameter 'server_id' is set if @api_client.config.client_side_validation && server_id.nil? fail ArgumentError, "Missing the required parameter 'server_id' when calling NicApi.datacenters_servers_nics_delete" end # verify the required parameter 'nic_id' is set if @api_client.config.client_side_validation && nic_id.nil? fail ArgumentError, "Missing the required parameter 'nic_id' when calling NicApi.datacenters_servers_nics_delete" end if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10 fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_delete, must be smaller than or equal to 10.' end if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0 fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_delete, must be greater than or equal to 0.' end # resource path local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)).sub('{' + 'nicId' + '}', CGI.escape(nic_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil? query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication'] = opts.merge( :operation => :"NicApi.datacenters_servers_nics_delete", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NicApi#datacenters_servers_nics_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#datacenters_servers_nics_find_by_id(datacenter_id, server_id, nic_id, opts = {}) ⇒ Nic
Retrieve a Nic Retrieves the attributes of a given NIC
124 125 126 127 |
# File 'lib/ionoscloud/api/nic_api.rb', line 124 def datacenters_servers_nics_find_by_id(datacenter_id, server_id, nic_id, opts = {}) data, _status_code, _headers = datacenters_servers_nics_find_by_id_with_http_info(datacenter_id, server_id, nic_id, opts) data end |
#datacenters_servers_nics_find_by_id_with_http_info(datacenter_id, server_id, nic_id, opts = {}) ⇒ Array<(Nic, Integer, Hash)>
Retrieve a Nic Retrieves the attributes of a given NIC
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'lib/ionoscloud/api/nic_api.rb', line 139 def datacenters_servers_nics_find_by_id_with_http_info(datacenter_id, server_id, nic_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NicApi.datacenters_servers_nics_find_by_id ...' end # verify the required parameter 'datacenter_id' is set if @api_client.config.client_side_validation && datacenter_id.nil? fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling NicApi.datacenters_servers_nics_find_by_id" end # verify the required parameter 'server_id' is set if @api_client.config.client_side_validation && server_id.nil? fail ArgumentError, "Missing the required parameter 'server_id' when calling NicApi.datacenters_servers_nics_find_by_id" end # verify the required parameter 'nic_id' is set if @api_client.config.client_side_validation && nic_id.nil? fail ArgumentError, "Missing the required parameter 'nic_id' when calling NicApi.datacenters_servers_nics_find_by_id" end if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10 fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_find_by_id, must be smaller than or equal to 10.' end if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0 fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_find_by_id, must be greater than or equal to 0.' end # resource path local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)).sub('{' + 'nicId' + '}', CGI.escape(nic_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil? query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Nic' # auth_names auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication'] = opts.merge( :operation => :"NicApi.datacenters_servers_nics_find_by_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NicApi#datacenters_servers_nics_find_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#datacenters_servers_nics_firewallrules_delete(datacenter_id, server_id, nic_id, firewallrule_id, opts = {}) ⇒ Object
Delete a Firewall Rule Removes the specific Firewall Rule
217 218 219 220 |
# File 'lib/ionoscloud/api/nic_api.rb', line 217 def datacenters_servers_nics_firewallrules_delete(datacenter_id, server_id, nic_id, firewallrule_id, opts = {}) data, _status_code, _headers = datacenters_servers_nics_firewallrules_delete_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, opts) data end |
#datacenters_servers_nics_firewallrules_delete_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Delete a Firewall Rule Removes the specific Firewall Rule
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 |
# File 'lib/ionoscloud/api/nic_api.rb', line 233 def datacenters_servers_nics_firewallrules_delete_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NicApi.datacenters_servers_nics_firewallrules_delete ...' end # verify the required parameter 'datacenter_id' is set if @api_client.config.client_side_validation && datacenter_id.nil? fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling NicApi.datacenters_servers_nics_firewallrules_delete" end # verify the required parameter 'server_id' is set if @api_client.config.client_side_validation && server_id.nil? fail ArgumentError, "Missing the required parameter 'server_id' when calling NicApi.datacenters_servers_nics_firewallrules_delete" end # verify the required parameter 'nic_id' is set if @api_client.config.client_side_validation && nic_id.nil? fail ArgumentError, "Missing the required parameter 'nic_id' when calling NicApi.datacenters_servers_nics_firewallrules_delete" end # verify the required parameter 'firewallrule_id' is set if @api_client.config.client_side_validation && firewallrule_id.nil? fail ArgumentError, "Missing the required parameter 'firewallrule_id' when calling NicApi.datacenters_servers_nics_firewallrules_delete" end if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10 fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_firewallrules_delete, must be smaller than or equal to 10.' end if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0 fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_firewallrules_delete, must be greater than or equal to 0.' end # resource path local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)).sub('{' + 'nicId' + '}', CGI.escape(nic_id.to_s)).sub('{' + 'firewallruleId' + '}', CGI.escape(firewallrule_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil? query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication'] = opts.merge( :operation => :"NicApi.datacenters_servers_nics_firewallrules_delete", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NicApi#datacenters_servers_nics_firewallrules_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#datacenters_servers_nics_firewallrules_find_by_id(datacenter_id, server_id, nic_id, firewallrule_id, opts = {}) ⇒ FirewallRule
Retrieve a Firewall Rule Retrieves the attributes of a given Firewall Rule.
315 316 317 318 |
# File 'lib/ionoscloud/api/nic_api.rb', line 315 def datacenters_servers_nics_firewallrules_find_by_id(datacenter_id, server_id, nic_id, firewallrule_id, opts = {}) data, _status_code, _headers = datacenters_servers_nics_firewallrules_find_by_id_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, opts) data end |
#datacenters_servers_nics_firewallrules_find_by_id_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, opts = {}) ⇒ Array<(FirewallRule, Integer, Hash)>
Retrieve a Firewall Rule Retrieves the attributes of a given Firewall Rule.
331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 |
# File 'lib/ionoscloud/api/nic_api.rb', line 331 def datacenters_servers_nics_firewallrules_find_by_id_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NicApi.datacenters_servers_nics_firewallrules_find_by_id ...' end # verify the required parameter 'datacenter_id' is set if @api_client.config.client_side_validation && datacenter_id.nil? fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling NicApi.datacenters_servers_nics_firewallrules_find_by_id" end # verify the required parameter 'server_id' is set if @api_client.config.client_side_validation && server_id.nil? fail ArgumentError, "Missing the required parameter 'server_id' when calling NicApi.datacenters_servers_nics_firewallrules_find_by_id" end # verify the required parameter 'nic_id' is set if @api_client.config.client_side_validation && nic_id.nil? fail ArgumentError, "Missing the required parameter 'nic_id' when calling NicApi.datacenters_servers_nics_firewallrules_find_by_id" end # verify the required parameter 'firewallrule_id' is set if @api_client.config.client_side_validation && firewallrule_id.nil? fail ArgumentError, "Missing the required parameter 'firewallrule_id' when calling NicApi.datacenters_servers_nics_firewallrules_find_by_id" end if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10 fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_firewallrules_find_by_id, must be smaller than or equal to 10.' end if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0 fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_firewallrules_find_by_id, must be greater than or equal to 0.' end # resource path local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)).sub('{' + 'nicId' + '}', CGI.escape(nic_id.to_s)).sub('{' + 'firewallruleId' + '}', CGI.escape(firewallrule_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil? query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'FirewallRule' # auth_names auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication'] = opts.merge( :operation => :"NicApi.datacenters_servers_nics_firewallrules_find_by_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NicApi#datacenters_servers_nics_firewallrules_find_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#datacenters_servers_nics_firewallrules_get(datacenter_id, server_id, nic_id, opts = {}) ⇒ FirewallRules
List Firewall Rules Retrieves a list of firewall rules associated with a particular NIC
414 415 416 417 |
# File 'lib/ionoscloud/api/nic_api.rb', line 414 def datacenters_servers_nics_firewallrules_get(datacenter_id, server_id, nic_id, opts = {}) data, _status_code, _headers = datacenters_servers_nics_firewallrules_get_with_http_info(datacenter_id, server_id, nic_id, opts) data end |
#datacenters_servers_nics_firewallrules_get_with_http_info(datacenter_id, server_id, nic_id, opts = {}) ⇒ Array<(FirewallRules, Integer, Hash)>
List Firewall Rules Retrieves a list of firewall rules associated with a particular NIC
431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 |
# File 'lib/ionoscloud/api/nic_api.rb', line 431 def datacenters_servers_nics_firewallrules_get_with_http_info(datacenter_id, server_id, nic_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NicApi.datacenters_servers_nics_firewallrules_get ...' end # verify the required parameter 'datacenter_id' is set if @api_client.config.client_side_validation && datacenter_id.nil? fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling NicApi.datacenters_servers_nics_firewallrules_get" end # verify the required parameter 'server_id' is set if @api_client.config.client_side_validation && server_id.nil? fail ArgumentError, "Missing the required parameter 'server_id' when calling NicApi.datacenters_servers_nics_firewallrules_get" end # verify the required parameter 'nic_id' is set if @api_client.config.client_side_validation && nic_id.nil? fail ArgumentError, "Missing the required parameter 'nic_id' when calling NicApi.datacenters_servers_nics_firewallrules_get" end if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10 fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_firewallrules_get, must be smaller than or equal to 10.' end if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0 fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_firewallrules_get, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling NicApi.datacenters_servers_nics_firewallrules_get, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 10000 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling NicApi.datacenters_servers_nics_firewallrules_get, must be smaller than or equal to 10000.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling NicApi.datacenters_servers_nics_firewallrules_get, must be greater than or equal to 1.' end # resource path local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)).sub('{' + 'nicId' + '}', CGI.escape(nic_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil? query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'FirewallRules' # auth_names auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication'] = opts.merge( :operation => :"NicApi.datacenters_servers_nics_firewallrules_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NicApi#datacenters_servers_nics_firewallrules_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#datacenters_servers_nics_firewallrules_patch(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, opts = {}) ⇒ FirewallRule
Partially modify a Firewall Rule You can use update attributes of a resource
524 525 526 527 |
# File 'lib/ionoscloud/api/nic_api.rb', line 524 def datacenters_servers_nics_firewallrules_patch(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, opts = {}) data, _status_code, _headers = datacenters_servers_nics_firewallrules_patch_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, opts) data end |
#datacenters_servers_nics_firewallrules_patch_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, opts = {}) ⇒ Array<(FirewallRule, Integer, Hash)>
Partially modify a Firewall Rule You can use update attributes of a resource
541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 |
# File 'lib/ionoscloud/api/nic_api.rb', line 541 def datacenters_servers_nics_firewallrules_patch_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NicApi.datacenters_servers_nics_firewallrules_patch ...' end # verify the required parameter 'datacenter_id' is set if @api_client.config.client_side_validation && datacenter_id.nil? fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling NicApi.datacenters_servers_nics_firewallrules_patch" end # verify the required parameter 'server_id' is set if @api_client.config.client_side_validation && server_id.nil? fail ArgumentError, "Missing the required parameter 'server_id' when calling NicApi.datacenters_servers_nics_firewallrules_patch" end # verify the required parameter 'nic_id' is set if @api_client.config.client_side_validation && nic_id.nil? fail ArgumentError, "Missing the required parameter 'nic_id' when calling NicApi.datacenters_servers_nics_firewallrules_patch" end # verify the required parameter 'firewallrule_id' is set if @api_client.config.client_side_validation && firewallrule_id.nil? fail ArgumentError, "Missing the required parameter 'firewallrule_id' when calling NicApi.datacenters_servers_nics_firewallrules_patch" end # verify the required parameter 'firewallrule' is set if @api_client.config.client_side_validation && firewallrule.nil? fail ArgumentError, "Missing the required parameter 'firewallrule' when calling NicApi.datacenters_servers_nics_firewallrules_patch" end if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10 fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_firewallrules_patch, must be smaller than or equal to 10.' end if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0 fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_firewallrules_patch, must be greater than or equal to 0.' end # resource path local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)).sub('{' + 'nicId' + '}', CGI.escape(nic_id.to_s)).sub('{' + 'firewallruleId' + '}', CGI.escape(firewallrule_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil? query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(firewallrule) # return_type return_type = opts[:debug_return_type] || 'FirewallRule' # auth_names auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication'] = opts.merge( :operation => :"NicApi.datacenters_servers_nics_firewallrules_patch", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NicApi#datacenters_servers_nics_firewallrules_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#datacenters_servers_nics_firewallrules_post(datacenter_id, server_id, nic_id, firewallrule, opts = {}) ⇒ FirewallRule
Create a Firewall Rule This will add a Firewall Rule to the NIC
629 630 631 632 |
# File 'lib/ionoscloud/api/nic_api.rb', line 629 def datacenters_servers_nics_firewallrules_post(datacenter_id, server_id, nic_id, firewallrule, opts = {}) data, _status_code, _headers = datacenters_servers_nics_firewallrules_post_with_http_info(datacenter_id, server_id, nic_id, firewallrule, opts) data end |
#datacenters_servers_nics_firewallrules_post_with_http_info(datacenter_id, server_id, nic_id, firewallrule, opts = {}) ⇒ Array<(FirewallRule, Integer, Hash)>
Create a Firewall Rule This will add a Firewall Rule to the NIC
645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 |
# File 'lib/ionoscloud/api/nic_api.rb', line 645 def datacenters_servers_nics_firewallrules_post_with_http_info(datacenter_id, server_id, nic_id, firewallrule, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NicApi.datacenters_servers_nics_firewallrules_post ...' end # verify the required parameter 'datacenter_id' is set if @api_client.config.client_side_validation && datacenter_id.nil? fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling NicApi.datacenters_servers_nics_firewallrules_post" end # verify the required parameter 'server_id' is set if @api_client.config.client_side_validation && server_id.nil? fail ArgumentError, "Missing the required parameter 'server_id' when calling NicApi.datacenters_servers_nics_firewallrules_post" end # verify the required parameter 'nic_id' is set if @api_client.config.client_side_validation && nic_id.nil? fail ArgumentError, "Missing the required parameter 'nic_id' when calling NicApi.datacenters_servers_nics_firewallrules_post" end # verify the required parameter 'firewallrule' is set if @api_client.config.client_side_validation && firewallrule.nil? fail ArgumentError, "Missing the required parameter 'firewallrule' when calling NicApi.datacenters_servers_nics_firewallrules_post" end if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10 fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_firewallrules_post, must be smaller than or equal to 10.' end if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0 fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_firewallrules_post, must be greater than or equal to 0.' end # resource path local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)).sub('{' + 'nicId' + '}', CGI.escape(nic_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil? query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(firewallrule) # return_type return_type = opts[:debug_return_type] || 'FirewallRule' # auth_names auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication'] = opts.merge( :operation => :"NicApi.datacenters_servers_nics_firewallrules_post", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NicApi#datacenters_servers_nics_firewallrules_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#datacenters_servers_nics_firewallrules_put(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, opts = {}) ⇒ FirewallRule
Modify a Firewall Rule You can use update attributes of a resource
730 731 732 733 |
# File 'lib/ionoscloud/api/nic_api.rb', line 730 def datacenters_servers_nics_firewallrules_put(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, opts = {}) data, _status_code, _headers = datacenters_servers_nics_firewallrules_put_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, opts) data end |
#datacenters_servers_nics_firewallrules_put_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, opts = {}) ⇒ Array<(FirewallRule, Integer, Hash)>
Modify a Firewall Rule You can use update attributes of a resource
747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 |
# File 'lib/ionoscloud/api/nic_api.rb', line 747 def datacenters_servers_nics_firewallrules_put_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NicApi.datacenters_servers_nics_firewallrules_put ...' end # verify the required parameter 'datacenter_id' is set if @api_client.config.client_side_validation && datacenter_id.nil? fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling NicApi.datacenters_servers_nics_firewallrules_put" end # verify the required parameter 'server_id' is set if @api_client.config.client_side_validation && server_id.nil? fail ArgumentError, "Missing the required parameter 'server_id' when calling NicApi.datacenters_servers_nics_firewallrules_put" end # verify the required parameter 'nic_id' is set if @api_client.config.client_side_validation && nic_id.nil? fail ArgumentError, "Missing the required parameter 'nic_id' when calling NicApi.datacenters_servers_nics_firewallrules_put" end # verify the required parameter 'firewallrule_id' is set if @api_client.config.client_side_validation && firewallrule_id.nil? fail ArgumentError, "Missing the required parameter 'firewallrule_id' when calling NicApi.datacenters_servers_nics_firewallrules_put" end # verify the required parameter 'firewallrule' is set if @api_client.config.client_side_validation && firewallrule.nil? fail ArgumentError, "Missing the required parameter 'firewallrule' when calling NicApi.datacenters_servers_nics_firewallrules_put" end if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10 fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_firewallrules_put, must be smaller than or equal to 10.' end if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0 fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_firewallrules_put, must be greater than or equal to 0.' end # resource path local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)).sub('{' + 'nicId' + '}', CGI.escape(nic_id.to_s)).sub('{' + 'firewallruleId' + '}', CGI.escape(firewallrule_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil? query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(firewallrule) # return_type return_type = opts[:debug_return_type] || 'FirewallRule' # auth_names auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication'] = opts.merge( :operation => :"NicApi.datacenters_servers_nics_firewallrules_put", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NicApi#datacenters_servers_nics_firewallrules_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#datacenters_servers_nics_get(datacenter_id, server_id, opts = {}) ⇒ Nics
List Nics Retrieves a list of NICs.
835 836 837 838 |
# File 'lib/ionoscloud/api/nic_api.rb', line 835 def datacenters_servers_nics_get(datacenter_id, server_id, opts = {}) data, _status_code, _headers = datacenters_servers_nics_get_with_http_info(datacenter_id, server_id, opts) data end |
#datacenters_servers_nics_get_with_http_info(datacenter_id, server_id, opts = {}) ⇒ Array<(Nics, Integer, Hash)>
List Nics Retrieves a list of NICs.
851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 |
# File 'lib/ionoscloud/api/nic_api.rb', line 851 def datacenters_servers_nics_get_with_http_info(datacenter_id, server_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NicApi.datacenters_servers_nics_get ...' end # verify the required parameter 'datacenter_id' is set if @api_client.config.client_side_validation && datacenter_id.nil? fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling NicApi.datacenters_servers_nics_get" end # verify the required parameter 'server_id' is set if @api_client.config.client_side_validation && server_id.nil? fail ArgumentError, "Missing the required parameter 'server_id' when calling NicApi.datacenters_servers_nics_get" end if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10 fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_get, must be smaller than or equal to 10.' end if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0 fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_get, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling NicApi.datacenters_servers_nics_get, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 10000 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling NicApi.datacenters_servers_nics_get, must be smaller than or equal to 10000.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling NicApi.datacenters_servers_nics_get, must be greater than or equal to 1.' end # resource path local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/nics'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil? query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Nics' # auth_names auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication'] = opts.merge( :operation => :"NicApi.datacenters_servers_nics_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NicApi#datacenters_servers_nics_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#datacenters_servers_nics_patch(datacenter_id, server_id, nic_id, nic, opts = {}) ⇒ Nic
Partially modify a Nic You can use update attributes of a Nic
939 940 941 942 |
# File 'lib/ionoscloud/api/nic_api.rb', line 939 def datacenters_servers_nics_patch(datacenter_id, server_id, nic_id, nic, opts = {}) data, _status_code, _headers = datacenters_servers_nics_patch_with_http_info(datacenter_id, server_id, nic_id, nic, opts) data end |
#datacenters_servers_nics_patch_with_http_info(datacenter_id, server_id, nic_id, nic, opts = {}) ⇒ Array<(Nic, Integer, Hash)>
Partially modify a Nic You can use update attributes of a Nic
955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 |
# File 'lib/ionoscloud/api/nic_api.rb', line 955 def datacenters_servers_nics_patch_with_http_info(datacenter_id, server_id, nic_id, nic, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NicApi.datacenters_servers_nics_patch ...' end # verify the required parameter 'datacenter_id' is set if @api_client.config.client_side_validation && datacenter_id.nil? fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling NicApi.datacenters_servers_nics_patch" end # verify the required parameter 'server_id' is set if @api_client.config.client_side_validation && server_id.nil? fail ArgumentError, "Missing the required parameter 'server_id' when calling NicApi.datacenters_servers_nics_patch" end # verify the required parameter 'nic_id' is set if @api_client.config.client_side_validation && nic_id.nil? fail ArgumentError, "Missing the required parameter 'nic_id' when calling NicApi.datacenters_servers_nics_patch" end # verify the required parameter 'nic' is set if @api_client.config.client_side_validation && nic.nil? fail ArgumentError, "Missing the required parameter 'nic' when calling NicApi.datacenters_servers_nics_patch" end if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10 fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_patch, must be smaller than or equal to 10.' end if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0 fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_patch, must be greater than or equal to 0.' end # resource path local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)).sub('{' + 'nicId' + '}', CGI.escape(nic_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil? query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(nic) # return_type return_type = opts[:debug_return_type] || 'Nic' # auth_names auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication'] = opts.merge( :operation => :"NicApi.datacenters_servers_nics_patch", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NicApi#datacenters_servers_nics_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#datacenters_servers_nics_post(datacenter_id, server_id, nic, opts = {}) ⇒ Nic
Create a Nic Adds a NIC to the target server. Combine count of Nics and volumes attached to the server should not exceed size 24.
1038 1039 1040 1041 |
# File 'lib/ionoscloud/api/nic_api.rb', line 1038 def datacenters_servers_nics_post(datacenter_id, server_id, nic, opts = {}) data, _status_code, _headers = datacenters_servers_nics_post_with_http_info(datacenter_id, server_id, nic, opts) data end |
#datacenters_servers_nics_post_with_http_info(datacenter_id, server_id, nic, opts = {}) ⇒ Array<(Nic, Integer, Hash)>
Create a Nic Adds a NIC to the target server. Combine count of Nics and volumes attached to the server should not exceed size 24.
1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 |
# File 'lib/ionoscloud/api/nic_api.rb', line 1053 def datacenters_servers_nics_post_with_http_info(datacenter_id, server_id, nic, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NicApi.datacenters_servers_nics_post ...' end # verify the required parameter 'datacenter_id' is set if @api_client.config.client_side_validation && datacenter_id.nil? fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling NicApi.datacenters_servers_nics_post" end # verify the required parameter 'server_id' is set if @api_client.config.client_side_validation && server_id.nil? fail ArgumentError, "Missing the required parameter 'server_id' when calling NicApi.datacenters_servers_nics_post" end # verify the required parameter 'nic' is set if @api_client.config.client_side_validation && nic.nil? fail ArgumentError, "Missing the required parameter 'nic' when calling NicApi.datacenters_servers_nics_post" end if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10 fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_post, must be smaller than or equal to 10.' end if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0 fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_post, must be greater than or equal to 0.' end # resource path local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/nics'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil? query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(nic) # return_type return_type = opts[:debug_return_type] || 'Nic' # auth_names auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication'] = opts.merge( :operation => :"NicApi.datacenters_servers_nics_post", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NicApi#datacenters_servers_nics_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#datacenters_servers_nics_put(datacenter_id, server_id, nic_id, nic, opts = {}) ⇒ Nic
Modify a Nic You can use update attributes of a Nic
1133 1134 1135 1136 |
# File 'lib/ionoscloud/api/nic_api.rb', line 1133 def datacenters_servers_nics_put(datacenter_id, server_id, nic_id, nic, opts = {}) data, _status_code, _headers = datacenters_servers_nics_put_with_http_info(datacenter_id, server_id, nic_id, nic, opts) data end |
#datacenters_servers_nics_put_with_http_info(datacenter_id, server_id, nic_id, nic, opts = {}) ⇒ Array<(Nic, Integer, Hash)>
Modify a Nic You can use update attributes of a Nic
1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 |
# File 'lib/ionoscloud/api/nic_api.rb', line 1149 def datacenters_servers_nics_put_with_http_info(datacenter_id, server_id, nic_id, nic, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NicApi.datacenters_servers_nics_put ...' end # verify the required parameter 'datacenter_id' is set if @api_client.config.client_side_validation && datacenter_id.nil? fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling NicApi.datacenters_servers_nics_put" end # verify the required parameter 'server_id' is set if @api_client.config.client_side_validation && server_id.nil? fail ArgumentError, "Missing the required parameter 'server_id' when calling NicApi.datacenters_servers_nics_put" end # verify the required parameter 'nic_id' is set if @api_client.config.client_side_validation && nic_id.nil? fail ArgumentError, "Missing the required parameter 'nic_id' when calling NicApi.datacenters_servers_nics_put" end # verify the required parameter 'nic' is set if @api_client.config.client_side_validation && nic.nil? fail ArgumentError, "Missing the required parameter 'nic' when calling NicApi.datacenters_servers_nics_put" end if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10 fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_put, must be smaller than or equal to 10.' end if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0 fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling NicApi.datacenters_servers_nics_put, must be greater than or equal to 0.' end # resource path local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)).sub('{' + 'nicId' + '}', CGI.escape(nic_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil? query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(nic) # return_type return_type = opts[:debug_return_type] || 'Nic' # auth_names auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication'] = opts.merge( :operation => :"NicApi.datacenters_servers_nics_put", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NicApi#datacenters_servers_nics_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |