Interface CfnLoadBalancer.ListenersProperty

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CfnLoadBalancer.ListenersProperty.Jsii$Proxy
Enclosing class:
CfnLoadBalancer

@Stability(Stable) public static interface CfnLoadBalancer.ListenersProperty extends software.amazon.jsii.JsiiSerializable
Specifies a listener for your Classic Load Balancer.

Modifying any property replaces the listener.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.elasticloadbalancing.*;
 ListenersProperty listenersProperty = ListenersProperty.builder()
         .instancePort("instancePort")
         .loadBalancerPort("loadBalancerPort")
         .protocol("protocol")
         // the properties below are optional
         .instanceProtocol("instanceProtocol")
         .policyNames(List.of("policyNames"))
         .sslCertificateId("sslCertificateId")
         .build();
 
  • Method Details

    • getInstancePort

      @Stability(Stable) @NotNull String getInstancePort()
      The port on which the instance is listening.
    • getLoadBalancerPort

      @Stability(Stable) @NotNull String getLoadBalancerPort()
      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.

    • getProtocol

      @Stability(Stable) @NotNull String getProtocol()
      The load balancer transport protocol to use for routing: HTTP, HTTPS, TCP, or SSL.
    • getInstanceProtocol

      @Stability(Stable) @Nullable default String getInstanceProtocol()
      The protocol to use for routing traffic to instances: HTTP, HTTPS, TCP, or SSL.

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

      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.

    • getPolicyNames

      @Stability(Stable) @Nullable default List<String> getPolicyNames()
      The names of the policies to associate with the listener.
    • getSslCertificateId

      @Stability(Stable) @Nullable default String getSslCertificateId()
      The Amazon Resource Name (ARN) of the server certificate.
    • builder

      @Stability(Stable) static CfnLoadBalancer.ListenersProperty.Builder builder()
      Returns:
      a CfnLoadBalancer.ListenersProperty.Builder of CfnLoadBalancer.ListenersProperty