1. Packages
  2. AWS Classic
  3. API Docs
  4. elasticache
  5. getCluster

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

AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi

aws.elasticache.getCluster

Explore with Pulumi AI

aws logo

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

AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi

    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")
    
    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
    	})
    }
    
    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 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
    

    Using getCluster

    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 getCluster(args: GetClusterArgs, opts?: InvokeOptions): Promise<GetClusterResult>
    function getClusterOutput(args: GetClusterOutputArgs, opts?: InvokeOptions): Output<GetClusterResult>
    def get_cluster(cluster_id: Optional[str] = None,
                    tags: Optional[Mapping[str, str]] = None,
                    opts: Optional[InvokeOptions] = None) -> GetClusterResult
    def get_cluster_output(cluster_id: Optional[pulumi.Input[str]] = None,
                    tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetClusterResult]
    func LookupCluster(ctx *Context, args *LookupClusterArgs, opts ...InvokeOption) (*LookupClusterResult, error)
    func LookupClusterOutput(ctx *Context, args *LookupClusterOutputArgs, opts ...InvokeOption) LookupClusterResultOutput

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

    public static class GetCluster 
    {
        public static Task<GetClusterResult> InvokeAsync(GetClusterArgs args, InvokeOptions? opts = null)
        public static Output<GetClusterResult> Invoke(GetClusterInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetClusterResult> getCluster(GetClusterArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:elasticache/getCluster:getCluster
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ClusterId string
    Group identifier.
    Tags Dictionary<string, string>
    Tags assigned to the resource
    ClusterId string
    Group identifier.
    Tags map[string]string
    Tags assigned to the resource
    clusterId String
    Group identifier.
    tags Map<String,String>
    Tags assigned to the resource
    clusterId string
    Group identifier.
    tags {[key: string]: string}
    Tags assigned to the resource
    cluster_id str
    Group identifier.
    tags Mapping[str, str]
    Tags assigned to the resource
    clusterId String
    Group identifier.
    tags Map<String>
    Tags assigned to the resource

    getCluster Result

    The following output properties are available:

    Arn string
    AvailabilityZone string
    Availability Zone for the cache cluster.
    CacheNodes List<GetClusterCacheNode>
    List of node objects including id, address, port, availability_zone and outpost_arn. Referenceable e.g., as ${data.aws_elasticache_cluster.bar.cache_nodes.0.address}
    ClusterAddress string
    (Memcached only) DNS name of the cache cluster without the port appended.
    ClusterId string
    ConfigurationEndpoint string
    (Memcached only) Configuration endpoint to allow host discovery.
    Engine string
    Name of the cache engine.
    EngineVersion string
    Version number of the cache engine.
    Id string
    The provider-assigned unique ID for this managed resource.
    IpDiscovery string
    The IP version advertised in the discovery protocol.
    LogDeliveryConfigurations List<GetClusterLogDeliveryConfiguration>
    Redis SLOWLOG or Redis Engine Log delivery settings.
    MaintenanceWindow string
    Specifies the weekly time range for when maintenance on the cache cluster is performed.
    NetworkType string
    The IP versions for cache cluster connections.
    NodeType string
    The cluster node type.
    NotificationTopicArn string
    An ARN of an SNS topic that ElastiCache notifications get sent to.
    NumCacheNodes int
    The number of cache nodes that the cache cluster has.
    ParameterGroupName string
    Name of the parameter group associated with this cache cluster.
    Port int
    The port number on which each of the cache nodes will accept connections.
    PreferredOutpostArn string
    The outpost ARN in which the cache cluster was created if created in outpost.
    ReplicationGroupId string
    The replication group to which this cache cluster belongs.
    SecurityGroupIds List<string>
    List VPC security groups associated with the cache cluster.
    SnapshotRetentionLimit int
    The number of days for which ElastiCache will retain automatic cache cluster snapshots before deleting them.
    SnapshotWindow string
    Daily time range (in UTC) during which ElastiCache will begin taking a daily snapshot of the cache cluster.
    SubnetGroupName string
    Name of the subnet group associated to the cache cluster.
    Tags Dictionary<string, string>
    Tags assigned to the resource
    Arn string
    AvailabilityZone string
    Availability Zone for the cache cluster.
    CacheNodes []GetClusterCacheNode
    List of node objects including id, address, port, availability_zone and outpost_arn. Referenceable e.g., as ${data.aws_elasticache_cluster.bar.cache_nodes.0.address}
    ClusterAddress string
    (Memcached only) DNS name of the cache cluster without the port appended.
    ClusterId string
    ConfigurationEndpoint string
    (Memcached only) Configuration endpoint to allow host discovery.
    Engine string
    Name of the cache engine.
    EngineVersion string
    Version number of the cache engine.
    Id string
    The provider-assigned unique ID for this managed resource.
    IpDiscovery string
    The IP version advertised in the discovery protocol.
    LogDeliveryConfigurations []GetClusterLogDeliveryConfiguration
    Redis SLOWLOG or Redis Engine Log delivery settings.
    MaintenanceWindow string
    Specifies the weekly time range for when maintenance on the cache cluster is performed.
    NetworkType string
    The IP versions for cache cluster connections.
    NodeType string
    The cluster node type.
    NotificationTopicArn string
    An ARN of an SNS topic that ElastiCache notifications get sent to.
    NumCacheNodes int
    The number of cache nodes that the cache cluster has.
    ParameterGroupName string
    Name of the parameter group associated with this cache cluster.
    Port int
    The port number on which each of the cache nodes will accept connections.
    PreferredOutpostArn string
    The outpost ARN in which the cache cluster was created if created in outpost.
    ReplicationGroupId string
    The replication group to which this cache cluster belongs.
    SecurityGroupIds []string
    List VPC security groups associated with the cache cluster.
    SnapshotRetentionLimit int
    The number of days for which ElastiCache will retain automatic cache cluster snapshots before deleting them.
    SnapshotWindow string
    Daily time range (in UTC) during which ElastiCache will begin taking a daily snapshot of the cache cluster.
    SubnetGroupName string
    Name of the subnet group associated to the cache cluster.
    Tags map[string]string
    Tags assigned to the resource
    arn String
    availabilityZone String
    Availability Zone for the cache cluster.
    cacheNodes List<GetClusterCacheNode>
    List of node objects including id, address, port, availability_zone and outpost_arn. Referenceable e.g., as ${data.aws_elasticache_cluster.bar.cache_nodes.0.address}
    clusterAddress String
    (Memcached only) DNS name of the cache cluster without the port appended.
    clusterId String
    configurationEndpoint String
    (Memcached only) Configuration endpoint to allow host discovery.
    engine String
    Name of the cache engine.
    engineVersion String
    Version number of the cache engine.
    id String
    The provider-assigned unique ID for this managed resource.
    ipDiscovery String
    The IP version advertised in the discovery protocol.
    logDeliveryConfigurations List<GetClusterLogDeliveryConfiguration>
    Redis SLOWLOG or Redis Engine Log delivery settings.
    maintenanceWindow String
    Specifies the weekly time range for when maintenance on the cache cluster is performed.
    networkType String
    The IP versions for cache cluster connections.
    nodeType String
    The cluster node type.
    notificationTopicArn String
    An ARN of an SNS topic that ElastiCache notifications get sent to.
    numCacheNodes Integer
    The number of cache nodes that the cache cluster has.
    parameterGroupName String
    Name of the parameter group associated with this cache cluster.
    port Integer
    The port number on which each of the cache nodes will accept connections.
    preferredOutpostArn String
    The outpost ARN in which the cache cluster was created if created in outpost.
    replicationGroupId String
    The replication group to which this cache cluster belongs.
    securityGroupIds List<String>
    List VPC security groups associated with the cache cluster.
    snapshotRetentionLimit Integer
    The number of days for which ElastiCache will retain automatic cache cluster snapshots before deleting them.
    snapshotWindow String
    Daily time range (in UTC) during which ElastiCache will begin taking a daily snapshot of the cache cluster.
    subnetGroupName String
    Name of the subnet group associated to the cache cluster.
    tags Map<String,String>
    Tags assigned to the resource
    arn string
    availabilityZone string
    Availability Zone for the cache cluster.
    cacheNodes GetClusterCacheNode[]
    List of node objects including id, address, port, availability_zone and outpost_arn. Referenceable e.g., as ${data.aws_elasticache_cluster.bar.cache_nodes.0.address}
    clusterAddress string
    (Memcached only) DNS name of the cache cluster without the port appended.
    clusterId string
    configurationEndpoint string
    (Memcached only) Configuration endpoint to allow host discovery.
    engine string
    Name of the cache engine.
    engineVersion string
    Version number of the cache engine.
    id string
    The provider-assigned unique ID for this managed resource.
    ipDiscovery string
    The IP version advertised in the discovery protocol.
    logDeliveryConfigurations GetClusterLogDeliveryConfiguration[]
    Redis SLOWLOG or Redis Engine Log delivery settings.
    maintenanceWindow string
    Specifies the weekly time range for when maintenance on the cache cluster is performed.
    networkType string
    The IP versions for cache cluster connections.
    nodeType string
    The cluster node type.
    notificationTopicArn string
    An ARN of an SNS topic that ElastiCache notifications get sent to.
    numCacheNodes number
    The number of cache nodes that the cache cluster has.
    parameterGroupName string
    Name of the parameter group associated with this cache cluster.
    port number
    The port number on which each of the cache nodes will accept connections.
    preferredOutpostArn string
    The outpost ARN in which the cache cluster was created if created in outpost.
    replicationGroupId string
    The replication group to which this cache cluster belongs.
    securityGroupIds string[]
    List VPC security groups associated with the cache cluster.
    snapshotRetentionLimit number
    The number of days for which ElastiCache will retain automatic cache cluster snapshots before deleting them.
    snapshotWindow string
    Daily time range (in UTC) during which ElastiCache will begin taking a daily snapshot of the cache cluster.
    subnetGroupName string
    Name of the subnet group associated to the cache cluster.
    tags {[key: string]: string}
    Tags assigned to the resource
    arn str
    availability_zone str
    Availability Zone for the cache cluster.
    cache_nodes Sequence[GetClusterCacheNode]
    List of node objects including id, address, port, availability_zone and outpost_arn. Referenceable e.g., as ${data.aws_elasticache_cluster.bar.cache_nodes.0.address}
    cluster_address str
    (Memcached only) DNS name of the cache cluster without the port appended.
    cluster_id str
    configuration_endpoint str
    (Memcached only) Configuration endpoint to allow host discovery.
    engine str
    Name of the cache engine.
    engine_version str
    Version number of the cache engine.
    id str
    The provider-assigned unique ID for this managed resource.
    ip_discovery str
    The IP version advertised in the discovery protocol.
    log_delivery_configurations Sequence[GetClusterLogDeliveryConfiguration]
    Redis SLOWLOG or Redis Engine Log delivery settings.
    maintenance_window str
    Specifies the weekly time range for when maintenance on the cache cluster is performed.
    network_type str
    The IP versions for cache cluster connections.
    node_type str
    The cluster node type.
    notification_topic_arn str
    An ARN of an SNS topic that ElastiCache notifications get sent to.
    num_cache_nodes int
    The number of cache nodes that the cache cluster has.
    parameter_group_name str
    Name of the parameter group associated with this cache cluster.
    port int
    The port number on which each of the cache nodes will accept connections.
    preferred_outpost_arn str
    The outpost ARN in which the cache cluster was created if created in outpost.
    replication_group_id str
    The replication group to which this cache cluster belongs.
    security_group_ids Sequence[str]
    List VPC security groups associated with the cache cluster.
    snapshot_retention_limit int
    The number of days for which ElastiCache will retain automatic cache cluster snapshots before deleting them.
    snapshot_window str
    Daily time range (in UTC) during which ElastiCache will begin taking a daily snapshot of the cache cluster.
    subnet_group_name str
    Name of the subnet group associated to the cache cluster.
    tags Mapping[str, str]
    Tags assigned to the resource
    arn String
    availabilityZone String
    Availability Zone for the cache cluster.
    cacheNodes List<Property Map>
    List of node objects including id, address, port, availability_zone and outpost_arn. Referenceable e.g., as ${data.aws_elasticache_cluster.bar.cache_nodes.0.address}
    clusterAddress String
    (Memcached only) DNS name of the cache cluster without the port appended.
    clusterId String
    configurationEndpoint String
    (Memcached only) Configuration endpoint to allow host discovery.
    engine String
    Name of the cache engine.
    engineVersion String
    Version number of the cache engine.
    id String
    The provider-assigned unique ID for this managed resource.
    ipDiscovery String
    The IP version advertised in the discovery protocol.
    logDeliveryConfigurations List<Property Map>
    Redis SLOWLOG or Redis Engine Log delivery settings.
    maintenanceWindow String
    Specifies the weekly time range for when maintenance on the cache cluster is performed.
    networkType String
    The IP versions for cache cluster connections.
    nodeType String
    The cluster node type.
    notificationTopicArn String
    An ARN of an SNS topic that ElastiCache notifications get sent to.
    numCacheNodes Number
    The number of cache nodes that the cache cluster has.
    parameterGroupName String
    Name of the parameter group associated with this cache cluster.
    port Number
    The port number on which each of the cache nodes will accept connections.
    preferredOutpostArn String
    The outpost ARN in which the cache cluster was created if created in outpost.
    replicationGroupId String
    The replication group to which this cache cluster belongs.
    securityGroupIds List<String>
    List VPC security groups associated with the cache cluster.
    snapshotRetentionLimit Number
    The number of days for which ElastiCache will retain automatic cache cluster snapshots before deleting them.
    snapshotWindow String
    Daily time range (in UTC) during which ElastiCache will begin taking a daily snapshot of the cache cluster.
    subnetGroupName String
    Name of the subnet group associated to the cache cluster.
    tags Map<String>
    Tags assigned to the resource

    Supporting Types

    GetClusterCacheNode

    Address string
    AvailabilityZone string
    Availability Zone for the cache cluster.
    Id string
    OutpostArn string
    Port int
    The port number on which each of the cache nodes will accept connections.
    Address string
    AvailabilityZone string
    Availability Zone for the cache cluster.
    Id string
    OutpostArn string
    Port int
    The port number on which each of the cache nodes will accept connections.
    address String
    availabilityZone String
    Availability Zone for the cache cluster.
    id String
    outpostArn String
    port Integer
    The port number on which each of the cache nodes will accept connections.
    address string
    availabilityZone string
    Availability Zone for the cache cluster.
    id string
    outpostArn string
    port number
    The port number on which each of the cache nodes will accept connections.
    address str
    availability_zone str
    Availability Zone for the cache cluster.
    id str
    outpost_arn str
    port int
    The port number on which each of the cache nodes will accept connections.
    address String
    availabilityZone String
    Availability Zone for the cache cluster.
    id String
    outpostArn String
    port Number
    The port number on which each of the cache nodes will accept connections.

    GetClusterLogDeliveryConfiguration

    Destination string
    DestinationType string
    LogFormat string
    LogType string
    Destination string
    DestinationType string
    LogFormat string
    LogType string
    destination String
    destinationType String
    logFormat String
    logType String
    destination string
    destinationType string
    logFormat string
    logType string
    destination String
    destinationType String
    logFormat String
    logType 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

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

    AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi