PHPackages                             antcool/easy-cloud-pods - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. antcool/easy-cloud-pods

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

antcool/easy-cloud-pods
=======================

PHP SDK for Cloud Pods

1.1.2(3y ago)323MITPHPPHP ^8.0.2

Since Apr 11Pushed 3y ago1 watchersCompare

[ Source](https://github.com/lonquan/easy-cloud-pods)[ Packagist](https://packagist.org/packages/antcool/easy-cloud-pods)[ RSS](/packages/antcool-easy-cloud-pods/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (7)Versions (4)Used By (0)

 EasyCloudPods - CloudPods PHP SDK
===================================

[](#-easycloudpods---cloudpods-php-sdk-)

 PHP SDK for Cloud Pods.

Overtrue! Respect!

文档链接
----

[](#文档链接)

- [CloudPods Docs](https://www.cloudpods.org/zh/docs/)
- [APIs](https://www.cloudpods.org/zh/docs/swagger/?&apiIdx=0#section/Authentication)

安装
--

[](#安装)

```
$ composer require antcool/easy-cloud-pods -vvv
```

使用
--

[](#使用)

**需开启统一API入口, [查看文档](https://www.cloudpods.org/zh/docs/development/apisdk/01_apigateway/#%E5%BC%80%E5%90%AF%E7%BB%9F%E4%B8%80api%E5%85%A5%E5%8F%A3)**

### 配置项

[](#配置项)

```
$config = [
    'default'       => 'production',
    'projects'      => [
        'production' => [
            'api_gateway'  => 'https:///api/s/',
            'project_id'   => '****',
            'project_name' => null,

            'auth_type' => 'password', // ak/sk
            'user_name'     => '****',
            'user_password' => '****',
            'key_id' => '****',
            'secret' => '****',

            'domain'        => null,
            'domain_name'   => null,

        ],
    ],

    /**
     * 默认使用各 endpoint type 字段作为统一 API 入口请求时的服务类型路径
     * 由于每个版本的路径会有不同, 当默认路径错误时, 可通过此配置覆盖
     * compute_v2: compute_v2
     * image: image/v1
     * identity: identity/v3
     */
    'endpoint_path' => [
        'image'    => 'image/v1',
        'identity' => 'identity/v3',
    ],

    'debug'        => true,
    'runtime_path' => storage_path('cloud-pods'),

    'http' => [
        'timeout' => 30,
        'verify'  => false,
    ],
];
```

### 创建实例

[](#创建实例)

```
use AntCool\CloudPods\Application;

$app = new Application(new Config(\config('cloudpods'));

// use other project config
$config = $app->getConfig()->useProject('project_name');

/** @var \AntCool\CloudPods\Kernel\Client $client */
$client = $app->getClient();
```

### API 调用示范

[](#api-调用示范)

> \\AntCool\\CloudPods\\Middleware\\AccessTokenMiddleware 已经实现对 AuthToken 和 Endpoints 的自动处理

```
// 查看 Endpoints
$client->getEndpoints();

// 获取支持的镜像
$client->withService('image')->getJson('images', ['limit' => 1000, 'details' => true])
// 实际请求 URL: https:///api/s/image/v1/images?limit=1000&details=1

// 获取主机规格
$client->withService('compute_v2')->getJson('serverskus', ['limit' => 1000, 'details' => true]);

// 创建秘钥对
$client->withService('compute_v2')->postJson('keypairs', [
            'count'   => 1,
            'keypair' => [
                'description' => 'description',
                'name'        => 'name',
            ],
        ]);

// 创建虚拟机
$client->withService('compute_v2')->postJson('servers', $params);

// 删除虚拟机
$client->withService('compute_v2')->deleteJson('servers/' . $id, [
            'OverridePendingDelete' => true,
            'Purge'                 => true,
            'DeleteSnapshots'       => true,
            'DeleteEip'             => true,
            'DeleteDisks'           => true,
        ]);

// 获取 monitor 监控服务 unified monitor 的查询接口签名
$app->getUtils()->unifiedMonitorSign($params);
```

Contributing
------------

[](#contributing)

You can contribute in one of three ways:

1. ...
2. ...

License
-------

[](#license)

MIT

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~7 days

Total

3

Last Release

1110d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/473d9234b25803aa72515f11bb87e5a093ca4ff1eac5952ecdf0dfc09e46c0ec?d=identicon)[lonquan](/maintainers/lonquan)

### Embed Badge

![Health badge](/badges/antcool-easy-cloud-pods/health.svg)

```
[![Health](https://phpackages.com/badges/antcool-easy-cloud-pods/health.svg)](https://phpackages.com/packages/antcool-easy-cloud-pods)
```

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[google/cloud-core

Google Cloud PHP shared dependency, providing functionality useful to all components.

343121.4M79](/packages/google-cloud-core)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
