updateNodegroupConfig method
- required String clusterName,
- required String nodegroupName,
- String? clientRequestToken,
- UpdateLabelsPayload? labels,
- NodegroupScalingConfig? scalingConfig,
Updates an Amazon EKS managed node group configuration. Your node group continues to function during the update. The response output includes an update ID that you can use to track the status of your node group update with the DescribeUpdate API operation. Currently you can update the Kubernetes labels for a node group or the scaling configuration.
May throw InvalidParameterException. May throw ClientException. May throw ServerException. May throw ResourceInUseException. May throw ResourceNotFoundException. May throw InvalidRequestException.
Parameter clusterName
:
The name of the Amazon EKS cluster that the managed node group resides in.
Parameter nodegroupName
:
The name of the managed node group to update.
Parameter clientRequestToken
:
Unique, case-sensitive identifier that you provide to ensure the
idempotency of the request.
Parameter labels
:
The Kubernetes labels to be applied to the nodes in the node group after
the update.
Parameter scalingConfig
:
The scaling configuration details for the Auto Scaling group after the
update.
Implementation
Future<UpdateNodegroupConfigResponse> updateNodegroupConfig({
required String clusterName,
required String nodegroupName,
String? clientRequestToken,
UpdateLabelsPayload? labels,
NodegroupScalingConfig? scalingConfig,
}) async {
ArgumentError.checkNotNull(clusterName, 'clusterName');
ArgumentError.checkNotNull(nodegroupName, 'nodegroupName');
final $payload = <String, dynamic>{
'clientRequestToken': clientRequestToken ?? _s.generateIdempotencyToken(),
if (labels != null) 'labels': labels,
if (scalingConfig != null) 'scalingConfig': scalingConfig,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/clusters/${Uri.encodeComponent(clusterName)}/node-groups/${Uri.encodeComponent(nodegroupName)}/update-config',
exceptionFnMap: _exceptionFns,
);
return UpdateNodegroupConfigResponse.fromJson(response);
}