NicApi

All URIs are relative to https://api.ionos.com/cloudapi/v5

MethodHTTP requestDescription

DELETE /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}

Delete a Nic

GET /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}

Retrieve a Nic

DELETE /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId}

Delete a Firewall Rule

GET /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId}

Retrieve a Firewall Rule

GET /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules

List Firewall Rules

PATCH /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId}

Partially modify a Firewall Rule

POST /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules

Create a Firewall Rule

PUT /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/firewallrules/{firewallruleId}

Modify a Firewall Rule

GET /datacenters/{datacenterId}/servers/{serverId}/nics

List Nics

PATCH /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}

Partially modify a Nic

POST /datacenters/{datacenterId}/servers/{serverId}/nics

Create a Nic

PUT /datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}

Modify a Nic

datacenters_servers_nics_delete

Object datacenters_servers_nics_delete(datacenter_id, server_id, nic_id, opts)

Delete a Nic

Deletes the specified NIC.

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |config|
  # Configure HTTP basic authorization: Basic Authentication
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'

  # Configure API key authorization: Token Authentication
  config.api_key['Authorization'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = Ionoscloud::NicApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the datacenter
server_id = 'server_id_example' # String | The unique ID of the Server
nic_id = 'nic_id_example' # String | The unique ID of the NIC
opts = {
  pretty: true, # Boolean | Controls whether response is pretty-printed (with indentation and new lines)
  depth: 56, # Integer | Controls the details depth of response objects.  Eg. GET /datacenters/[ID]  - depth=0: only direct properties are included. Children (servers etc.) are not included  - depth=1: direct properties and children references are included  - depth=2: direct properties and children properties are included  - depth=3: direct properties and children properties and children's children are included  - depth=... and so on
  x_contract_number: 56 # Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
}

begin
  # Delete a Nic
  result = api_instance.datacenters_servers_nics_delete(datacenter_id, server_id, nic_id, opts)
  p result
rescue Ionoscloud::ApiError => e
  puts "Error when calling NicApi->datacenters_servers_nics_delete: #{e}"
end

Using the datacenters_servers_nics_delete_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(Object, Integer, Hash)> datacenters_servers_nics_delete_with_http_info(datacenter_id, server_id, nic_id, opts)

begin
  # Delete a Nic
  data, status_code, headers = api_instance.datacenters_servers_nics_delete_with_http_info(datacenter_id, server_id, nic_id, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => Object
rescue Ionoscloud::ApiError => e
  puts "Error when calling NicApi->datacenters_servers_nics_delete_with_http_info: #{e}"
end

Parameters

NameTypeDescriptionNotes

datacenter_id

String

The unique ID of the datacenter

server_id

String

The unique ID of the Server

nic_id

String

The unique ID of the NIC

pretty

Boolean

Controls whether response is pretty-printed (with indentation and new lines)

[optional][default to true]

depth

Integer

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on

[optional][default to 0]

x_contract_number

Integer

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

[optional]

Return type

Object

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacenters_servers_nics_find_by_id

datacenters_servers_nics_find_by_id(datacenter_id, server_id, nic_id, opts)

Retrieve a Nic

Retrieves the attributes of a given NIC

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |config|
  # Configure HTTP basic authorization: Basic Authentication
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'

  # Configure API key authorization: Token Authentication
  config.api_key['Authorization'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = Ionoscloud::NicApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the datacenter
server_id = 'server_id_example' # String | The unique ID of the Server
nic_id = 'nic_id_example' # String | The unique ID of the NIC
opts = {
  pretty: true, # Boolean | Controls whether response is pretty-printed (with indentation and new lines)
  depth: 56, # Integer | Controls the details depth of response objects.  Eg. GET /datacenters/[ID]  - depth=0: only direct properties are included. Children (servers etc.) are not included  - depth=1: direct properties and children references are included  - depth=2: direct properties and children properties are included  - depth=3: direct properties and children properties and children's children are included  - depth=... and so on
  x_contract_number: 56 # Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
}

begin
  # Retrieve a Nic
  result = api_instance.datacenters_servers_nics_find_by_id(datacenter_id, server_id, nic_id, opts)
  p result
rescue Ionoscloud::ApiError => e
  puts "Error when calling NicApi->datacenters_servers_nics_find_by_id: #{e}"
end

Using the datacenters_servers_nics_find_by_id_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> datacenters_servers_nics_find_by_id_with_http_info(datacenter_id, server_id, nic_id, opts)

begin
  # Retrieve a Nic
  data, status_code, headers = api_instance.datacenters_servers_nics_find_by_id_with_http_info(datacenter_id, server_id, nic_id, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <Nic>
rescue Ionoscloud::ApiError => e
  puts "Error when calling NicApi->datacenters_servers_nics_find_by_id_with_http_info: #{e}"
end

Parameters

NameTypeDescriptionNotes

datacenter_id

String

The unique ID of the datacenter

server_id

String

The unique ID of the Server

nic_id

String

The unique ID of the NIC

pretty

Boolean

Controls whether response is pretty-printed (with indentation and new lines)

[optional][default to true]

depth

Integer

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on

[optional][default to 0]

x_contract_number

Integer

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

[optional]

Return type

Nic

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacenters_servers_nics_firewallrules_delete

Object datacenters_servers_nics_firewallrules_delete(datacenter_id, server_id, nic_id, firewallrule_id, opts)

Delete a Firewall Rule

Removes the specific Firewall Rule

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |config|
  # Configure HTTP basic authorization: Basic Authentication
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'

  # Configure API key authorization: Token Authentication
  config.api_key['Authorization'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = Ionoscloud::NicApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the datacenter
server_id = 'server_id_example' # String | The unique ID of the Server
nic_id = 'nic_id_example' # String | The unique ID of the NIC
firewallrule_id = 'firewallrule_id_example' # String | The unique ID of the Firewall Rule
opts = {
  pretty: true, # Boolean | Controls whether response is pretty-printed (with indentation and new lines)
  depth: 56, # Integer | Controls the details depth of response objects.  Eg. GET /datacenters/[ID]  - depth=0: only direct properties are included. Children (servers etc.) are not included  - depth=1: direct properties and children references are included  - depth=2: direct properties and children properties are included  - depth=3: direct properties and children properties and children's children are included  - depth=... and so on
  x_contract_number: 56 # Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
}

begin
  # Delete a Firewall Rule
  result = api_instance.datacenters_servers_nics_firewallrules_delete(datacenter_id, server_id, nic_id, firewallrule_id, opts)
  p result
rescue Ionoscloud::ApiError => e
  puts "Error when calling NicApi->datacenters_servers_nics_firewallrules_delete: #{e}"
end

Using the datacenters_servers_nics_firewallrules_delete_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(Object, Integer, Hash)> datacenters_servers_nics_firewallrules_delete_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, opts)

begin
  # Delete a Firewall Rule
  data, status_code, headers = api_instance.datacenters_servers_nics_firewallrules_delete_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => Object
rescue Ionoscloud::ApiError => e
  puts "Error when calling NicApi->datacenters_servers_nics_firewallrules_delete_with_http_info: #{e}"
end

Parameters

NameTypeDescriptionNotes

datacenter_id

String

The unique ID of the datacenter

server_id

String

The unique ID of the Server

nic_id

String

The unique ID of the NIC

firewallrule_id

String

The unique ID of the Firewall Rule

pretty

Boolean

Controls whether response is pretty-printed (with indentation and new lines)

[optional][default to true]

depth

Integer

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on

[optional][default to 0]

x_contract_number

Integer

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

[optional]

Return type

Object

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacenters_servers_nics_firewallrules_find_by_id

datacenters_servers_nics_firewallrules_find_by_id(datacenter_id, server_id, nic_id, firewallrule_id, opts)

Retrieve a Firewall Rule

Retrieves the attributes of a given Firewall Rule.

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |config|
  # Configure HTTP basic authorization: Basic Authentication
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'

  # Configure API key authorization: Token Authentication
  config.api_key['Authorization'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = Ionoscloud::NicApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the datacenter
server_id = 'server_id_example' # String | The unique ID of the Server
nic_id = 'nic_id_example' # String | The unique ID of the NIC
firewallrule_id = 'firewallrule_id_example' # String | The unique ID of the Firewall Rule
opts = {
  pretty: true, # Boolean | Controls whether response is pretty-printed (with indentation and new lines)
  depth: 56, # Integer | Controls the details depth of response objects.  Eg. GET /datacenters/[ID]  - depth=0: only direct properties are included. Children (servers etc.) are not included  - depth=1: direct properties and children references are included  - depth=2: direct properties and children properties are included  - depth=3: direct properties and children properties and children's children are included  - depth=... and so on
  x_contract_number: 56 # Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
}

begin
  # Retrieve a Firewall Rule
  result = api_instance.datacenters_servers_nics_firewallrules_find_by_id(datacenter_id, server_id, nic_id, firewallrule_id, opts)
  p result
rescue Ionoscloud::ApiError => e
  puts "Error when calling NicApi->datacenters_servers_nics_firewallrules_find_by_id: #{e}"
end

Using the datacenters_servers_nics_firewallrules_find_by_id_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> datacenters_servers_nics_firewallrules_find_by_id_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, opts)

begin
  # Retrieve a Firewall Rule
  data, status_code, headers = api_instance.datacenters_servers_nics_firewallrules_find_by_id_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <FirewallRule>
rescue Ionoscloud::ApiError => e
  puts "Error when calling NicApi->datacenters_servers_nics_firewallrules_find_by_id_with_http_info: #{e}"
end

Parameters

NameTypeDescriptionNotes

datacenter_id

String

The unique ID of the datacenter

server_id

String

The unique ID of the Server

nic_id

String

The unique ID of the NIC

firewallrule_id

String

The unique ID of the Firewall Rule

pretty

Boolean

Controls whether response is pretty-printed (with indentation and new lines)

[optional][default to true]

depth

Integer

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on

[optional][default to 0]

x_contract_number

Integer

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

[optional]

Return type

FirewallRule

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacenters_servers_nics_firewallrules_get

datacenters_servers_nics_firewallrules_get(datacenter_id, server_id, nic_id, opts)

List Firewall Rules

Retrieves a list of firewall rules associated with a particular NIC

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |config|
  # Configure HTTP basic authorization: Basic Authentication
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'

  # Configure API key authorization: Token Authentication
  config.api_key['Authorization'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = Ionoscloud::NicApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the datacenter
server_id = 'server_id_example' # String | The unique ID of the Server
nic_id = 'nic_id_example' # String | The unique ID of the NIC
opts = {
  pretty: true, # Boolean | Controls whether response is pretty-printed (with indentation and new lines)
  depth: 56, # Integer | Controls the details depth of response objects.  Eg. GET /datacenters/[ID]  - depth=0: only direct properties are included. Children (servers etc.) are not included  - depth=1: direct properties and children references are included  - depth=2: direct properties and children properties are included  - depth=3: direct properties and children properties and children's children are included  - depth=... and so on
  x_contract_number: 56, # Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
  offset: 56, # Integer | the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination)
  limit: 56 # Integer | the maximum number of elements to return (use together with <code>offset</code> for pagination)
}

begin
  # List Firewall Rules 
  result = api_instance.datacenters_servers_nics_firewallrules_get(datacenter_id, server_id, nic_id, opts)
  p result
rescue Ionoscloud::ApiError => e
  puts "Error when calling NicApi->datacenters_servers_nics_firewallrules_get: #{e}"
end

Using the datacenters_servers_nics_firewallrules_get_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> datacenters_servers_nics_firewallrules_get_with_http_info(datacenter_id, server_id, nic_id, opts)

begin
  # List Firewall Rules 
  data, status_code, headers = api_instance.datacenters_servers_nics_firewallrules_get_with_http_info(datacenter_id, server_id, nic_id, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <FirewallRules>
rescue Ionoscloud::ApiError => e
  puts "Error when calling NicApi->datacenters_servers_nics_firewallrules_get_with_http_info: #{e}"
end

Parameters

NameTypeDescriptionNotes

datacenter_id

String

The unique ID of the datacenter

server_id

String

The unique ID of the Server

nic_id

String

The unique ID of the NIC

pretty

Boolean

Controls whether response is pretty-printed (with indentation and new lines)

[optional][default to true]

depth

Integer

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on

[optional][default to 0]

x_contract_number

Integer

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

[optional]

offset

Integer

the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination)

[optional][default to 0]

limit

Integer

the maximum number of elements to return (use together with <code>offset</code> for pagination)

[optional][default to 1000]

Return type

FirewallRules

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacenters_servers_nics_firewallrules_patch

datacenters_servers_nics_firewallrules_patch(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, opts)

Partially modify a Firewall Rule

You can use update attributes of a resource

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |config|
  # Configure HTTP basic authorization: Basic Authentication
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'

  # Configure API key authorization: Token Authentication
  config.api_key['Authorization'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = Ionoscloud::NicApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the datacenter
server_id = 'server_id_example' # String | The unique ID of the Server
nic_id = 'nic_id_example' # String | The unique ID of the NIC
firewallrule_id = 'firewallrule_id_example' # String | The unique ID of the Firewall Rule
firewallrule = Ionoscloud::FirewallruleProperties.new({protocol: 'TCP'}) # FirewallruleProperties | Modified Firewall Rule
opts = {
  pretty: true, # Boolean | Controls whether response is pretty-printed (with indentation and new lines)
  depth: 56, # Integer | Controls the details depth of response objects.  Eg. GET /datacenters/[ID]  - depth=0: only direct properties are included. Children (servers etc.) are not included  - depth=1: direct properties and children references are included  - depth=2: direct properties and children properties are included  - depth=3: direct properties and children properties and children's children are included  - depth=... and so on
  x_contract_number: 56 # Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
}

begin
  # Partially modify a Firewall Rule
  result = api_instance.datacenters_servers_nics_firewallrules_patch(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, opts)
  p result
rescue Ionoscloud::ApiError => e
  puts "Error when calling NicApi->datacenters_servers_nics_firewallrules_patch: #{e}"
end

Using the datacenters_servers_nics_firewallrules_patch_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> datacenters_servers_nics_firewallrules_patch_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, opts)

begin
  # Partially modify a Firewall Rule
  data, status_code, headers = api_instance.datacenters_servers_nics_firewallrules_patch_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <FirewallRule>
rescue Ionoscloud::ApiError => e
  puts "Error when calling NicApi->datacenters_servers_nics_firewallrules_patch_with_http_info: #{e}"
end

Parameters

NameTypeDescriptionNotes

datacenter_id

String

The unique ID of the datacenter

server_id

String

The unique ID of the Server

nic_id

String

The unique ID of the NIC

firewallrule_id

String

The unique ID of the Firewall Rule

firewallrule

Modified Firewall Rule

pretty

Boolean

Controls whether response is pretty-printed (with indentation and new lines)

[optional][default to true]

depth

Integer

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on

[optional][default to 0]

x_contract_number

Integer

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

[optional]

Return type

FirewallRule

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

datacenters_servers_nics_firewallrules_post

datacenters_servers_nics_firewallrules_post(datacenter_id, server_id, nic_id, firewallrule, opts)

Create a Firewall Rule

This will add a Firewall Rule to the NIC

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |config|
  # Configure HTTP basic authorization: Basic Authentication
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'

  # Configure API key authorization: Token Authentication
  config.api_key['Authorization'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = Ionoscloud::NicApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the datacenter
server_id = 'server_id_example' # String | The unique ID of the server
nic_id = 'nic_id_example' # String | The unique ID of the NIC
firewallrule = Ionoscloud::FirewallRule.new({properties: Ionoscloud::FirewallruleProperties.new({protocol: 'TCP'})}) # FirewallRule | Firewall Rule to be created
opts = {
  pretty: true, # Boolean | Controls whether response is pretty-printed (with indentation and new lines)
  depth: 56, # Integer | Controls the details depth of response objects.  Eg. GET /datacenters/[ID]  - depth=0: only direct properties are included. Children (servers etc.) are not included  - depth=1: direct properties and children references are included  - depth=2: direct properties and children properties are included  - depth=3: direct properties and children properties and children's children are included  - depth=... and so on
  x_contract_number: 56 # Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
}

begin
  # Create a Firewall Rule
  result = api_instance.datacenters_servers_nics_firewallrules_post(datacenter_id, server_id, nic_id, firewallrule, opts)
  p result
rescue Ionoscloud::ApiError => e
  puts "Error when calling NicApi->datacenters_servers_nics_firewallrules_post: #{e}"
end

Using the datacenters_servers_nics_firewallrules_post_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> datacenters_servers_nics_firewallrules_post_with_http_info(datacenter_id, server_id, nic_id, firewallrule, opts)

begin
  # Create a Firewall Rule
  data, status_code, headers = api_instance.datacenters_servers_nics_firewallrules_post_with_http_info(datacenter_id, server_id, nic_id, firewallrule, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <FirewallRule>
rescue Ionoscloud::ApiError => e
  puts "Error when calling NicApi->datacenters_servers_nics_firewallrules_post_with_http_info: #{e}"
end

Parameters

NameTypeDescriptionNotes

datacenter_id

String

The unique ID of the datacenter

server_id

String

The unique ID of the server

nic_id

String

The unique ID of the NIC

firewallrule

Firewall Rule to be created

pretty

Boolean

Controls whether response is pretty-printed (with indentation and new lines)

[optional][default to true]

depth

Integer

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on

[optional][default to 0]

x_contract_number

Integer

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

[optional]

Return type

FirewallRule

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

datacenters_servers_nics_firewallrules_put

datacenters_servers_nics_firewallrules_put(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, opts)

Modify a Firewall Rule

You can use update attributes of a resource

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |config|
  # Configure HTTP basic authorization: Basic Authentication
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'

  # Configure API key authorization: Token Authentication
  config.api_key['Authorization'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = Ionoscloud::NicApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the datacenter
server_id = 'server_id_example' # String | The unique ID of the Server
nic_id = 'nic_id_example' # String | The unique ID of the NIC
firewallrule_id = 'firewallrule_id_example' # String | The unique ID of the Firewall Rule
firewallrule = Ionoscloud::FirewallRule.new({properties: Ionoscloud::FirewallruleProperties.new({protocol: 'TCP'})}) # FirewallRule | Modified Firewall Rule
opts = {
  pretty: true, # Boolean | Controls whether response is pretty-printed (with indentation and new lines)
  depth: 56, # Integer | Controls the details depth of response objects.  Eg. GET /datacenters/[ID]  - depth=0: only direct properties are included. Children (servers etc.) are not included  - depth=1: direct properties and children references are included  - depth=2: direct properties and children properties are included  - depth=3: direct properties and children properties and children's children are included  - depth=... and so on
  x_contract_number: 56 # Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
}

begin
  # Modify a Firewall Rule
  result = api_instance.datacenters_servers_nics_firewallrules_put(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, opts)
  p result
rescue Ionoscloud::ApiError => e
  puts "Error when calling NicApi->datacenters_servers_nics_firewallrules_put: #{e}"
end

Using the datacenters_servers_nics_firewallrules_put_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> datacenters_servers_nics_firewallrules_put_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, opts)

begin
  # Modify a Firewall Rule
  data, status_code, headers = api_instance.datacenters_servers_nics_firewallrules_put_with_http_info(datacenter_id, server_id, nic_id, firewallrule_id, firewallrule, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <FirewallRule>
rescue Ionoscloud::ApiError => e
  puts "Error when calling NicApi->datacenters_servers_nics_firewallrules_put_with_http_info: #{e}"
end

Parameters

NameTypeDescriptionNotes

datacenter_id

String

The unique ID of the datacenter

server_id

String

The unique ID of the Server

nic_id

String

The unique ID of the NIC

firewallrule_id

String

The unique ID of the Firewall Rule

firewallrule

Modified Firewall Rule

pretty

Boolean

Controls whether response is pretty-printed (with indentation and new lines)

[optional][default to true]

depth

Integer

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on

[optional][default to 0]

x_contract_number

Integer

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

[optional]

Return type

FirewallRule

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

datacenters_servers_nics_get

datacenters_servers_nics_get(datacenter_id, server_id, opts)

List Nics

Retrieves a list of NICs.

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |config|
  # Configure HTTP basic authorization: Basic Authentication
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'

  # Configure API key authorization: Token Authentication
  config.api_key['Authorization'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = Ionoscloud::NicApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the datacenter
server_id = 'server_id_example' # String | The unique ID of the Server
opts = {
  pretty: true, # Boolean | Controls whether response is pretty-printed (with indentation and new lines)
  depth: 56, # Integer | Controls the details depth of response objects.  Eg. GET /datacenters/[ID]  - depth=0: only direct properties are included. Children (servers etc.) are not included  - depth=1: direct properties and children references are included  - depth=2: direct properties and children properties are included  - depth=3: direct properties and children properties and children's children are included  - depth=... and so on
  x_contract_number: 56, # Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
  offset: 56, # Integer | the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination)
  limit: 56 # Integer | the maximum number of elements to return (use together with <code>offset</code> for pagination)
}

begin
  # List Nics 
  result = api_instance.datacenters_servers_nics_get(datacenter_id, server_id, opts)
  p result
rescue Ionoscloud::ApiError => e
  puts "Error when calling NicApi->datacenters_servers_nics_get: #{e}"
end

Using the datacenters_servers_nics_get_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> datacenters_servers_nics_get_with_http_info(datacenter_id, server_id, opts)

begin
  # List Nics 
  data, status_code, headers = api_instance.datacenters_servers_nics_get_with_http_info(datacenter_id, server_id, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <Nics>
rescue Ionoscloud::ApiError => e
  puts "Error when calling NicApi->datacenters_servers_nics_get_with_http_info: #{e}"
end

Parameters

NameTypeDescriptionNotes

datacenter_id

String

The unique ID of the datacenter

server_id

String

The unique ID of the Server

pretty

Boolean

Controls whether response is pretty-printed (with indentation and new lines)

[optional][default to true]

depth

Integer

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on

[optional][default to 0]

x_contract_number

Integer

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

[optional]

offset

Integer

the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination)

[optional][default to 0]

limit

Integer

the maximum number of elements to return (use together with <code>offset</code> for pagination)

[optional][default to 1000]

Return type

Nics

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacenters_servers_nics_patch

datacenters_servers_nics_patch(datacenter_id, server_id, nic_id, nic, opts)

Partially modify a Nic

You can use update attributes of a Nic

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |config|
  # Configure HTTP basic authorization: Basic Authentication
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'

  # Configure API key authorization: Token Authentication
  config.api_key['Authorization'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = Ionoscloud::NicApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the datacenter
server_id = 'server_id_example' # String | The unique ID of the Server
nic_id = 'nic_id_example' # String | The unique ID of the NIC
nic = Ionoscloud::NicProperties.new({lan: 2}) # NicProperties | Modified properties of Nic
opts = {
  pretty: true, # Boolean | Controls whether response is pretty-printed (with indentation and new lines)
  depth: 56, # Integer | Controls the details depth of response objects.  Eg. GET /datacenters/[ID]  - depth=0: only direct properties are included. Children (servers etc.) are not included  - depth=1: direct properties and children references are included  - depth=2: direct properties and children properties are included  - depth=3: direct properties and children properties and children's children are included  - depth=... and so on
  x_contract_number: 56 # Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
}

begin
  # Partially modify a Nic
  result = api_instance.datacenters_servers_nics_patch(datacenter_id, server_id, nic_id, nic, opts)
  p result
rescue Ionoscloud::ApiError => e
  puts "Error when calling NicApi->datacenters_servers_nics_patch: #{e}"
end

Using the datacenters_servers_nics_patch_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> datacenters_servers_nics_patch_with_http_info(datacenter_id, server_id, nic_id, nic, opts)

begin
  # Partially modify a Nic
  data, status_code, headers = api_instance.datacenters_servers_nics_patch_with_http_info(datacenter_id, server_id, nic_id, nic, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <Nic>
rescue Ionoscloud::ApiError => e
  puts "Error when calling NicApi->datacenters_servers_nics_patch_with_http_info: #{e}"
end

Parameters

NameTypeDescriptionNotes

datacenter_id

String

The unique ID of the datacenter

server_id

String

The unique ID of the Server

nic_id

String

The unique ID of the NIC

nic

Modified properties of Nic

pretty

Boolean

Controls whether response is pretty-printed (with indentation and new lines)

[optional][default to true]

depth

Integer

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on

[optional][default to 0]

x_contract_number

Integer

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

[optional]

Return type

Nic

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

datacenters_servers_nics_post

datacenters_servers_nics_post(datacenter_id, server_id, nic, opts)

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.

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |config|
  # Configure HTTP basic authorization: Basic Authentication
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'

  # Configure API key authorization: Token Authentication
  config.api_key['Authorization'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = Ionoscloud::NicApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the datacenter
server_id = 'server_id_example' # String | The unique ID of the Server
nic = Ionoscloud::Nic.new({properties: Ionoscloud::NicProperties.new({lan: 2})}) # Nic | Nic to be created
opts = {
  pretty: true, # Boolean | Controls whether response is pretty-printed (with indentation and new lines)
  depth: 56, # Integer | Controls the details depth of response objects.  Eg. GET /datacenters/[ID]  - depth=0: only direct properties are included. Children (servers etc.) are not included  - depth=1: direct properties and children references are included  - depth=2: direct properties and children properties are included  - depth=3: direct properties and children properties and children's children are included  - depth=... and so on
  x_contract_number: 56 # Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
}

begin
  # Create a Nic
  result = api_instance.datacenters_servers_nics_post(datacenter_id, server_id, nic, opts)
  p result
rescue Ionoscloud::ApiError => e
  puts "Error when calling NicApi->datacenters_servers_nics_post: #{e}"
end

Using the datacenters_servers_nics_post_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> datacenters_servers_nics_post_with_http_info(datacenter_id, server_id, nic, opts)

begin
  # Create a Nic
  data, status_code, headers = api_instance.datacenters_servers_nics_post_with_http_info(datacenter_id, server_id, nic, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <Nic>
rescue Ionoscloud::ApiError => e
  puts "Error when calling NicApi->datacenters_servers_nics_post_with_http_info: #{e}"
end

Parameters

NameTypeDescriptionNotes

datacenter_id

String

The unique ID of the datacenter

server_id

String

The unique ID of the Server

nic

Nic to be created

pretty

Boolean

Controls whether response is pretty-printed (with indentation and new lines)

[optional][default to true]

depth

Integer

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on

[optional][default to 0]

x_contract_number

Integer

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

[optional]

Return type

Nic

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

datacenters_servers_nics_put

datacenters_servers_nics_put(datacenter_id, server_id, nic_id, nic, opts)

Modify a Nic

You can use update attributes of a Nic

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |config|
  # Configure HTTP basic authorization: Basic Authentication
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'

  # Configure API key authorization: Token Authentication
  config.api_key['Authorization'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = Ionoscloud::NicApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the datacenter
server_id = 'server_id_example' # String | The unique ID of the Server
nic_id = 'nic_id_example' # String | The unique ID of the NIC
nic = Ionoscloud::Nic.new({properties: Ionoscloud::NicProperties.new({lan: 2})}) # Nic | Modified Nic
opts = {
  pretty: true, # Boolean | Controls whether response is pretty-printed (with indentation and new lines)
  depth: 56, # Integer | Controls the details depth of response objects.  Eg. GET /datacenters/[ID]  - depth=0: only direct properties are included. Children (servers etc.) are not included  - depth=1: direct properties and children references are included  - depth=2: direct properties and children properties are included  - depth=3: direct properties and children properties and children's children are included  - depth=... and so on
  x_contract_number: 56 # Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
}

begin
  # Modify a Nic
  result = api_instance.datacenters_servers_nics_put(datacenter_id, server_id, nic_id, nic, opts)
  p result
rescue Ionoscloud::ApiError => e
  puts "Error when calling NicApi->datacenters_servers_nics_put: #{e}"
end

Using the datacenters_servers_nics_put_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> datacenters_servers_nics_put_with_http_info(datacenter_id, server_id, nic_id, nic, opts)

begin
  # Modify a Nic
  data, status_code, headers = api_instance.datacenters_servers_nics_put_with_http_info(datacenter_id, server_id, nic_id, nic, opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <Nic>
rescue Ionoscloud::ApiError => e
  puts "Error when calling NicApi->datacenters_servers_nics_put_with_http_info: #{e}"
end

Parameters

NameTypeDescriptionNotes

datacenter_id

String

The unique ID of the datacenter

server_id

String

The unique ID of the Server

nic_id

String

The unique ID of the NIC

nic

Modified Nic

pretty

Boolean

Controls whether response is pretty-printed (with indentation and new lines)

[optional][default to true]

depth

Integer

Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on

[optional][default to 0]

x_contract_number

Integer

Users having more than 1 contract need to provide contract number, against which all API requests should be executed

[optional]

Return type

Nic

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

Last updated