updateClusterVersion method
Updates an Amazon EKS cluster to the specified Kubernetes version. Your
cluster continues to function during the update. The response output
includes an update ID that you can use to track the status of your cluster
update with the
DescribeUpdate API operation.
Cluster updates are asynchronous, and they should finish within a few
minutes. During an update, the cluster status moves to
UPDATING (this status transition is eventually consistent).
When the update is complete (either Failed or
Successful), the cluster status moves to Active.
If your cluster has managed node groups attached to it, all of your node groups' Kubernetes versions must match the cluster's Kubernetes version in order to update the cluster to a new Kubernetes version.
May throw ClientException.
May throw InvalidParameterException.
May throw InvalidRequestException.
May throw InvalidStateException.
May throw ResourceInUseException.
May throw ResourceNotFoundException.
May throw ServerException.
May throw ThrottlingException.
Parameter name :
The name of the Amazon EKS cluster to update.
Parameter version :
The desired Kubernetes version following a successful update.
Parameter clientRequestToken :
A unique, case-sensitive identifier that you provide to ensure the
idempotency of the request.
Parameter force :
Set this value to true to override upgrade-blocking readiness
checks when updating a cluster.
Implementation
Future<UpdateClusterVersionResponse> updateClusterVersion({
required String name,
required String version,
String? clientRequestToken,
bool? force,
}) async {
final $payload = <String, dynamic>{
'version': version,
'clientRequestToken': clientRequestToken ?? _s.generateIdempotencyToken(),
if (force != null) 'force': force,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/clusters/${Uri.encodeComponent(name)}/updates',
exceptionFnMap: _exceptionFns,
);
return UpdateClusterVersionResponse.fromJson(response);
}