list_eks_clusters
Retrieve Amazon EKS clusters in your current AWS region to monitor and manage Kubernetes environments.
Instructions
Lists EKS clusters in the current region.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:2218-2222 (handler)The handler function for the 'list_eks_clusters' tool. It uses the EKSClient to send a ListEksClustersCommand and returns the list of EKS cluster names as JSON.if (name === "list_eks_clusters") { const command = new ListEksClustersCommand({}); const response = await eksClient.send(command); return { content: [{ type: "text", text: JSON.stringify(response.clusters || [], null, 2) }] }; }
- src/index.ts:732-734 (registration)Registration of the 'list_eks_clusters' tool in the list of tools returned by ListToolsRequestHandler.name: "list_eks_clusters", description: "Lists EKS clusters in the current region.", inputSchema: { "type": "object", "properties": {} }
- src/index.ts:734-734 (schema)Input schema for the 'list_eks_clusters' tool (empty object, no parameters).inputSchema: { "type": "object", "properties": {} }
- src/index.ts:72-72 (helper)Initialization of the EKSClient used by the handler.const eksClient = new EKSClient({});
- src/index.ts:39-39 (helper)Import of EKSClient and ListEksClustersCommand (aliased from ListClustersCommand).import { EKSClient, ListClustersCommand as ListEksClustersCommand, DescribeClusterCommand } from "@aws-sdk/client-eks";