Class LoadBalancerProps.Builder
java.lang.Object
software.amazon.awscdk.services.elasticloadbalancing.LoadBalancerProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<LoadBalancerProps>
- Enclosing interface:
LoadBalancerProps
@Stability(Stable)
public static final class LoadBalancerProps.Builder
extends Object
implements software.amazon.jsii.Builder<LoadBalancerProps>
A builder for
LoadBalancerProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaccessLoggingPolicy
(CfnLoadBalancer.AccessLoggingPolicyProperty accessLoggingPolicy) Sets the value ofLoadBalancerProps.getAccessLoggingPolicy()
build()
Builds the configured instance.Sets the value ofLoadBalancerProps.getCrossZone()
healthCheck
(HealthCheck healthCheck) Sets the value ofLoadBalancerProps.getHealthCheck()
internetFacing
(Boolean internetFacing) Sets the value ofLoadBalancerProps.getInternetFacing()
listeners
(List<? extends LoadBalancerListener> listeners) Sets the value ofLoadBalancerProps.getListeners()
subnetSelection
(SubnetSelection subnetSelection) Sets the value ofLoadBalancerProps.getSubnetSelection()
targets
(List<? extends ILoadBalancerTarget> targets) Sets the value ofLoadBalancerProps.getTargets()
Sets the value ofLoadBalancerProps.getVpc()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
vpc
Sets the value ofLoadBalancerProps.getVpc()
- Parameters:
vpc
- VPC network of the fleet instances. This parameter is required.- Returns:
this
-
accessLoggingPolicy
@Stability(Stable) public LoadBalancerProps.Builder accessLoggingPolicy(CfnLoadBalancer.AccessLoggingPolicyProperty accessLoggingPolicy) Sets the value ofLoadBalancerProps.getAccessLoggingPolicy()
- Parameters:
accessLoggingPolicy
- Enable Loadbalancer access logs Can be used to avoid manual work as aws console Required S3 bucket name , enabled flag Can add interval for pushing log Can set bucket prefix in order to provide folder name inside bucket.- Returns:
this
-
crossZone
Sets the value ofLoadBalancerProps.getCrossZone()
- Parameters:
crossZone
- Whether cross zone load balancing is enabled. This controls whether the load balancer evenly distributes requests across each availability zone- Returns:
this
-
healthCheck
Sets the value ofLoadBalancerProps.getHealthCheck()
- Parameters:
healthCheck
- Health check settings for the load balancing targets. Not required but recommended.- Returns:
this
-
internetFacing
Sets the value ofLoadBalancerProps.getInternetFacing()
- Parameters:
internetFacing
- Whether this is an internet-facing Load Balancer. This controls whether the LB has a public IP address assigned. It does not open up the Load Balancer's security groups to public internet access.- Returns:
this
-
listeners
@Stability(Stable) public LoadBalancerProps.Builder listeners(List<? extends LoadBalancerListener> listeners) Sets the value ofLoadBalancerProps.getListeners()
- Parameters:
listeners
- What listeners to set up for the load balancer. Can also be added by .addListener()- Returns:
this
-
subnetSelection
@Stability(Stable) public LoadBalancerProps.Builder subnetSelection(SubnetSelection subnetSelection) Sets the value ofLoadBalancerProps.getSubnetSelection()
- Parameters:
subnetSelection
- Which subnets to deploy the load balancer. Can be used to define a specific set of subnets to deploy the load balancer to. Useful multiple public or private subnets are covering the same availability zone.- Returns:
this
-
targets
@Stability(Stable) public LoadBalancerProps.Builder targets(List<? extends ILoadBalancerTarget> targets) Sets the value ofLoadBalancerProps.getTargets()
- Parameters:
targets
- What targets to load balance to. Can also be added by .addTarget()- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<LoadBalancerProps>
- Returns:
- a new instance of
LoadBalancerProps
- Throws:
NullPointerException
- if any required attribute was not provided
-