- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
ListInsightsCommand
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.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { EKSClient, ListInsightsCommand } from "@aws-sdk/client-eks"; // ES Modules import
// const { EKSClient, ListInsightsCommand } = require("@aws-sdk/client-eks"); // CommonJS import
const client = new EKSClient(config);
const input = { // ListInsightsRequest
clusterName: "STRING_VALUE", // required
filter: { // InsightsFilter
categories: [ // CategoryList
"UPGRADE_READINESS" || "MISCONFIGURATION",
],
kubernetesVersions: [ // StringList
"STRING_VALUE",
],
statuses: [ // InsightStatusValueList
"PASSING" || "WARNING" || "ERROR" || "UNKNOWN",
],
},
maxResults: Number("int"),
nextToken: "STRING_VALUE",
};
const command = new ListInsightsCommand(input);
const response = await client.send(command);
// { // ListInsightsResponse
// insights: [ // InsightSummaries
// { // InsightSummary
// id: "STRING_VALUE",
// name: "STRING_VALUE",
// category: "UPGRADE_READINESS" || "MISCONFIGURATION",
// kubernetesVersion: "STRING_VALUE",
// lastRefreshTime: new Date("TIMESTAMP"),
// lastTransitionTime: new Date("TIMESTAMP"),
// description: "STRING_VALUE",
// insightStatus: { // InsightStatus
// status: "PASSING" || "WARNING" || "ERROR" || "UNKNOWN",
// reason: "STRING_VALUE",
// },
// },
// ],
// nextToken: "STRING_VALUE",
// };
ListInsightsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
clusterName Required | string | undefined | The name of the Amazon EKS cluster associated with the insights. |
filter | InsightsFilter | undefined | 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. |
maxResults | number | undefined | The maximum number of identity provider configurations returned by |
nextToken | string | undefined | The |
ListInsightsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
insights | InsightSummary[] | undefined | The returned list of insights. |
nextToken | string | undefined | The |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InvalidParameterException | client | The specified parameter is invalid. Review the available parameters for the API request. |
InvalidRequestException | client | The request is invalid given the state of the cluster. Check the state of the cluster and the associated operations. |
ResourceNotFoundException | client | The specified resource could not be found. You can view your available clusters with |
ServerException | server | These errors are usually caused by a server-side issue. |
EKSServiceException | Base exception class for all service exceptions from EKS service. |