Skip to content

Latest commit

 

History

History
252 lines (213 loc) · 17.1 KB

README.md

File metadata and controls

252 lines (213 loc) · 17.1 KB

BegetOpenAPICloud

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

Installation & Usage

Requirements

PHP 7.4 and later. Should also work with PHP 8.0.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/LTD-Beget/openapi-cloud-php.git"
    }
  ],
  "require": {
    "LTD-Beget/openapi-cloud-php": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/BegetOpenAPICloud/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure Bearer (JWT) authorization: bearerAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\CloudServiceApi(
    // 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
);
$service_id = 'service_id_example'; // string
$cloud_change_configuration_request = new \OpenAPI\Client\Model\CloudChangeConfigurationRequest(); // \OpenAPI\Client\Model\CloudChangeConfigurationRequest

try {
    $result = $apiInstance->cloudServiceChangeConfiguration($service_id, $cloud_change_configuration_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CloudServiceApi->cloudServiceChangeConfiguration: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://api.beget.com

Class Method HTTP request Description
CloudServiceApi cloudServiceChangeConfiguration PATCH /v1/cloud/{service_id}/configuration
CloudServiceApi cloudServiceCreate POST /v1/cloud
CloudServiceApi cloudServiceGet GET /v1/cloud/{service_id}
CloudServiceApi cloudServiceGetConfigurationList GET /v1/cloud/configuration
CloudServiceApi cloudServiceGetList GET /v1/cloud
CloudServiceApi cloudServiceRemove DELETE /v1/cloud/{service_id}
CloudServiceApi cloudServiceUpdate PATCH /v1/cloud/{service_id}
MysqlServiceApi mysqlServiceChangeAccessPassword PATCH /v1/cloud/mysql/{service_id}/db/{db_name}/access/{host}
MysqlServiceApi mysqlServiceCreateAccess POST /v1/cloud/mysql/{service_id}/db/{db_name}/access
MysqlServiceApi mysqlServiceCreateDb POST /v1/cloud/mysql/{service_id}/db
MysqlServiceApi mysqlServiceGetConfig GET /v1/cloud/mysql/{service_id}/config
MysqlServiceApi mysqlServiceGetDbList GET /v1/cloud/mysql/{service_id}/db
MysqlServiceApi mysqlServiceRemoveAccess DELETE /v1/cloud/mysql/{service_id}/db/{db_name}/access/{host}
MysqlServiceApi mysqlServiceRemoveDb DELETE /v1/cloud/mysql/{service_id}/db/{db_name}
MysqlServiceApi mysqlServiceSetConfig PUT /v1/cloud/mysql/{service_id}/config
MysqlServiceApi mysqlServiceUpdateDb PATCH /v1/cloud/mysql/{service_id}/db/{db_name}
MysqlStatisticServiceApi mysqlStatisticServiceGetCpu GET /v1/cloud/mysql/{service_id}/statistic/cpu
MysqlStatisticServiceApi mysqlStatisticServiceGetCpuDetails GET /v1/cloud/mysql/{service_id}/statistic/cpu-details
MysqlStatisticServiceApi mysqlStatisticServiceGetDisk GET /v1/cloud/mysql/{service_id}/statistic/disk
MysqlStatisticServiceApi mysqlStatisticServiceGetDiskUsage GET /v1/cloud/mysql/{service_id}/statistic/disk-usage
MysqlStatisticServiceApi mysqlStatisticServiceGetLoadAverage GET /v1/cloud/mysql/{service_id}/statistic/load-average
MysqlStatisticServiceApi mysqlStatisticServiceGetMemory GET /v1/cloud/mysql/{service_id}/statistic/memory
MysqlStatisticServiceApi mysqlStatisticServiceGetNetwork GET /v1/cloud/mysql/{service_id}/statistic/network
PostgresqlServiceApi postgresqlServiceCreateDb POST /v1/cloud/postgresql/{service_id}/db
PostgresqlServiceApi postgresqlServiceCreateRole POST /v1/cloud/postgresql/{service_id}/role
PostgresqlServiceApi postgresqlServiceGetConfig GET /v1/cloud/postgresql/{service_id}/config
PostgresqlServiceApi postgresqlServiceGetDbList GET /v1/cloud/postgresql/{service_id}/db
PostgresqlServiceApi postgresqlServiceGetRemoteAccess GET /v1/cloud/postgresql/{service_id}/remote-access
PostgresqlServiceApi postgresqlServiceGetRoleList GET /v1/cloud/postgresql/{service_id}/role
PostgresqlServiceApi postgresqlServiceRemoveDb DELETE /v1/cloud/postgresql/{service_id}/db/{db_name}
PostgresqlServiceApi postgresqlServiceRemoveRole DELETE /v1/cloud/postgresql/{service_id}/role/{role_name}
PostgresqlServiceApi postgresqlServiceSetConfig PUT /v1/cloud/postgresql/{service_id}/config
PostgresqlServiceApi postgresqlServiceUpdateDb PATCH /v1/cloud/postgresql/{service_id}/db/{db_name}
PostgresqlServiceApi postgresqlServiceUpdateRemoteAccess PUT /v1/cloud/postgresql/{service_id}/remote-access
PostgresqlServiceApi postgresqlServiceUpdateRole PATCH /v1/cloud/postgresql/{service_id}/role/{role_name}
PostgresqlStatisticServiceApi postgresqlStatisticServiceGetCpu GET /v1/cloud/postgresql/{service_id}/statistic/cpu
PostgresqlStatisticServiceApi postgresqlStatisticServiceGetCpuDetails GET /v1/cloud/postgresql/{service_id}/statistic/cpu-details
PostgresqlStatisticServiceApi postgresqlStatisticServiceGetDisk GET /v1/cloud/postgresql/{service_id}/statistic/disk
PostgresqlStatisticServiceApi postgresqlStatisticServiceGetDiskUsage GET /v1/cloud/postgresql/{service_id}/statistic/disk-usage
PostgresqlStatisticServiceApi postgresqlStatisticServiceGetLoadAverage GET /v1/cloud/postgresql/{service_id}/statistic/load-average
PostgresqlStatisticServiceApi postgresqlStatisticServiceGetMemory GET /v1/cloud/postgresql/{service_id}/statistic/memory
PostgresqlStatisticServiceApi postgresqlStatisticServiceGetNetwork GET /v1/cloud/postgresql/{service_id}/statistic/network

Models

Authorization

bearerAuth

  • Type: Bearer authentication (JWT)

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: v1.3.1
    • Package version: v1.3.1
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen