createRenewal method
Creates a renewal contract for the specified Outpost.
May throw AccessDeniedException.
May throw InternalServerException.
May throw NotFoundException.
May throw ValidationException.
Parameter outpostIdentifier :
The ID or ARN of the Outpost.
Parameter paymentOption :
The payment option.
Parameter paymentTerm :
The payment term.
Parameter clientToken :
A unique, case-sensitive identifier that you provide to ensure the
idempotency of the request.
Implementation
Future<CreateRenewalOutput> createRenewal({
required String outpostIdentifier,
required PaymentOption paymentOption,
required PaymentTerm paymentTerm,
String? clientToken,
}) async {
final $payload = <String, dynamic>{
'OutpostIdentifier': outpostIdentifier,
'PaymentOption': paymentOption.value,
'PaymentTerm': paymentTerm.value,
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/renewals',
exceptionFnMap: _exceptionFns,
);
return CreateRenewalOutput.fromJson(response);
}