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

com.pulumi.digitalocean.kotlin.UptimeCheckArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.digitalocean.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.digitalocean.UptimeCheckArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Provides a [DigitalOcean Uptime Checks](https://docs.digitalocean.com/reference/api/api-reference/#tag/Uptime)
 * resource. Uptime Checks provide the ability to monitor your endpoints from around the world, and alert you when they're slow, unavailable, or SSL certificates are expiring.
 * ## Import
 * Uptime checks can be imported using the uptime check's `id`, e.g.
 * ```sh
 * $ pulumi import digitalocean:index/uptimeCheck:UptimeCheck target 5a4981aa-9653-4bd1-bef5-d6bff52042e4
 * ```
 * @property enabled A boolean value indicating whether the check is enabled/disabled.
 * @property name A human-friendly display name for the check.
 * @property regions An array containing the selected regions to perform healthchecks from: "us_east", "us_west", "eu_west", "se_asia"
 * @property target The endpoint to perform healthchecks on.
 * @property type The type of health check to perform: 'ping' 'http' 'https'.
 */
public data class UptimeCheckArgs(
    public val enabled: Output? = null,
    public val name: Output? = null,
    public val regions: Output>? = null,
    public val target: Output? = null,
    public val type: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.digitalocean.UptimeCheckArgs =
        com.pulumi.digitalocean.UptimeCheckArgs.builder()
            .enabled(enabled?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .regions(regions?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .target(target?.applyValue({ args0 -> args0 }))
            .type(type?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [UptimeCheckArgs].
 */
@PulumiTagMarker
public class UptimeCheckArgsBuilder internal constructor() {
    private var enabled: Output? = null

    private var name: Output? = null

    private var regions: Output>? = null

    private var target: Output? = null

    private var type: Output? = null

    /**
     * @param value A boolean value indicating whether the check is enabled/disabled.
     */
    @JvmName("xxgxixvavhbvwlkn")
    public suspend fun enabled(`value`: Output) {
        this.enabled = value
    }

    /**
     * @param value A human-friendly display name for the check.
     */
    @JvmName("vbcltbdmwvlcniww")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value An array containing the selected regions to perform healthchecks from: "us_east", "us_west", "eu_west", "se_asia"
     */
    @JvmName("luhafkaemwvjogjo")
    public suspend fun regions(`value`: Output>) {
        this.regions = value
    }

    @JvmName("ephvvpajxtoaadhu")
    public suspend fun regions(vararg values: Output) {
        this.regions = Output.all(values.asList())
    }

    /**
     * @param values An array containing the selected regions to perform healthchecks from: "us_east", "us_west", "eu_west", "se_asia"
     */
    @JvmName("deaagwihvoyqbhjy")
    public suspend fun regions(values: List>) {
        this.regions = Output.all(values)
    }

    /**
     * @param value The endpoint to perform healthchecks on.
     */
    @JvmName("fcriewppojhkpoyw")
    public suspend fun target(`value`: Output) {
        this.target = value
    }

    /**
     * @param value The type of health check to perform: 'ping' 'http' 'https'.
     */
    @JvmName("gdeaaohkvsbjjmwh")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value A boolean value indicating whether the check is enabled/disabled.
     */
    @JvmName("pujlbtenmbtdqpyn")
    public suspend fun enabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enabled = mapped
    }

    /**
     * @param value A human-friendly display name for the check.
     */
    @JvmName("hcxqsewgqsxieicp")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value An array containing the selected regions to perform healthchecks from: "us_east", "us_west", "eu_west", "se_asia"
     */
    @JvmName("lffshnkaldscudhg")
    public suspend fun regions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.regions = mapped
    }

    /**
     * @param values An array containing the selected regions to perform healthchecks from: "us_east", "us_west", "eu_west", "se_asia"
     */
    @JvmName("gmbapspyplpjbagu")
    public suspend fun regions(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.regions = mapped
    }

    /**
     * @param value The endpoint to perform healthchecks on.
     */
    @JvmName("ohpclhlfqpblqsll")
    public suspend fun target(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.target = mapped
    }

    /**
     * @param value The type of health check to perform: 'ping' 'http' 'https'.
     */
    @JvmName("pcaigowusrpqfcmq")
    public suspend fun type(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): UptimeCheckArgs = UptimeCheckArgs(
        enabled = enabled,
        name = name,
        regions = regions,
        target = target,
        type = type,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy