paws.networking (version 0.1.6)

elb_create_load_balancer_listeners: Creates one or more listeners for the specified load balancer

Description

Creates one or more listeners for the specified load balancer. If a listener with the specified port does not already exist, it is created; otherwise, the properties of the new listener must match the properties of the existing listener.

Usage

elb_create_load_balancer_listeners(LoadBalancerName, Listeners)

Arguments

LoadBalancerName

[required] The name of the load balancer.

Listeners

[required] The listeners.

Request syntax

svc$create_load_balancer_listeners(
  LoadBalancerName = "string",
  Listeners = list(
    list(
      Protocol = "string",
      LoadBalancerPort = 123,
      InstanceProtocol = "string",
      InstancePort = 123,
      SSLCertificateId = "string"
    )
  )
)

Details

For more information, see Listeners for Your Classic Load Balancer in the Classic Load Balancers Guide.

Examples

Run this code
# NOT RUN {
# This example creates a listener for your load balancer at port 80 using
# the HTTP protocol.
# }
# NOT RUN {
svc$create_load_balancer_listeners(
  Listeners = list(
    list(
      InstancePort = 80L,
      InstanceProtocol = "HTTP",
      LoadBalancerPort = 80L,
      Protocol = "HTTP"
    )
  ),
  LoadBalancerName = "my-load-balancer"
)
# }
# NOT RUN {
# This example creates a listener for your load balancer at port 443 using
# the HTTPS protocol.
# }
# NOT RUN {
svc$create_load_balancer_listeners(
  Listeners = list(
    list(
      InstancePort = 80L,
      InstanceProtocol = "HTTP",
      LoadBalancerPort = 443L,
      Protocol = "HTTPS",
      SSLCertificateId = "arn:aws:iam::123456789012:server-certificate/my-server-cert"
    )
  ),
  LoadBalancerName = "my-load-balancer"
)
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace