2013-06-11 124 views
1

我在「已驗證的域名」列表中添加了一個新的域名,更新了DNS,現在我想通過API驗證(PHP SDK實際上)如果域名已被標記爲由aws驗證。到目前爲止,我有這個PHP - 亞馬遜AWS SES - 如何驗證域名的狀態

function get_verified_status($domain, $key, $secret) { 
// Instantiate the client with your AWS credentials 
     $ses = SesClient::factory(array(
        'key'  => $key, 
        'secret' => $secret, 
        'region' => Region::US_EAST_1 
       )); 
print_r($domain); 
echo "response"; 
$response = $ses->GetIdentityVerificationAttributes($domain); 
#$response = $ses->list_verified_email_addresses(); 

//get_identity_verification_attributes 
     return $response; 
} 

的響應(從CLI運行)

PHP test.php的

Array 
(
    [0] => appi.com 
    [1] => acs.com 
) 
responsePHP Fatal error: Uncaught exception 'Guzzle\Service\Exception\ValidationException' with message 'Validation errors: [Identities] is a required array: A list of identities.' in /var/www/html/s3/vendor/guzzle/guzzle/src/Guzzle/Service/Command/AbstractCommand.php:376 
Stack trace: 
#0 /var/www/html/s3/vendor/guzzle/guzzle/src/Guzzle/Service/Command/AbstractCommand.php(272): Guzzle\Service\Command\AbstractCommand->validate() 
#1 /var/www/html/s3/vendor/guzzle/guzzle/src/Guzzle/Service/Client.php(193): Guzzle\Service\Command\AbstractCommand->prepare() 
#2 /var/www/html/s3/vendor/guzzle/guzzle/src/Guzzle/Service/Command/AbstractCommand.php(162): Guzzle\Service\Client->execute(Object(Aws\Common\Command\QueryCommand)) 
#3 /var/www/html/s3/vendor/guzzle/guzzle/src/Guzzle/Service/Command/AbstractCommand.php(213): Guzzle\Service\Command\AbstractCommand->execute() 
#4 /var/www/html/s3/vendor/guzzle/guzzle/src/Guzzle/Service/Client.php(93): Guzzle\Service\Command\AbstractCommand->getResult() 
#5 /var/www/html/s3/vendo in /var/www/html/s3/vendor/guzzle/guzzle/src/Guzzle/Service/Command/AbstractCommand.php on line 376 

我不明白爲什麼,因爲我傳遞一個數組我得到這個錯誤如在印刷品中可以看到的那樣。我會很感激你的幫助

回答