AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
This is the response object from the CreateReplicationGroup operation.
Namespace: Amazon.ElastiCache.Model
Assembly: AWSSDK.ElastiCache.dll
Version: 3.x.y.z
public class CreateReplicationGroupResponse : AmazonWebServiceResponse
The CreateReplicationGroupResponse type exposes the following members
Name | Description | |
---|---|---|
CreateReplicationGroupResponse() |
Name | Type | Description | |
---|---|---|---|
ContentLength | System.Int64 | Inherited from Amazon.Runtime.AmazonWebServiceResponse. | |
HttpStatusCode | System.Net.HttpStatusCode | Inherited from Amazon.Runtime.AmazonWebServiceResponse. | |
ReplicationGroup | Amazon.ElastiCache.Model.ReplicationGroup |
Gets and sets the property ReplicationGroup. |
|
ResponseMetadata | Amazon.Runtime.ResponseMetadata | Inherited from Amazon.Runtime.AmazonWebServiceResponse. |
Creates a Redis replication group with 3 nodes.
var client = new AmazonElastiCacheClient(); var response = client.CreateReplicationGroup(new CreateReplicationGroupRequest { AutomaticFailoverEnabled = true, CacheNodeType = "cache.m3.medium", Engine = "redis", EngineVersion = "2.8.24", NumCacheClusters = 3, ReplicationGroupDescription = "A Redis replication group.", ReplicationGroupId = "my-redis-rg", SnapshotRetentionLimit = 30 }); ReplicationGroup replicationGroup = response.ReplicationGroup;
Creates a Redis (cluster mode enabled) replication group with two shards. One shard has one read replica node and the other shard has two read replicas.
var client = new AmazonElastiCacheClient(); var response = client.CreateReplicationGroup(new CreateReplicationGroupRequest { AutoMinorVersionUpgrade = true, CacheNodeType = "cache.m3.medium", CacheParameterGroupName = "default.redis3.2.cluster.on", Engine = "redis", EngineVersion = "3.2.4", NodeGroupConfiguration = new List<NodeGroupConfiguration> { new NodeGroupConfiguration { PrimaryAvailabilityZone = "us-east-1c", ReplicaAvailabilityZones = new List<string> { "us-east-1b" }, ReplicaCount = 1, Slots = "0-8999" }, new NodeGroupConfiguration { PrimaryAvailabilityZone = "us-east-1a", ReplicaAvailabilityZones = new List<string> { "us-east-1a", "us-east-1c" }, ReplicaCount = 2, Slots = "9000-16383" } }, NumNodeGroups = 2, ReplicationGroupDescription = "A multi-sharded replication group", ReplicationGroupId = "clustered-redis-rg", SnapshotRetentionLimit = 8 }); ReplicationGroup replicationGroup = response.ReplicationGroup;
.NET Core App:
Supported in: 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5, 4.0, 3.5