Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.aws.alb.LoadBalancerArgs Maven / Gradle / Ivy
Go to download
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.aws.alb;
import com.pulumi.aws.alb.inputs.LoadBalancerAccessLogsArgs;
import com.pulumi.aws.alb.inputs.LoadBalancerConnectionLogsArgs;
import com.pulumi.aws.alb.inputs.LoadBalancerSubnetMappingArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
public final class LoadBalancerArgs extends com.pulumi.resources.ResourceArgs {
public static final LoadBalancerArgs Empty = new LoadBalancerArgs();
/**
* Access Logs block. See below.
*
*/
@Import(name="accessLogs")
private @Nullable Output accessLogs;
/**
* @return Access Logs block. See below.
*
*/
public Optional> accessLogs() {
return Optional.ofNullable(this.accessLogs);
}
/**
* Client keep alive value in seconds. The valid range is 60-604800 seconds. The default is 3600 seconds.
*
*/
@Import(name="clientKeepAlive")
private @Nullable Output clientKeepAlive;
/**
* @return Client keep alive value in seconds. The valid range is 60-604800 seconds. The default is 3600 seconds.
*
*/
public Optional> clientKeepAlive() {
return Optional.ofNullable(this.clientKeepAlive);
}
/**
* Connection Logs block. See below. Only valid for Load Balancers of type `application`.
*
*/
@Import(name="connectionLogs")
private @Nullable Output connectionLogs;
/**
* @return Connection Logs block. See below. Only valid for Load Balancers of type `application`.
*
*/
public Optional> connectionLogs() {
return Optional.ofNullable(this.connectionLogs);
}
/**
* ID of the customer owned ipv4 pool to use for this load balancer.
*
*/
@Import(name="customerOwnedIpv4Pool")
private @Nullable Output customerOwnedIpv4Pool;
/**
* @return ID of the customer owned ipv4 pool to use for this load balancer.
*
*/
public Optional> customerOwnedIpv4Pool() {
return Optional.ofNullable(this.customerOwnedIpv4Pool);
}
/**
* How the load balancer handles requests that might pose a security risk to an application due to HTTP desync. Valid values are `monitor`, `defensive` (default), `strictest`.
*
*/
@Import(name="desyncMitigationMode")
private @Nullable Output desyncMitigationMode;
/**
* @return How the load balancer handles requests that might pose a security risk to an application due to HTTP desync. Valid values are `monitor`, `defensive` (default), `strictest`.
*
*/
public Optional> desyncMitigationMode() {
return Optional.ofNullable(this.desyncMitigationMode);
}
/**
* How traffic is distributed among the load balancer Availability Zones. Possible values are `any_availability_zone` (default), `availability_zone_affinity`, or `partial_availability_zone_affinity`. See [Availability Zone DNS affinity](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#zonal-dns-affinity) for additional details. Only valid for `network` type load balancers.
*
*/
@Import(name="dnsRecordClientRoutingPolicy")
private @Nullable Output dnsRecordClientRoutingPolicy;
/**
* @return How traffic is distributed among the load balancer Availability Zones. Possible values are `any_availability_zone` (default), `availability_zone_affinity`, or `partial_availability_zone_affinity`. See [Availability Zone DNS affinity](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#zonal-dns-affinity) for additional details. Only valid for `network` type load balancers.
*
*/
public Optional> dnsRecordClientRoutingPolicy() {
return Optional.ofNullable(this.dnsRecordClientRoutingPolicy);
}
/**
* Whether HTTP headers with header fields that are not valid are removed by the load balancer (true) or routed to targets (false). The default is false. Elastic Load Balancing requires that message header names contain only alphanumeric characters and hyphens. Only valid for Load Balancers of type `application`.
*
*/
@Import(name="dropInvalidHeaderFields")
private @Nullable Output dropInvalidHeaderFields;
/**
* @return Whether HTTP headers with header fields that are not valid are removed by the load balancer (true) or routed to targets (false). The default is false. Elastic Load Balancing requires that message header names contain only alphanumeric characters and hyphens. Only valid for Load Balancers of type `application`.
*
*/
public Optional> dropInvalidHeaderFields() {
return Optional.ofNullable(this.dropInvalidHeaderFields);
}
/**
* If true, cross-zone load balancing of the load balancer will be enabled. For `network` and `gateway` type load balancers, this feature is disabled by default (`false`). For `application` load balancer this feature is always enabled (`true`) and cannot be disabled. Defaults to `false`.
*
*/
@Import(name="enableCrossZoneLoadBalancing")
private @Nullable Output enableCrossZoneLoadBalancing;
/**
* @return If true, cross-zone load balancing of the load balancer will be enabled. For `network` and `gateway` type load balancers, this feature is disabled by default (`false`). For `application` load balancer this feature is always enabled (`true`) and cannot be disabled. Defaults to `false`.
*
*/
public Optional> enableCrossZoneLoadBalancing() {
return Optional.ofNullable(this.enableCrossZoneLoadBalancing);
}
/**
* If true, deletion of the load balancer will be disabled via the AWS API. This will prevent this provider from deleting the load balancer. Defaults to `false`.
*
*/
@Import(name="enableDeletionProtection")
private @Nullable Output enableDeletionProtection;
/**
* @return If true, deletion of the load balancer will be disabled via the AWS API. This will prevent this provider from deleting the load balancer. Defaults to `false`.
*
*/
public Optional> enableDeletionProtection() {
return Optional.ofNullable(this.enableDeletionProtection);
}
/**
* Whether HTTP/2 is enabled in `application` load balancers. Defaults to `true`.
*
*/
@Import(name="enableHttp2")
private @Nullable Output enableHttp2;
/**
* @return Whether HTTP/2 is enabled in `application` load balancers. Defaults to `true`.
*
*/
public Optional> enableHttp2() {
return Optional.ofNullable(this.enableHttp2);
}
/**
* Whether the two headers (`x-amzn-tls-version` and `x-amzn-tls-cipher-suite`), which contain information about the negotiated TLS version and cipher suite, are added to the client request before sending it to the target. Only valid for Load Balancers of type `application`. Defaults to `false`
*
*/
@Import(name="enableTlsVersionAndCipherSuiteHeaders")
private @Nullable Output enableTlsVersionAndCipherSuiteHeaders;
/**
* @return Whether the two headers (`x-amzn-tls-version` and `x-amzn-tls-cipher-suite`), which contain information about the negotiated TLS version and cipher suite, are added to the client request before sending it to the target. Only valid for Load Balancers of type `application`. Defaults to `false`
*
*/
public Optional> enableTlsVersionAndCipherSuiteHeaders() {
return Optional.ofNullable(this.enableTlsVersionAndCipherSuiteHeaders);
}
/**
* Whether to allow a WAF-enabled load balancer to route requests to targets if it is unable to forward the request to AWS WAF. Defaults to `false`.
*
*/
@Import(name="enableWafFailOpen")
private @Nullable Output enableWafFailOpen;
/**
* @return Whether to allow a WAF-enabled load balancer to route requests to targets if it is unable to forward the request to AWS WAF. Defaults to `false`.
*
*/
public Optional> enableWafFailOpen() {
return Optional.ofNullable(this.enableWafFailOpen);
}
/**
* Whether the X-Forwarded-For header should preserve the source port that the client used to connect to the load balancer in `application` load balancers. Defaults to `false`.
*
*/
@Import(name="enableXffClientPort")
private @Nullable Output enableXffClientPort;
/**
* @return Whether the X-Forwarded-For header should preserve the source port that the client used to connect to the load balancer in `application` load balancers. Defaults to `false`.
*
*/
public Optional> enableXffClientPort() {
return Optional.ofNullable(this.enableXffClientPort);
}
/**
* Whether zonal shift is enabled. Defaults to `false`.
*
*/
@Import(name="enableZonalShift")
private @Nullable Output enableZonalShift;
/**
* @return Whether zonal shift is enabled. Defaults to `false`.
*
*/
public Optional> enableZonalShift() {
return Optional.ofNullable(this.enableZonalShift);
}
/**
* Whether inbound security group rules are enforced for traffic originating from a PrivateLink. Only valid for Load Balancers of type `network`. The possible values are `on` and `off`.
*
*/
@Import(name="enforceSecurityGroupInboundRulesOnPrivateLinkTraffic")
private @Nullable Output enforceSecurityGroupInboundRulesOnPrivateLinkTraffic;
/**
* @return Whether inbound security group rules are enforced for traffic originating from a PrivateLink. Only valid for Load Balancers of type `network`. The possible values are `on` and `off`.
*
*/
public Optional> enforceSecurityGroupInboundRulesOnPrivateLinkTraffic() {
return Optional.ofNullable(this.enforceSecurityGroupInboundRulesOnPrivateLinkTraffic);
}
/**
* Time in seconds that the connection is allowed to be idle. Only valid for Load Balancers of type `application`. Default: 60.
*
*/
@Import(name="idleTimeout")
private @Nullable Output idleTimeout;
/**
* @return Time in seconds that the connection is allowed to be idle. Only valid for Load Balancers of type `application`. Default: 60.
*
*/
public Optional> idleTimeout() {
return Optional.ofNullable(this.idleTimeout);
}
/**
* If true, the LB will be internal. Defaults to `false`.
*
*/
@Import(name="internal")
private @Nullable Output internal;
/**
* @return If true, the LB will be internal. Defaults to `false`.
*
*/
public Optional> internal() {
return Optional.ofNullable(this.internal);
}
/**
* Type of IP addresses used by the subnets for your load balancer. The possible values depend upon the load balancer type: `ipv4` (all load balancer types), `dualstack` (all load balancer types), and `dualstack-without-public-ipv4` (type `application` only).
*
*/
@Import(name="ipAddressType")
private @Nullable Output ipAddressType;
/**
* @return Type of IP addresses used by the subnets for your load balancer. The possible values depend upon the load balancer type: `ipv4` (all load balancer types), `dualstack` (all load balancer types), and `dualstack-without-public-ipv4` (type `application` only).
*
*/
public Optional> ipAddressType() {
return Optional.ofNullable(this.ipAddressType);
}
/**
* Type of load balancer to create. Possible values are `application`, `gateway`, or `network`. The default value is `application`.
*
*/
@Import(name="loadBalancerType")
private @Nullable Output loadBalancerType;
/**
* @return Type of load balancer to create. Possible values are `application`, `gateway`, or `network`. The default value is `application`.
*
*/
public Optional> loadBalancerType() {
return Optional.ofNullable(this.loadBalancerType);
}
/**
* Name of the LB. This name must be unique within your AWS account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen. If not specified, this provider will autogenerate a name beginning with `tf-lb`.
*
*/
@Import(name="name")
private @Nullable Output name;
/**
* @return Name of the LB. This name must be unique within your AWS account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen. If not specified, this provider will autogenerate a name beginning with `tf-lb`.
*
*/
public Optional> name() {
return Optional.ofNullable(this.name);
}
/**
* Creates a unique name beginning with the specified prefix. Conflicts with `name`.
*
*/
@Import(name="namePrefix")
private @Nullable Output namePrefix;
/**
* @return Creates a unique name beginning with the specified prefix. Conflicts with `name`.
*
*/
public Optional> namePrefix() {
return Optional.ofNullable(this.namePrefix);
}
/**
* Whether the Application Load Balancer should preserve the Host header in the HTTP request and send it to the target without any change. Defaults to `false`.
*
*/
@Import(name="preserveHostHeader")
private @Nullable Output preserveHostHeader;
/**
* @return Whether the Application Load Balancer should preserve the Host header in the HTTP request and send it to the target without any change. Defaults to `false`.
*
*/
public Optional> preserveHostHeader() {
return Optional.ofNullable(this.preserveHostHeader);
}
/**
* List of security group IDs to assign to the LB. Only valid for Load Balancers of type `application` or `network`. For load balancers of type `network` security groups cannot be added if none are currently present, and cannot all be removed once added. If either of these conditions are met, this will force a recreation of the resource.
*
*/
@Import(name="securityGroups")
private @Nullable Output> securityGroups;
/**
* @return List of security group IDs to assign to the LB. Only valid for Load Balancers of type `application` or `network`. For load balancers of type `network` security groups cannot be added if none are currently present, and cannot all be removed once added. If either of these conditions are met, this will force a recreation of the resource.
*
*/
public Optional>> securityGroups() {
return Optional.ofNullable(this.securityGroups);
}
/**
* Subnet mapping block. See below. For Load Balancers of type `network` subnet mappings can only be added.
*
*/
@Import(name="subnetMappings")
private @Nullable Output> subnetMappings;
/**
* @return Subnet mapping block. See below. For Load Balancers of type `network` subnet mappings can only be added.
*
*/
public Optional>> subnetMappings() {
return Optional.ofNullable(this.subnetMappings);
}
/**
* List of subnet IDs to attach to the LB. For Load Balancers of type `network` subnets can only be added (see [Availability Zones](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#availability-zones)), deleting a subnet for load balancers of type `network` will force a recreation of the resource.
*
*/
@Import(name="subnets")
private @Nullable Output> subnets;
/**
* @return List of subnet IDs to attach to the LB. For Load Balancers of type `network` subnets can only be added (see [Availability Zones](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#availability-zones)), deleting a subnet for load balancers of type `network` will force a recreation of the resource.
*
*/
public Optional>> subnets() {
return Optional.ofNullable(this.subnets);
}
/**
* Map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*
*/
@Import(name="tags")
private @Nullable Output> tags;
/**
* @return Map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*
*/
public Optional>> tags() {
return Optional.ofNullable(this.tags);
}
/**
* Determines how the load balancer modifies the `X-Forwarded-For` header in the HTTP request before sending the request to the target. The possible values are `append`, `preserve`, and `remove`. Only valid for Load Balancers of type `application`. The default is `append`.
*
*/
@Import(name="xffHeaderProcessingMode")
private @Nullable Output xffHeaderProcessingMode;
/**
* @return Determines how the load balancer modifies the `X-Forwarded-For` header in the HTTP request before sending the request to the target. The possible values are `append`, `preserve`, and `remove`. Only valid for Load Balancers of type `application`. The default is `append`.
*
*/
public Optional> xffHeaderProcessingMode() {
return Optional.ofNullable(this.xffHeaderProcessingMode);
}
private LoadBalancerArgs() {}
private LoadBalancerArgs(LoadBalancerArgs $) {
this.accessLogs = $.accessLogs;
this.clientKeepAlive = $.clientKeepAlive;
this.connectionLogs = $.connectionLogs;
this.customerOwnedIpv4Pool = $.customerOwnedIpv4Pool;
this.desyncMitigationMode = $.desyncMitigationMode;
this.dnsRecordClientRoutingPolicy = $.dnsRecordClientRoutingPolicy;
this.dropInvalidHeaderFields = $.dropInvalidHeaderFields;
this.enableCrossZoneLoadBalancing = $.enableCrossZoneLoadBalancing;
this.enableDeletionProtection = $.enableDeletionProtection;
this.enableHttp2 = $.enableHttp2;
this.enableTlsVersionAndCipherSuiteHeaders = $.enableTlsVersionAndCipherSuiteHeaders;
this.enableWafFailOpen = $.enableWafFailOpen;
this.enableXffClientPort = $.enableXffClientPort;
this.enableZonalShift = $.enableZonalShift;
this.enforceSecurityGroupInboundRulesOnPrivateLinkTraffic = $.enforceSecurityGroupInboundRulesOnPrivateLinkTraffic;
this.idleTimeout = $.idleTimeout;
this.internal = $.internal;
this.ipAddressType = $.ipAddressType;
this.loadBalancerType = $.loadBalancerType;
this.name = $.name;
this.namePrefix = $.namePrefix;
this.preserveHostHeader = $.preserveHostHeader;
this.securityGroups = $.securityGroups;
this.subnetMappings = $.subnetMappings;
this.subnets = $.subnets;
this.tags = $.tags;
this.xffHeaderProcessingMode = $.xffHeaderProcessingMode;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(LoadBalancerArgs defaults) {
return new Builder(defaults);
}
public static final class Builder {
private LoadBalancerArgs $;
public Builder() {
$ = new LoadBalancerArgs();
}
public Builder(LoadBalancerArgs defaults) {
$ = new LoadBalancerArgs(Objects.requireNonNull(defaults));
}
/**
* @param accessLogs Access Logs block. See below.
*
* @return builder
*
*/
public Builder accessLogs(@Nullable Output accessLogs) {
$.accessLogs = accessLogs;
return this;
}
/**
* @param accessLogs Access Logs block. See below.
*
* @return builder
*
*/
public Builder accessLogs(LoadBalancerAccessLogsArgs accessLogs) {
return accessLogs(Output.of(accessLogs));
}
/**
* @param clientKeepAlive Client keep alive value in seconds. The valid range is 60-604800 seconds. The default is 3600 seconds.
*
* @return builder
*
*/
public Builder clientKeepAlive(@Nullable Output clientKeepAlive) {
$.clientKeepAlive = clientKeepAlive;
return this;
}
/**
* @param clientKeepAlive Client keep alive value in seconds. The valid range is 60-604800 seconds. The default is 3600 seconds.
*
* @return builder
*
*/
public Builder clientKeepAlive(Integer clientKeepAlive) {
return clientKeepAlive(Output.of(clientKeepAlive));
}
/**
* @param connectionLogs Connection Logs block. See below. Only valid for Load Balancers of type `application`.
*
* @return builder
*
*/
public Builder connectionLogs(@Nullable Output connectionLogs) {
$.connectionLogs = connectionLogs;
return this;
}
/**
* @param connectionLogs Connection Logs block. See below. Only valid for Load Balancers of type `application`.
*
* @return builder
*
*/
public Builder connectionLogs(LoadBalancerConnectionLogsArgs connectionLogs) {
return connectionLogs(Output.of(connectionLogs));
}
/**
* @param customerOwnedIpv4Pool ID of the customer owned ipv4 pool to use for this load balancer.
*
* @return builder
*
*/
public Builder customerOwnedIpv4Pool(@Nullable Output customerOwnedIpv4Pool) {
$.customerOwnedIpv4Pool = customerOwnedIpv4Pool;
return this;
}
/**
* @param customerOwnedIpv4Pool ID of the customer owned ipv4 pool to use for this load balancer.
*
* @return builder
*
*/
public Builder customerOwnedIpv4Pool(String customerOwnedIpv4Pool) {
return customerOwnedIpv4Pool(Output.of(customerOwnedIpv4Pool));
}
/**
* @param desyncMitigationMode How the load balancer handles requests that might pose a security risk to an application due to HTTP desync. Valid values are `monitor`, `defensive` (default), `strictest`.
*
* @return builder
*
*/
public Builder desyncMitigationMode(@Nullable Output desyncMitigationMode) {
$.desyncMitigationMode = desyncMitigationMode;
return this;
}
/**
* @param desyncMitigationMode How the load balancer handles requests that might pose a security risk to an application due to HTTP desync. Valid values are `monitor`, `defensive` (default), `strictest`.
*
* @return builder
*
*/
public Builder desyncMitigationMode(String desyncMitigationMode) {
return desyncMitigationMode(Output.of(desyncMitigationMode));
}
/**
* @param dnsRecordClientRoutingPolicy How traffic is distributed among the load balancer Availability Zones. Possible values are `any_availability_zone` (default), `availability_zone_affinity`, or `partial_availability_zone_affinity`. See [Availability Zone DNS affinity](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#zonal-dns-affinity) for additional details. Only valid for `network` type load balancers.
*
* @return builder
*
*/
public Builder dnsRecordClientRoutingPolicy(@Nullable Output dnsRecordClientRoutingPolicy) {
$.dnsRecordClientRoutingPolicy = dnsRecordClientRoutingPolicy;
return this;
}
/**
* @param dnsRecordClientRoutingPolicy How traffic is distributed among the load balancer Availability Zones. Possible values are `any_availability_zone` (default), `availability_zone_affinity`, or `partial_availability_zone_affinity`. See [Availability Zone DNS affinity](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#zonal-dns-affinity) for additional details. Only valid for `network` type load balancers.
*
* @return builder
*
*/
public Builder dnsRecordClientRoutingPolicy(String dnsRecordClientRoutingPolicy) {
return dnsRecordClientRoutingPolicy(Output.of(dnsRecordClientRoutingPolicy));
}
/**
* @param dropInvalidHeaderFields Whether HTTP headers with header fields that are not valid are removed by the load balancer (true) or routed to targets (false). The default is false. Elastic Load Balancing requires that message header names contain only alphanumeric characters and hyphens. Only valid for Load Balancers of type `application`.
*
* @return builder
*
*/
public Builder dropInvalidHeaderFields(@Nullable Output dropInvalidHeaderFields) {
$.dropInvalidHeaderFields = dropInvalidHeaderFields;
return this;
}
/**
* @param dropInvalidHeaderFields Whether HTTP headers with header fields that are not valid are removed by the load balancer (true) or routed to targets (false). The default is false. Elastic Load Balancing requires that message header names contain only alphanumeric characters and hyphens. Only valid for Load Balancers of type `application`.
*
* @return builder
*
*/
public Builder dropInvalidHeaderFields(Boolean dropInvalidHeaderFields) {
return dropInvalidHeaderFields(Output.of(dropInvalidHeaderFields));
}
/**
* @param enableCrossZoneLoadBalancing If true, cross-zone load balancing of the load balancer will be enabled. For `network` and `gateway` type load balancers, this feature is disabled by default (`false`). For `application` load balancer this feature is always enabled (`true`) and cannot be disabled. Defaults to `false`.
*
* @return builder
*
*/
public Builder enableCrossZoneLoadBalancing(@Nullable Output enableCrossZoneLoadBalancing) {
$.enableCrossZoneLoadBalancing = enableCrossZoneLoadBalancing;
return this;
}
/**
* @param enableCrossZoneLoadBalancing If true, cross-zone load balancing of the load balancer will be enabled. For `network` and `gateway` type load balancers, this feature is disabled by default (`false`). For `application` load balancer this feature is always enabled (`true`) and cannot be disabled. Defaults to `false`.
*
* @return builder
*
*/
public Builder enableCrossZoneLoadBalancing(Boolean enableCrossZoneLoadBalancing) {
return enableCrossZoneLoadBalancing(Output.of(enableCrossZoneLoadBalancing));
}
/**
* @param enableDeletionProtection If true, deletion of the load balancer will be disabled via the AWS API. This will prevent this provider from deleting the load balancer. Defaults to `false`.
*
* @return builder
*
*/
public Builder enableDeletionProtection(@Nullable Output enableDeletionProtection) {
$.enableDeletionProtection = enableDeletionProtection;
return this;
}
/**
* @param enableDeletionProtection If true, deletion of the load balancer will be disabled via the AWS API. This will prevent this provider from deleting the load balancer. Defaults to `false`.
*
* @return builder
*
*/
public Builder enableDeletionProtection(Boolean enableDeletionProtection) {
return enableDeletionProtection(Output.of(enableDeletionProtection));
}
/**
* @param enableHttp2 Whether HTTP/2 is enabled in `application` load balancers. Defaults to `true`.
*
* @return builder
*
*/
public Builder enableHttp2(@Nullable Output enableHttp2) {
$.enableHttp2 = enableHttp2;
return this;
}
/**
* @param enableHttp2 Whether HTTP/2 is enabled in `application` load balancers. Defaults to `true`.
*
* @return builder
*
*/
public Builder enableHttp2(Boolean enableHttp2) {
return enableHttp2(Output.of(enableHttp2));
}
/**
* @param enableTlsVersionAndCipherSuiteHeaders Whether the two headers (`x-amzn-tls-version` and `x-amzn-tls-cipher-suite`), which contain information about the negotiated TLS version and cipher suite, are added to the client request before sending it to the target. Only valid for Load Balancers of type `application`. Defaults to `false`
*
* @return builder
*
*/
public Builder enableTlsVersionAndCipherSuiteHeaders(@Nullable Output enableTlsVersionAndCipherSuiteHeaders) {
$.enableTlsVersionAndCipherSuiteHeaders = enableTlsVersionAndCipherSuiteHeaders;
return this;
}
/**
* @param enableTlsVersionAndCipherSuiteHeaders Whether the two headers (`x-amzn-tls-version` and `x-amzn-tls-cipher-suite`), which contain information about the negotiated TLS version and cipher suite, are added to the client request before sending it to the target. Only valid for Load Balancers of type `application`. Defaults to `false`
*
* @return builder
*
*/
public Builder enableTlsVersionAndCipherSuiteHeaders(Boolean enableTlsVersionAndCipherSuiteHeaders) {
return enableTlsVersionAndCipherSuiteHeaders(Output.of(enableTlsVersionAndCipherSuiteHeaders));
}
/**
* @param enableWafFailOpen Whether to allow a WAF-enabled load balancer to route requests to targets if it is unable to forward the request to AWS WAF. Defaults to `false`.
*
* @return builder
*
*/
public Builder enableWafFailOpen(@Nullable Output enableWafFailOpen) {
$.enableWafFailOpen = enableWafFailOpen;
return this;
}
/**
* @param enableWafFailOpen Whether to allow a WAF-enabled load balancer to route requests to targets if it is unable to forward the request to AWS WAF. Defaults to `false`.
*
* @return builder
*
*/
public Builder enableWafFailOpen(Boolean enableWafFailOpen) {
return enableWafFailOpen(Output.of(enableWafFailOpen));
}
/**
* @param enableXffClientPort Whether the X-Forwarded-For header should preserve the source port that the client used to connect to the load balancer in `application` load balancers. Defaults to `false`.
*
* @return builder
*
*/
public Builder enableXffClientPort(@Nullable Output enableXffClientPort) {
$.enableXffClientPort = enableXffClientPort;
return this;
}
/**
* @param enableXffClientPort Whether the X-Forwarded-For header should preserve the source port that the client used to connect to the load balancer in `application` load balancers. Defaults to `false`.
*
* @return builder
*
*/
public Builder enableXffClientPort(Boolean enableXffClientPort) {
return enableXffClientPort(Output.of(enableXffClientPort));
}
/**
* @param enableZonalShift Whether zonal shift is enabled. Defaults to `false`.
*
* @return builder
*
*/
public Builder enableZonalShift(@Nullable Output enableZonalShift) {
$.enableZonalShift = enableZonalShift;
return this;
}
/**
* @param enableZonalShift Whether zonal shift is enabled. Defaults to `false`.
*
* @return builder
*
*/
public Builder enableZonalShift(Boolean enableZonalShift) {
return enableZonalShift(Output.of(enableZonalShift));
}
/**
* @param enforceSecurityGroupInboundRulesOnPrivateLinkTraffic Whether inbound security group rules are enforced for traffic originating from a PrivateLink. Only valid for Load Balancers of type `network`. The possible values are `on` and `off`.
*
* @return builder
*
*/
public Builder enforceSecurityGroupInboundRulesOnPrivateLinkTraffic(@Nullable Output enforceSecurityGroupInboundRulesOnPrivateLinkTraffic) {
$.enforceSecurityGroupInboundRulesOnPrivateLinkTraffic = enforceSecurityGroupInboundRulesOnPrivateLinkTraffic;
return this;
}
/**
* @param enforceSecurityGroupInboundRulesOnPrivateLinkTraffic Whether inbound security group rules are enforced for traffic originating from a PrivateLink. Only valid for Load Balancers of type `network`. The possible values are `on` and `off`.
*
* @return builder
*
*/
public Builder enforceSecurityGroupInboundRulesOnPrivateLinkTraffic(String enforceSecurityGroupInboundRulesOnPrivateLinkTraffic) {
return enforceSecurityGroupInboundRulesOnPrivateLinkTraffic(Output.of(enforceSecurityGroupInboundRulesOnPrivateLinkTraffic));
}
/**
* @param idleTimeout Time in seconds that the connection is allowed to be idle. Only valid for Load Balancers of type `application`. Default: 60.
*
* @return builder
*
*/
public Builder idleTimeout(@Nullable Output idleTimeout) {
$.idleTimeout = idleTimeout;
return this;
}
/**
* @param idleTimeout Time in seconds that the connection is allowed to be idle. Only valid for Load Balancers of type `application`. Default: 60.
*
* @return builder
*
*/
public Builder idleTimeout(Integer idleTimeout) {
return idleTimeout(Output.of(idleTimeout));
}
/**
* @param internal If true, the LB will be internal. Defaults to `false`.
*
* @return builder
*
*/
public Builder internal(@Nullable Output internal) {
$.internal = internal;
return this;
}
/**
* @param internal If true, the LB will be internal. Defaults to `false`.
*
* @return builder
*
*/
public Builder internal(Boolean internal) {
return internal(Output.of(internal));
}
/**
* @param ipAddressType Type of IP addresses used by the subnets for your load balancer. The possible values depend upon the load balancer type: `ipv4` (all load balancer types), `dualstack` (all load balancer types), and `dualstack-without-public-ipv4` (type `application` only).
*
* @return builder
*
*/
public Builder ipAddressType(@Nullable Output ipAddressType) {
$.ipAddressType = ipAddressType;
return this;
}
/**
* @param ipAddressType Type of IP addresses used by the subnets for your load balancer. The possible values depend upon the load balancer type: `ipv4` (all load balancer types), `dualstack` (all load balancer types), and `dualstack-without-public-ipv4` (type `application` only).
*
* @return builder
*
*/
public Builder ipAddressType(String ipAddressType) {
return ipAddressType(Output.of(ipAddressType));
}
/**
* @param loadBalancerType Type of load balancer to create. Possible values are `application`, `gateway`, or `network`. The default value is `application`.
*
* @return builder
*
*/
public Builder loadBalancerType(@Nullable Output loadBalancerType) {
$.loadBalancerType = loadBalancerType;
return this;
}
/**
* @param loadBalancerType Type of load balancer to create. Possible values are `application`, `gateway`, or `network`. The default value is `application`.
*
* @return builder
*
*/
public Builder loadBalancerType(String loadBalancerType) {
return loadBalancerType(Output.of(loadBalancerType));
}
/**
* @param name Name of the LB. This name must be unique within your AWS account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen. If not specified, this provider will autogenerate a name beginning with `tf-lb`.
*
* @return builder
*
*/
public Builder name(@Nullable Output name) {
$.name = name;
return this;
}
/**
* @param name Name of the LB. This name must be unique within your AWS account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen. If not specified, this provider will autogenerate a name beginning with `tf-lb`.
*
* @return builder
*
*/
public Builder name(String name) {
return name(Output.of(name));
}
/**
* @param namePrefix Creates a unique name beginning with the specified prefix. Conflicts with `name`.
*
* @return builder
*
*/
public Builder namePrefix(@Nullable Output namePrefix) {
$.namePrefix = namePrefix;
return this;
}
/**
* @param namePrefix Creates a unique name beginning with the specified prefix. Conflicts with `name`.
*
* @return builder
*
*/
public Builder namePrefix(String namePrefix) {
return namePrefix(Output.of(namePrefix));
}
/**
* @param preserveHostHeader Whether the Application Load Balancer should preserve the Host header in the HTTP request and send it to the target without any change. Defaults to `false`.
*
* @return builder
*
*/
public Builder preserveHostHeader(@Nullable Output preserveHostHeader) {
$.preserveHostHeader = preserveHostHeader;
return this;
}
/**
* @param preserveHostHeader Whether the Application Load Balancer should preserve the Host header in the HTTP request and send it to the target without any change. Defaults to `false`.
*
* @return builder
*
*/
public Builder preserveHostHeader(Boolean preserveHostHeader) {
return preserveHostHeader(Output.of(preserveHostHeader));
}
/**
* @param securityGroups List of security group IDs to assign to the LB. Only valid for Load Balancers of type `application` or `network`. For load balancers of type `network` security groups cannot be added if none are currently present, and cannot all be removed once added. If either of these conditions are met, this will force a recreation of the resource.
*
* @return builder
*
*/
public Builder securityGroups(@Nullable Output> securityGroups) {
$.securityGroups = securityGroups;
return this;
}
/**
* @param securityGroups List of security group IDs to assign to the LB. Only valid for Load Balancers of type `application` or `network`. For load balancers of type `network` security groups cannot be added if none are currently present, and cannot all be removed once added. If either of these conditions are met, this will force a recreation of the resource.
*
* @return builder
*
*/
public Builder securityGroups(List securityGroups) {
return securityGroups(Output.of(securityGroups));
}
/**
* @param securityGroups List of security group IDs to assign to the LB. Only valid for Load Balancers of type `application` or `network`. For load balancers of type `network` security groups cannot be added if none are currently present, and cannot all be removed once added. If either of these conditions are met, this will force a recreation of the resource.
*
* @return builder
*
*/
public Builder securityGroups(String... securityGroups) {
return securityGroups(List.of(securityGroups));
}
/**
* @param subnetMappings Subnet mapping block. See below. For Load Balancers of type `network` subnet mappings can only be added.
*
* @return builder
*
*/
public Builder subnetMappings(@Nullable Output> subnetMappings) {
$.subnetMappings = subnetMappings;
return this;
}
/**
* @param subnetMappings Subnet mapping block. See below. For Load Balancers of type `network` subnet mappings can only be added.
*
* @return builder
*
*/
public Builder subnetMappings(List subnetMappings) {
return subnetMappings(Output.of(subnetMappings));
}
/**
* @param subnetMappings Subnet mapping block. See below. For Load Balancers of type `network` subnet mappings can only be added.
*
* @return builder
*
*/
public Builder subnetMappings(LoadBalancerSubnetMappingArgs... subnetMappings) {
return subnetMappings(List.of(subnetMappings));
}
/**
* @param subnets List of subnet IDs to attach to the LB. For Load Balancers of type `network` subnets can only be added (see [Availability Zones](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#availability-zones)), deleting a subnet for load balancers of type `network` will force a recreation of the resource.
*
* @return builder
*
*/
public Builder subnets(@Nullable Output> subnets) {
$.subnets = subnets;
return this;
}
/**
* @param subnets List of subnet IDs to attach to the LB. For Load Balancers of type `network` subnets can only be added (see [Availability Zones](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#availability-zones)), deleting a subnet for load balancers of type `network` will force a recreation of the resource.
*
* @return builder
*
*/
public Builder subnets(List subnets) {
return subnets(Output.of(subnets));
}
/**
* @param subnets List of subnet IDs to attach to the LB. For Load Balancers of type `network` subnets can only be added (see [Availability Zones](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#availability-zones)), deleting a subnet for load balancers of type `network` will force a recreation of the resource.
*
* @return builder
*
*/
public Builder subnets(String... subnets) {
return subnets(List.of(subnets));
}
/**
* @param tags Map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*
* @return builder
*
*/
public Builder tags(@Nullable Output> tags) {
$.tags = tags;
return this;
}
/**
* @param tags Map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*
* @return builder
*
*/
public Builder tags(Map tags) {
return tags(Output.of(tags));
}
/**
* @param xffHeaderProcessingMode Determines how the load balancer modifies the `X-Forwarded-For` header in the HTTP request before sending the request to the target. The possible values are `append`, `preserve`, and `remove`. Only valid for Load Balancers of type `application`. The default is `append`.
*
* @return builder
*
*/
public Builder xffHeaderProcessingMode(@Nullable Output xffHeaderProcessingMode) {
$.xffHeaderProcessingMode = xffHeaderProcessingMode;
return this;
}
/**
* @param xffHeaderProcessingMode Determines how the load balancer modifies the `X-Forwarded-For` header in the HTTP request before sending the request to the target. The possible values are `append`, `preserve`, and `remove`. Only valid for Load Balancers of type `application`. The default is `append`.
*
* @return builder
*
*/
public Builder xffHeaderProcessingMode(String xffHeaderProcessingMode) {
return xffHeaderProcessingMode(Output.of(xffHeaderProcessingMode));
}
public LoadBalancerArgs build() {
return $;
}
}
}