添加网站文件
This commit is contained in:
30
vendor/tencentcloud/tencentcloud-sdk-php/examples/scf/v20180416/ListFunctions.php
vendored
Normal file
30
vendor/tencentcloud/tencentcloud-sdk-php/examples/scf/v20180416/ListFunctions.php
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
require_once __DIR__.'/../../../vendor/autoload.php';
|
||||
use TencentCloud\Common\Credential;
|
||||
use TencentCloud\Common\Profile\ClientProfile;
|
||||
use TencentCloud\Common\Profile\HttpProfile;
|
||||
use TencentCloud\Common\Exception\TencentCloudSDKException;
|
||||
use TencentCloud\Scf\V20180416\ScfClient;
|
||||
use TencentCloud\Scf\V20180416\Models\ListFunctionsRequest;
|
||||
try {
|
||||
$cred = new Credential(getenv("TENCENTCLOUD_SECRET_ID"), getenv("TENCENTCLOUD_SECRET_KEY"));
|
||||
$httpProfile = new HttpProfile();
|
||||
$httpProfile->setEndpoint("scf.tencentcloudapi.com");
|
||||
|
||||
$clientProfile = new ClientProfile();
|
||||
$clientProfile->setHttpProfile($httpProfile);
|
||||
$client = new ScfClient($cred, "ap-guangzhou", $clientProfile);
|
||||
|
||||
$req = new ListFunctionsRequest();
|
||||
|
||||
$params = '{}';
|
||||
$req->fromJsonString($params);
|
||||
|
||||
|
||||
$resp = $client->ListFunctions($req);
|
||||
|
||||
print_r($resp->toJsonString());
|
||||
}
|
||||
catch(TencentCloudSDKException $e) {
|
||||
echo $e;
|
||||
}
|
||||
Reference in New Issue
Block a user