Class CfnListener.Builder

java.lang.Object
software.amazon.awscdk.services.elasticloadbalancingv2.CfnListener.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnListener>
Enclosing class:
CfnListener

@Stability(Stable) public static final class CfnListener.Builder extends Object implements software.amazon.jsii.Builder<CfnListener>
A fluent builder for CfnListener.
  • Method Details

    • create

      @Stability(Stable) public static CfnListener.Builder create(Construct scope, String id)
      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      Returns:
      a new instance of CfnListener.Builder.
    • defaultActions

      @Stability(Stable) public CfnListener.Builder defaultActions(IResolvable defaultActions)
      The actions for the default rule. You cannot define a condition for a default rule.

      To create additional rules for an Application Load Balancer, use AWS::ElasticLoadBalancingV2::ListenerRule .

      Parameters:
      defaultActions - The actions for the default rule. You cannot define a condition for a default rule. This parameter is required.
      Returns:
      this
    • defaultActions

      @Stability(Stable) public CfnListener.Builder defaultActions(List<? extends Object> defaultActions)
      The actions for the default rule. You cannot define a condition for a default rule.

      To create additional rules for an Application Load Balancer, use AWS::ElasticLoadBalancingV2::ListenerRule .

      Parameters:
      defaultActions - The actions for the default rule. You cannot define a condition for a default rule. This parameter is required.
      Returns:
      this
    • loadBalancerArn

      @Stability(Stable) public CfnListener.Builder loadBalancerArn(String loadBalancerArn)
      The Amazon Resource Name (ARN) of the load balancer.

      Parameters:
      loadBalancerArn - The Amazon Resource Name (ARN) of the load balancer. This parameter is required.
      Returns:
      this
    • alpnPolicy

      @Stability(Stable) public CfnListener.Builder alpnPolicy(List<String> alpnPolicy)
      [TLS listener] The name of the Application-Layer Protocol Negotiation (ALPN) policy.

      Parameters:
      alpnPolicy - [TLS listener] The name of the Application-Layer Protocol Negotiation (ALPN) policy. This parameter is required.
      Returns:
      this
    • certificates

      @Stability(Stable) public CfnListener.Builder certificates(IResolvable certificates)
      The default SSL server certificate for a secure listener.

      You must provide exactly one certificate if the listener protocol is HTTPS or TLS.

      To create a certificate list for a secure listener, use AWS::ElasticLoadBalancingV2::ListenerCertificate .

      Parameters:
      certificates - The default SSL server certificate for a secure listener. This parameter is required.
      Returns:
      this
    • certificates

      @Stability(Stable) public CfnListener.Builder certificates(List<? extends Object> certificates)
      The default SSL server certificate for a secure listener.

      You must provide exactly one certificate if the listener protocol is HTTPS or TLS.

      To create a certificate list for a secure listener, use AWS::ElasticLoadBalancingV2::ListenerCertificate .

      Parameters:
      certificates - The default SSL server certificate for a secure listener. This parameter is required.
      Returns:
      this
    • port

      @Stability(Stable) public CfnListener.Builder port(Number port)
      The port on which the load balancer is listening.

      You cannot specify a port for a Gateway Load Balancer.

      Parameters:
      port - The port on which the load balancer is listening. This parameter is required.
      Returns:
      this
    • protocol

      @Stability(Stable) public CfnListener.Builder protocol(String protocol)
      The protocol for connections from clients to the load balancer.

      For Application Load Balancers, the supported protocols are HTTP and HTTPS. For Network Load Balancers, the supported protocols are TCP, TLS, UDP, and TCP_UDP. You can’t specify the UDP or TCP_UDP protocol if dual-stack mode is enabled. You cannot specify a protocol for a Gateway Load Balancer.

      Parameters:
      protocol - The protocol for connections from clients to the load balancer. This parameter is required.
      Returns:
      this
    • sslPolicy

      @Stability(Stable) public CfnListener.Builder sslPolicy(String sslPolicy)
      [HTTPS and TLS listeners] The security policy that defines which protocols and ciphers are supported.

      For more information, see Security policies in the Application Load Balancers Guide and Security policies in the Network Load Balancers Guide .

      Parameters:
      sslPolicy - [HTTPS and TLS listeners] The security policy that defines which protocols and ciphers are supported. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public CfnListener build()
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnListener>
      Returns:
      a newly built instance of CfnListener.