1. Packages
  2. AWS Classic
  3. API Docs
  4. eks
  5. getNodeGroups

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.23.0 published on Thursday, Feb 22, 2024 by Pulumi

aws.eks.getNodeGroups

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.23.0 published on Thursday, Feb 22, 2024 by Pulumi

    Retrieve the EKS Node Groups associated with a named EKS cluster. This will allow you to pass a list of Node Group names to other resources.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleNodeGroups = Aws.Eks.GetNodeGroups.Invoke(new()
        {
            ClusterName = "example",
        });
    
        var exampleNodeGroup = .Select(__value => 
        {
            return Aws.Eks.GetNodeGroup.Invoke(new()
            {
                ClusterName = "example",
                NodeGroupName = __value,
            });
        }).ToList();
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/eks"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleNodeGroups, err := eks.GetNodeGroups(ctx, &eks.GetNodeGroupsArgs{
    			ClusterName: "example",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_ := "TODO: For expression"
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws as aws
    
    example_node_groups = aws.eks.get_node_groups(cluster_name="example")
    example_node_group = [aws.eks.get_node_group(cluster_name="example",
        node_group_name=__value) for __key, __value in example_node_groups.names]
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const exampleNodeGroups = aws.eks.getNodeGroups({
        clusterName: "example",
    });
    const exampleNodeGroup = exampleNodeGroups.then(exampleNodeGroups => .map(([, ]) => (aws.eks.getNodeGroup({
        clusterName: "example",
        nodeGroupName: __value,
    }))));
    

    Coming soon!

    Using getNodeGroups

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getNodeGroups(args: GetNodeGroupsArgs, opts?: InvokeOptions): Promise<GetNodeGroupsResult>
    function getNodeGroupsOutput(args: GetNodeGroupsOutputArgs, opts?: InvokeOptions): Output<GetNodeGroupsResult>
    def get_node_groups(cluster_name: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetNodeGroupsResult
    def get_node_groups_output(cluster_name: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetNodeGroupsResult]
    func GetNodeGroups(ctx *Context, args *GetNodeGroupsArgs, opts ...InvokeOption) (*GetNodeGroupsResult, error)
    func GetNodeGroupsOutput(ctx *Context, args *GetNodeGroupsOutputArgs, opts ...InvokeOption) GetNodeGroupsResultOutput

    > Note: This function is named GetNodeGroups in the Go SDK.

    public static class GetNodeGroups 
    {
        public static Task<GetNodeGroupsResult> InvokeAsync(GetNodeGroupsArgs args, InvokeOptions? opts = null)
        public static Output<GetNodeGroupsResult> Invoke(GetNodeGroupsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNodeGroupsResult> getNodeGroups(GetNodeGroupsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:eks/getNodeGroups:getNodeGroups
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ClusterName string
    Name of the cluster.
    ClusterName string
    Name of the cluster.
    clusterName String
    Name of the cluster.
    clusterName string
    Name of the cluster.
    cluster_name str
    Name of the cluster.
    clusterName String
    Name of the cluster.

    getNodeGroups Result

    The following output properties are available:

    ClusterName string
    Id string
    The provider-assigned unique ID for this managed resource.
    Names List<string>
    Set of all node group names in an EKS Cluster.
    ClusterName string
    Id string
    The provider-assigned unique ID for this managed resource.
    Names []string
    Set of all node group names in an EKS Cluster.
    clusterName String
    id String
    The provider-assigned unique ID for this managed resource.
    names List<String>
    Set of all node group names in an EKS Cluster.
    clusterName string
    id string
    The provider-assigned unique ID for this managed resource.
    names string[]
    Set of all node group names in an EKS Cluster.
    cluster_name str
    id str
    The provider-assigned unique ID for this managed resource.
    names Sequence[str]
    Set of all node group names in an EKS Cluster.
    clusterName String
    id String
    The provider-assigned unique ID for this managed resource.
    names List<String>
    Set of all node group names in an EKS Cluster.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.23.0 published on Thursday, Feb 22, 2024 by Pulumi