jpamorimdev/contabo-api
最新稳定版本:v1.0.0
Composer 安装命令:
composer require jpamorimdev/contabo-api
包简介
Contabo API allows you to manage your resources using PHP.
README 文档
README
Contabo API allows you to manage your resources using PHP
Installation
Install the latest version with:
$ composer require jpamorimdev/contabo-api
Requirements
- PHP 5.6 or higher is required
Supported Operations for Now
- Instance
- List instances
- Create a new instance
- Get specific instance by id
- Update specific instance
- Reinstall specific instance
- Cancel specific instance by id
- List operations history
- Instance Action
- Start
- Restart
- Stop
- Shutdown
- List action history
- Images
- List available standard and custom images
- Provide a custom image
- Get details about a specific image by its id
- Update custom image name by its id
- Delete an uploaded custom image by its id
- List Operations history
- Object Storage
- List all your Object Storages
- Create a new object storage
- Get specific object storage by its id
- Upgrade object storage size resp. update autoscaling settings.
- Cancels the specified object storage at the next possible date
- Private Network
- List private networks
- Create a new private network
- Update a private network by id
- Get specific private network by id
- Delete existing private network by id
- Add instance to a private network
- Remove instance from a private network
- Tags (It will be supported in next versions )
- Users (It will be supported in next versions )
- Roles (It will be supported in next versions )
- Secrets (It will be supported in next versions )
Basic usage
// All API Calls made throw HTTPS use jpmorimdev\ContaboApi\base\ContaboClient; $client_id = "client_id"; // IP is preferred , we take care of get Domain $client_secret = 'client_secret' ; // for example $username = "username" ; // $password = "password" ; // $contaboClient = new ContaboClient($client_id , $client_secret , $username , $password); var_dump($contaboClient->getComputeInstancesManagerInstance()->all()); var_dump($contaboClient->getComputeInstancesManagerInstance()->create('imageId' , \jpmorimdev\ContaboApi\operations\instances\Products::VPS_L ,\jpmorimdev\ContaboApi\operations\Regions::Germany , [ 'license' => \jpmorimdev\ContaboApi\operations\instances\Licenses::cPanel5 ] )); var_dump($contaboClient->getComputeInstancesManagerInstance()->listHistory()); var_dump($contaboClient->getComputeInstancesManagerInstance()->listActionsHistory()); $instance = $contaboClient->getComputeInstancesManagerInstance()->getInstance('instanceId'); var_dump($instance->restart()); var_dump($instance->start()); var_dump($instance->shutdown()); var_dump($instance->stop()); var_dump($contaboClient->getPrivateNetworksManagerInstance()->all()); var_dump($contaboClient->getImagesManagerInstance()->listAvailable()); var_dump($contaboClient->getObjectStorageManagerInstance()->all());
License
jpamorimdev/contabo-api is licensed under the MIT License.
统计信息
- 总下载量: 11
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-07-15