ecs_composex.elbv2 package

Subpackages

Submodules

ecs_composex.elbv2.elbv2_ecs module

class ecs_composex.elbv2.elbv2_ecs. ComposeTargetGroup ( title , elbv2 , family , service , stack , port , ** kwargs ) [source]

Bases: TargetGroup

Class to manage Target Groups

generate_outputs ( ) [source]
init_outputs ( ) [source]
set_new_resource_outputs ( output_definition ) [source]

Method to define the outputs for the resource when new

class ecs_composex.elbv2.elbv2_ecs. MergedTargetGroup ( name , definition , elbv2 , stack , port , ** kwargs ) [source]

Bases: TargetGroup

Class for TargetGroup merged among more than one service

associate_families ( settings ) [source]
property definition : dict
generate_outputs ( ) [source]
init_outputs ( ) [source]
set_new_resource_outputs ( output_definition ) [source]

Method to define the outputs for the resource when new

ecs_composex.elbv2.elbv2_ecs. define_service_target_group ( resource , family , service , resources_root_stack , target_definition ) [source]

Function to create the elbv2 target group

Return type :

ecs_composex.elbv2.elbv2_ecs.ComposeTargetGroup

ecs_composex.elbv2.elbv2_ecs. define_service_target_group_definition ( resource , family , service , target_def , resources_root_stack ) [source]

Function to create the new service TGT Group for a given combination of family, service and port.

Return type :

ecs_composex.elbv2.elbv2_ecs.ComposeTargetGroup

ecs_composex.elbv2.elbv2_ecs. elbv2_to_ecs ( resources , services_stack , res_root_stack , settings ) [source]

Entrypoint function to map services, targets, listeners and ACM together

Parameters :
Returns :

ecs_composex.elbv2.elbv2_ecs. handle_path_settings ( props , path_raw ) [source]

Function to set the path and codes properties

Parameters :
  • props ( dict ) –

  • path_raw ( str ) –

Returns :

ecs_composex.elbv2.elbv2_ecs. handle_ping_settings ( props , ping_raw ) [source]

Function to setup the “ping” settings

Parameters :
  • props ( dict ) –

  • ping_raw ( str ) –

Returns :

ecs_composex.elbv2.elbv2_ecs. handle_services_association ( load_balancer , res_root_stack , settings ) [source]

Function to handle association of listeners and targets to the LB

Return type :

None

ecs_composex.elbv2.elbv2_ecs. handle_sg_lb_ingress_to_service ( resource , family , resources_stack ) [source]

Function to add ingress from the LB to Target if using ALB :type resource: :param resource: :param ecs_composex.ecs.ecs_family.ComposeFamily family: :type resources_stack: :param resources_stack: :return:

ecs_composex.elbv2.elbv2_ecs. handle_target_groups_association ( load_balancer , res_root_stack , settings ) [source]

Function to create TargetGroups based on the TargetGroups defined on the ELB rather than the services. This allows to associate more than one ECS service to a single TargetGroup.

Return type :

None

ecs_composex.elbv2.elbv2_ecs. import_target_group_attributes ( props , target_def , elbv2 ) [source]
ecs_composex.elbv2.elbv2_ecs. set_healthcheck_definition ( props , target_definition , healtheck_keyword = 'healthcheck' ) [source]
Parameters :
  • props ( dict ) –

  • target_definition ( dict ) –

Returns :

ecs_composex.elbv2.elbv2_ecs. validate_props_and_service_definition ( props , service ) [source]

Function to validate that the defined settings are valid according to the service definition. :type props: :param props: :param ecs_composex.common.compose_services.ComposeService service: :return:

ecs_composex.elbv2.elbv2_ecs. validate_target_group_attributes ( target_attributes , validation , lb_type ) [source]

Function to ensure that each attribute set is compatible with elbv2.type == application

Parameters :
  • target_attributes ( list [ TargetGroupAttribute ] ) –

  • validation ( dict ) –

  • lb_type ( str ) –

Raises :

ValueError

ecs_composex.elbv2.elbv2_module module

ecs_composex.elbv2.elbv2_params module

Module contents