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: {@link #classic}, {@link #application} and {@link #network}.

ExampleMetadata:

infused

Example:

import aws_cdk.aws_elasticloadbalancing as elb

# lb: elb.LoadBalancer

lb.add_listener(
    external_port=80
)

deployment_group = codedeploy.ServerDeploymentGroup(self, "DeploymentGroup",
    load_balancer=codedeploy.LoadBalancer.classic(lb)
)

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