0
PHPを使用して新しい帯域幅プールを作成しようとしていますが、私のAPIキーに関するエラーが戻ってきています。あなたは間違って作成しているにPHPで帯域幅プールを作成
<?php
require_once './vendor/autoload.php';
$apiUsername = getenv('SOFTLAYER_USERNAME');
$apiKey = getenv('SOFTLAYER_API_KEY');
$template = new stdClass();
$template->accountId = xxxxx;
$template->bandwidthAllotmentTypeId = 2;
$template->locationGroupId = 1;
$template->name = 'newBWpoolPHP';
$template->serviceProviderId = 1;
try {
$client = \SoftLayer\SoapClient::getClient('SoftLayer_Network_Bandwidth_Version1_Allotment', $apiUsername, $apiKey);
$response = $client->createObject(template);
print_r($response);
} catch(Exception $e) {
echo 'Cannot compute. Error is: ' . $e->getMessage();
}
?>
は、完全に感謝を働きました。 – greyhoundforty