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
我不明白为什么,因为我传递一个数组我得到这个错误如在印刷品中可以看到的那样。我会很感激你的帮助