MultiRegionCluster class
Provides a MemoryDB Multi Region 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.MultiRegionCluster("example", {
multiRegionClusterNameSuffix: "example",
nodeType: "db.r7g.xlarge",
});
const exampleCluster = new aws.memorydb.Cluster("example", {
aclName: exampleAwsMemorydbAcl.id,
autoMinorVersionUpgrade: false,
name: "example",
nodeType: "db.t4g.small",
numShards: 2,
securityGroupIds: [exampleAwsSecurityGroup.id],
snapshotRetentionLimit: 7,
subnetGroupName: exampleAwsMemorydbSubnetGroup.id,
multiRegionClusterName: example.multiRegionClusterName,
});
import pulumi
import pulumi_aws as aws
example = aws.memorydb.MultiRegionCluster("example",
multi_region_cluster_name_suffix="example",
node_type="db.r7g.xlarge")
example_cluster = aws.memorydb.Cluster("example",
acl_name=example_aws_memorydb_acl["id"],
auto_minor_version_upgrade=False,
name="example",
node_type="db.t4g.small",
num_shards=2,
security_group_ids=[example_aws_security_group["id"]],
snapshot_retention_limit=7,
subnet_group_name=example_aws_memorydb_subnet_group["id"],
multi_region_cluster_name=example.multi_region_cluster_name)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.MemoryDb.MultiRegionCluster("example", new()
{
MultiRegionClusterNameSuffix = "example",
NodeType = "db.r7g.xlarge",
});
var exampleCluster = new Aws.MemoryDb.Cluster("example", new()
{
AclName = exampleAwsMemorydbAcl.Id,
AutoMinorVersionUpgrade = false,
Name = "example",
NodeType = "db.t4g.small",
NumShards = 2,
SecurityGroupIds = new[]
{
exampleAwsSecurityGroup.Id,
},
SnapshotRetentionLimit = 7,
SubnetGroupName = exampleAwsMemorydbSubnetGroup.Id,
MultiRegionClusterName = example.MultiRegionClusterName,
});
});
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 {
example, err := memorydb.NewMultiRegionCluster(ctx, "example", &memorydb.MultiRegionClusterArgs{
MultiRegionClusterNameSuffix: pulumi.String("example"),
NodeType: pulumi.String("db.r7g.xlarge"),
})
if err != nil {
return err
}
_, err = memorydb.NewCluster(ctx, "example", &memorydb.ClusterArgs{
AclName: pulumi.Any(exampleAwsMemorydbAcl.Id),
AutoMinorVersionUpgrade: pulumi.Bool(false),
Name: pulumi.String("example"),
NodeType: pulumi.String("db.t4g.small"),
NumShards: pulumi.Int(2),
SecurityGroupIds: pulumi.StringArray{
exampleAwsSecurityGroup.Id,
},
SnapshotRetentionLimit: pulumi.Int(7),
SubnetGroupName: pulumi.Any(exampleAwsMemorydbSubnetGroup.Id),
MultiRegionClusterName: example.MultiRegionClusterName,
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_memorydb_multiregioncluster" "example" {
multi_region_cluster_name_suffix = "example"
node_type = "db.r7g.xlarge"
}
resource "aws_memorydb_cluster" "example" {
acl_name = exampleAwsMemorydbAcl.id
auto_minor_version_upgrade = false
name = "example"
node_type = "db.t4g.small"
num_shards = 2
security_group_ids = [exampleAwsSecurityGroup.id]
snapshot_retention_limit = 7
subnet_group_name = exampleAwsMemorydbSubnetGroup.id
multi_region_cluster_name = aws_memorydb_multiregioncluster.example.multi_region_cluster_name
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.memorydb.MultiRegionCluster;
import com.pulumi.aws.memorydb.MultiRegionClusterArgs;
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 MultiRegionCluster("example", MultiRegionClusterArgs.builder()
.multiRegionClusterNameSuffix("example")
.nodeType("db.r7g.xlarge")
.build());
var exampleCluster = new Cluster("exampleCluster", ClusterArgs.builder()
.aclName(exampleAwsMemorydbAcl.id())
.autoMinorVersionUpgrade(false)
.name("example")
.nodeType("db.t4g.small")
.numShards(2)
.securityGroupIds(exampleAwsSecurityGroup.id())
.snapshotRetentionLimit(7)
.subnetGroupName(exampleAwsMemorydbSubnetGroup.id())
.multiRegionClusterName(example.multiRegionClusterName())
.build());
}
}
resources:
example:
type: aws:memorydb:MultiRegionCluster
properties:
multiRegionClusterNameSuffix: example
nodeType: db.r7g.xlarge
exampleCluster:
type: aws:memorydb:Cluster
name: example
properties:
aclName: ${exampleAwsMemorydbAcl.id}
autoMinorVersionUpgrade: false
name: example
nodeType: db.t4g.small
numShards: 2
securityGroupIds:
- ${exampleAwsSecurityGroup.id}
snapshotRetentionLimit: 7
subnetGroupName: ${exampleAwsMemorydbSubnetGroup.id}
multiRegionClusterName: ${example.multiRegionClusterName}
Import
Using pulumi import, import a cluster using the multiRegionClusterName. For example:
$ pulumi import aws:memorydb/multiRegionCluster:MultiRegionCluster example virxk-example
Constructors
- MultiRegionCluster(String name, {MultiRegionClusterArgs? args, CustomResourceOptions? options})
-
Creates a new MultiRegionCluster.
nameThe Pulumi resource name.argsArguments used to configure this MultiRegionCluster. The set of arguments for MultiRegionCluster.optionsResource options controlling this resource's behavior. - MultiRegionCluster.reference(String urn)
- Creates a typed reference to an existing MultiRegionCluster resource.
Properties
-
arn
↔ Output<
String> -
The ARN of the multi-region cluster.
latefinal
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
description
↔ Output<
String?> -
description for the multi-region cluster.
latefinal
-
engine
↔ Output<
String> -
The name of the engine to be used for the multi-region cluster. Valid values are
redisandvalkey.latefinal -
engineVersion
↔ Output<
String> -
The version of the engine to be used for the multi-region cluster. Downgrades are not supported.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
- 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
-
multiRegionClusterName
↔ Output<
String> -
The name of the multi-region cluster.
latefinal
-
multiRegionClusterNameSuffix
↔ Output<
String> -
A suffix to be added to the multi-region cluster name. An AWS generated prefix is automatically applied to the multi-region cluster name when it is created.
latefinal
-
multiRegionParameterGroupName
↔ Output<
String> -
The name of the multi-region parameter group to be associated with the cluster.
latefinal
-
nodeType
↔ Output<
String> -
The node type to be used for the multi-region cluster.
latefinal
-
numShards
↔ Output<
int> -
The number of shards for the multi-region cluster.
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
-
status
↔ Output<
String> -
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 -
timeouts
↔ Output<
MultiRegionClusterTimeouts?> -
latefinal
-
tlsEnabled
↔ Output<
bool> -
A flag to enable in-transit encryption on the cluster.
latefinal
-
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
updateStrategy
↔ Output<
String?> -
latefinal
-
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
Static Methods
-
get(
String name, Input< String> id, {MultiRegionClusterState? state, CustomResourceOptions? options}) → MultiRegionCluster -
Gets an existing MultiRegionCluster resource's state with the given
nameandid.