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 datacentersLansDeleteWithHttpInfo which also returns the status code and the headers, if you don't need them you may use datacentersLansDelete 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.LansApi;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");LansApi apiInstance =newLansApi(defaultClient);String datacenterId ="datacenterId_example"; // String | The unique ID of the data center.String lanId ="lanId_example"; // String | The unique ID of the LAN. 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.datacentersLansDeleteWithHttpInfo(datacenterId, lanId, pretty, depth, xContractNumber); } catch (ApiException e) {System.err.println("Exception when calling LansApi#datacentersLansDelete");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:
Lan datacentersLansFindById(datacenterId, lanId, pretty, depth, xContractNumber)
Retrieve LANs
Retrieve the properties of the specified LAN within the data center.
Parameters
Name
Type
Description
Notes
datacenterId
String
The unique ID of the data center.
lanId
String
The unique ID of the LAN.
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.
⚠️ Note: the example bellow uses the datacentersLansFindByIdWithHttpInfo which also returns the status code and the headers, if you don't need them you may use datacentersLansFindById 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.LansApi;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");LansApi apiInstance =newLansApi(defaultClient);String datacenterId ="datacenterId_example"; // String | The unique ID of the data center.String lanId ="lanId_example"; // String | The unique ID of the LAN. 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<Lan> result = apiInstance.datacentersLansFindByIdWithHttpInfo(datacenterId, lanId, 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 LansApi#datacentersLansFindById");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 {Lan result =apiInstance.datacentersLansFindById(datacenterId, lanId).pretty(true).depth(0).xContractNumber(56).execute();System.out.println(result); } catch (ApiException e) {System.err.println("Exception when calling LansApi#datacentersLansFindById");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.
[optional]
offset
Integer
The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination).
[optional] [default to 0]
limit
Integer
The maximum number of elements to return (use together with offset for pagination).
[optional] [default to 1000]
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 datacentersLansGetWithHttpInfo which also returns the status code and the headers, if you don't need them you may use datacentersLansGet 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.LansApi;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");LansApi apiInstance =newLansApi(defaultClient);String datacenterId ="datacenterId_example"; // String | The unique ID of the data center. 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.
Integer offset = 0; // Integer | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination).
Integer limit = 1000; // Integer | The maximum number of elements to return (use together with offset for pagination).
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<Lans> result = apiInstance.datacentersLansGetWithHttpInfo(datacenterId, pretty, depth, xContractNumber, offset, limit, 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 LansApi#datacentersLansGet");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 {Lans result =apiInstance.datacentersLansGet(datacenterId).pretty(true).depth(0).offset(0).limit(1000).xContractNumber(56).orderBy("orderBy_example").maxResults(5).filters(filters).execute();System.out.println(result); } catch (ApiException e) {System.err.println("Exception when calling LansApi#datacentersLansGet");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); }
datacentersLansNicsFindById
Nic datacentersLansNicsFindById(datacenterId, lanId, nicId, pretty, depth, xContractNumber)
Retrieve attached NICs
Retrieve the properties of the NIC, attached to the specified LAN.
Parameters
Name
Type
Description
Notes
datacenterId
String
The unique ID of the data center.
lanId
String
The unique ID of the LAN.
nicId
String
The unique ID of the NIC.
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.
⚠️ Note: the example bellow uses the datacentersLansNicsFindByIdWithHttpInfo which also returns the status code and the headers, if you don't need them you may use datacentersLansNicsFindById 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.LansApi;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");LansApi apiInstance =newLansApi(defaultClient);String datacenterId ="datacenterId_example"; // String | The unique ID of the data center.String lanId ="lanId_example"; // String | The unique ID of the LAN.String nicId ="nicId_example"; // String | The unique ID of the NIC. 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<Nic> result = apiInstance.datacentersLansNicsFindByIdWithHttpInfo(datacenterId, lanId, nicId, 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 LansApi#datacentersLansNicsFindById");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 {Nic result =apiInstance.datacentersLansNicsFindById(datacenterId, lanId, nicId).pretty(true).depth(0).xContractNumber(56).execute();System.out.println(result); } catch (ApiException e) {System.err.println("Exception when calling LansApi#datacentersLansNicsFindById");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.
[optional]
offset
Integer
The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination).
[optional] [default to 0]
limit
Integer
The maximum number of elements to return (use together with offset for pagination).
[optional] [default to 1000]
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 datacentersLansNicsGetWithHttpInfo which also returns the status code and the headers, if you don't need them you may use datacentersLansNicsGet 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.LansApi;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");LansApi apiInstance =newLansApi(defaultClient);String datacenterId ="datacenterId_example"; // String | The unique ID of the data center.String lanId ="lanId_example"; // String | The unique ID of the LAN. 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.
Integer offset = 0; // Integer | The first element (from the complete list of the elements) to include in the response (used together with <b><i>limit</i></b> for pagination).
Integer limit = 1000; // Integer | The maximum number of elements to return (use together with offset for pagination).
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<LanNics> result = apiInstance.datacentersLansNicsGetWithHttpInfo(datacenterId, lanId, pretty, depth, xContractNumber, offset, limit, 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 LansApi#datacentersLansNicsGet");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 {LanNics result =apiInstance.datacentersLansNicsGet(datacenterId, lanId).pretty(true).depth(0).offset(0).limit(1000).xContractNumber(56).orderBy("orderBy_example").maxResults(5).filters(filters).execute();System.out.println(result); } catch (ApiException e) {System.err.println("Exception when calling LansApi#datacentersLansNicsGet");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); }
datacentersLansNicsPost
Nic datacentersLansNicsPost(datacenterId, lanId, nic, pretty, depth, xContractNumber)
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 datacentersLansNicsPostWithHttpInfo which also returns the status code and the headers, if you don't need them you may use datacentersLansNicsPost 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.LansApi;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");LansApi apiInstance =newLansApi(defaultClient);String datacenterId ="datacenterId_example"; // String | The unique ID of the data center.String lanId ="lanId_example"; // String | The unique ID of the LAN. properties =newNicProperties(); // NicProperties | nic =newNic(NicProperties); // Nic | The NIC to be attached. 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<Nic> result = apiInstance.datacentersLansNicsPostWithHttpInfo(datacenterId, lanId, nic, 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 LansApi#datacentersLansNicsPost");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 {Nic result =apiInstance.datacentersLansNicsPost(datacenterId, lanId, nic).pretty(true).depth(0).xContractNumber(56).execute();System.out.println(result); } catch (ApiException e) {System.err.println("Exception when calling LansApi#datacentersLansNicsPost");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); }
datacentersLansPatch
Lan datacentersLansPatch(datacenterId, lanId, lan, pretty, depth, xContractNumber)
Partially modify LANs
Update the properties of the specified LAN within the data center.
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 datacentersLansPatchWithHttpInfo which also returns the status code and the headers, if you don't need them you may use datacentersLansPatch 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.LansApi;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");LansApi apiInstance =newLansApi(defaultClient);String datacenterId ="datacenterId_example"; // String | The unique ID of the data center.String lanId ="lanId_example"; // String | The unique ID of the LAN.LanProperties lan =newLanProperties(); // LanProperties | The properties of the LAN 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<Lan> result = apiInstance.datacentersLansPatchWithHttpInfo(datacenterId, lanId, lan, 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 LansApi#datacentersLansPatch");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 {Lan result =apiInstance.datacentersLansPatch(datacenterId, lanId, lan).pretty(true).depth(0).xContractNumber(56).execute();System.out.println(result); } catch (ApiException e) {System.err.println("Exception when calling LansApi#datacentersLansPatch");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 datacentersLansPostWithHttpInfo which also returns the status code and the headers, if you don't need them you may use datacentersLansPost 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.LansApi;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");LansApi apiInstance =newLansApi(defaultClient);String datacenterId ="datacenterId_example"; // String | The unique ID of the data center. properties =newLanPropertiesPost(); // LanPropertiesPost | lan =newLanPost(LanPropertiesPost); // LanPost | The LAN to create. 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<LanPost> result = apiInstance.datacentersLansPostWithHttpInfo(datacenterId, lan, 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 LansApi#datacentersLansPost");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 {LanPost result =apiInstance.datacentersLansPost(datacenterId, lan).pretty(true).depth(0).xContractNumber(56).execute();System.out.println(result); } catch (ApiException e) {System.err.println("Exception when calling LansApi#datacentersLansPost");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); }
datacentersLansPut
Lan datacentersLansPut(datacenterId, lanId, lan, pretty, depth, xContractNumber)
Modify LANs
Modify the properties of the specified LAN within the data center.
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 datacentersLansPutWithHttpInfo which also returns the status code and the headers, if you don't need them you may use datacentersLansPut 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.LansApi;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");LansApi apiInstance =newLansApi(defaultClient);String datacenterId ="datacenterId_example"; // String | The unique ID of the data center.String lanId ="lanId_example"; // String | The unique ID of the LAN. properties =newLanProperties(); // LanProperties | lan =newLan(LanProperties); // Lan | The modified LAN 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<Lan> result = apiInstance.datacentersLansPutWithHttpInfo(datacenterId, lanId, lan, 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 LansApi#datacentersLansPut");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 {Lan result =apiInstance.datacentersLansPut(datacenterId, lanId, lan).pretty(true).depth(0).xContractNumber(56).execute();System.out.println(result); } catch (ApiException e) {System.err.println("Exception when calling LansApi#datacentersLansPut");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); }