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

com.pulumi.gcp.compute.kotlin.HttpsHealthCheckArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.compute.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.compute.HttpsHealthCheckArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * An HttpsHealthCheck resource. This resource defines a template for how
 * individual VMs should be checked for health, via HTTPS.
 * > **Note:** gcp.compute.HttpsHealthCheck is a legacy health check.
 * The newer [gcp.compute.HealthCheck](https://www.terraform.io/docs/providers/google/r/compute_health_check.html)
 * should be preferred for all uses except
 * [Network Load Balancers](https://cloud.google.com/compute/docs/load-balancing/network/)
 * which still require the legacy version.
 * To get more information about HttpsHealthCheck, see:
 * * [API documentation](https://cloud.google.com/compute/docs/reference/v1/httpsHealthChecks)
 * * How-to Guides
 *     * [Adding Health Checks](https://cloud.google.com/compute/docs/load-balancing/health-checks#legacy_health_checks)
 * ## Example Usage
 * ### Https Health Check Basic
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const _default = new gcp.compute.HttpsHealthCheck("default", {
 *     name: "authentication-health-check",
 *     requestPath: "/health_check",
 *     timeoutSec: 1,
 *     checkIntervalSec: 1,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default = gcp.compute.HttpsHealthCheck("default",
 *     name="authentication-health-check",
 *     request_path="/health_check",
 *     timeout_sec=1,
 *     check_interval_sec=1)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var @default = new Gcp.Compute.HttpsHealthCheck("default", new()
 *     {
 *         Name = "authentication-health-check",
 *         RequestPath = "/health_check",
 *         TimeoutSec = 1,
 *         CheckIntervalSec = 1,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := compute.NewHttpsHealthCheck(ctx, "default", &compute.HttpsHealthCheckArgs{
 * 			Name:             pulumi.String("authentication-health-check"),
 * 			RequestPath:      pulumi.String("/health_check"),
 * 			TimeoutSec:       pulumi.Int(1),
 * 			CheckIntervalSec: pulumi.Int(1),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.gcp.compute.HttpsHealthCheck;
 * import com.pulumi.gcp.compute.HttpsHealthCheckArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var default_ = new HttpsHealthCheck("default", HttpsHealthCheckArgs.builder()
 *             .name("authentication-health-check")
 *             .requestPath("/health_check")
 *             .timeoutSec(1)
 *             .checkIntervalSec(1)
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:compute:HttpsHealthCheck
 *     properties:
 *       name: authentication-health-check
 *       requestPath: /health_check
 *       timeoutSec: 1
 *       checkIntervalSec: 1
 * ```
 * 
 * ## Import
 * HttpsHealthCheck can be imported using any of these accepted formats:
 * * `projects/{{project}}/global/httpsHealthChecks/{{name}}`
 * * `{{project}}/{{name}}`
 * * `{{name}}`
 * When using the `pulumi import` command, HttpsHealthCheck can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:compute/httpsHealthCheck:HttpsHealthCheck default projects/{{project}}/global/httpsHealthChecks/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:compute/httpsHealthCheck:HttpsHealthCheck default {{project}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:compute/httpsHealthCheck:HttpsHealthCheck default {{name}}
 * ```
 * @property checkIntervalSec How often (in seconds) to send a health check. The default value is 5
 * seconds.
 * @property description An optional description of this resource. Provide this property when
 * you create the resource.
 * @property healthyThreshold A so-far unhealthy instance will be marked healthy after this many
 * consecutive successes. The default value is 2.
 * @property host The value of the host header in the HTTPS health check request. If
 * left empty (default value), the public IP on behalf of which this
 * health check is performed will be used.
 * @property name Name of the resource. Provided by the client when the resource is
 * created. The name must be 1-63 characters long, and comply with
 * RFC1035.  Specifically, the name must be 1-63 characters long and
 * match the regular expression `a-z?` which means
 * the first character must be a lowercase letter, and all following
 * characters must be a dash, lowercase letter, or digit, except the
 * last character, which cannot be a dash.
 * - - -
 * @property port The TCP port number for the HTTPS health check request.
 * The default value is 443.
 * @property project The ID of the project in which the resource belongs.
 * If it is not provided, the provider project is used.
 * @property requestPath The request path of the HTTPS health check request.
 * The default value is /.
 * @property timeoutSec How long (in seconds) to wait before claiming failure.
 * The default value is 5 seconds.  It is invalid for timeoutSec to have
 * greater value than checkIntervalSec.
 * @property unhealthyThreshold A so-far healthy instance will be marked unhealthy after this many
 * consecutive failures. The default value is 2.
 */
public data class HttpsHealthCheckArgs(
    public val checkIntervalSec: Output? = null,
    public val description: Output? = null,
    public val healthyThreshold: Output? = null,
    public val host: Output? = null,
    public val name: Output? = null,
    public val port: Output? = null,
    public val project: Output? = null,
    public val requestPath: Output? = null,
    public val timeoutSec: Output? = null,
    public val unhealthyThreshold: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.compute.HttpsHealthCheckArgs =
        com.pulumi.gcp.compute.HttpsHealthCheckArgs.builder()
            .checkIntervalSec(checkIntervalSec?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .healthyThreshold(healthyThreshold?.applyValue({ args0 -> args0 }))
            .host(host?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .port(port?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .requestPath(requestPath?.applyValue({ args0 -> args0 }))
            .timeoutSec(timeoutSec?.applyValue({ args0 -> args0 }))
            .unhealthyThreshold(unhealthyThreshold?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [HttpsHealthCheckArgs].
 */
@PulumiTagMarker
public class HttpsHealthCheckArgsBuilder internal constructor() {
    private var checkIntervalSec: Output? = null

    private var description: Output? = null

    private var healthyThreshold: Output? = null

    private var host: Output? = null

    private var name: Output? = null

    private var port: Output? = null

    private var project: Output? = null

    private var requestPath: Output? = null

    private var timeoutSec: Output? = null

    private var unhealthyThreshold: Output? = null

    /**
     * @param value How often (in seconds) to send a health check. The default value is 5
     * seconds.
     */
    @JvmName("fdafadqkkcoooaan")
    public suspend fun checkIntervalSec(`value`: Output) {
        this.checkIntervalSec = value
    }

    /**
     * @param value An optional description of this resource. Provide this property when
     * you create the resource.
     */
    @JvmName("fpijnchxrmpxfgdy")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value A so-far unhealthy instance will be marked healthy after this many
     * consecutive successes. The default value is 2.
     */
    @JvmName("clddngyouwrnwlli")
    public suspend fun healthyThreshold(`value`: Output) {
        this.healthyThreshold = value
    }

    /**
     * @param value The value of the host header in the HTTPS health check request. If
     * left empty (default value), the public IP on behalf of which this
     * health check is performed will be used.
     */
    @JvmName("mqesngyeuwmenhlq")
    public suspend fun host(`value`: Output) {
        this.host = value
    }

    /**
     * @param value Name of the resource. Provided by the client when the resource is
     * created. The name must be 1-63 characters long, and comply with
     * RFC1035.  Specifically, the name must be 1-63 characters long and
     * match the regular expression `a-z?` which means
     * the first character must be a lowercase letter, and all following
     * characters must be a dash, lowercase letter, or digit, except the
     * last character, which cannot be a dash.
     * - - -
     */
    @JvmName("yhymdejsgtylopfr")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The TCP port number for the HTTPS health check request.
     * The default value is 443.
     */
    @JvmName("utaxadothctygbcg")
    public suspend fun port(`value`: Output) {
        this.port = value
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("vndnjrvgtrpqctxk")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value The request path of the HTTPS health check request.
     * The default value is /.
     */
    @JvmName("wkotwnkeheoawoar")
    public suspend fun requestPath(`value`: Output) {
        this.requestPath = value
    }

    /**
     * @param value How long (in seconds) to wait before claiming failure.
     * The default value is 5 seconds.  It is invalid for timeoutSec to have
     * greater value than checkIntervalSec.
     */
    @JvmName("uknhncqefuesngci")
    public suspend fun timeoutSec(`value`: Output) {
        this.timeoutSec = value
    }

    /**
     * @param value A so-far healthy instance will be marked unhealthy after this many
     * consecutive failures. The default value is 2.
     */
    @JvmName("orrsjameekmqclgg")
    public suspend fun unhealthyThreshold(`value`: Output) {
        this.unhealthyThreshold = value
    }

    /**
     * @param value How often (in seconds) to send a health check. The default value is 5
     * seconds.
     */
    @JvmName("rkuohlpwymuggvgi")
    public suspend fun checkIntervalSec(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.checkIntervalSec = mapped
    }

    /**
     * @param value An optional description of this resource. Provide this property when
     * you create the resource.
     */
    @JvmName("xlxqqxjbdcjblurb")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value A so-far unhealthy instance will be marked healthy after this many
     * consecutive successes. The default value is 2.
     */
    @JvmName("actpdnlnfuvbeybg")
    public suspend fun healthyThreshold(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.healthyThreshold = mapped
    }

    /**
     * @param value The value of the host header in the HTTPS health check request. If
     * left empty (default value), the public IP on behalf of which this
     * health check is performed will be used.
     */
    @JvmName("ecijjfmtqpghnqam")
    public suspend fun host(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.host = mapped
    }

    /**
     * @param value Name of the resource. Provided by the client when the resource is
     * created. The name must be 1-63 characters long, and comply with
     * RFC1035.  Specifically, the name must be 1-63 characters long and
     * match the regular expression `a-z?` which means
     * the first character must be a lowercase letter, and all following
     * characters must be a dash, lowercase letter, or digit, except the
     * last character, which cannot be a dash.
     * - - -
     */
    @JvmName("fmpnvskoneupbekw")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The TCP port number for the HTTPS health check request.
     * The default value is 443.
     */
    @JvmName("jgnyhiyhekntifpw")
    public suspend fun port(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.port = mapped
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("iyvsmmiegsutvnwn")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value The request path of the HTTPS health check request.
     * The default value is /.
     */
    @JvmName("upletxfxofqwsxxd")
    public suspend fun requestPath(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requestPath = mapped
    }

    /**
     * @param value How long (in seconds) to wait before claiming failure.
     * The default value is 5 seconds.  It is invalid for timeoutSec to have
     * greater value than checkIntervalSec.
     */
    @JvmName("emgvkuxihxxuxthp")
    public suspend fun timeoutSec(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.timeoutSec = mapped
    }

    /**
     * @param value A so-far healthy instance will be marked unhealthy after this many
     * consecutive failures. The default value is 2.
     */
    @JvmName("cokjvecnvwgknjis")
    public suspend fun unhealthyThreshold(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.unhealthyThreshold = mapped
    }

    internal fun build(): HttpsHealthCheckArgs = HttpsHealthCheckArgs(
        checkIntervalSec = checkIntervalSec,
        description = description,
        healthyThreshold = healthyThreshold,
        host = host,
        name = name,
        port = port,
        project = project,
        requestPath = requestPath,
        timeoutSec = timeoutSec,
        unhealthyThreshold = unhealthyThreshold,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy