Fugue.AWS.Elasticache.ReplicationGroup

Module Members

external

(Function)

Create a reference to an externally managed ReplicationGroup.

Example usage:

cluster: Elasticache.ReplicationGroup.external("MyCluster", AWS.Us-east-1)

Type Signature

 fun (String, Region) -> ReplicationGroup
Argument: name

The name of the target ReplicationGroup.

Type: String

Argument: region

The region containing the target ReplicationGroup.

Type: Region

Returns:

A reference to the specified ReplicationGroup.

Type: ReplicationGroup

new

(Function)

ReplicationGroup Constructor.

Example usage:

import Fugue.AWS.EC2 as EC2
import Fugue.AWS.Elasticache as Elasticache
import Fugue.AWS.Pattern.Network as Network
import Fugue.Core.AWS.Common as AWS

net: Network.new {
  name: "EXAMPLE",
  cidr: "10.42.0.0/16",
  region: AWS.Us-east-1,
  publicSubnets: [
    (AWS.B, "10.42.12.0/24"),
    (AWS.C, "10.42.13.0/24")
  ],
  privateSubnets: [
    (AWS.B, "10.42.22.0/24"),
    (AWS.C, "10.42.23.0/24")
  ]
}

subnetGroup: Elasticache.CacheSubnetGroup.new {
  name: "private",
  description: "private subnets",
  subnets: net.privateSubnets,
}

clusterSecurityGroup: EC2.SecurityGroup.new {
  description: "redis-example-cluster",
  ipPermissions: [
    # add rules here...
  ],
  ipPermissionsEgress: None,
  vpc: net.vpc,
  tags: None
}

cache: Elasticache.ReplicationGroup.new {
  name: "example-cache",
  description: "My cache",
  cacheNodeType: Elasticache.Cache_t2_micro,
  engine: Elasticache.Redis,
  numCacheClusters: 3,
  securityGroups: [clusterSecurityGroup],
  port: None,
  tags: None,
  cacheSubnetGroup: subnetGroup,
}

Type Signature

 fun (Spec) -> ReplicationGroup
Argument: spec

A ReplicationGroup specification.

Type: Spec

Returns:

A ReplicationGroup value.

Type: ReplicationGroup

Spec

(Type)

type Spec:
  description: String
  numCacheClusters: Optional<Int>
  cacheNodeType: CacheNodeType
  engine: EngineType
  securityGroups: List<SecurityGroup>
  tags: Optional<List<Tag>>
  port: Optional<Int>
  name: String
  cacheSubnetGroup: CacheSubnetGroup

ReplicationGroup Specification

Record {

Field: description

Description of the replication group.

Type: String

Field: numCacheClusters

The number of CacheClusters in the replication group.

Type: Optional<Int>

Field: cacheNodeType

The node type to use in cache clusters.

Type: CacheNodeType

Field: engine

The cache engine to use for the replication group.

Type: EngineType

Field: securityGroups

The list of SecurityGroups to associate with the replication group.

Type: List<SecurityGroup>

Field: tags

The list of tags to attach to the replication group.

Type: Optional<List<Tag>>

Field: port

The cache port number.

Type: Optional<Int>

Field: name

The replication group identifier. Up to 20 lower case alphanumeric characters or hyphens. Must start with a letter. Cannot end with a hyphen or include two consecutive hyphens.

Type: String

Field: cacheSubnetGroup

The CacheSubnetGroup to deploy CacheClusters in.

Type: CacheSubnetGroup

}