1. Packages
  2. AWS
  3. API Docs
  4. eks
  5. getClusters
AWS v7.11.0 published on Wednesday, Nov 5, 2025 by Pulumi

aws.eks.getClusters

Start a Neo task
Explain and create an aws.eks.getClusters resource
aws logo
AWS v7.11.0 published on Wednesday, Nov 5, 2025 by Pulumi

    Retrieve EKS Clusters list

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    import * as std from "@pulumi/std";
    
    const example = aws.eks.getClusters({});
    const exampleGetCluster = example.then(example => std.toset({
        input: example.names,
    })).then(invoke => .reduce((__obj, [__key, __value]) => ({ ...__obj, [__key]: aws.eks.getCluster({
        name: __value,
    }) })));
    
    import pulumi
    import pulumi_aws as aws
    import pulumi_std as std
    
    example = aws.eks.get_clusters()
    example_get_cluster = {__key: aws.eks.get_cluster(name=__value) for __key, __value in std.toset(input=example.names).result}
    
    Example coming soon!
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    using Std = Pulumi.Std;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Aws.Eks.GetClusters.Invoke();
    
        var exampleGetCluster = Std.Toset.Invoke(new()
        {
            Input = example.Apply(getClustersResult => getClustersResult.Names),
        }).Apply(invoke => );
    
    });
    
    Example coming soon!
    
    Example coming soon!
    

    Using getClusters

    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 getClusters(args: GetClustersArgs, opts?: InvokeOptions): Promise<GetClustersResult>
    function getClustersOutput(args: GetClustersOutputArgs, opts?: InvokeOptions): Output<GetClustersResult>
    def get_clusters(region: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetClustersResult
    def get_clusters_output(region: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetClustersResult]
    func GetClusters(ctx *Context, args *GetClustersArgs, opts ...InvokeOption) (*GetClustersResult, error)
    func GetClustersOutput(ctx *Context, args *GetClustersOutputArgs, opts ...InvokeOption) GetClustersResultOutput

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

    public static class GetClusters 
    {
        public static Task<GetClustersResult> InvokeAsync(GetClustersArgs args, InvokeOptions? opts = null)
        public static Output<GetClustersResult> Invoke(GetClustersInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetClustersResult> getClusters(GetClustersArgs args, InvokeOptions options)
    public static Output<GetClustersResult> getClusters(GetClustersArgs args, InvokeOptions options)
    
    fn::invoke:
      function: aws:eks/getClusters:getClusters
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.

    getClusters Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Names List<string>
    Set of EKS clusters names
    Region string
    Id string
    The provider-assigned unique ID for this managed resource.
    Names []string
    Set of EKS clusters names
    Region string
    id String
    The provider-assigned unique ID for this managed resource.
    names List<String>
    Set of EKS clusters names
    region String
    id string
    The provider-assigned unique ID for this managed resource.
    names string[]
    Set of EKS clusters names
    region string
    id str
    The provider-assigned unique ID for this managed resource.
    names Sequence[str]
    Set of EKS clusters names
    region str
    id String
    The provider-assigned unique ID for this managed resource.
    names List<String>
    Set of EKS clusters names
    region String

    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
    AWS v7.11.0 published on Wednesday, Nov 5, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate