ecs_composex.elasticache package

Submodules

ecs_composex.elasticache.elasticache_aws module

Module to scan and find the DB and Secret for Lookup of x-rds

ecs_composex.elasticache.elasticache_aws. get_cluster_config ( resource , cluster_name , session ) [source]
ecs_composex.elasticache.elasticache_aws. get_replica_group_config ( resource , cluster_name , session ) [source]
ecs_composex.elasticache.elasticache_aws. lookup_cluster_resource ( resource , session ) [source]

Function to find the DB in AWS account

Parameters :

session ( boto3.session.Session ) – Boto3 session for clients

Returns :

ecs_composex.elasticache.elasticache_aws. return_cluster_config ( resource , cluster_arn , session ) [source]

Function to retrieve the DB information we need for services integration

Parameters :
Returns :

the DB details

ecs_composex.elasticache.elasticache_ecs module

Module to handle Linking ECS tasks and the elastic cache clusters

ecs_composex.elasticache.elasticache_ecs. create_lookup_mappings ( mappings , lookup_resources , settings ) [source]

Function to build up the Mappings for ElastiCache

Parameters :
Returns :

ecs_composex.elasticache.elasticache_ecs. elasticache_to_ecs ( resources , services_stack , res_root_stack , settings ) [source]

Entrypoint function to map new and lookup resources to ECS Services

Parameters :

Function to go over each service defined in the DB and assign found DB settings to service

Parameters :
Returns :

ecs_composex.elasticache.elasticache_module module

ecs_composex.elasticache.elasticache_params module

Parameters for ES Cluster

ecs_composex.elasticache.elasticache_stack module

Module to handle the AWS ES Stack and resources creation

class ecs_composex.elasticache.elasticache_stack. CacheCluster ( name , definition , module , settings ) [source]

Bases: NetworkXResource

Class to represent an AWS Elastic CacheCluster

add_memcahed_config ( template ) [source]
add_redis_config ( template ) [source]
add_redis_replica_config ( template ) [source]
init_memcached_outputs ( ) [source]

Method to init the DocDB output attributes

init_redis_outputs ( ) [source]
init_redis_replica_outputs ( ) [source]
subnets_param = <ecs_composex.common.cfn_params.Parameter object>
class ecs_composex.elasticache.elasticache_stack. XStack ( title , settings , module , ** kwargs ) [source]

Bases: ComposeXStack

Method to manage the elastic cache resources and root stack

ecs_composex.elasticache.elasticache_template module

Module to create the ElasticCache Cluster and nodes

ecs_composex.elasticache.elasticache_template. create_cluster_from_parameters ( cluster , template ) [source]

Function to create the Cluster from the MacroParameters

Parameters :
Returns :

ecs_composex.elasticache.elasticache_template. create_cluster_from_properties ( cluster , template ) [source]

Function to create the Elastic Cache Cluster from properties

Parameters :
Returns :

ecs_composex.elasticache.elasticache_template. create_parameter_group ( cluster , definition ) [source]

Function to add the parameter group

Parameters :
Returns :

The parameter group

Return type :

troposphere.elasticache.ParameterGroup

ecs_composex.elasticache.elasticache_template. create_replication_group ( cluster ) [source]

Function to add the replication group from properties

Parameters :

cluster ( ecs_composex.elasticache.elasticache_stack.CacheCluster ) –

Returns :

ecs_composex.elasticache.elasticache_template. create_root_template ( new_resources ) [source]

Function to create the root template and add the new resources to it.

Parameters :

new_resources ( list<ecs_composex.elasticache.elasticache_stack.CacheCluster> ) –

Returns :

the root template for ElasticCache

Return type :

troposphere.Template

ecs_composex.elasticache.elasticache_template. determine_resource_type ( name , properties ) [source]

Function to determine if the properties are the ones of a DB Cluster or DB Instance. By default it will assume Cluster if cannot conclude that it is a DB Instance

Parameters :
  • name ( str ) –

  • properties ( dict ) –

Returns :

ecs_composex.elasticache.elasticache_template. handle_security_groups ( cluster , props , resource_class ) [source]

Function to handle security groups properties and assignment.

Parameters :
Raises :

TypeError

ecs_composex.elasticache.elasticache_template. init_root_template ( ) [source]

Module contents