extendLicenseConsumption method
Extends the expiration date for license consumption.
May throw ValidationException. May throw InvalidParameterValueException. May throw AuthorizationException. May throw AccessDeniedException. May throw RateLimitExceededException. May throw ServerInternalException. May throw ResourceNotFoundException.
Parameter licenseConsumptionToken
:
License consumption token.
Parameter dryRun
:
Checks whether you have the required permissions for the action, without
actually making the request. Provides an error response if you do not have
the required permissions.
Implementation
Future<ExtendLicenseConsumptionResponse> extendLicenseConsumption({
required String licenseConsumptionToken,
bool? dryRun,
}) async {
ArgumentError.checkNotNull(
licenseConsumptionToken, 'licenseConsumptionToken');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSLicenseManager.ExtendLicenseConsumption'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'LicenseConsumptionToken': licenseConsumptionToken,
if (dryRun != null) 'DryRun': dryRun,
},
);
return ExtendLicenseConsumptionResponse.fromJson(jsonResponse.body);
}