Delete the specified image; this operation is only supported for private images.
Example
from__future__import print_functionimport timeimport ionoscloudfrom ionoscloud.rest import ApiException# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6configuration = ionoscloud.Configuration( host ='https://api.ionos.com/cloudapi/v6',)# Example of configuring HTTP Basic Authorizationconfiguration.username ='YOUR_USERNAME'configuration.password ='YOUR_PASSWORD'with ionoscloud.ApiClient(configuration)as api_client:# Create an instance of the API class api_instance = ionoscloud.ImagesApi(api_client) image_id ='image_id_example'# str | The unique ID of the image.try:# Delete images api_instance.images_delete(image_id)except ApiException as e:print('Exception when calling ImagesApi.images_delete: %s\n'% e)
from__future__import print_functionimport timeimport ionoscloudfrom ionoscloud.rest import ApiException# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6configuration = ionoscloud.Configuration( host ='https://api.ionos.com/cloudapi/v6',)# Example of configuring HTTP Basic Authorizationconfiguration.username ='YOUR_USERNAME'configuration.password ='YOUR_PASSWORD'with ionoscloud.ApiClient(configuration)as api_client:# Create an instance of the API class api_instance = ionoscloud.ImagesApi(api_client) image_id ='image_id_example'# str | The unique ID of the image.try:# Retrieve images api_response = api_instance.images_find_by_id(image_id)print(api_response)except ApiException as e:print('Exception when calling ImagesApi.images_find_by_id: %s\n'% e)
from__future__import print_functionimport timeimport ionoscloudfrom ionoscloud.rest import ApiException# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6configuration = ionoscloud.Configuration( host ='https://api.ionos.com/cloudapi/v6',)# Example of configuring HTTP Basic Authorizationconfiguration.username ='YOUR_USERNAME'configuration.password ='YOUR_PASSWORD'with ionoscloud.ApiClient(configuration)as api_client:# Create an instance of the API class api_instance = ionoscloud.ImagesApi(api_client)try:# List images api_response = api_instance.images_get()print(api_response)except ApiException as e:print('Exception when calling ImagesApi.images_get: %s\n'% e)
from__future__import print_functionimport timeimport ionoscloudfrom ionoscloud.rest import ApiException# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6configuration = ionoscloud.Configuration( host ='https://api.ionos.com/cloudapi/v6',)# Example of configuring HTTP Basic Authorizationconfiguration.username ='YOUR_USERNAME'configuration.password ='YOUR_PASSWORD'with ionoscloud.ApiClient(configuration)as api_client:# Create an instance of the API class api_instance = ionoscloud.ImagesApi(api_client) image_id ='image_id_example'# str | The unique ID of the image. image = ionoscloud.ImageProperties()# ImageProperties | The image properties to be updated.try:# Partially modify images api_response = api_instance.images_patch(image_id, image)print(api_response)except ApiException as e:print('Exception when calling ImagesApi.images_patch: %s\n'% e)
from__future__import print_functionimport timeimport ionoscloudfrom ionoscloud.rest import ApiException# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6configuration = ionoscloud.Configuration( host ='https://api.ionos.com/cloudapi/v6',)# Example of configuring HTTP Basic Authorizationconfiguration.username ='YOUR_USERNAME'configuration.password ='YOUR_PASSWORD'with ionoscloud.ApiClient(configuration)as api_client:# Create an instance of the API class api_instance = ionoscloud.ImagesApi(api_client) image_id ='image_id_example'# str | The unique ID of the image. image = ionoscloud.Image()# Image | The modified imagetry:# Modify an Image by ID api_response = api_instance.images_put(image_id, image)print(api_response)except ApiException as e:print('Exception when calling ImagesApi.images_put: %s\n'% e)
Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to True]
depth
int
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed.
[optional]
image_id
str
The unique ID of the image.
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to True]
depth
int
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed.
[optional]
pretty
bool
Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to True]
depth
int
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed.
Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to True]
depth
int
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed.
Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to True]
depth
int
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed.