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.lb.inputs.TargetGroupState 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.lb.inputs;
import com.pulumi.aws.lb.inputs.TargetGroupHealthCheckArgs;
import com.pulumi.aws.lb.inputs.TargetGroupStickinessArgs;
import com.pulumi.aws.lb.inputs.TargetGroupTargetFailoverArgs;
import com.pulumi.aws.lb.inputs.TargetGroupTargetGroupHealthArgs;
import com.pulumi.aws.lb.inputs.TargetGroupTargetHealthStateArgs;
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 TargetGroupState extends com.pulumi.resources.ResourceArgs {
public static final TargetGroupState Empty = new TargetGroupState();
/**
* ARN of the Target Group (matches `id`).
*
*/
@Import(name="arn")
private @Nullable Output arn;
/**
* @return ARN of the Target Group (matches `id`).
*
*/
public Optional> arn() {
return Optional.ofNullable(this.arn);
}
/**
* ARN suffix for use with CloudWatch Metrics.
*
*/
@Import(name="arnSuffix")
private @Nullable Output arnSuffix;
/**
* @return ARN suffix for use with CloudWatch Metrics.
*
*/
public Optional> arnSuffix() {
return Optional.ofNullable(this.arnSuffix);
}
/**
* Whether to terminate connections at the end of the deregistration timeout on Network Load Balancers. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#deregistration-delay) for more information. Default is `false`.
*
*/
@Import(name="connectionTermination")
private @Nullable Output connectionTermination;
/**
* @return Whether to terminate connections at the end of the deregistration timeout on Network Load Balancers. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#deregistration-delay) for more information. Default is `false`.
*
*/
public Optional> connectionTermination() {
return Optional.ofNullable(this.connectionTermination);
}
/**
* Amount time for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused. The range is 0-3600 seconds. The default value is 300 seconds.
*
*/
@Import(name="deregistrationDelay")
private @Nullable Output deregistrationDelay;
/**
* @return Amount time for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused. The range is 0-3600 seconds. The default value is 300 seconds.
*
*/
public Optional> deregistrationDelay() {
return Optional.ofNullable(this.deregistrationDelay);
}
/**
* Health Check configuration block. Detailed below.
*
*/
@Import(name="healthCheck")
private @Nullable Output healthCheck;
/**
* @return Health Check configuration block. Detailed below.
*
*/
public Optional> healthCheck() {
return Optional.ofNullable(this.healthCheck);
}
/**
* The type of IP addresses used by the target group, only supported when target type is set to `ip`. Possible values are `ipv4` or `ipv6`.
*
*/
@Import(name="ipAddressType")
private @Nullable Output ipAddressType;
/**
* @return The type of IP addresses used by the target group, only supported when target type is set to `ip`. Possible values are `ipv4` or `ipv6`.
*
*/
public Optional> ipAddressType() {
return Optional.ofNullable(this.ipAddressType);
}
/**
* Whether the request and response headers exchanged between the load balancer and the Lambda function include arrays of values or strings. Only applies when `target_type` is `lambda`. Default is `false`.
*
*/
@Import(name="lambdaMultiValueHeadersEnabled")
private @Nullable Output lambdaMultiValueHeadersEnabled;
/**
* @return Whether the request and response headers exchanged between the load balancer and the Lambda function include arrays of values or strings. Only applies when `target_type` is `lambda`. Default is `false`.
*
*/
public Optional> lambdaMultiValueHeadersEnabled() {
return Optional.ofNullable(this.lambdaMultiValueHeadersEnabled);
}
/**
* ARNs of the Load Balancers associated with the Target Group.
*
*/
@Import(name="loadBalancerArns")
private @Nullable Output> loadBalancerArns;
/**
* @return ARNs of the Load Balancers associated with the Target Group.
*
*/
public Optional>> loadBalancerArns() {
return Optional.ofNullable(this.loadBalancerArns);
}
/**
* Determines how the load balancer selects targets when routing requests. Only applicable for Application Load Balancer Target Groups. The value is `round_robin`, `least_outstanding_requests`, or `weighted_random`. The default is `round_robin`.
*
*/
@Import(name="loadBalancingAlgorithmType")
private @Nullable Output loadBalancingAlgorithmType;
/**
* @return Determines how the load balancer selects targets when routing requests. Only applicable for Application Load Balancer Target Groups. The value is `round_robin`, `least_outstanding_requests`, or `weighted_random`. The default is `round_robin`.
*
*/
public Optional> loadBalancingAlgorithmType() {
return Optional.ofNullable(this.loadBalancingAlgorithmType);
}
/**
* Determines whether to enable target anomaly mitigation. Target anomaly mitigation is only supported by the `weighted_random` load balancing algorithm type. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#automatic-target-weights) for more information. The value is `"on"` or `"off"`. The default is `"off"`.
*
*/
@Import(name="loadBalancingAnomalyMitigation")
private @Nullable Output loadBalancingAnomalyMitigation;
/**
* @return Determines whether to enable target anomaly mitigation. Target anomaly mitigation is only supported by the `weighted_random` load balancing algorithm type. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#automatic-target-weights) for more information. The value is `"on"` or `"off"`. The default is `"off"`.
*
*/
public Optional> loadBalancingAnomalyMitigation() {
return Optional.ofNullable(this.loadBalancingAnomalyMitigation);
}
/**
* Indicates whether cross zone load balancing is enabled. The value is `"true"`, `"false"` or `"use_load_balancer_configuration"`. The default is `"use_load_balancer_configuration"`.
*
*/
@Import(name="loadBalancingCrossZoneEnabled")
private @Nullable Output loadBalancingCrossZoneEnabled;
/**
* @return Indicates whether cross zone load balancing is enabled. The value is `"true"`, `"false"` or `"use_load_balancer_configuration"`. The default is `"use_load_balancer_configuration"`.
*
*/
public Optional> loadBalancingCrossZoneEnabled() {
return Optional.ofNullable(this.loadBalancingCrossZoneEnabled);
}
/**
* Name of the target group. If omitted, this provider will assign a random, unique name. This name must be unique per region per account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen.
*
*/
@Import(name="name")
private @Nullable Output name;
/**
* @return Name of the target group. If omitted, this provider will assign a random, unique name. This name must be unique per region per account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen.
*
*/
public Optional> name() {
return Optional.ofNullable(this.name);
}
/**
* Creates a unique name beginning with the specified prefix. Conflicts with `name`. Cannot be longer than 6 characters.
*
*/
@Import(name="namePrefix")
private @Nullable Output namePrefix;
/**
* @return Creates a unique name beginning with the specified prefix. Conflicts with `name`. Cannot be longer than 6 characters.
*
*/
public Optional> namePrefix() {
return Optional.ofNullable(this.namePrefix);
}
/**
* Port on which targets receive traffic, unless overridden when registering a specific target. Required when `target_type` is `instance`, `ip` or `alb`. Does not apply when `target_type` is `lambda`.
*
*/
@Import(name="port")
private @Nullable Output port;
/**
* @return Port on which targets receive traffic, unless overridden when registering a specific target. Required when `target_type` is `instance`, `ip` or `alb`. Does not apply when `target_type` is `lambda`.
*
*/
public Optional> port() {
return Optional.ofNullable(this.port);
}
/**
* Whether client IP preservation is enabled. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#client-ip-preservation) for more information.
*
*/
@Import(name="preserveClientIp")
private @Nullable Output preserveClientIp;
/**
* @return Whether client IP preservation is enabled. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#client-ip-preservation) for more information.
*
*/
public Optional> preserveClientIp() {
return Optional.ofNullable(this.preserveClientIp);
}
/**
* Protocol to use for routing traffic to the targets.
* Should be one of `GENEVE`, `HTTP`, `HTTPS`, `TCP`, `TCP_UDP`, `TLS`, or `UDP`.
* Required when `target_type` is `instance`, `ip`, or `alb`.
* Does not apply when `target_type` is `lambda`.
*
*/
@Import(name="protocol")
private @Nullable Output protocol;
/**
* @return Protocol to use for routing traffic to the targets.
* Should be one of `GENEVE`, `HTTP`, `HTTPS`, `TCP`, `TCP_UDP`, `TLS`, or `UDP`.
* Required when `target_type` is `instance`, `ip`, or `alb`.
* Does not apply when `target_type` is `lambda`.
*
*/
public Optional> protocol() {
return Optional.ofNullable(this.protocol);
}
/**
* Only applicable when `protocol` is `HTTP` or `HTTPS`. The protocol version. Specify `GRPC` to send requests to targets using gRPC. Specify `HTTP2` to send requests to targets using HTTP/2. The default is `HTTP1`, which sends requests to targets using HTTP/1.1
*
*/
@Import(name="protocolVersion")
private @Nullable Output protocolVersion;
/**
* @return Only applicable when `protocol` is `HTTP` or `HTTPS`. The protocol version. Specify `GRPC` to send requests to targets using gRPC. Specify `HTTP2` to send requests to targets using HTTP/2. The default is `HTTP1`, which sends requests to targets using HTTP/1.1
*
*/
public Optional> protocolVersion() {
return Optional.ofNullable(this.protocolVersion);
}
/**
* Whether to enable support for proxy protocol v2 on Network Load Balancers. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#proxy-protocol) for more information. Default is `false`.
*
*/
@Import(name="proxyProtocolV2")
private @Nullable Output proxyProtocolV2;
/**
* @return Whether to enable support for proxy protocol v2 on Network Load Balancers. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#proxy-protocol) for more information. Default is `false`.
*
*/
public Optional> proxyProtocolV2() {
return Optional.ofNullable(this.proxyProtocolV2);
}
/**
* Amount time for targets to warm up before the load balancer sends them a full share of requests. The range is 30-900 seconds or 0 to disable. The default value is 0 seconds.
*
*/
@Import(name="slowStart")
private @Nullable Output slowStart;
/**
* @return Amount time for targets to warm up before the load balancer sends them a full share of requests. The range is 30-900 seconds or 0 to disable. The default value is 0 seconds.
*
*/
public Optional> slowStart() {
return Optional.ofNullable(this.slowStart);
}
/**
* Stickiness configuration block. Detailed below.
*
*/
@Import(name="stickiness")
private @Nullable Output stickiness;
/**
* @return Stickiness configuration block. Detailed below.
*
*/
public Optional> stickiness() {
return Optional.ofNullable(this.stickiness);
}
/**
* 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);
}
/**
* A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
*
* @deprecated
* Please use `tags` instead.
*
*/
@Deprecated /* Please use `tags` instead. */
@Import(name="tagsAll")
private @Nullable Output> tagsAll;
/**
* @return A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
*
* @deprecated
* Please use `tags` instead.
*
*/
@Deprecated /* Please use `tags` instead. */
public Optional>> tagsAll() {
return Optional.ofNullable(this.tagsAll);
}
/**
* Target failover block. Only applicable for Gateway Load Balancer target groups. See target_failover for more information.
*
*/
@Import(name="targetFailovers")
private @Nullable Output> targetFailovers;
/**
* @return Target failover block. Only applicable for Gateway Load Balancer target groups. See target_failover for more information.
*
*/
public Optional>> targetFailovers() {
return Optional.ofNullable(this.targetFailovers);
}
/**
* Target health requirements block. See target_group_health for more information.
*
*/
@Import(name="targetGroupHealth")
private @Nullable Output targetGroupHealth;
/**
* @return Target health requirements block. See target_group_health for more information.
*
*/
public Optional> targetGroupHealth() {
return Optional.ofNullable(this.targetGroupHealth);
}
/**
* Target health state block. Only applicable for Network Load Balancer target groups when `protocol` is `TCP` or `TLS`. See target_health_state for more information.
*
*/
@Import(name="targetHealthStates")
private @Nullable Output> targetHealthStates;
/**
* @return Target health state block. Only applicable for Network Load Balancer target groups when `protocol` is `TCP` or `TLS`. See target_health_state for more information.
*
*/
public Optional>> targetHealthStates() {
return Optional.ofNullable(this.targetHealthStates);
}
/**
* Type of target that you must specify when registering targets with this target group.
* See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_CreateTargetGroup.html) for supported values.
* The default is `instance`.
*
* Note that you can't specify targets for a target group using both instance IDs and IP addresses.
*
* If the target type is `ip`, specify IP addresses from the subnets of the virtual private cloud (VPC) for the target group, the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and the RFC 6598 range (100.64.0.0/10). You can't specify publicly routable IP addresses.
*
* Network Load Balancers do not support the `lambda` target type.
*
* Application Load Balancers do not support the `alb` target type.
*
*/
@Import(name="targetType")
private @Nullable Output targetType;
/**
* @return Type of target that you must specify when registering targets with this target group.
* See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_CreateTargetGroup.html) for supported values.
* The default is `instance`.
*
* Note that you can't specify targets for a target group using both instance IDs and IP addresses.
*
* If the target type is `ip`, specify IP addresses from the subnets of the virtual private cloud (VPC) for the target group, the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and the RFC 6598 range (100.64.0.0/10). You can't specify publicly routable IP addresses.
*
* Network Load Balancers do not support the `lambda` target type.
*
* Application Load Balancers do not support the `alb` target type.
*
*/
public Optional> targetType() {
return Optional.ofNullable(this.targetType);
}
/**
* Identifier of the VPC in which to create the target group. Required when `target_type` is `instance`, `ip` or `alb`. Does not apply when `target_type` is `lambda`.
*
*/
@Import(name="vpcId")
private @Nullable Output vpcId;
/**
* @return Identifier of the VPC in which to create the target group. Required when `target_type` is `instance`, `ip` or `alb`. Does not apply when `target_type` is `lambda`.
*
*/
public Optional> vpcId() {
return Optional.ofNullable(this.vpcId);
}
private TargetGroupState() {}
private TargetGroupState(TargetGroupState $) {
this.arn = $.arn;
this.arnSuffix = $.arnSuffix;
this.connectionTermination = $.connectionTermination;
this.deregistrationDelay = $.deregistrationDelay;
this.healthCheck = $.healthCheck;
this.ipAddressType = $.ipAddressType;
this.lambdaMultiValueHeadersEnabled = $.lambdaMultiValueHeadersEnabled;
this.loadBalancerArns = $.loadBalancerArns;
this.loadBalancingAlgorithmType = $.loadBalancingAlgorithmType;
this.loadBalancingAnomalyMitigation = $.loadBalancingAnomalyMitigation;
this.loadBalancingCrossZoneEnabled = $.loadBalancingCrossZoneEnabled;
this.name = $.name;
this.namePrefix = $.namePrefix;
this.port = $.port;
this.preserveClientIp = $.preserveClientIp;
this.protocol = $.protocol;
this.protocolVersion = $.protocolVersion;
this.proxyProtocolV2 = $.proxyProtocolV2;
this.slowStart = $.slowStart;
this.stickiness = $.stickiness;
this.tags = $.tags;
this.tagsAll = $.tagsAll;
this.targetFailovers = $.targetFailovers;
this.targetGroupHealth = $.targetGroupHealth;
this.targetHealthStates = $.targetHealthStates;
this.targetType = $.targetType;
this.vpcId = $.vpcId;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(TargetGroupState defaults) {
return new Builder(defaults);
}
public static final class Builder {
private TargetGroupState $;
public Builder() {
$ = new TargetGroupState();
}
public Builder(TargetGroupState defaults) {
$ = new TargetGroupState(Objects.requireNonNull(defaults));
}
/**
* @param arn ARN of the Target Group (matches `id`).
*
* @return builder
*
*/
public Builder arn(@Nullable Output arn) {
$.arn = arn;
return this;
}
/**
* @param arn ARN of the Target Group (matches `id`).
*
* @return builder
*
*/
public Builder arn(String arn) {
return arn(Output.of(arn));
}
/**
* @param arnSuffix ARN suffix for use with CloudWatch Metrics.
*
* @return builder
*
*/
public Builder arnSuffix(@Nullable Output arnSuffix) {
$.arnSuffix = arnSuffix;
return this;
}
/**
* @param arnSuffix ARN suffix for use with CloudWatch Metrics.
*
* @return builder
*
*/
public Builder arnSuffix(String arnSuffix) {
return arnSuffix(Output.of(arnSuffix));
}
/**
* @param connectionTermination Whether to terminate connections at the end of the deregistration timeout on Network Load Balancers. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#deregistration-delay) for more information. Default is `false`.
*
* @return builder
*
*/
public Builder connectionTermination(@Nullable Output connectionTermination) {
$.connectionTermination = connectionTermination;
return this;
}
/**
* @param connectionTermination Whether to terminate connections at the end of the deregistration timeout on Network Load Balancers. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#deregistration-delay) for more information. Default is `false`.
*
* @return builder
*
*/
public Builder connectionTermination(Boolean connectionTermination) {
return connectionTermination(Output.of(connectionTermination));
}
/**
* @param deregistrationDelay Amount time for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused. The range is 0-3600 seconds. The default value is 300 seconds.
*
* @return builder
*
*/
public Builder deregistrationDelay(@Nullable Output deregistrationDelay) {
$.deregistrationDelay = deregistrationDelay;
return this;
}
/**
* @param deregistrationDelay Amount time for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused. The range is 0-3600 seconds. The default value is 300 seconds.
*
* @return builder
*
*/
public Builder deregistrationDelay(Integer deregistrationDelay) {
return deregistrationDelay(Output.of(deregistrationDelay));
}
/**
* @param healthCheck Health Check configuration block. Detailed below.
*
* @return builder
*
*/
public Builder healthCheck(@Nullable Output healthCheck) {
$.healthCheck = healthCheck;
return this;
}
/**
* @param healthCheck Health Check configuration block. Detailed below.
*
* @return builder
*
*/
public Builder healthCheck(TargetGroupHealthCheckArgs healthCheck) {
return healthCheck(Output.of(healthCheck));
}
/**
* @param ipAddressType The type of IP addresses used by the target group, only supported when target type is set to `ip`. Possible values are `ipv4` or `ipv6`.
*
* @return builder
*
*/
public Builder ipAddressType(@Nullable Output ipAddressType) {
$.ipAddressType = ipAddressType;
return this;
}
/**
* @param ipAddressType The type of IP addresses used by the target group, only supported when target type is set to `ip`. Possible values are `ipv4` or `ipv6`.
*
* @return builder
*
*/
public Builder ipAddressType(String ipAddressType) {
return ipAddressType(Output.of(ipAddressType));
}
/**
* @param lambdaMultiValueHeadersEnabled Whether the request and response headers exchanged between the load balancer and the Lambda function include arrays of values or strings. Only applies when `target_type` is `lambda`. Default is `false`.
*
* @return builder
*
*/
public Builder lambdaMultiValueHeadersEnabled(@Nullable Output lambdaMultiValueHeadersEnabled) {
$.lambdaMultiValueHeadersEnabled = lambdaMultiValueHeadersEnabled;
return this;
}
/**
* @param lambdaMultiValueHeadersEnabled Whether the request and response headers exchanged between the load balancer and the Lambda function include arrays of values or strings. Only applies when `target_type` is `lambda`. Default is `false`.
*
* @return builder
*
*/
public Builder lambdaMultiValueHeadersEnabled(Boolean lambdaMultiValueHeadersEnabled) {
return lambdaMultiValueHeadersEnabled(Output.of(lambdaMultiValueHeadersEnabled));
}
/**
* @param loadBalancerArns ARNs of the Load Balancers associated with the Target Group.
*
* @return builder
*
*/
public Builder loadBalancerArns(@Nullable Output> loadBalancerArns) {
$.loadBalancerArns = loadBalancerArns;
return this;
}
/**
* @param loadBalancerArns ARNs of the Load Balancers associated with the Target Group.
*
* @return builder
*
*/
public Builder loadBalancerArns(List loadBalancerArns) {
return loadBalancerArns(Output.of(loadBalancerArns));
}
/**
* @param loadBalancerArns ARNs of the Load Balancers associated with the Target Group.
*
* @return builder
*
*/
public Builder loadBalancerArns(String... loadBalancerArns) {
return loadBalancerArns(List.of(loadBalancerArns));
}
/**
* @param loadBalancingAlgorithmType Determines how the load balancer selects targets when routing requests. Only applicable for Application Load Balancer Target Groups. The value is `round_robin`, `least_outstanding_requests`, or `weighted_random`. The default is `round_robin`.
*
* @return builder
*
*/
public Builder loadBalancingAlgorithmType(@Nullable Output loadBalancingAlgorithmType) {
$.loadBalancingAlgorithmType = loadBalancingAlgorithmType;
return this;
}
/**
* @param loadBalancingAlgorithmType Determines how the load balancer selects targets when routing requests. Only applicable for Application Load Balancer Target Groups. The value is `round_robin`, `least_outstanding_requests`, or `weighted_random`. The default is `round_robin`.
*
* @return builder
*
*/
public Builder loadBalancingAlgorithmType(String loadBalancingAlgorithmType) {
return loadBalancingAlgorithmType(Output.of(loadBalancingAlgorithmType));
}
/**
* @param loadBalancingAnomalyMitigation Determines whether to enable target anomaly mitigation. Target anomaly mitigation is only supported by the `weighted_random` load balancing algorithm type. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#automatic-target-weights) for more information. The value is `"on"` or `"off"`. The default is `"off"`.
*
* @return builder
*
*/
public Builder loadBalancingAnomalyMitigation(@Nullable Output loadBalancingAnomalyMitigation) {
$.loadBalancingAnomalyMitigation = loadBalancingAnomalyMitigation;
return this;
}
/**
* @param loadBalancingAnomalyMitigation Determines whether to enable target anomaly mitigation. Target anomaly mitigation is only supported by the `weighted_random` load balancing algorithm type. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#automatic-target-weights) for more information. The value is `"on"` or `"off"`. The default is `"off"`.
*
* @return builder
*
*/
public Builder loadBalancingAnomalyMitigation(String loadBalancingAnomalyMitigation) {
return loadBalancingAnomalyMitigation(Output.of(loadBalancingAnomalyMitigation));
}
/**
* @param loadBalancingCrossZoneEnabled Indicates whether cross zone load balancing is enabled. The value is `"true"`, `"false"` or `"use_load_balancer_configuration"`. The default is `"use_load_balancer_configuration"`.
*
* @return builder
*
*/
public Builder loadBalancingCrossZoneEnabled(@Nullable Output loadBalancingCrossZoneEnabled) {
$.loadBalancingCrossZoneEnabled = loadBalancingCrossZoneEnabled;
return this;
}
/**
* @param loadBalancingCrossZoneEnabled Indicates whether cross zone load balancing is enabled. The value is `"true"`, `"false"` or `"use_load_balancer_configuration"`. The default is `"use_load_balancer_configuration"`.
*
* @return builder
*
*/
public Builder loadBalancingCrossZoneEnabled(String loadBalancingCrossZoneEnabled) {
return loadBalancingCrossZoneEnabled(Output.of(loadBalancingCrossZoneEnabled));
}
/**
* @param name Name of the target group. If omitted, this provider will assign a random, unique name. This name must be unique per region per account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen.
*
* @return builder
*
*/
public Builder name(@Nullable Output name) {
$.name = name;
return this;
}
/**
* @param name Name of the target group. If omitted, this provider will assign a random, unique name. This name must be unique per region per account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen.
*
* @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`. Cannot be longer than 6 characters.
*
* @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`. Cannot be longer than 6 characters.
*
* @return builder
*
*/
public Builder namePrefix(String namePrefix) {
return namePrefix(Output.of(namePrefix));
}
/**
* @param port Port on which targets receive traffic, unless overridden when registering a specific target. Required when `target_type` is `instance`, `ip` or `alb`. Does not apply when `target_type` is `lambda`.
*
* @return builder
*
*/
public Builder port(@Nullable Output port) {
$.port = port;
return this;
}
/**
* @param port Port on which targets receive traffic, unless overridden when registering a specific target. Required when `target_type` is `instance`, `ip` or `alb`. Does not apply when `target_type` is `lambda`.
*
* @return builder
*
*/
public Builder port(Integer port) {
return port(Output.of(port));
}
/**
* @param preserveClientIp Whether client IP preservation is enabled. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#client-ip-preservation) for more information.
*
* @return builder
*
*/
public Builder preserveClientIp(@Nullable Output preserveClientIp) {
$.preserveClientIp = preserveClientIp;
return this;
}
/**
* @param preserveClientIp Whether client IP preservation is enabled. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#client-ip-preservation) for more information.
*
* @return builder
*
*/
public Builder preserveClientIp(String preserveClientIp) {
return preserveClientIp(Output.of(preserveClientIp));
}
/**
* @param protocol Protocol to use for routing traffic to the targets.
* Should be one of `GENEVE`, `HTTP`, `HTTPS`, `TCP`, `TCP_UDP`, `TLS`, or `UDP`.
* Required when `target_type` is `instance`, `ip`, or `alb`.
* Does not apply when `target_type` is `lambda`.
*
* @return builder
*
*/
public Builder protocol(@Nullable Output protocol) {
$.protocol = protocol;
return this;
}
/**
* @param protocol Protocol to use for routing traffic to the targets.
* Should be one of `GENEVE`, `HTTP`, `HTTPS`, `TCP`, `TCP_UDP`, `TLS`, or `UDP`.
* Required when `target_type` is `instance`, `ip`, or `alb`.
* Does not apply when `target_type` is `lambda`.
*
* @return builder
*
*/
public Builder protocol(String protocol) {
return protocol(Output.of(protocol));
}
/**
* @param protocolVersion Only applicable when `protocol` is `HTTP` or `HTTPS`. The protocol version. Specify `GRPC` to send requests to targets using gRPC. Specify `HTTP2` to send requests to targets using HTTP/2. The default is `HTTP1`, which sends requests to targets using HTTP/1.1
*
* @return builder
*
*/
public Builder protocolVersion(@Nullable Output protocolVersion) {
$.protocolVersion = protocolVersion;
return this;
}
/**
* @param protocolVersion Only applicable when `protocol` is `HTTP` or `HTTPS`. The protocol version. Specify `GRPC` to send requests to targets using gRPC. Specify `HTTP2` to send requests to targets using HTTP/2. The default is `HTTP1`, which sends requests to targets using HTTP/1.1
*
* @return builder
*
*/
public Builder protocolVersion(String protocolVersion) {
return protocolVersion(Output.of(protocolVersion));
}
/**
* @param proxyProtocolV2 Whether to enable support for proxy protocol v2 on Network Load Balancers. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#proxy-protocol) for more information. Default is `false`.
*
* @return builder
*
*/
public Builder proxyProtocolV2(@Nullable Output proxyProtocolV2) {
$.proxyProtocolV2 = proxyProtocolV2;
return this;
}
/**
* @param proxyProtocolV2 Whether to enable support for proxy protocol v2 on Network Load Balancers. See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#proxy-protocol) for more information. Default is `false`.
*
* @return builder
*
*/
public Builder proxyProtocolV2(Boolean proxyProtocolV2) {
return proxyProtocolV2(Output.of(proxyProtocolV2));
}
/**
* @param slowStart Amount time for targets to warm up before the load balancer sends them a full share of requests. The range is 30-900 seconds or 0 to disable. The default value is 0 seconds.
*
* @return builder
*
*/
public Builder slowStart(@Nullable Output slowStart) {
$.slowStart = slowStart;
return this;
}
/**
* @param slowStart Amount time for targets to warm up before the load balancer sends them a full share of requests. The range is 30-900 seconds or 0 to disable. The default value is 0 seconds.
*
* @return builder
*
*/
public Builder slowStart(Integer slowStart) {
return slowStart(Output.of(slowStart));
}
/**
* @param stickiness Stickiness configuration block. Detailed below.
*
* @return builder
*
*/
public Builder stickiness(@Nullable Output stickiness) {
$.stickiness = stickiness;
return this;
}
/**
* @param stickiness Stickiness configuration block. Detailed below.
*
* @return builder
*
*/
public Builder stickiness(TargetGroupStickinessArgs stickiness) {
return stickiness(Output.of(stickiness));
}
/**
* @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 tagsAll A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
*
* @return builder
*
* @deprecated
* Please use `tags` instead.
*
*/
@Deprecated /* Please use `tags` instead. */
public Builder tagsAll(@Nullable Output> tagsAll) {
$.tagsAll = tagsAll;
return this;
}
/**
* @param tagsAll A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
*
* @return builder
*
* @deprecated
* Please use `tags` instead.
*
*/
@Deprecated /* Please use `tags` instead. */
public Builder tagsAll(Map tagsAll) {
return tagsAll(Output.of(tagsAll));
}
/**
* @param targetFailovers Target failover block. Only applicable for Gateway Load Balancer target groups. See target_failover for more information.
*
* @return builder
*
*/
public Builder targetFailovers(@Nullable Output> targetFailovers) {
$.targetFailovers = targetFailovers;
return this;
}
/**
* @param targetFailovers Target failover block. Only applicable for Gateway Load Balancer target groups. See target_failover for more information.
*
* @return builder
*
*/
public Builder targetFailovers(List targetFailovers) {
return targetFailovers(Output.of(targetFailovers));
}
/**
* @param targetFailovers Target failover block. Only applicable for Gateway Load Balancer target groups. See target_failover for more information.
*
* @return builder
*
*/
public Builder targetFailovers(TargetGroupTargetFailoverArgs... targetFailovers) {
return targetFailovers(List.of(targetFailovers));
}
/**
* @param targetGroupHealth Target health requirements block. See target_group_health for more information.
*
* @return builder
*
*/
public Builder targetGroupHealth(@Nullable Output targetGroupHealth) {
$.targetGroupHealth = targetGroupHealth;
return this;
}
/**
* @param targetGroupHealth Target health requirements block. See target_group_health for more information.
*
* @return builder
*
*/
public Builder targetGroupHealth(TargetGroupTargetGroupHealthArgs targetGroupHealth) {
return targetGroupHealth(Output.of(targetGroupHealth));
}
/**
* @param targetHealthStates Target health state block. Only applicable for Network Load Balancer target groups when `protocol` is `TCP` or `TLS`. See target_health_state for more information.
*
* @return builder
*
*/
public Builder targetHealthStates(@Nullable Output> targetHealthStates) {
$.targetHealthStates = targetHealthStates;
return this;
}
/**
* @param targetHealthStates Target health state block. Only applicable for Network Load Balancer target groups when `protocol` is `TCP` or `TLS`. See target_health_state for more information.
*
* @return builder
*
*/
public Builder targetHealthStates(List targetHealthStates) {
return targetHealthStates(Output.of(targetHealthStates));
}
/**
* @param targetHealthStates Target health state block. Only applicable for Network Load Balancer target groups when `protocol` is `TCP` or `TLS`. See target_health_state for more information.
*
* @return builder
*
*/
public Builder targetHealthStates(TargetGroupTargetHealthStateArgs... targetHealthStates) {
return targetHealthStates(List.of(targetHealthStates));
}
/**
* @param targetType Type of target that you must specify when registering targets with this target group.
* See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_CreateTargetGroup.html) for supported values.
* The default is `instance`.
*
* Note that you can't specify targets for a target group using both instance IDs and IP addresses.
*
* If the target type is `ip`, specify IP addresses from the subnets of the virtual private cloud (VPC) for the target group, the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and the RFC 6598 range (100.64.0.0/10). You can't specify publicly routable IP addresses.
*
* Network Load Balancers do not support the `lambda` target type.
*
* Application Load Balancers do not support the `alb` target type.
*
* @return builder
*
*/
public Builder targetType(@Nullable Output targetType) {
$.targetType = targetType;
return this;
}
/**
* @param targetType Type of target that you must specify when registering targets with this target group.
* See [doc](https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_CreateTargetGroup.html) for supported values.
* The default is `instance`.
*
* Note that you can't specify targets for a target group using both instance IDs and IP addresses.
*
* If the target type is `ip`, specify IP addresses from the subnets of the virtual private cloud (VPC) for the target group, the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and the RFC 6598 range (100.64.0.0/10). You can't specify publicly routable IP addresses.
*
* Network Load Balancers do not support the `lambda` target type.
*
* Application Load Balancers do not support the `alb` target type.
*
* @return builder
*
*/
public Builder targetType(String targetType) {
return targetType(Output.of(targetType));
}
/**
* @param vpcId Identifier of the VPC in which to create the target group. Required when `target_type` is `instance`, `ip` or `alb`. Does not apply when `target_type` is `lambda`.
*
* @return builder
*
*/
public Builder vpcId(@Nullable Output vpcId) {
$.vpcId = vpcId;
return this;
}
/**
* @param vpcId Identifier of the VPC in which to create the target group. Required when `target_type` is `instance`, `ip` or `alb`. Does not apply when `target_type` is `lambda`.
*
* @return builder
*
*/
public Builder vpcId(String vpcId) {
return vpcId(Output.of(vpcId));
}
public TargetGroupState build() {
return $;
}
}
}