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 :
-
-
resource ( ecs_composex.elasticache.elasticache_stack.CacheCluster ) –
-
cluster_arn ( str ) –
-
session ( boto3.session.Session ) –
-
- 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 :
-
-
mappings (
dict
) – -
lookup_resources (
list
[ecs_composex.elasticache.elasticache_stack.CacheCluster
]) – -
settings (
ecs_composex.common.settings.ComposeXSettings
) –
-
- 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 :
-
-
resources ( dict ) –
-
services_stack ( ecs_composex.common.stacks.ComposeXStack ) –
-
res_root_stack ( ecs_composex.common.stacks.ComposeXStack ) –
-
settings ( ecs_composex.common.settings.ComposeXSettings ) –
-
- ecs_composex.elasticache.elasticache_ecs. link_cluster_to_service ( cluster , cluster_mappings , mapping_name ) [source] ¶
-
Function to go over each service defined in the DB and assign found DB settings to service
- Parameters :
-
-
cluster ( ecs_composex.elasticache.elasticache_stack.CacheCluster ) –
-
cluster_mappings ( dict ) –
-
mapping_name ( str ) –
-
- 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
- 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 :
-
-
cluster ( ecs_composex.elasticache.elasticache_stack.CacheCluster ) –
-
template –
-
- Returns :
-
- ecs_composex.elasticache.elasticache_template. create_cluster_from_properties ( cluster , template ) [source] ¶
-
Function to create the Elastic Cache Cluster from properties
- Parameters :
-
-
cluster ( ecs_composex.elasticache.elasticache_stack.CacheCluster ) –
-
template ( troposphere.Template ) –
-
- Returns :
-
- ecs_composex.elasticache.elasticache_template. create_parameter_group ( cluster , definition ) [source] ¶
-
Function to add the parameter group
- Parameters :
-
-
cluster ( ecs_composex.elasticache.elasticache_stack.CacheCluster ) –
-
definition ( dict ) –
-
- 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 :
-
-
cluster ( ecs_composex.elasticache.elasticache_stack.CacheCluster ) –
-
props ( dict ) –
-
resource_class –
-
- Raises :
-
TypeError