volcengine / volcengine-php-sdk
v1.0.43
2025-01-23 12:14 UTC
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
- dev-main
- v1.0.43
- v1.0.42
- v1.0.41
- v1.0.40
- v1.0.39
- v1.0.38
- v1.0.37
- v1.0.36
- v1.0.35
- v1.0.34
- v1.0.33
- v1.0.32
- v1.0.31
- v1.0.30
- v1.0.29
- v1.0.28
- v1.0.27
- v1.0.26
- v1.0.25
- v1.0.24
- v1.0.23
- v1.0.22
- v1.0.21
- v1.0.20
- v1.0.19
- v1.0.18
- v1.0.17
- v1.0.16
- v1.0.15
- v1.0.14
- v1.0.13
- v1.0.12
- v1.0.11
- v1.0.10
- v1.0.9
- v1.0.8
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
This package is auto-updated.
Last update: 2025-01-23 12:15:47 UTC
README
Requirements
PHP 5.5 and later
Installation & Usage
Composer
To install the bindings via Composer, add the following to composer.json
:
{
"require": {
"volcengine/volcengine-php-sdk": "v1.0.43"
}
}
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; } ?>