Download the PHP package boci/hetzner-laravel without Composer
On this page you can find all versions of the php package boci/hetzner-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download boci/hetzner-laravel
More information about boci/hetzner-laravel
Files in boci/hetzner-laravel
Package hetzner-laravel
Short Description A Laravel SDK for interacting with the Hetzner Cloud API - inspired by Nuno Maduro's OpenAI PHP client
License MIT
Homepage https://github.com/amar8eka/hetzner-laravel
Informations about the package hetzner-laravel
Hetzner Laravel
โก๏ธ Hetzner Laravel is a supercharged community-maintained Laravel SDK that allows you to interact with the Hetzner Cloud API. Inspired by Nuno Maduro's excellent OpenAI PHP client.
Features
- ๐ Modern Architecture: Clean, organized, and maintainable code structure
- ๐งช Testing Ready: Includes
ClientFakefor easy testing and mocking - ๐ Meta Information: Access rate limits and request details
- ๐ก๏ธ Type Safe: Full type safety with PHP 8.2+
- ๐ฏ Resource Based: Clean, organized API resources
- ๐ง Laravel Integration: Seamless Laravel service provider and facade
- ๐ Complete API Coverage: All Hetzner Cloud API endpoints implemented
Installation
You can install the package via composer:
Configuration
Publish the configuration file:
Add your Hetzner API token to your .env file:
Usage
Basic Usage
Using the Facade
Working with Images
Working with Locations
Working with Server Types
Working with Networks
Working with Load Balancers
Working with DNS
Meta Information
Access rate limits and request details:
Testing
The package provides a fake implementation for testing:
Testing with Exceptions
Advanced Usage
Custom HTTP Client
Dependency Injection
API Resources
The package is organized into resources that correspond to Hetzner Cloud API endpoints:
- Actions: Get multiple actions, get an action
- Billing: Get all prices
- Certificates: List, create, get, update, delete certificates
- DNS Zones: List, create, get, update, delete DNS zones + actions + RRSets
- Firewalls: List, create, get, update, delete firewalls + actions
- Floating IPs: List, create, get, update, delete floating IPs + actions
- Images: List, get, update, delete images + actions
- ISOs: List, get ISOs
- Load Balancers: List, create, get, update, delete load balancers + actions
- Load Balancer Types: List, get load balancer types
- Locations: List, get locations
- Networks: List, create, get, update, delete networks + actions
- Placement Groups: List, create, get, update, delete placement groups
- Primary IPs: List, create, get, update, delete primary IPs + actions
- Servers: List, create, get, update, delete servers + actions
- Server Types: List, get server types
- SSH Keys: List, create, get, update, delete SSH keys
- Volumes: List, create, get, update, delete volumes + actions
Error Handling
The package provides custom exceptions for better error handling:
Documentation
For more information about the Hetzner Cloud API, please refer to the following resources:
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Amar Beka
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
Quick Reference
๐ Actions
list()- Get multiple actionsretrieve(string $actionId)- Get an action
๐ Security
Certificates
list()- List certificatescreate(array $parameters)- Create a certificateretrieve(string $certificateId)- Get a certificateupdate(string $certificateId, array $parameters)- Update a certificatedelete(string $certificateId)- Delete a certificate
SSH Keys
list()- List SSH keyscreate(array $parameters)- Create an SSH keyretrieve(string $sshKeyId)- Get an SSH keyupdate(string $sshKeyId, array $parameters)- Update an SSH keydelete(string $sshKeyId)- Delete an SSH key
๐ DNS Zones
list()- List DNS zonescreate(array $parameters)- Create a DNS zoneretrieve(string $zoneIdOrName)- Get a DNS zoneupdate(string $zoneIdOrName, array $parameters)- Update a DNS zonedelete(string $zoneIdOrName)- Delete a DNS zoneexport(string $zoneIdOrName)- Export zone fileimport(array $parameters)- Import zone fileactions()- Access zone actionsrrsets()- Access DNS records
๐ Locations
list()- List locationsretrieve(string $locationId)- Get a location
๐ฅ Firewalls
list()- List firewallscreate(array $parameters)- Create a firewallretrieve(string $firewallId)- Get a firewallupdate(string $firewallId, array $parameters)- Update a firewalldelete(string $firewallId)- Delete a firewallactions()- Access firewall actions
๐ Floating IPs
list()- List floating IPscreate(array $parameters)- Create a floating IPretrieve(string $floatingIpId)- Get a floating IPupdate(string $floatingIpId, array $parameters)- Update a floating IPdelete(string $floatingIpId)- Delete a floating IPactions()- Access floating IP actions
๐ฅ๏ธ Servers
list()- List serverscreate(array $parameters)- Create a serverretrieve(string $serverId)- Get a serverupdate(string $serverId, array $parameters)- Update a serverdelete(string $serverId)- Delete a servermetrics(string $serverId, array $parameters)- Get server metricsactions()- Access server actions
๐ผ๏ธ Images
list()- List imagesretrieve(string $imageId)- Get an imageupdate(string $imageId, array $parameters)- Update an imagedelete(string $imageId)- Delete an imageactions()- Access image actions
๐ฟ ISOs
list()- List ISOsretrieve(string $isoId)- Get an ISO
๐ฆ Placement Groups
list()- List placement groupscreate(array $parameters)- Create a placement groupretrieve(string $placementGroupId)- Get a placement groupupdate(string $placementGroupId, array $parameters)- Update a placement groupdelete(string $placementGroupId)- Delete a placement group
๐ Primary IPs
list()- List primary IPscreate(array $parameters)- Create a primary IPretrieve(string $primaryIpId)- Get a primary IPupdate(string $primaryIpId, array $parameters)- Update a primary IPdelete(string $primaryIpId)- Delete a primary IPactions()- Access primary IP actions
โ๏ธ Server Types
list()- List server typesretrieve(string $serverTypeId)- Get a server type
โ๏ธ Load Balancers
list()- List load balancerscreate(array $parameters)- Create a load balancerretrieve(string $loadBalancerId)- Get a load balancerupdate(string $loadBalancerId, array $parameters)- Update a load balancerdelete(string $loadBalancerId)- Delete a load balancermetrics(string $loadBalancerId, array $parameters)- Get load balancer metricsactions()- Access load balancer actions
โ๏ธ Load Balancer Types
list()- List load balancer typesretrieve(string $loadBalancerTypeId)- Get a load balancer type
๐ Networks
list()- List networkscreate(array $parameters)- Create a networkretrieve(string $networkId)- Get a networkupdate(string $networkId, array $parameters)- Update a networkdelete(string $networkId)- Delete a networkactions()- Access network actions
๐ฐ Billing
listPricing()- Get all prices
๐พ Volumes
list()- List volumescreate(array $parameters)- Create a volumeretrieve(string $volumeId)- Get a volumeupdate(string $volumeId, array $parameters)- Update a volumedelete(string $volumeId)- Delete a volumeactions()- Access volume actions
This package provides complete coverage of the Hetzner Cloud API, ensuring you can manage all your cloud resources programmatically with ease.
All versions of hetzner-laravel with dependencies
guzzlehttp/guzzle Version ^7.10
illuminate/support Version ^12.0
psr/http-client Version ^1.0
psr/http-message Version ^2.0