Cluster class
Provides a MemoryDB Cluster.
More information about MemoryDB can be found in the Developer Guide.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.memorydb.Cluster("example", {
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,
});
import pulumi
import pulumi_aws as aws
example = aws.memorydb.Cluster("example",
acl_name="open-access",
name="my-cluster",
node_type="db.t4g.small",
engine="redis",
engine_version="7.1",
num_shards=2,
security_group_ids=[example_aws_security_group["id"]],
snapshot_retention_limit=7,
subnet_group_name=example_aws_memorydb_subnet_group["id"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.MemoryDb.Cluster("example", new()
{
AclName = "open-access",
Name = "my-cluster",
NodeType = "db.t4g.small",
Engine = "redis",
EngineVersion = "7.1",
NumShards = 2,
SecurityGroupIds = new[]
{
exampleAwsSecurityGroup.Id,
},
SnapshotRetentionLimit = 7,
SubnetGroupName = exampleAwsMemorydbSubnetGroup.Id,
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/memorydb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := memorydb.NewCluster(ctx, "example", &memorydb.ClusterArgs{
AclName: pulumi.String("open-access"),
Name: pulumi.String("my-cluster"),
NodeType: pulumi.String("db.t4g.small"),
Engine: pulumi.String("redis"),
EngineVersion: pulumi.String("7.1"),
NumShards: pulumi.Int(2),
SecurityGroupIds: pulumi.StringArray{
exampleAwsSecurityGroup.Id,
},
SnapshotRetentionLimit: pulumi.Int(7),
SubnetGroupName: pulumi.Any(exampleAwsMemorydbSubnetGroup.Id),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_memorydb_cluster" "example" {
acl_name = "open-access"
name = "my-cluster"
node_type = "db.t4g.small"
engine = "redis"
engine_version = "7.1"
num_shards = 2
security_group_ids = [exampleAwsSecurityGroup.id]
snapshot_retention_limit = 7
subnet_group_name = exampleAwsMemorydbSubnetGroup.id
}
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());
}
}
resources:
example:
type: aws:memorydb:Cluster
properties:
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}
Import
Using pulumi import, import a cluster using the name. For example:
$ pulumi import aws:memorydb/cluster:Cluster example my-cluster
Constructors
- Cluster(String name, {ClusterArgs? args, CustomResourceOptions? options})
-
Creates a new Cluster.
nameThe Pulumi resource name.argsArguments used to configure this Cluster. The set of arguments for Cluster.optionsResource options controlling this resource's behavior. - Cluster.reference(String urn)
- Creates a typed reference to an existing Cluster resource.
Properties
-
aclName
↔ Output<
String> -
The name of the Access Control List to associate with the cluster.
latefinal
-
arn
↔ Output<
String> -
The ARN of the cluster.
latefinal
-
autoMinorVersionUpgrade
↔ Output<
bool?> -
When set to
true, the cluster will automatically receive minor engine version upgrades after launch. Defaults totrue.latefinal -
childResources
→ Set<
Resource> -
finalinherited
-
clusterEndpoints
↔ Output<
List< ClusterClusterEndpoint> > -
latefinal
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
dataTiering
↔ Output<
bool?> -
Enables data tiering. This option is not supported by all instance types. For more information, see Data tiering.
latefinal
-
description
↔ Output<
String?> -
Description for the cluster. Defaults to
"Managed by Pulumi".latefinal -
engine
↔ Output<
String> -
The engine that will run on your nodes. Supported values are
redisandvalkey.latefinal -
enginePatchVersion
↔ Output<
String> -
Patch version number of the engine used by the cluster.
latefinal
-
engineVersion
↔ Output<
String> -
Version number of the engine to be used for the cluster. Downgrades are not supported.
latefinal
-
finalSnapshotName
↔ Output<
String?> -
Name of the final cluster snapshot to be created when this resource is deleted. If omitted, no final snapshot will be made.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
-
ipDiscovery
↔ Output<
String> -
Mechanism that the cluster uses to discover IP addresses. Valid values are
ipv4andipv6. Defaults toipv4. To specifyipv6,networkTypemust beipv6ordualStack.latefinal - isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
kmsKeyArn
↔ Output<
String?> -
ARN of the KMS key used to encrypt the cluster at rest.
latefinal
-
maintenanceWindow
↔ Output<
String> -
Specifies the 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.latefinal -
multiRegionClusterName
↔ Output<
String?> -
The multi region cluster identifier specified on
aws.memorydb.MultiRegionCluster.latefinal -
name
↔ Output<
String> -
Name of the cluster. If omitted, the provider will assign a random, unique name. Conflicts with
namePrefix.latefinal -
namePrefix
↔ Output<
String> -
Creates a unique name beginning with the specified prefix. Conflicts with
name.latefinal -
networkType
↔ Output<
String> -
IP address type for the cluster. Valid values are
ipv4,ipv6anddualStack. Defaults toipv4.latefinal -
nodeType
↔ Output<
String> -
The compute and memory capacity of the nodes in the cluster. See AWS documentation on supported node types as well as vertical scaling.
latefinal
-
numReplicasPerShard
↔ Output<
int?> -
The number of replicas to apply to each shard, up to a maximum of 5. Defaults to
1(i.e. 2 nodes per shard).latefinal -
numShards
↔ Output<
int?> -
The number of shards in the cluster. Defaults to
1.latefinal -
parameterGroupName
↔ Output<
String> -
The name of the parameter group associated with the cluster.
latefinal
-
port
↔ Output<
int> -
The port number on which each of the nodes accepts connections. Defaults to
6379.latefinal -
region
↔ Output<
String> -
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
securityGroupIds
↔ Output<
List< String> ?> -
Set of VPC Security Group ID-s to associate with this cluster.
latefinal
-
Set of shards in this cluster.
latefinal
-
snapshotArns
↔ Output<
List< String> ?> -
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.
latefinal
-
snapshotName
↔ Output<
String?> -
The name of a snapshot from which to restore data into the new cluster.
latefinal
-
snapshotRetentionLimit
↔ Output<
int> -
The number of days for which MemoryDB retains automatic snapshots before deleting them. When set to
0, automatic backups are disabled. Defaults to0.latefinal -
snapshotWindow
↔ Output<
String> -
The daily time range (in UTC) during which MemoryDB begins taking a daily snapshot of your shard. Example:
05:00-09:00.latefinal -
snsTopicArn
↔ Output<
String?> -
ARN of the SNS topic to which cluster notifications are sent.
latefinal
-
subnetGroupName
↔ Output<
String> -
The name of the subnet group to be used for the cluster. Defaults to a subnet group consisting of default VPC subnets.
latefinal
-
A map of tags to assign to the resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.latefinal -
A map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.latefinal -
tlsEnabled
↔ Output<
bool?> -
A flag to enable in-transit encryption on the cluster. When set to
false, theaclNamemust beopen-access. Defaults totrue.latefinal -
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
urn
↔ Output<
String> -
latefinalinherited
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited