I am trying to interface my php code with AWS Marketplace. There seems to be no example in PHP, anywhere.
$client = new MarketplaceMeteringMarketplaceMeteringClient($config);
$request = array();
$request['ProductCode']=ProductCode;
$request['Filter']['CUSTOMER_IDENTIFIER']=$result['CustomerIdentifier'];
$entitlement = $client->GetEntitlements( $request);
I am getting the following error and don’t know why?
Type: InvalidArgumentException
Message: Operation not found: GetEntitlements
Filename: /app/vendor/aws/aws-sdk-php/src/AwsClient.php
2
Answers
I should have used this $marketplaceentitlementservice = new MarketplaceEntitlementServiceClient($config);
instead of the MarketplaceMeteringClient.
You need to use MarketplaceEntitlementServiceClient to interact with the AWS Marketplace Entitlement Service. It supports GetEntitlements operation.
Hope it helps.