Fugue.AWS.ELB.LoadBalancer

This is the preferred interface for making Elastic Load Balancer resources with Fugue. The LoadBalancer, Listener, and HealthCheck modules comprise the bulk of the interface.

If you want to manage an ELB with Fugue, the new function is the right place to start.

Module Members

external

(Function)

Create a reference to an externally managed LoadBalancer.

Example usage:

elb: ELB.LoadBalancer.external("my-lb", AWS.Us-east-1)

Type Signature

 fun (String, Region) -> LoadBalancer
Argument: name

The name of the target LoadBalancer.

Type: String

Argument: region

The Region containing the target LoadBalancer.

Type: Region

Returns:

A reference to the specified LoadBalancer.

Type: LoadBalancer

new

(Function)

new Elastic Load Balancer (Constructor)

Call this constructor to create a new Fugue.Core.AWS.ELB.LoadBalancer value.

Example usage:

ELB.LoadBalancer.new {
  loadBalancerName: "mvc-complex-elb",
  subnets: [
    public-10-0-1-0,
    public-10-0-2-0
  ],
  healthCheck: ELB.HealthCheck.tcp {
    port: 3000,
    interval: 15,
    timeout: 3,
    unhealthyThreshold: 3,
    healthyThreshold: 3
  },
  securityGroups: [example-elb-sg],
  scheme: ELB.Internal,
  listeners: [example-listener],
  tags: [example-app-tag]
}

Arguments:

Type Signature

 fun { loadBalancerName: String,
       subnets: List<Subnet>,
       instances: Optional<List<Instance>>,
       healthCheck: HealthCheck,
       securityGroups: List<SecurityGroup>,
       scheme: Optional<LoadBalancerScheme>,
       listeners: List<Listener>,
       tags: Optional<List<Tag>>,
       crossZone: Optional<Bool>,
       connectionDraining: Optional<Int>,
       idleTimeout: Optional<Int>,
       accessLog: Optional<AccessLog> } -> LoadBalancer
Argument: loadBalancerName

The name to be applied to the load balancer. If not provided, the name of the binding is used.

Type: String

Argument: subnets

The subnets in which the ELB should forward traffic. Mutable.

Type: List<Subnet>

Argument: instances

Instances to add to the ELB’s server pool. An ELB must have at least one instance in its pool, and that instance must be “healthy” in order to receive traffic. An ELB associated with an Autoscaling Group does not require any values in this field. Mutable.

Note: Fugue allows EC2 instances that are created outside of Fugue to be associated with a Fugue-managed ELB. Use an https://docs.fugue.co/Fugue.AWS.EC2.Instance.html#function-fugue-aws-ec2-instance-external to accomplish this.

Type: Optional<List<Instance>>

Argument: healthCheck

A health check configuration for the ELB. This check is how the ELB determines whether an instance is healthy or unhealthy, and only healthy instances receive forwarded traffic. A health check is required to create a LoadBalancer. Mutable.

Type: HealthCheck

Argument: securityGroups

A list of security groups to apply to the ELB itself. Mutable.

Type: List<SecurityGroup>

Argument: scheme

A load balancing scheme that the ELB should use.

Type: Optional<LoadBalancerScheme>

Argument: listeners

A list of listeners to host on the ELB. A listener accepts connections on a port on the load balancer and forwards it to a port on healthy instances in the ELB’s pool. Mutable.

Type: List<Listener>

Argument: tags

Key-value pair tags to assign to the instance. Mutable.

Type: Optional<List<Tag>>

Argument: crossZone

Enable cross-availability-zone load balancing. Mutable.

Type: Optional<Bool>

Argument: connectionDraining

Enable connection draining and set the connection draining timeout to the specified value. If not specified, do not enable connection draining. Mutable.

Type: Optional<Int>

Argument: idleTimeout

Configure the idle timeout for load balancer connections to the specified value. If not specified, the default is 60 seconds. Mutable.

Type: Optional<Int>

Argument: accessLog

Enable and configure load balancer access logging with the specified ELB.AccessLog configuration values. If not specified, do not enable access logs. Mutable.

Type: Optional<AccessLog>

Returns:

A Fugue.Core.AWS.ELB.LoadBalancer value.

Type: LoadBalancer

LoadBalancerSpec

(Type)

type LoadBalancerSpec:
  loadBalancerName: String
  subnets: List<Subnet>
  instances: Optional<List<Instance>>
  healthCheck: HealthCheck
  securityGroups: List<SecurityGroup>
  scheme: Optional<LoadBalancerScheme>
  listeners: List<Listener>
  tags: Optional<List<Tag>>

DEPRECATED

See Fugue.AWS.ELB.LoadBalancer.new for documentation on the current constructor.

ELB Load Balancer Specification (Resource)

This type of value specifies an ELB for the ELB. new() constructor.

Record {

Field: loadBalancerName

The name to be applied to the load balancer. If not provided, the name of the binding is used.

Type: String

Field: subnets

The subnets in which the ELB should forward traffic.

Type: List<Subnet>

Field: instances

Instances to add to the ELB’s server pool. An ELB must have at least one instance in its pool, and that instance must be “healthy” in order to receive traffic. An ELB associated with an Autoscaling Group does not require any values in this field.

Type: Optional<List<Instance>>

Field: healthCheck

A health check configuration for the ELB. This check is how the ELB determines whether an instance is healthy or unhealthy, and only healthy instances receive forwarded traffic.

Type: HealthCheck

Field: securityGroups

A list of security groups to apply to the ELB itself.

Type: List<SecurityGroup>

Field: scheme

A load balancing scheme that the ELB should use.

Type: Optional<LoadBalancerScheme>

Field: listeners

A list of listeners to host on the ELB. A listener accepts connections on a port on the load balancer and forwards it to a port on healthy instances in the ELB’s pool.

Type: List<Listener>

Field: tags

Key-value pair tags to assign to the instance.

Type: Optional<List<Tag>>

}

default

(Value)

default:
  instances: None
  scheme: Optional(InternetFacing)
  tags: None

DEPRECATED ELB.LoadBalancer.default is no longer supported. It will be removed in a future release.

ELB Load Balancer Specification (Default Values)