Get Entitlement request is not working
irfanDC opened this issue · 1 comments
irfanDC commented
Can you please help me to resolve it or help me to get it work if i am doing something wrong?
Code:
use Aws\MarketplaceEntitlementService\MarketplaceEntitlementServiceClient;
$clientEntilement = new MarketplaceEntitlementServiceClient([
'version' => 'latest',
'region' => 'eu-central-1',
'credentials' => [
'key' => 'xxxxxxxxxx',
'secret' => 'xxxxxxxxxx',
],
]);
$clientEntilementRes = $clientEntilement->getEntitlements([
"Filter"=>[
"CUSTOMER_IDENTIFIER" => [$result['CustomerIdentifier']]
],
'MaxResults' => 10,
'ProductCode' => $result['ProductCode'], // REQUIRED
]);
print_r($clientEntilementRes);exit;
"Error executing "GetEntitlements" on "https://entitlement.marketplace.eu-central-1.amazonaws.com"; AWS HTTP error: cURL error 6: Could not resolve host: entitlement.marketplace.eu-central-1.amazonaws.com (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
diehlaws commented
Thanks for reaching out to us @irfanDC. Per our AWS Service Endpoints documentation page, the AWS Marketplace Entitlement Service only has one endpoint in us-east-1. You'll want to specify this region when initializing your MarketplaceEntitlementServiceClient
in order to reach the appropriate endpoint for the service.