There are more AWS SDK examples available in the AWS Doc SDK Examples
Use ListNodegroups with a CLI
The following code examples show how to use ListNodegroups.
- CLI
-
- AWS CLI
-
List all the node groups in an Amazon EKS cluster
The following
list-nodegroupsexample list all the node groups in an Amazon EKS cluster.aws eks list-nodegroups \ --cluster-namemy-eks-clusterOutput:
{ "nodegroups": [ "my-eks-managed-node-group", "my-eks-nodegroup" ] }-
For API details, see ListNodegroups
in AWS CLI Command Reference.
-
- PowerShell
-
- Tools for PowerShell V4
-
Example 1: This cmdlet lists the Amazon EKS node groups associated with the specified cluster in your AWS account in the specified Region.
Get-EKSNodegroupList -ClusterName PRODOutput:
ProdEKSNodeGroup-
For API details, see ListNodegroups in AWS Tools for PowerShell Cmdlet Reference (V4).
-
- Tools for PowerShell V5
-
Example 1: This cmdlet lists the Amazon EKS node groups associated with the specified cluster in your AWS account in the specified Region.
Get-EKSNodegroupList -ClusterName PRODOutput:
ProdEKSNodeGroup-
For API details, see ListNodegroups in AWS Tools for PowerShell Cmdlet Reference (V5).
-