Delete Allocation with Application API¶
Delete the given allocation.
Usage¶
<?php
$pterodactyl->deleteAllocation($nodeId, $allocationId);
//For a node instance
$node->deleteAllocation($allocationId);
?>
Parameters¶
Parameter | Description | Rules |
---|---|---|
nodeId | The id of the node | |
allocationId | The id of the allocation |
Returns¶
None
Throwing exception if failed.
Example¶
<?php
try {
$pterodactyl->deleteAllocation(1, 3);
} catch(\Exception $e){
print_r($e->getMessage());
}
?>
<?php
try {
$node = $pterodactyl->node(1);
$node->deleteAllocation(3);
} catch(\Exception $e){
print_r($e->getMessage());
}
?>