Skip to content

LTD-Beget/openapi-cloud-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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}
MysqlBackupServiceApi mysqlBackupServiceGetList GET /v1/cloud/mysql/backup
MysqlBackupServiceApi mysqlBackupServiceGetOrders GET /v1/cloud/mysql/backup/orders
MysqlBackupServiceApi mysqlBackupServiceRestore POST /v1/cloud/mysql/backup/{copy_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
PostgresqlBackupServiceApi postgresqlBackupServiceGetList GET /v1/cloud/postgresql/backup
PostgresqlBackupServiceApi postgresqlBackupServiceGetOrders GET /v1/cloud/postgresql/backup/orders
PostgresqlBackupServiceApi postgresqlBackupServiceRestore POST /v1/cloud/postgresql/backup/{copy_id}
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
S3ServiceApi s3ServiceChangeAccessKey PATCH /v1/cloud/s3/{service_id}/access-key
S3ServiceApi s3ServiceChangeCors PATCH /v1/cloud/s3/{service_id}/cors
S3ServiceApi s3ServiceChangeDomain PATCH /v1/cloud/s3/{service_id}/domain
S3ServiceApi s3ServiceChangePublic PATCH /v1/cloud/s3/{service_id}/public
S3ServiceApi s3ServiceGetPrefix GET /v1/cloud/s3/prefix
S3ServiceApi s3ServiceGetPrice GET /v1/cloud/s3/price
S3ServiceApi s3ServiceGetQuota GET /v1/cloud/s3/quota

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.4.0
    • Package version: v1.4.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published