listInsights method
Returns a list of all insights checked for against the specified cluster. You can filter which insights are returned by category, associated Kubernetes version, and status. The default filter lists all categories and every status.
The following lists the available categories:
-
UPGRADE_READINESS: Amazon EKS identifies issues that could impact your ability to upgrade to new versions of Kubernetes. These are called upgrade insights. -
MISCONFIGURATION: Amazon EKS identifies misconfiguration in your EKS Hybrid Nodes setup that could impair functionality of your cluster or workloads. These are called configuration insights.
May throw InvalidParameterException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ServerException.
Parameter clusterName :
The name of the Amazon EKS cluster associated with the insights.
Parameter filter :
The criteria to filter your list of insights for your cluster. You can
filter which insights are returned by category, associated Kubernetes
version, and status.
Parameter maxResults :
The maximum number of identity provider configurations returned by
ListInsights in paginated output. When you use this
parameter, ListInsights returns only maxResults
results in a single page along with a nextToken response
element. You can see the remaining results of the initial request by
sending another ListInsights request with the returned
nextToken value. This value can be between 1 and 100. If you
don't use this parameter, ListInsights returns up to 100
results and a nextToken value, if applicable.
Parameter nextToken :
The nextToken value returned from a previous paginated
ListInsights request. When the results of a
ListInsights request exceed maxResults, you can
use this value to retrieve the next page of results. This value is
null when there are no more results to return.
Implementation
Future<ListInsightsResponse> listInsights({
required String clusterName,
InsightsFilter? filter,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final $payload = <String, dynamic>{
if (filter != null) 'filter': filter,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/clusters/${Uri.encodeComponent(clusterName)}/insights',
exceptionFnMap: _exceptionFns,
);
return ListInsightsResponse.fromJson(response);
}