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 InvalidParameterException. May throw ClientException. May throw ServerException. May throw ResourceInUseException. May throw ResourceNotFoundException. May throw InvalidRequestException.
Parameter name
:
The name of the Amazon EKS cluster to update.
Parameter version
:
The desired Kubernetes version following a successful update.
Parameter clientRequestToken
:
Unique, case-sensitive identifier that you provide to ensure the
idempotency of the request.
Implementation
Future<UpdateClusterVersionResponse> updateClusterVersion({
required String name,
required String version,
String? clientRequestToken,
}) async {
ArgumentError.checkNotNull(name, 'name');
ArgumentError.checkNotNull(version, 'version');
final $payload = <String, dynamic>{
'version': version,
'clientRequestToken': clientRequestToken ?? _s.generateIdempotencyToken(),
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/clusters/${Uri.encodeComponent(name)}/updates',
exceptionFnMap: _exceptionFns,
);
return UpdateClusterVersionResponse.fromJson(response);
}