Delete the specified image; this operation is only supported for private images.
Parameters
Name
Type
Description
Notes
imageId
String
The unique ID of the image.
pretty
Boolean
Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to true]
depth
Integer
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]
xContractNumber
Integer
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
[optional]
Return type
null (empty response body)
HTTP request headers
Content-Type: Not defined
Accept: application/json
⚠️ Note: the example bellow uses the imagesDeleteWithHttpInfo which also returns the status code and the headers, if you don't need them you may use imagesDelete instead
Example
// Import classes:importcom.ionoscloud.ApiClient;importcom.ionoscloud.ApiException;importcom.ionoscloud.ApiResponse;importcom.ionoscloud.Configuration;importcom.ionoscloud.auth.*;importcom.ionoscloud.model.*;importcom.ionoscloud.api.ImagesApi;publicclassExample {publicstaticvoidmain(String[] args) {ApiClient defaultClient =Configuration.getDefaultApiClient();// Configure HTTP basic authorization: Basic AuthenticationHttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");basicAuthentication.setUsername("YOUR USERNAME");basicAuthentication.setPassword("YOUR PASSWORD");// Configure Api Key authorization: Token AuthenticationdefaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");ImagesApi apiInstance =newImagesApi(defaultClient);String imageId ="imageId_example"; // String | The unique ID of the image. Boolean pretty = true; // Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
Integer depth = 0; // Integer | 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
Integer xContractNumber = 56; // Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
try {apiInstance.imagesDeleteWithHttpInfo(imageId, pretty, depth, xContractNumber); } catch (ApiException e) {System.err.println("Exception when calling ImagesApi#imagesDelete");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); } }}
⚠️ Note: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.
For convenience, you can alternatively use a builder, which allows to omit optional parameters:
Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to true]
depth
Integer
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]
xContractNumber
Integer
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
⚠️ Note: the example bellow uses the imagesFindByIdWithHttpInfo which also returns the status code and the headers, if you don't need them you may use imagesFindById instead
Example
// Import classes:importcom.ionoscloud.ApiClient;importcom.ionoscloud.ApiException;importcom.ionoscloud.ApiResponse;importcom.ionoscloud.Configuration;importcom.ionoscloud.auth.*;importcom.ionoscloud.model.*;importcom.ionoscloud.api.ImagesApi;publicclassExample {publicstaticvoidmain(String[] args) {ApiClient defaultClient =Configuration.getDefaultApiClient();// Configure HTTP basic authorization: Basic AuthenticationHttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");basicAuthentication.setUsername("YOUR USERNAME");basicAuthentication.setPassword("YOUR PASSWORD");// Configure Api Key authorization: Token AuthenticationdefaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");ImagesApi apiInstance =newImagesApi(defaultClient);String imageId ="imageId_example"; // String | The unique ID of the image. Boolean pretty = true; // Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
Integer depth = 0; // Integer | 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
Integer xContractNumber = 56; // Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
try {ApiResponse<Image> result =apiInstance.imagesFindByIdWithHttpInfo(imageId, pretty, depth, xContractNumber);System.out.println("Response: "+result.getData());System.out.println("Status Code: "+result.getStatusCode());System.out.println("Headers: "+result.getHeaders()); } catch (ApiException e) {System.err.println("Exception when calling ImagesApi#imagesFindById");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); } }}
⚠️ Note: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.
For convenience, you can alternatively use a builder, which allows to omit optional parameters:
try {Image result =apiInstance.imagesFindById(imageId).pretty(true).depth(0).xContractNumber(56).execute();System.out.println(result); } catch (ApiException e) {System.err.println("Exception when calling ImagesApi#imagesFindById");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); }
imagesGet
Images imagesGet(pretty, depth, xContractNumber)
List images
List all the images within the data center.
Parameters
Name
Type
Description
Notes
pretty
Boolean
Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to true]
depth
Integer
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]
xContractNumber
Integer
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
[optional]
orderBy
String
Sorts the results alphanumerically in ascending order based on the specified property.
[optional]
maxResults
Integer
Limits the number of results returned.
[optional]
filters
Map<String, String>
Limit results to those containing a matching value for a specific property.
⚠️ Note: the example bellow uses the imagesGetWithHttpInfo which also returns the status code and the headers, if you don't need them you may use imagesGet instead
Example
// Import classes:importcom.ionoscloud.ApiClient;importcom.ionoscloud.ApiException;importcom.ionoscloud.ApiResponse;importcom.ionoscloud.Configuration;importcom.ionoscloud.auth.*;importcom.ionoscloud.model.*;importcom.ionoscloud.api.ImagesApi;publicclassExample {publicstaticvoidmain(String[] args) {ApiClient defaultClient =Configuration.getDefaultApiClient();// Configure HTTP basic authorization: Basic AuthenticationHttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");basicAuthentication.setUsername("YOUR USERNAME");basicAuthentication.setPassword("YOUR PASSWORD");// Configure Api Key authorization: Token AuthenticationdefaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");ImagesApi apiInstance =newImagesApi(defaultClient); Boolean pretty = true; // Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
Integer depth = 0; // Integer | 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
Integer xContractNumber = 56; // Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
String orderBy ="orderBy_example"; // String | Order by fieldInteger maxResults ="maxResults_example"; // Integer | Maximum number of results to returnMap<String,String> filters =newHashMap<String,String>(); // Map<String, String> | Filter results by fieldtry { ApiResponse<Images> result = apiInstance.imagesGetWithHttpInfo(pretty, depth, xContractNumber, orderBy, maxResults, filters);
System.out.println("Response: "+result.getData());System.out.println("Status Code: "+result.getStatusCode());System.out.println("Headers: "+result.getHeaders()); } catch (ApiException e) {System.err.println("Exception when calling ImagesApi#imagesGet");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); } }}
⚠️ Note: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.
For convenience, you can alternatively use a builder, which allows to omit optional parameters:
try {Images result =apiInstance.imagesGet().pretty(true).depth(0).xContractNumber(56).orderBy("orderBy_example").maxResults(5).filters(filters).execute();System.out.println(result); } catch (ApiException e) {System.err.println("Exception when calling ImagesApi#imagesGet");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); }
Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to true]
depth
Integer
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]
xContractNumber
Integer
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
⚠️ Note: the example bellow uses the imagesPatchWithHttpInfo which also returns the status code and the headers, if you don't need them you may use imagesPatch instead
Example
// Import classes:importcom.ionoscloud.ApiClient;importcom.ionoscloud.ApiException;importcom.ionoscloud.ApiResponse;importcom.ionoscloud.Configuration;importcom.ionoscloud.auth.*;importcom.ionoscloud.model.*;importcom.ionoscloud.api.ImagesApi;publicclassExample {publicstaticvoidmain(String[] args) {ApiClient defaultClient =Configuration.getDefaultApiClient();// Configure HTTP basic authorization: Basic AuthenticationHttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");basicAuthentication.setUsername("YOUR USERNAME");basicAuthentication.setPassword("YOUR PASSWORD");// Configure Api Key authorization: Token AuthenticationdefaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");ImagesApi apiInstance =newImagesApi(defaultClient);String imageId ="imageId_example"; // String | The unique ID of the image. licenceType =newString(); // String | The OS type of this image. image =newImageProperties(String); // ImageProperties | The image properties to be updated. Boolean pretty = true; // Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
Integer depth = 0; // Integer | 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
Integer xContractNumber = 56; // Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
try {ApiResponse<Image> result =apiInstance.imagesPatchWithHttpInfo(imageId, image, pretty, depth, xContractNumber);System.out.println("Response: "+result.getData());System.out.println("Status Code: "+result.getStatusCode());System.out.println("Headers: "+result.getHeaders()); } catch (ApiException e) {System.err.println("Exception when calling ImagesApi#imagesPatch");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); } }}
⚠️ Note: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.
For convenience, you can alternatively use a builder, which allows to omit optional parameters:
try {Image result =apiInstance.imagesPatch(imageId, image).pretty(true).depth(0).xContractNumber(56).execute();System.out.println(result); } catch (ApiException e) {System.err.println("Exception when calling ImagesApi#imagesPatch");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); }
Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to true]
depth
Integer
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]
xContractNumber
Integer
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
⚠️ Note: the example bellow uses the imagesPutWithHttpInfo which also returns the status code and the headers, if you don't need them you may use imagesPut instead
Example
// Import classes:importcom.ionoscloud.ApiClient;importcom.ionoscloud.ApiException;importcom.ionoscloud.ApiResponse;importcom.ionoscloud.Configuration;importcom.ionoscloud.auth.*;importcom.ionoscloud.model.*;importcom.ionoscloud.api.ImagesApi;publicclassExample {publicstaticvoidmain(String[] args) {ApiClient defaultClient =Configuration.getDefaultApiClient();// Configure HTTP basic authorization: Basic AuthenticationHttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");basicAuthentication.setUsername("YOUR USERNAME");basicAuthentication.setPassword("YOUR PASSWORD");// Configure Api Key authorization: Token AuthenticationdefaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");ImagesApi apiInstance =newImagesApi(defaultClient);String imageId ="imageId_example"; // String | The unique ID of the image. properties =newImageProperties(); // ImageProperties | image =newImage(ImageProperties); // Image | The modified image Boolean pretty = true; // Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
Integer depth = 0; // Integer | 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
Integer xContractNumber = 56; // Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
try {ApiResponse<Image> result =apiInstance.imagesPutWithHttpInfo(imageId, image, pretty, depth, xContractNumber);System.out.println("Response: "+result.getData());System.out.println("Status Code: "+result.getStatusCode());System.out.println("Headers: "+result.getHeaders()); } catch (ApiException e) {System.err.println("Exception when calling ImagesApi#imagesPut");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); } }}
⚠️ Note: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.
For convenience, you can alternatively use a builder, which allows to omit optional parameters:
try {Image result =apiInstance.imagesPut(imageId, image).pretty(true).depth(0).xContractNumber(56).execute();System.out.println(result); } catch (ApiException e) {System.err.println("Exception when calling ImagesApi#imagesPut");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); }