require'time'require'ionoscloud'# setup authorizationIonoscloud.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'endapi_instance =Ionoscloud::NicApi.newdatacenter_id ='datacenter_id_example'# String | The unique ID of the datacenterserver_id ='server_id_example'# String | The unique ID of the Servernic_id ='nic_id_example'# String | The unique ID of the NICopts = { 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 resultrescueIonoscloud::ApiError=> eputs"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.
require'time'require'ionoscloud'# setup authorizationIonoscloud.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'endapi_instance =Ionoscloud::NicApi.newdatacenter_id ='datacenter_id_example'# String | The unique ID of the datacenterserver_id ='server_id_example'# String | The unique ID of the Servernic_id ='nic_id_example'# String | The unique ID of the NICopts = { 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 resultrescueIonoscloud::ApiError=> eputs"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.
require'time'require'ionoscloud'# setup authorizationIonoscloud.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'endapi_instance =Ionoscloud::NicApi.newdatacenter_id ='datacenter_id_example'# String | The unique ID of the datacenterserver_id ='server_id_example'# String | The unique ID of the Servernic_id ='nic_id_example'# String | The unique ID of the NICfirewallrule_id ='firewallrule_id_example'# String | The unique ID of the Firewall Ruleopts = { 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 resultrescueIonoscloud::ApiError=> eputs"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.
Retrieves the attributes of a given Firewall Rule.
Examples
require'time'require'ionoscloud'# setup authorizationIonoscloud.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'endapi_instance =Ionoscloud::NicApi.newdatacenter_id ='datacenter_id_example'# String | The unique ID of the datacenterserver_id ='server_id_example'# String | The unique ID of the Servernic_id ='nic_id_example'# String | The unique ID of the NICfirewallrule_id ='firewallrule_id_example'# String | The unique ID of the Firewall Ruleopts = { 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 resultrescueIonoscloud::ApiError=> eputs"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.
Retrieves a list of firewall rules associated with a particular NIC
Examples
require'time'require'ionoscloud'# setup authorizationIonoscloud.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'endapi_instance =Ionoscloud::NicApi.newdatacenter_id ='datacenter_id_example'# String | The unique ID of the datacenterserver_id ='server_id_example'# String | The unique ID of the Servernic_id ='nic_id_example'# String | The unique ID of the NICopts = { 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 resultrescueIonoscloud::ApiError=> eputs"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.
require'time'require'ionoscloud'# setup authorizationIonoscloud.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'endapi_instance =Ionoscloud::NicApi.newdatacenter_id ='datacenter_id_example'# String | The unique ID of the datacenterserver_id ='server_id_example'# String | The unique ID of the Servernic_id ='nic_id_example'# String | The unique ID of the NICfirewallrule_id ='firewallrule_id_example'# String | The unique ID of the Firewall Rulefirewallrule = 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 resultrescueIonoscloud::ApiError=> eputs"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.
require'time'require'ionoscloud'# setup authorizationIonoscloud.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'endapi_instance =Ionoscloud::NicApi.newdatacenter_id ='datacenter_id_example'# String | The unique ID of the datacenterserver_id ='server_id_example'# String | The unique ID of the servernic_id ='nic_id_example'# String | The unique ID of the NICfirewallrule = 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 resultrescueIonoscloud::ApiError=> eputs"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.
require'time'require'ionoscloud'# setup authorizationIonoscloud.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'endapi_instance =Ionoscloud::NicApi.newdatacenter_id ='datacenter_id_example'# String | The unique ID of the datacenterserver_id ='server_id_example'# String | The unique ID of the Servernic_id ='nic_id_example'# String | The unique ID of the NICfirewallrule_id ='firewallrule_id_example'# String | The unique ID of the Firewall Rulefirewallrule = 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 resultrescueIonoscloud::ApiError=> eputs"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.
require'time'require'ionoscloud'# setup authorizationIonoscloud.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'endapi_instance =Ionoscloud::NicApi.newdatacenter_id ='datacenter_id_example'# String | The unique ID of the datacenterserver_id ='server_id_example'# String | The unique ID of the Serveropts = { 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 resultrescueIonoscloud::ApiError=> eputs"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.
require'time'require'ionoscloud'# setup authorizationIonoscloud.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'endapi_instance =Ionoscloud::NicApi.newdatacenter_id ='datacenter_id_example'# String | The unique ID of the datacenterserver_id ='server_id_example'# String | The unique ID of the Servernic_id ='nic_id_example'# String | The unique ID of the NICnic =Ionoscloud::NicProperties.new({lan: 2}) # NicProperties | Modified properties of Nicopts = { 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 resultrescueIonoscloud::ApiError=> eputs"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.
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 authorizationIonoscloud.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'endapi_instance =Ionoscloud::NicApi.newdatacenter_id ='datacenter_id_example'# String | The unique ID of the datacenterserver_id ='server_id_example'# String | The unique ID of the Servernic =Ionoscloud::Nic.new({properties: Ionoscloud::NicProperties.new({lan: 2})}) # Nic | Nic to be createdopts = { 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 resultrescueIonoscloud::ApiError=> eputs"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.
require'time'require'ionoscloud'# setup authorizationIonoscloud.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'endapi_instance =Ionoscloud::NicApi.newdatacenter_id ='datacenter_id_example'# String | The unique ID of the datacenterserver_id ='server_id_example'# String | The unique ID of the Servernic_id ='nic_id_example'# String | The unique ID of the NICnic =Ionoscloud::Nic.new({properties: Ionoscloud::NicProperties.new({lan: 2})}) # Nic | Modified Nicopts = { 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 resultrescueIonoscloud::ApiError=> eputs"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.