All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.alb.outputs.TargetGroupHealthCheck Maven / Gradle / Ivy

// *** 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.outputs;

import com.pulumi.core.annotations.CustomType;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class TargetGroupHealthCheck {
    /**
     * @return Whether health checks are enabled. Defaults to `true`.
     * 
     */
    private @Nullable Boolean enabled;
    /**
     * @return Number of consecutive health check successes required before considering a target healthy. The range is 2-10. Defaults to 3.
     * 
     */
    private @Nullable Integer healthyThreshold;
    /**
     * @return Approximate amount of time, in seconds, between health checks of an individual target. The range is 5-300. For `lambda` target groups, it needs to be greater than the timeout of the underlying `lambda`. Defaults to 30.
     * 
     */
    private @Nullable Integer interval;
    /**
     * @return The HTTP or gRPC codes to use when checking for a successful response from a target.
     * The `health_check.protocol` must be one of `HTTP` or `HTTPS` or the `target_type` must be `lambda`.
     * Values can be comma-separated individual values (e.g., "200,202") or a range of values (e.g., "200-299").
     * * For gRPC-based target groups (i.e., the `protocol` is one of `HTTP` or `HTTPS` and the `protocol_version` is `GRPC`), values can be between `0` and `99`. The default is `12`.
     * * When used with an Application Load Balancer (i.e., the `protocol` is one of `HTTP` or `HTTPS` and the `protocol_version` is not `GRPC`), values can be between `200` and `499`. The default is `200`.
     * * When used with a Network Load Balancer (i.e., the `protocol` is one of `TCP`, `TCP_UDP`, `UDP`, or `TLS`), values can be between `200` and `599`. The default is `200-399`.
     * * When the `target_type` is `lambda`, values can be between `200` and `499`. The default is `200`.
     * 
     */
    private @Nullable String matcher;
    /**
     * @return Destination for the health check request. Required for HTTP/HTTPS ALB and HTTP NLB. Only applies to HTTP/HTTPS.
     * * For HTTP and HTTPS health checks, the default is `/`.
     * * For gRPC health checks, the default is `/Amazon Web Services.ALB/healthcheck`.
     * 
     */
    private @Nullable String path;
    /**
     * @return The port the load balancer uses when performing health checks on targets.
     * Valid values are either `traffic-port`, to use the same port as the target group, or a valid port number between `1` and `65536`.
     * Default is `traffic-port`.
     * 
     */
    private @Nullable String port;
    /**
     * @return Protocol the load balancer uses when performing health checks on targets.
     * Must be one of `TCP`, `HTTP`, or `HTTPS`.
     * The `TCP` protocol is not supported for health checks if the protocol of the target group is `HTTP` or `HTTPS`.
     * Default is `HTTP`.
     * Cannot be specified when the `target_type` is `lambda`.
     * 
     */
    private @Nullable String protocol;
    /**
     * @return Amount of time, in seconds, during which no response from a target means a failed health check. The range is 2–120 seconds. For target groups with a protocol of HTTP, the default is 6 seconds. For target groups with a protocol of TCP, TLS or HTTPS, the default is 10 seconds. For target groups with a protocol of GENEVE, the default is 5 seconds. If the target type is lambda, the default is 30 seconds.
     * 
     */
    private @Nullable Integer timeout;
    /**
     * @return Number of consecutive health check failures required before considering a target unhealthy. The range is 2-10. Defaults to 3.
     * 
     */
    private @Nullable Integer unhealthyThreshold;

    private TargetGroupHealthCheck() {}
    /**
     * @return Whether health checks are enabled. Defaults to `true`.
     * 
     */
    public Optional enabled() {
        return Optional.ofNullable(this.enabled);
    }
    /**
     * @return Number of consecutive health check successes required before considering a target healthy. The range is 2-10. Defaults to 3.
     * 
     */
    public Optional healthyThreshold() {
        return Optional.ofNullable(this.healthyThreshold);
    }
    /**
     * @return Approximate amount of time, in seconds, between health checks of an individual target. The range is 5-300. For `lambda` target groups, it needs to be greater than the timeout of the underlying `lambda`. Defaults to 30.
     * 
     */
    public Optional interval() {
        return Optional.ofNullable(this.interval);
    }
    /**
     * @return The HTTP or gRPC codes to use when checking for a successful response from a target.
     * The `health_check.protocol` must be one of `HTTP` or `HTTPS` or the `target_type` must be `lambda`.
     * Values can be comma-separated individual values (e.g., "200,202") or a range of values (e.g., "200-299").
     * * For gRPC-based target groups (i.e., the `protocol` is one of `HTTP` or `HTTPS` and the `protocol_version` is `GRPC`), values can be between `0` and `99`. The default is `12`.
     * * When used with an Application Load Balancer (i.e., the `protocol` is one of `HTTP` or `HTTPS` and the `protocol_version` is not `GRPC`), values can be between `200` and `499`. The default is `200`.
     * * When used with a Network Load Balancer (i.e., the `protocol` is one of `TCP`, `TCP_UDP`, `UDP`, or `TLS`), values can be between `200` and `599`. The default is `200-399`.
     * * When the `target_type` is `lambda`, values can be between `200` and `499`. The default is `200`.
     * 
     */
    public Optional matcher() {
        return Optional.ofNullable(this.matcher);
    }
    /**
     * @return Destination for the health check request. Required for HTTP/HTTPS ALB and HTTP NLB. Only applies to HTTP/HTTPS.
     * * For HTTP and HTTPS health checks, the default is `/`.
     * * For gRPC health checks, the default is `/Amazon Web Services.ALB/healthcheck`.
     * 
     */
    public Optional path() {
        return Optional.ofNullable(this.path);
    }
    /**
     * @return The port the load balancer uses when performing health checks on targets.
     * Valid values are either `traffic-port`, to use the same port as the target group, or a valid port number between `1` and `65536`.
     * Default is `traffic-port`.
     * 
     */
    public Optional port() {
        return Optional.ofNullable(this.port);
    }
    /**
     * @return Protocol the load balancer uses when performing health checks on targets.
     * Must be one of `TCP`, `HTTP`, or `HTTPS`.
     * The `TCP` protocol is not supported for health checks if the protocol of the target group is `HTTP` or `HTTPS`.
     * Default is `HTTP`.
     * Cannot be specified when the `target_type` is `lambda`.
     * 
     */
    public Optional protocol() {
        return Optional.ofNullable(this.protocol);
    }
    /**
     * @return Amount of time, in seconds, during which no response from a target means a failed health check. The range is 2–120 seconds. For target groups with a protocol of HTTP, the default is 6 seconds. For target groups with a protocol of TCP, TLS or HTTPS, the default is 10 seconds. For target groups with a protocol of GENEVE, the default is 5 seconds. If the target type is lambda, the default is 30 seconds.
     * 
     */
    public Optional timeout() {
        return Optional.ofNullable(this.timeout);
    }
    /**
     * @return Number of consecutive health check failures required before considering a target unhealthy. The range is 2-10. Defaults to 3.
     * 
     */
    public Optional unhealthyThreshold() {
        return Optional.ofNullable(this.unhealthyThreshold);
    }

    public static Builder builder() {
        return new Builder();
    }

    public static Builder builder(TargetGroupHealthCheck defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable Boolean enabled;
        private @Nullable Integer healthyThreshold;
        private @Nullable Integer interval;
        private @Nullable String matcher;
        private @Nullable String path;
        private @Nullable String port;
        private @Nullable String protocol;
        private @Nullable Integer timeout;
        private @Nullable Integer unhealthyThreshold;
        public Builder() {}
        public Builder(TargetGroupHealthCheck defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.enabled = defaults.enabled;
    	      this.healthyThreshold = defaults.healthyThreshold;
    	      this.interval = defaults.interval;
    	      this.matcher = defaults.matcher;
    	      this.path = defaults.path;
    	      this.port = defaults.port;
    	      this.protocol = defaults.protocol;
    	      this.timeout = defaults.timeout;
    	      this.unhealthyThreshold = defaults.unhealthyThreshold;
        }

        @CustomType.Setter
        public Builder enabled(@Nullable Boolean enabled) {

            this.enabled = enabled;
            return this;
        }
        @CustomType.Setter
        public Builder healthyThreshold(@Nullable Integer healthyThreshold) {

            this.healthyThreshold = healthyThreshold;
            return this;
        }
        @CustomType.Setter
        public Builder interval(@Nullable Integer interval) {

            this.interval = interval;
            return this;
        }
        @CustomType.Setter
        public Builder matcher(@Nullable String matcher) {

            this.matcher = matcher;
            return this;
        }
        @CustomType.Setter
        public Builder path(@Nullable String path) {

            this.path = path;
            return this;
        }
        @CustomType.Setter
        public Builder port(@Nullable String port) {

            this.port = port;
            return this;
        }
        @CustomType.Setter
        public Builder protocol(@Nullable String protocol) {

            this.protocol = protocol;
            return this;
        }
        @CustomType.Setter
        public Builder timeout(@Nullable Integer timeout) {

            this.timeout = timeout;
            return this;
        }
        @CustomType.Setter
        public Builder unhealthyThreshold(@Nullable Integer unhealthyThreshold) {

            this.unhealthyThreshold = unhealthyThreshold;
            return this;
        }
        public TargetGroupHealthCheck build() {
            final var _resultValue = new TargetGroupHealthCheck();
            _resultValue.enabled = enabled;
            _resultValue.healthyThreshold = healthyThreshold;
            _resultValue.interval = interval;
            _resultValue.matcher = matcher;
            _resultValue.path = path;
            _resultValue.port = port;
            _resultValue.protocol = protocol;
            _resultValue.timeout = timeout;
            _resultValue.unhealthyThreshold = unhealthyThreshold;
            return _resultValue;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy