renewOffering method
Explicitly sets the quantity of devices to renew for an offering, starting
from the effectiveDate
of the next period. The API returns a
NotEligible
error if the user is not permitted to invoke the
operation. If you must be able to invoke this operation, contact aws-devicefarm-support@amazon.com.
May throw ArgumentException. May throw NotFoundException. May throw NotEligibleException. May throw LimitExceededException. May throw ServiceAccountException.
Parameter offeringId
:
The ID of a request to renew an offering.
Parameter quantity
:
The quantity requested in an offering renewal.
Implementation
Future<RenewOfferingResult> renewOffering({
String? offeringId,
int? quantity,
}) async {
_s.validateStringLength(
'offeringId',
offeringId,
32,
1152921504606846976,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'DeviceFarm_20150623.RenewOffering'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (offeringId != null) 'offeringId': offeringId,
if (quantity != null) 'quantity': quantity,
},
);
return RenewOfferingResult.fromJson(jsonResponse.body);
}