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::IPBlocksApi.newipblock_id ='ipblock_id_example'# String | 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 IP Block result = api_instance.ipblocks_delete(ipblock_id, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling IPBlocksApi->ipblocks_delete: #{e}"end
Using the ipblocks_delete_with_http_info variant
This returns an Array which contains the response data, status code and headers.
begin# Delete IP Block data, status_code, headers = api_instance.ipblocks_delete_with_http_info(ipblock_id, opts)p status_code # => 2xxp headers # => { ... }p data # => ObjectrescueIonoscloud::ApiError=> eputs"Error when calling IPBlocksApi->ipblocks_delete_with_http_info: #{e}"end
Parameters
Name
Type
Description
Notes
ipblock_id
String
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
ipblocks_find_by_id
ipblocks_find_by_id(ipblock_id, opts)
Retrieve an IP Block
Retrieves the attributes of a given IP Block.
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::IPBlocksApi.newipblock_id ='ipblock_id_example'# String | 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 an IP Block result = api_instance.ipblocks_find_by_id(ipblock_id, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling IPBlocksApi->ipblocks_find_by_id: #{e}"end
Using the ipblocks_find_by_id_with_http_info variant
This returns an Array which contains the response data, status code and headers.
begin# Retrieve an IP Block data, status_code, headers = api_instance.ipblocks_find_by_id_with_http_info(ipblock_id, opts)p status_code # => 2xxp headers # => { ... }p data # => <IpBlock>rescueIonoscloud::ApiError=> eputs"Error when calling IPBlocksApi->ipblocks_find_by_id_with_http_info: #{e}"end
Parameters
Name
Type
Description
Notes
ipblock_id
String
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
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::IPBlocksApi.newopts = { 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 offset for pagination)}begin# List IP Blocks result = api_instance.ipblocks_get(opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling IPBlocksApi->ipblocks_get: #{e}"end
Using the ipblocks_get_with_http_info variant
This returns an Array which contains the response data, status code and headers.
begin# List IP Blocks data, status_code, headers = api_instance.ipblocks_get_with_http_info(opts)p status_code # => 2xxp headers # => { ... }p data # => <IpBlocks>rescueIonoscloud::ApiError=> eputs"Error when calling IPBlocksApi->ipblocks_get_with_http_info: #{e}"end
Parameters
Name
Type
Description
Notes
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 offset for pagination)
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::IPBlocksApi.newipblock_id ='ipblock_id_example'# String | ipblock =Ionoscloud::IpBlockProperties.new({location: 'us/las', size: 5}) # IpBlockProperties | IP Block to be modifiedopts = { 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 IP Block result = api_instance.ipblocks_patch(ipblock_id, ipblock, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling IPBlocksApi->ipblocks_patch: #{e}"end
Using the ipblocks_patch_with_http_info variant
This returns an Array which contains the response data, status code and headers.
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
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::IPBlocksApi.newipblock =Ionoscloud::IpBlock.new({properties: Ionoscloud::IpBlockProperties.new({location: 'us/las', size: 5})}) # IpBlock | IP Block to be reservedopts = { 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# Reserve IP Block result = api_instance.ipblocks_post(ipblock, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling IPBlocksApi->ipblocks_post: #{e}"end
Using the ipblocks_post_with_http_info variant
This returns an Array which contains the response data, status code and headers.
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
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::IPBlocksApi.newipblock_id ='ipblock_id_example'# String | ipblock =Ionoscloud::IpBlock.new({properties: Ionoscloud::IpBlockProperties.new({location: 'us/las', size: 5})}) # IpBlock | IP Block to be modifiedopts = { 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 IP Block result = api_instance.ipblocks_put(ipblock_id, ipblock, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling IPBlocksApi->ipblocks_put: #{e}"end
Using the ipblocks_put_with_http_info variant
This returns an Array which contains the response data, status code and headers.
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