All URIs are relative to http://localhost, except if the operation defines another base path.
Method | HTTP request | Description |
---|---|---|
attachNetworkToServer() | POST /cloud-servers/{id}/network | Add network to server |
createNetwork() | POST /cloud-networks | Create network |
deleteNetwork() | DELETE /cloud-networks/{id} | Delete network |
detachNetworkFromServer() | DELETE /cloud-servers/{id}/network/{networkId} | Detach network from server |
getNetwork() | GET /cloud-networks/{id} | Get network |
attachNetworkToServer($id, $networkAttachNetworkToServerRequest): object
Add network to server
Creates a Network resource.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: JWT
$config = NETZFABRIK\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = NETZFABRIK\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new NETZFABRIK\Api\NetworkApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string | Network identifier
$networkAttachNetworkToServerRequest = new \NETZFABRIK\Model\NetworkAttachNetworkToServerRequest(); // \NETZFABRIK\Model\NetworkAttachNetworkToServerRequest | The new Network resource
try {
$result = $apiInstance->attachNetworkToServer($id, $networkAttachNetworkToServerRequest);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling NetworkApi->attachNetworkToServer: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | Network identifier | |
networkAttachNetworkToServerRequest | \NETZFABRIK\Model\NetworkAttachNetworkToServerRequest | The new Network resource |
object
- Content-Type:
application/json
,text/html
- Accept:
application/json
,text/html
[Back to top] [Back to API list] [Back to Model list] [Back to README]
createNetwork($body): object
Create network
Creates a Network resource.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: JWT
$config = NETZFABRIK\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = NETZFABRIK\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new NETZFABRIK\Api\NetworkApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = array('key' => new \stdClass); // object | The new Network resource
try {
$result = $apiInstance->createNetwork($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling NetworkApi->createNetwork: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
body | object | The new Network resource |
object
- Content-Type:
application/json
,text/html
- Accept:
application/json
,text/html
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteNetwork($id)
Delete network
Removes the Network resource.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: JWT
$config = NETZFABRIK\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = NETZFABRIK\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new NETZFABRIK\Api\NetworkApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string | Network identifier
try {
$apiInstance->deleteNetwork($id);
} catch (Exception $e) {
echo 'Exception when calling NetworkApi->deleteNetwork: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | Network identifier |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
detachNetworkFromServer($id, $networkId)
Detach network from server
Removes the Network resource.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: JWT
$config = NETZFABRIK\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = NETZFABRIK\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new NETZFABRIK\Api\NetworkApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string | Network identifier
$networkId = 'networkId_example'; // string | Network identifier
try {
$apiInstance->detachNetworkFromServer($id, $networkId);
} catch (Exception $e) {
echo 'Exception when calling NetworkApi->detachNetworkFromServer: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | Network identifier | |
networkId | string | Network identifier |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getNetwork($id): object
Get network
Retrieves a Network resource.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: JWT
$config = NETZFABRIK\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = NETZFABRIK\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new NETZFABRIK\Api\NetworkApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string | Network identifier
try {
$result = $apiInstance->getNetwork($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling NetworkApi->getNetwork: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | Network identifier |
object
- Content-Type: Not defined
- Accept:
application/json
,text/html
[Back to top] [Back to API list] [Back to Model list] [Back to README]