Class Cluster


  • public class Cluster
    extends com.pulumi.resources.CustomResource
    Provides a MemoryDB Cluster. More information about MemoryDB can be found in the [Developer Guide](https://docs.aws.amazon.com/memorydb/latest/devguide/what-is-memorydb-for-redis.html). ## Example Usage
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.memorydb.Cluster;
     import com.pulumi.aws.memorydb.ClusterArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     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) {
             var example = new Cluster("example", ClusterArgs.builder()
                 .aclName("open-access")
                 .name("my-cluster")
                 .nodeType("db.t4g.small")
                 .engine("redis")
                 .engineVersion("7.1")
                 .numShards(2)
                 .securityGroupIds(exampleAwsSecurityGroup.id())
                 .snapshotRetentionLimit(7)
                 .subnetGroupName(exampleAwsMemorydbSubnetGroup.id())
                 .build());
     
         }
     }
     
     
    ## Import Using `pulumi import`, import a cluster using the `name`. For example: ```sh $ pulumi import aws:memorydb/cluster:Cluster example my-cluster ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Constructor Summary

      Constructors 
      Constructor Description
      Cluster​(java.lang.String name)  
      Cluster​(java.lang.String name, ClusterArgs args)  
      Cluster​(java.lang.String name, ClusterArgs args, com.pulumi.resources.CustomResourceOptions options)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.lang.String> aclName()  
      com.pulumi.core.Output<java.lang.String> arn()  
      com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> autoMinorVersionUpgrade()  
      com.pulumi.core.Output<java.util.List<ClusterClusterEndpoint>> clusterEndpoints()  
      com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> dataTiering()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()  
      com.pulumi.core.Output<java.lang.String> engine()  
      com.pulumi.core.Output<java.lang.String> enginePatchVersion()  
      com.pulumi.core.Output<java.lang.String> engineVersion()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> finalSnapshotName()  
      static Cluster get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ClusterState state, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<java.lang.String> ipDiscovery()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> kmsKeyArn()  
      com.pulumi.core.Output<java.lang.String> maintenanceWindow()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> multiRegionClusterName()  
      com.pulumi.core.Output<java.lang.String> name()  
      com.pulumi.core.Output<java.lang.String> namePrefix()  
      com.pulumi.core.Output<java.lang.String> networkType()  
      com.pulumi.core.Output<java.lang.String> nodeType()  
      com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> numReplicasPerShard()  
      com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> numShards()  
      com.pulumi.core.Output<java.lang.String> parameterGroupName()  
      com.pulumi.core.Output<java.lang.Integer> port()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> securityGroupIds()  
      com.pulumi.core.Output<java.util.List<ClusterShard>> shards()  
      com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> snapshotArns()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> snapshotName()  
      com.pulumi.core.Output<java.lang.Integer> snapshotRetentionLimit()  
      com.pulumi.core.Output<java.lang.String> snapshotWindow()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> snsTopicArn()  
      com.pulumi.core.Output<java.lang.String> subnetGroupName()  
      com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()  
      com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tagsAll()  
      com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> tlsEnabled()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Cluster

        public Cluster​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • Cluster

        public Cluster​(java.lang.String name,
                       ClusterArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • Cluster

        public Cluster​(java.lang.String name,
                       ClusterArgs args,
                       @Nullable
                       com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • aclName

        public com.pulumi.core.Output<java.lang.String> aclName()
        Returns:
        Name of the Access Control List to associate with the cluster.
      • arn

        public com.pulumi.core.Output<java.lang.String> arn()
        Returns:
        ARN of the cluster.
      • autoMinorVersionUpgrade

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> autoMinorVersionUpgrade()
        Returns:
        When set to `true`, the cluster will automatically receive minor engine version upgrades after launch. Defaults to `true`.
      • dataTiering

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> dataTiering()
        Returns:
        Enables data tiering. This option is not supported by all instance types. For more information, see [Data tiering](https://docs.aws.amazon.com/memorydb/latest/devguide/data-tiering.html).
      • description

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
        Returns:
        Description for the cluster. Defaults to `"Managed by Pulumi"`.
      • engine

        public com.pulumi.core.Output<java.lang.String> engine()
        Returns:
        Engine that will run on your nodes. Supported values are `redis` and `valkey`.
      • enginePatchVersion

        public com.pulumi.core.Output<java.lang.String> enginePatchVersion()
        Returns:
        Patch version number of the engine used by the cluster.
      • engineVersion

        public com.pulumi.core.Output<java.lang.String> engineVersion()
        Returns:
        Version number of the engine to be used for the cluster. Downgrades are not supported.
      • finalSnapshotName

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> finalSnapshotName()
        Returns:
        Name of the final cluster snapshot to be created when this resource is deleted. If omitted, no final snapshot will be made.
      • ipDiscovery

        public com.pulumi.core.Output<java.lang.String> ipDiscovery()
        Returns:
        Mechanism that the cluster uses to discover IP addresses. Valid values are `ipv4` and `ipv6`. Defaults to `ipv4`. To specify `ipv6`, `networkType` must be `ipv6` or `dualStack`.
      • kmsKeyArn

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> kmsKeyArn()
        Returns:
        ARN of the KMS key used to encrypt the cluster at rest.
      • maintenanceWindow

        public com.pulumi.core.Output<java.lang.String> maintenanceWindow()
        Returns:
        Weekly time range during which maintenance on the cluster is performed. Specify as a range in the format `ddd:hh24:mi-ddd:hh24:mi` (24H Clock UTC). The minimum maintenance window is a 60 minute period. Example: `sun:23:00-mon:01:30`.
      • multiRegionClusterName

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> multiRegionClusterName()
        Returns:
        Multi region cluster identifier specified on `aws.memorydb.MultiRegionCluster`.
      • name

        public com.pulumi.core.Output<java.lang.String> name()
        Returns:
        Name of the cluster. If omitted, the provider will assign a random, unique name. Conflicts with `namePrefix`.
      • namePrefix

        public com.pulumi.core.Output<java.lang.String> namePrefix()
        Returns:
        Creates a unique name beginning with the specified prefix. Conflicts with `name`.
      • networkType

        public com.pulumi.core.Output<java.lang.String> networkType()
        Returns:
        IP address type for the cluster. Valid values are `ipv4`, `ipv6` and `dualStack`. Defaults to `ipv4`.
      • nodeType

        public com.pulumi.core.Output<java.lang.String> nodeType()
        Returns:
        Compute and memory capacity of the nodes in the cluster. See AWS documentation on [supported node types](https://docs.aws.amazon.com/memorydb/latest/devguide/nodes.supportedtypes.html) as well as [vertical scaling](https://docs.aws.amazon.com/memorydb/latest/devguide/cluster-vertical-scaling.html). The following arguments are optional:
      • numReplicasPerShard

        public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> numReplicasPerShard()
        Returns:
        Number of replicas to apply to each shard, up to a maximum of 5. Defaults to `1` (i.e. 2 nodes per shard).
      • numShards

        public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> numShards()
        Returns:
        Number of shards in the cluster. Defaults to `1`.
      • parameterGroupName

        public com.pulumi.core.Output<java.lang.String> parameterGroupName()
        Returns:
        Name of the parameter group associated with the cluster.
      • port

        public com.pulumi.core.Output<java.lang.Integer> port()
        Returns:
        Port number on which each of the nodes accepts connections. Defaults to `6379`.
      • region

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
      • securityGroupIds

        public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> securityGroupIds()
        Returns:
        Set of VPC Security Group ID-s to associate with this cluster.
      • shards

        public com.pulumi.core.Output<java.util.List<ClusterShard>> shards()
        Returns:
        Set of shards in this cluster.
      • snapshotArns

        public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> snapshotArns()
        Returns:
        List of ARN-s that uniquely identify RDB snapshot files stored in S3. The snapshot files will be used to populate the new cluster. Object names in the ARN-s cannot contain any commas.
      • snapshotName

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> snapshotName()
        Returns:
        Name of a snapshot from which to restore data into the new cluster.
      • snapshotRetentionLimit

        public com.pulumi.core.Output<java.lang.Integer> snapshotRetentionLimit()
        Returns:
        Number of days for which MemoryDB retains automatic snapshots before deleting them. When set to `0`, automatic backups are disabled. Defaults to `0`.
      • snapshotWindow

        public com.pulumi.core.Output<java.lang.String> snapshotWindow()
        Returns:
        Daily time range (in UTC) during which MemoryDB begins taking a daily snapshot of your shard. Example: `05:00-09:00`.
      • snsTopicArn

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> snsTopicArn()
        Returns:
        ARN of the SNS topic to which cluster notifications are sent.
      • subnetGroupName

        public com.pulumi.core.Output<java.lang.String> subnetGroupName()
        Returns:
        Name of the subnet group to be used for the cluster. Defaults to a subnet group consisting of default VPC subnets.
      • tags

        public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()
        Returns:
        Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
      • tagsAll

        public com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tagsAll()
        Returns:
        Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
      • tlsEnabled

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> tlsEnabled()
        Returns:
        Whether to enable in-transit encryption on the cluster. When set to `false`, the `aclName` must be `open-access`. Defaults to `true`.
      • get

        public static Cluster get​(java.lang.String name,
                                  com.pulumi.core.Output<java.lang.String> id,
                                  @Nullable
                                  ClusterState state,
                                  @Nullable
                                  com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.