updateCustomLineItem method
Update an existing custom line item in the current or previous billing period.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter arn :
The ARN of the custom line item to be updated.
Parameter chargeDetails :
A ListCustomLineItemChargeDetails containing the new charge
details for the custom line item.
Parameter description :
The new line item description of the custom line item.
Parameter name :
The new name for the custom line item.
Implementation
Future<UpdateCustomLineItemOutput> updateCustomLineItem({
required String arn,
CustomLineItemBillingPeriodRange? billingPeriodRange,
UpdateCustomLineItemChargeDetails? chargeDetails,
String? description,
String? name,
}) async {
final $payload = <String, dynamic>{
'Arn': arn,
if (billingPeriodRange != null) 'BillingPeriodRange': billingPeriodRange,
if (chargeDetails != null) 'ChargeDetails': chargeDetails,
if (description != null) 'Description': description,
if (name != null) 'Name': name,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/update-custom-line-item',
exceptionFnMap: _exceptionFns,
);
return UpdateCustomLineItemOutput.fromJson(response);
}