Models

IPBlocksApi

IPBlocksApi

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

Method

HTTP request

Description

ipblocks_delete

DELETE /ipblocks/{ipblockId}

Delete IP Block

ipblocks_find_by_id

GET /ipblocks/{ipblockId}

Retrieve an IP Block

ipblocks_get

GET /ipblocks

List IP Blocks

ipblocks_patch

PATCH /ipblocks/{ipblockId}

Partially modify IP Block

ipblocks_post

POST /ipblocks

Reserve IP Block

ipblocks_put

PUT /ipblocks/{ipblockId}

Modify IP Block

ipblocks_delete

object ipblocks_delete(ipblock_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number)

Delete IP Block

Removes the specific IP Block

Example

  • Basic Authentication (Basic Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure HTTP basic authorization: Basic Authentication
    configuration.username = 'YOUR_USERNAME'
    configuration.password = 'YOUR_PASSWORD'
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.IPBlocksApi(api_client)
    ipblock_id = 'ipblock_id_example' # str |
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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 = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    try:
    # Delete IP Block
    api_response = api_instance.ipblocks_delete(ipblock_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling IPBlocksApi.ipblocks_delete: %s\n' % e)
  • Api Key Authentication (Token Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure Api Key access token for authorization: Token Authentication
    configuration.api_key = {
    'Token Authentication': 'YOUR_API_TOKEN',
    }
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.IPBlocksApi(api_client)
    ipblock_id = 'ipblock_id_example' # str |
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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 = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    try:
    # Delete IP Block
    api_response = api_instance.ipblocks_delete(ipblock_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling IPBlocksApi.ipblocks_delete: %s\n' % e)

Parameters

Name

Type

Description

Notes

ipblock_id

str

pretty

bool

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

[optional] [default to True]

depth

int

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

int

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

IpBlock ipblocks_find_by_id(ipblock_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number)

Retrieve an IP Block

Retrieves the attributes of a given IP Block.

Example

  • Basic Authentication (Basic Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure HTTP basic authorization: Basic Authentication
    configuration.username = 'YOUR_USERNAME'
    configuration.password = 'YOUR_PASSWORD'
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.IPBlocksApi(api_client)
    ipblock_id = 'ipblock_id_example' # str |
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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 = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    try:
    # Retrieve an IP Block
    api_response = api_instance.ipblocks_find_by_id(ipblock_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling IPBlocksApi.ipblocks_find_by_id: %s\n' % e)
  • Api Key Authentication (Token Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure Api Key access token for authorization: Token Authentication
    configuration.api_key = {
    'Token Authentication': 'YOUR_API_TOKEN',
    }
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.IPBlocksApi(api_client)
    ipblock_id = 'ipblock_id_example' # str |
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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 = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    try:
    # Retrieve an IP Block
    api_response = api_instance.ipblocks_find_by_id(ipblock_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling IPBlocksApi.ipblocks_find_by_id: %s\n' % e)

Parameters

Name

Type

Description

Notes

ipblock_id

str

pretty

bool

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

[optional] [default to True]

depth

int

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

int

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

[optional]

Return type

IpBlock

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

ipblocks_get

IpBlocks ipblocks_get(pretty=pretty, depth=depth, x_contract_number=x_contract_number)

List IP Blocks

Retrieve a list of all reserved IP Blocks

Example

  • Basic Authentication (Basic Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure HTTP basic authorization: Basic Authentication
    configuration.username = 'YOUR_USERNAME'
    configuration.password = 'YOUR_PASSWORD'
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.IPBlocksApi(api_client)
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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 = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    try:
    # List IP Blocks
    api_response = api_instance.ipblocks_get(pretty=pretty, depth=depth, x_contract_number=x_contract_number)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling IPBlocksApi.ipblocks_get: %s\n' % e)
  • Api Key Authentication (Token Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure Api Key access token for authorization: Token Authentication
    configuration.api_key = {
    'Token Authentication': 'YOUR_API_TOKEN',
    }
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.IPBlocksApi(api_client)
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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 = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    try:
    # List IP Blocks
    api_response = api_instance.ipblocks_get(pretty=pretty, depth=depth, x_contract_number=x_contract_number)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling IPBlocksApi.ipblocks_get: %s\n' % e)

Parameters

Name

Type

Description

Notes

pretty

bool

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

[optional] [default to True]

depth

int

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

int

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

[optional]

Return type

IpBlocks

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

ipblocks_patch

IpBlock ipblocks_patch(ipblock_id, ipblock, pretty=pretty, depth=depth, x_contract_number=x_contract_number)

Partially modify IP Block

You can use update attributes of a resource

Example

  • Basic Authentication (Basic Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure HTTP basic authorization: Basic Authentication
    configuration.username = 'YOUR_USERNAME'
    configuration.password = 'YOUR_PASSWORD'
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.IPBlocksApi(api_client)
    ipblock_id = 'ipblock_id_example' # str |
    ipblock = ionoscloud.IpBlockProperties() # IpBlockProperties | IP Block to be modified
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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 = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    try:
    # Partially modify IP Block
    api_response = api_instance.ipblocks_patch(ipblock_id, ipblock, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling IPBlocksApi.ipblocks_patch: %s\n' % e)
  • Api Key Authentication (Token Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure Api Key access token for authorization: Token Authentication
    configuration.api_key = {
    'Token Authentication': 'YOUR_API_TOKEN',
    }
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.IPBlocksApi(api_client)
    ipblock_id = 'ipblock_id_example' # str |
    ipblock = ionoscloud.IpBlockProperties() # IpBlockProperties | IP Block to be modified
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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 = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    try:
    # Partially modify IP Block
    api_response = api_instance.ipblocks_patch(ipblock_id, ipblock, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling IPBlocksApi.ipblocks_patch: %s\n' % e)

Parameters

Name

Type

Description

Notes

ipblock_id

str

ipblock

IpBlockProperties

IP Block to be modified

pretty

bool

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

[optional] [default to True]

depth

int

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

int

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

[optional]

Return type

IpBlock

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

ipblocks_post

IpBlock ipblocks_post(ipblock, pretty=pretty, depth=depth, x_contract_number=x_contract_number)

Reserve IP Block

This will reserve a new IP Block

Example

  • Basic Authentication (Basic Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure HTTP basic authorization: Basic Authentication
    configuration.username = 'YOUR_USERNAME'
    configuration.password = 'YOUR_PASSWORD'
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.IPBlocksApi(api_client)
    ipblock = ionoscloud.IpBlock() # IpBlock | IP Block to be reserved
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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 = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    try:
    # Reserve IP Block
    api_response = api_instance.ipblocks_post(ipblock, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling IPBlocksApi.ipblocks_post: %s\n' % e)
  • Api Key Authentication (Token Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure Api Key access token for authorization: Token Authentication
    configuration.api_key = {
    'Token Authentication': 'YOUR_API_TOKEN',
    }
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.IPBlocksApi(api_client)
    ipblock = ionoscloud.IpBlock() # IpBlock | IP Block to be reserved
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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 = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    try:
    # Reserve IP Block
    api_response = api_instance.ipblocks_post(ipblock, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling IPBlocksApi.ipblocks_post: %s\n' % e)

Parameters

Name

Type

Description

Notes

ipblock

IpBlock

IP Block to be reserved

pretty

bool

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

[optional] [default to True]

depth

int

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

int

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

[optional]

Return type

IpBlock

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

ipblocks_put

IpBlock ipblocks_put(ipblock_id, ipblock, pretty=pretty, depth=depth, x_contract_number=x_contract_number)

Modify IP Block

You can use update attributes of a resource

Example

  • Basic Authentication (Basic Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure HTTP basic authorization: Basic Authentication
    configuration.username = 'YOUR_USERNAME'
    configuration.password = 'YOUR_PASSWORD'
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.IPBlocksApi(api_client)
    ipblock_id = 'ipblock_id_example' # str |
    ipblock = ionoscloud.IpBlock() # IpBlock | IP Block to be modified
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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 = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    try:
    # Modify IP Block
    api_response = api_instance.ipblocks_put(ipblock_id, ipblock, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling IPBlocksApi.ipblocks_put: %s\n' % e)
  • Api Key Authentication (Token Authentication):

    from __future__ import print_function
    import time
    import ionoscloud
    from ionoscloud.rest import ApiException
    from pprint import pprint
    # Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v5
    # See configuration.py for a list of all supported configuration parameters.
    configuration = ionoscloud.Configuration(
    host = 'https://api.ionos.com/cloudapi/v5',
    )
    # The client must configure the authentication and authorization parameters
    # in accordance with the API server security policy.
    # Examples with auth method are provided below
    # Configure Api Key access token for authorization: Token Authentication
    configuration.api_key = {
    'Token Authentication': 'YOUR_API_TOKEN',
    }
    # Enter a context with an instance of the API client
    with ionoscloud.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud.IPBlocksApi(api_client)
    ipblock_id = 'ipblock_id_example' # str |
    ipblock = ionoscloud.IpBlock() # IpBlock | IP Block to be modified
    pretty = True # bool | Controls whether response is pretty-printed (with indentation and new lines) (optional) (default to True)
    depth = 0 # int | 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 = 56 # int | Users having more than 1 contract need to provide contract number, against which all API requests should be executed (optional)
    try:
    # Modify IP Block
    api_response = api_instance.ipblocks_put(ipblock_id, ipblock, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
    pprint(api_response)
    except ApiException as e:
    print('Exception when calling IPBlocksApi.ipblocks_put: %s\n' % e)

Parameters

Name

Type

Description

Notes

ipblock_id

str

ipblock

IpBlock

IP Block to be modified

pretty

bool

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

[optional] [default to True]

depth

int

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

int

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

[optional]

Return type

IpBlock

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json