updateEksAnywhereSubscription method
Update an EKS Anywhere Subscription. Only auto renewal and tags can be updated after subscription creation.
May throw ClientException.
May throw InvalidParameterException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ServerException.
Parameter autoRenew :
A boolean indicating whether or not to automatically renew the
subscription.
Parameter id :
The ID of the subscription.
Parameter clientRequestToken :
Unique, case-sensitive identifier to ensure the idempotency of the
request.
Implementation
Future<UpdateEksAnywhereSubscriptionResponse> updateEksAnywhereSubscription({
required bool autoRenew,
required String id,
String? clientRequestToken,
}) async {
final $payload = <String, dynamic>{
'autoRenew': autoRenew,
'clientRequestToken': clientRequestToken ?? _s.generateIdempotencyToken(),
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/eks-anywhere-subscriptions/${Uri.encodeComponent(id)}',
exceptionFnMap: _exceptionFns,
);
return UpdateEksAnywhereSubscriptionResponse.fromJson(response);
}