updateClusterConfig method

Future<UpdateClusterConfigResponse> updateClusterConfig({
  1. required String name,
  2. String? clientRequestToken,
  3. Logging? logging,
  4. VpcConfigRequest? resourcesVpcConfig,
})

Updates an Amazon EKS cluster configuration. 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.

You can use this API operation to enable or disable exporting the Kubernetes control plane logs for your cluster to CloudWatch Logs. By default, cluster control plane logs aren't exported to CloudWatch Logs. For more information, see Amazon EKS Cluster Control Plane Logs in the Amazon EKS User Guide . You can also use this API operation to enable or disable public and private access to your cluster's Kubernetes API server endpoint. By default, public access is enabled, and private access is disabled. For more information, see Amazon EKS Cluster Endpoint Access Control in the Amazon EKS User Guide . 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.

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 clientRequestToken : Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Parameter logging : Enable or disable exporting the Kubernetes control plane logs for your cluster to CloudWatch Logs. By default, cluster control plane logs aren't exported to CloudWatch Logs. For more information, see Amazon EKS Cluster Control Plane Logs in the Amazon EKS User Guide .

Implementation

Future<UpdateClusterConfigResponse> updateClusterConfig({
  required String name,
  String? clientRequestToken,
  Logging? logging,
  VpcConfigRequest? resourcesVpcConfig,
}) async {
  ArgumentError.checkNotNull(name, 'name');
  final $payload = <String, dynamic>{
    'clientRequestToken': clientRequestToken ?? _s.generateIdempotencyToken(),
    if (logging != null) 'logging': logging,
    if (resourcesVpcConfig != null) 'resourcesVpcConfig': resourcesVpcConfig,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/clusters/${Uri.encodeComponent(name)}/update-config',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateClusterConfigResponse.fromJson(response);
}