LoadBalancer

class aws_cdk.aws_codedeploy.LoadBalancer

Bases: object

An interface of an abstract load balancer, as needed by CodeDeploy.

Create instances using the static factory methods: #classic, #application and #network.

ExampleMetadata:

infused

Example:

# alb: elbv2.ApplicationLoadBalancer

listener = alb.add_listener("Listener", port=80)
target_group = listener.add_targets("Fleet", port=80)

deployment_group = codedeploy.ServerDeploymentGroup(self, "DeploymentGroup",
    load_balancer=codedeploy.LoadBalancer.application(target_group)
)

Attributes

generation
name

Static Methods

classmethod application(alb_target_group)

Creates a new CodeDeploy load balancer from an Application Load Balancer Target Group.

Parameters:

alb_target_group (IApplicationTargetGroup) – an ALB Target Group.

Return type:

LoadBalancer

classmethod classic(load_balancer)

Creates a new CodeDeploy load balancer from a Classic ELB Load Balancer.

Parameters:

load_balancer (LoadBalancer) – a classic ELB Load Balancer.

Return type:

LoadBalancer

classmethod network(nlb_target_group)

Creates a new CodeDeploy load balancer from a Network Load Balancer Target Group.

Parameters:

nlb_target_group (INetworkTargetGroup) – an NLB Target Group.

Return type:

LoadBalancer