Fugue.AWS.Elasticache.Memcached

Table of Contents

Module Members

new

(Function)

A Memcached constructor.

The Memcached constructor is used for creating a Memcached cluster.

Example usage:

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

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
}

cluster: Elasticache.Memcached.new {
  name: "example-cluster",
  cacheNodeType: Elasticache.Cache_t2_micro,
  numCacheNodes: 5,
  securityGroups: [clusterSecurityGroup],
  cacheSubnetGroup: subnetGroup,
}

Type Signature

 fun { cacheNodeType: CacheNodeType,
       numCacheNodes: Int,
       securityGroups: Optional<List<SecurityGroup>>,
       name: String,
       port: Optional<Int>,
       tags: Optional<List<Tag>>,
       cacheSubnetGroup: CacheSubnetGroup} -> CacheCluster
Argument: cacheNodeType

The node type to use for the cluster.

Type: CacheNodeType

Argument: numCacheNodes

The number of cache nodes in the cluster. Mutable.

Type: Int

Argument: securityGroups

The list of SecurityGroups to associate with the cluster. Mutable.

Type: Optional<List<SecurityGroup>>

Argument: name

The CacheCluster 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

Argument: port

The cache port number.

Type: Optional<Int>

Argument: tags

A list of Tags to attach to the cluster.

Type: Optional<List<Tag>>

Argument: cacheSubnetGroup

The CacheSubnetGroup to deploy the cluster.

Type: CacheSubnetGroup

Returns:

A CacheCluster value.

Type: CacheCluster