updateLongTermPricing method
Updates the long-term pricing type.
May throw InvalidResourceException.
Parameter longTermPricingId :
The ID of the long-term pricing type for the device.
Parameter isLongTermPricingAutoRenew :
If set to true, specifies that the current long-term pricing
type for the device should be automatically renewed before the long-term
pricing contract expires.
Parameter replacementJob :
Specifies that a device that is ordered with long-term pricing should be
replaced with a new device.
Implementation
Future<void> updateLongTermPricing({
required String longTermPricingId,
bool? isLongTermPricingAutoRenew,
String? replacementJob,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSIESnowballJobManagementService.UpdateLongTermPricing'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'LongTermPricingId': longTermPricingId,
if (isLongTermPricingAutoRenew != null)
'IsLongTermPricingAutoRenew': isLongTermPricingAutoRenew,
if (replacementJob != null) 'ReplacementJob': replacementJob,
},
);
}