AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

Listener

import "github.com/aws/aws-sdk-go/service/elb"

type Listener struct { InstancePort *int64 `min:"1" type:"integer" required:"true"` InstanceProtocol *string `type:"string"` LoadBalancerPort *int64 `type:"integer" required:"true"` Protocol *string `type:"string" required:"true"` SSLCertificateId *string `type:"string"` }

Information about a listener.

For information about the protocols and the ports supported by Elastic Load Balancing, see Listeners for Your Classic Load Balancer (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-listener-config.html) in the Classic Load Balancers Guide.

InstancePort

Type: *int64

The port on which the instance is listening.

InstancePort is a required field

InstanceProtocol

Type: *string

The protocol to use for routing traffic to instances: HTTP, HTTPS, TCP, or SSL.

If the front-end protocol is HTTP, HTTPS, TCP, or SSL, InstanceProtocol must be at the same protocol.

If there is another listener with the same InstancePort whose InstanceProtocol is secure, (HTTPS or SSL), the listener's InstanceProtocol must also be secure.

If there is another listener with the same InstancePort whose InstanceProtocol is HTTP or TCP, the listener's InstanceProtocol must be HTTP or TCP.

LoadBalancerPort

Type: *int64

The port on which the load balancer is listening. On EC2-VPC, you can specify any port from the range 1-65535. On EC2-Classic, you can specify any port from the following list: 25, 80, 443, 465, 587, 1024-65535.

LoadBalancerPort is a required field

Protocol

Type: *string

The load balancer transport protocol to use for routing: HTTP, HTTPS, TCP, or SSL.

Protocol is a required field

SSLCertificateId

Type: *string

The Amazon Resource Name (ARN) of the server certificate.

Method

GoString

func (s Listener) GoString() string

GoString returns the string representation

SetInstancePort

func (s *Listener) SetInstancePort(v int64) *Listener

SetInstancePort sets the InstancePort field's value.

SetInstanceProtocol

func (s *Listener) SetInstanceProtocol(v string) *Listener

SetInstanceProtocol sets the InstanceProtocol field's value.

SetLoadBalancerPort

func (s *Listener) SetLoadBalancerPort(v int64) *Listener

SetLoadBalancerPort sets the LoadBalancerPort field's value.

SetProtocol

func (s *Listener) SetProtocol(v string) *Listener

SetProtocol sets the Protocol field's value.

SetSSLCertificateId

func (s *Listener) SetSSLCertificateId(v string) *Listener

SetSSLCertificateId sets the SSLCertificateId field's value.

String

func (s Listener) String() string

String returns the string representation

Validate

func (s *Listener) Validate() error

Validate inspects the fields of the type to determine if they are valid.

On this page: