AWS SDK Version 3 for .NET
API Reference

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.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceResponse
    Amazon.ElastiCache.Model.CreateReplicationGroupResponse

Namespace: Amazon.ElastiCache.Model
Assembly: AWSSDK.ElastiCache.dll
Version: 3.x.y.z

Syntax

C#
public class CreateReplicationGroupResponse : AmazonWebServiceResponse

The CreateReplicationGroupResponse type exposes the following members

Constructors

Properties

NameTypeDescription
Public Property ContentLength System.Int64 Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property HttpStatusCode System.Net.HttpStatusCode Inherited from Amazon.Runtime.AmazonWebServiceResponse.
Public Property ReplicationGroup Amazon.ElastiCache.Model.ReplicationGroup

Gets and sets the property ReplicationGroup.

Public Property ResponseMetadata Amazon.Runtime.ResponseMetadata Inherited from Amazon.Runtime.AmazonWebServiceResponse.

Examples

Creates a Redis replication group with 3 nodes.

CreateCacheReplicationGroup


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.

CreateReplicationGroup


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 {
        new NodeGroupConfiguration {
            PrimaryAvailabilityZone = "us-east-1c",
            ReplicaAvailabilityZones = new List {
                "us-east-1b"
            },
            ReplicaCount = 1,
            Slots = "0-8999"
        },
        new NodeGroupConfiguration {
            PrimaryAvailabilityZone = "us-east-1a",
            ReplicaAvailabilityZones = new List {
                "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;

            

Version Information

.NET Standard:
Supported in: 1.3

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms