getCluster

Use this data source to get information about an ElastiCache Cluster

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const myCluster = aws.elasticache.getCluster({
clusterId: "my-cluster-id",
});
import pulumi
import pulumi_aws as aws
my_cluster = aws.elasticache.get_cluster(cluster_id="my-cluster-id")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var myCluster = Aws.ElastiCache.GetCluster.Invoke(new()
{
ClusterId = "my-cluster-id",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticache"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := elasticache.LookupCluster(ctx, &elasticache.LookupClusterArgs{
ClusterId: "my-cluster-id",
}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.elasticache.ElasticacheFunctions;
import com.pulumi.aws.elasticache.inputs.GetClusterArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var myCluster = ElasticacheFunctions.getCluster(GetClusterArgs.builder()
.clusterId("my-cluster-id")
.build());
}
}
variables:
myCluster:
fn::invoke:
function: aws:elasticache:getCluster
arguments:
clusterId: my-cluster-id

Return

A collection of values returned by getCluster.

Parameters

argument

A collection of arguments for invoking getCluster.


suspend fun getCluster(clusterId: String, tags: Map<String, String>? = null): GetClusterResult

Return

A collection of values returned by getCluster.

Parameters

clusterId

Group identifier.

tags

Tags assigned to the resource

See also


suspend fun getCluster(argument: suspend GetClusterPlainArgsBuilder.() -> Unit): GetClusterResult

Return

A collection of values returned by getCluster.

Parameters

argument

Builder for com.pulumi.aws.elasticache.kotlin.inputs.GetClusterPlainArgs.

See also