resolveCustomer method
ResolveCustomer is called by a SaaS application during the
registration process. When a buyer visits your website during the
registration process, the buyer submits a registration token through their
browser. The registration token is resolved through this API to obtain a
CustomerIdentifier along with the
CustomerAWSAccountId, ProductCode, and
LicenseArn.
Permission is required for this operation. Your IAM role or user
performing this operation requires a policy to allow the
aws-marketplace:ResolveCustomer action. For more information,
see Actions,
resources, and condition keys for Amazon Web Services Marketplace Metering
Service in the Service Authorization Reference.
For Amazon Web Services Regions that support ResolveCustomer,
see ResolveCustomer
Region support.
May throw DisabledApiException.
May throw ExpiredTokenException.
May throw InternalServiceErrorException.
May throw InvalidTokenException.
May throw ThrottlingException.
Parameter registrationToken :
When a buyer visits your website during the registration process, the
buyer submits a registration token through the browser. The registration
token is resolved to obtain a CustomerIdentifier along with
the CustomerAWSAccountId, ProductCode, and
LicenseArn.
Implementation
Future<ResolveCustomerResult> resolveCustomer({
required String registrationToken,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSMPMeteringService.ResolveCustomer'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'RegistrationToken': registrationToken,
},
);
return ResolveCustomerResult.fromJson(jsonResponse.body);
}