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

com.pulumi.aws.lb.inputs.TargetGroupHealthCheckArgs Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

There is a newer version: 6.60.0-alpha.1731982519
Show newest version
// *** 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.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class TargetGroupHealthCheckArgs extends com.pulumi.resources.ResourceArgs {

    public static final TargetGroupHealthCheckArgs Empty = new TargetGroupHealthCheckArgs();

    /**
     * Whether health checks are enabled. Defaults to `true`.
     * 
     */
    @Import(name="enabled")
    private @Nullable Output enabled;

    /**
     * @return Whether health checks are enabled. Defaults to `true`.
     * 
     */
    public Optional> enabled() {
        return Optional.ofNullable(this.enabled);
    }

    /**
     * Number of consecutive health check successes required before considering a target healthy. The range is 2-10. Defaults to 3.
     * 
     */
    @Import(name="healthyThreshold")
    private @Nullable Output healthyThreshold;

    /**
     * @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);
    }

    /**
     * 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.
     * 
     */
    @Import(name="interval")
    private @Nullable Output interval;

    /**
     * @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);
    }

    /**
     * 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`.
     * 
     */
    @Import(name="matcher")
    private @Nullable Output matcher;

    /**
     * @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);
    }

    /**
     * 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`.
     * 
     */
    @Import(name="path")
    private @Nullable Output path;

    /**
     * @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);
    }

    /**
     * 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`.
     * 
     */
    @Import(name="port")
    private @Nullable Output port;

    /**
     * @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);
    }

    /**
     * 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`.
     * 
     */
    @Import(name="protocol")
    private @Nullable Output protocol;

    /**
     * @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);
    }

    /**
     * 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.
     * 
     */
    @Import(name="timeout")
    private @Nullable Output timeout;

    /**
     * @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);
    }

    /**
     * Number of consecutive health check failures required before considering a target unhealthy. The range is 2-10. Defaults to 3.
     * 
     */
    @Import(name="unhealthyThreshold")
    private @Nullable Output unhealthyThreshold;

    /**
     * @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);
    }

    private TargetGroupHealthCheckArgs() {}

    private TargetGroupHealthCheckArgs(TargetGroupHealthCheckArgs $) {
        this.enabled = $.enabled;
        this.healthyThreshold = $.healthyThreshold;
        this.interval = $.interval;
        this.matcher = $.matcher;
        this.path = $.path;
        this.port = $.port;
        this.protocol = $.protocol;
        this.timeout = $.timeout;
        this.unhealthyThreshold = $.unhealthyThreshold;
    }

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

    public static final class Builder {
        private TargetGroupHealthCheckArgs $;

        public Builder() {
            $ = new TargetGroupHealthCheckArgs();
        }

        public Builder(TargetGroupHealthCheckArgs defaults) {
            $ = new TargetGroupHealthCheckArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param enabled Whether health checks are enabled. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder enabled(@Nullable Output enabled) {
            $.enabled = enabled;
            return this;
        }

        /**
         * @param enabled Whether health checks are enabled. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder enabled(Boolean enabled) {
            return enabled(Output.of(enabled));
        }

        /**
         * @param healthyThreshold Number of consecutive health check successes required before considering a target healthy. The range is 2-10. Defaults to 3.
         * 
         * @return builder
         * 
         */
        public Builder healthyThreshold(@Nullable Output healthyThreshold) {
            $.healthyThreshold = healthyThreshold;
            return this;
        }

        /**
         * @param healthyThreshold Number of consecutive health check successes required before considering a target healthy. The range is 2-10. Defaults to 3.
         * 
         * @return builder
         * 
         */
        public Builder healthyThreshold(Integer healthyThreshold) {
            return healthyThreshold(Output.of(healthyThreshold));
        }

        /**
         * @param interval 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.
         * 
         * @return builder
         * 
         */
        public Builder interval(@Nullable Output interval) {
            $.interval = interval;
            return this;
        }

        /**
         * @param interval 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.
         * 
         * @return builder
         * 
         */
        public Builder interval(Integer interval) {
            return interval(Output.of(interval));
        }

        /**
         * @param matcher 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`.
         * 
         * @return builder
         * 
         */
        public Builder matcher(@Nullable Output matcher) {
            $.matcher = matcher;
            return this;
        }

        /**
         * @param matcher 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`.
         * 
         * @return builder
         * 
         */
        public Builder matcher(String matcher) {
            return matcher(Output.of(matcher));
        }

        /**
         * @param path 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`.
         * 
         * @return builder
         * 
         */
        public Builder path(@Nullable Output path) {
            $.path = path;
            return this;
        }

        /**
         * @param path 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`.
         * 
         * @return builder
         * 
         */
        public Builder path(String path) {
            return path(Output.of(path));
        }

        /**
         * @param port 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`.
         * 
         * @return builder
         * 
         */
        public Builder port(@Nullable Output port) {
            $.port = port;
            return this;
        }

        /**
         * @param port 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`.
         * 
         * @return builder
         * 
         */
        public Builder port(String port) {
            return port(Output.of(port));
        }

        /**
         * @param protocol 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`.
         * 
         * @return builder
         * 
         */
        public Builder protocol(@Nullable Output protocol) {
            $.protocol = protocol;
            return this;
        }

        /**
         * @param protocol 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`.
         * 
         * @return builder
         * 
         */
        public Builder protocol(String protocol) {
            return protocol(Output.of(protocol));
        }

        /**
         * @param timeout 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.
         * 
         * @return builder
         * 
         */
        public Builder timeout(@Nullable Output timeout) {
            $.timeout = timeout;
            return this;
        }

        /**
         * @param timeout 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.
         * 
         * @return builder
         * 
         */
        public Builder timeout(Integer timeout) {
            return timeout(Output.of(timeout));
        }

        /**
         * @param unhealthyThreshold Number of consecutive health check failures required before considering a target unhealthy. The range is 2-10. Defaults to 3.
         * 
         * @return builder
         * 
         */
        public Builder unhealthyThreshold(@Nullable Output unhealthyThreshold) {
            $.unhealthyThreshold = unhealthyThreshold;
            return this;
        }

        /**
         * @param unhealthyThreshold Number of consecutive health check failures required before considering a target unhealthy. The range is 2-10. Defaults to 3.
         * 
         * @return builder
         * 
         */
        public Builder unhealthyThreshold(Integer unhealthyThreshold) {
            return unhealthyThreshold(Output.of(unhealthyThreshold));
        }

        public TargetGroupHealthCheckArgs build() {
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy