minirplus/volcengine-php-sdk
最新稳定版本:v1.0.47-patch-1
Composer 安装命令:
composer require minirplus/volcengine-php-sdk
包简介
README 文档
README
set require guzzle to 7
Requirements
PHP 5.5 and later
Installation & Usage
Composer
To install the bindings via Composer, add the following to composer.json:
composer require minirplus/volcengine-php-sdk
Then run composer install
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); $config = \Volcengine\Common\Configuration::getDefaultConfiguration() ->setAk("Your AK") ->setSk("Your SK") ->setRegion("cn-beijing"); $apiInstance = new \Volcengine\Vpc\API\VPCApi( // 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 ); $body = new \Volcengine\Vpc\Model\CreateVpcRequest(); $body->setClientToken("token-123456789") ->setCidrBlock("192.168.0.0/16") ->setDnsServers(array("10.0.0.1", "10.1.1.2")); try { $result = $apiInstance->createVpc($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling VPCApi->createVpc: ', $e->getMessage(), PHP_EOL; } ?>
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2025-03-04