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

com.pulumi.gcp.container.kotlin.inputs.ClusterMaintenancePolicyArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 8.12.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.container.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.container.inputs.ClusterMaintenancePolicyArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property dailyMaintenanceWindow Time window specified for daily maintenance operations.
 * Specify `start_time` in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) format "HH:MM”,
 * where HH : \[00-23\] and MM : \[00-59\] GMT. For example:
 * Examples:
 * @property maintenanceExclusions Exceptions to maintenance window. Non-emergency maintenance should not occur in these windows. A cluster can have up to 20 maintenance exclusions at a time [Maintenance Window and Exclusions](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions)
 * @property recurringWindow Time window for recurring maintenance operations.
 * Specify `start_time` and `end_time` in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) "Zulu" date format.  The start time's date is
 * the initial date that the window starts, and the end time is used for calculating duration.  Specify `recurrence` in
 * [RFC5545](https://tools.ietf.org/html/rfc5545#section-3.8.5.3) RRULE format, to specify when this recurs.
 * Note that GKE may accept other formats, but will return values in UTC, causing a permanent diff.
 * Examples:
 * ```
 * maintenance_policy {
 * recurring_window {
 * start_time = "2019-08-01T02:00:00Z"
 * end_time = "2019-08-01T06:00:00Z"
 * recurrence = "FREQ=DAILY"
 * }
 * }
 * ```
 * ```
 * maintenance_policy {
 * recurring_window {
 * start_time = "2019-01-01T09:00:00Z"
 * end_time = "2019-01-01T17:00:00Z"
 * recurrence = "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR"
 * }
 * }
 * ```
 */
public data class ClusterMaintenancePolicyArgs(
    public val dailyMaintenanceWindow: Output? =
        null,
    public val maintenanceExclusions: Output>? =
        null,
    public val recurringWindow: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.container.inputs.ClusterMaintenancePolicyArgs =
        com.pulumi.gcp.container.inputs.ClusterMaintenancePolicyArgs.builder()
            .dailyMaintenanceWindow(
                dailyMaintenanceWindow?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .maintenanceExclusions(
                maintenanceExclusions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .recurringWindow(
                recurringWindow?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [ClusterMaintenancePolicyArgs].
 */
@PulumiTagMarker
public class ClusterMaintenancePolicyArgsBuilder internal constructor() {
    private var dailyMaintenanceWindow: Output? =
        null

    private var maintenanceExclusions: Output>? =
        null

    private var recurringWindow: Output? = null

    /**
     * @param value Time window specified for daily maintenance operations.
     * Specify `start_time` in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) format "HH:MM”,
     * where HH : \[00-23\] and MM : \[00-59\] GMT. For example:
     * Examples:
     */
    @JvmName("cbpuikokaxiautuv")
    public suspend fun dailyMaintenanceWindow(`value`: Output) {
        this.dailyMaintenanceWindow = value
    }

    /**
     * @param value Exceptions to maintenance window. Non-emergency maintenance should not occur in these windows. A cluster can have up to 20 maintenance exclusions at a time [Maintenance Window and Exclusions](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions)
     */
    @JvmName("mpbhkpabmtyvyhxk")
    public suspend fun maintenanceExclusions(`value`: Output>) {
        this.maintenanceExclusions = value
    }

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

    /**
     * @param values Exceptions to maintenance window. Non-emergency maintenance should not occur in these windows. A cluster can have up to 20 maintenance exclusions at a time [Maintenance Window and Exclusions](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions)
     */
    @JvmName("kxntgylargaiplhf")
    public suspend fun maintenanceExclusions(values: List>) {
        this.maintenanceExclusions = Output.all(values)
    }

    /**
     * @param value Time window for recurring maintenance operations.
     * Specify `start_time` and `end_time` in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) "Zulu" date format.  The start time's date is
     * the initial date that the window starts, and the end time is used for calculating duration.  Specify `recurrence` in
     * [RFC5545](https://tools.ietf.org/html/rfc5545#section-3.8.5.3) RRULE format, to specify when this recurs.
     * Note that GKE may accept other formats, but will return values in UTC, causing a permanent diff.
     * Examples:
     * ```
     * maintenance_policy {
     * recurring_window {
     * start_time = "2019-08-01T02:00:00Z"
     * end_time = "2019-08-01T06:00:00Z"
     * recurrence = "FREQ=DAILY"
     * }
     * }
     * ```
     * ```
     * maintenance_policy {
     * recurring_window {
     * start_time = "2019-01-01T09:00:00Z"
     * end_time = "2019-01-01T17:00:00Z"
     * recurrence = "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR"
     * }
     * }
     * ```
     */
    @JvmName("knqwwvwqcbcomajv")
    public suspend fun recurringWindow(`value`: Output) {
        this.recurringWindow = value
    }

    /**
     * @param value Time window specified for daily maintenance operations.
     * Specify `start_time` in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) format "HH:MM”,
     * where HH : \[00-23\] and MM : \[00-59\] GMT. For example:
     * Examples:
     */
    @JvmName("itsqutkrivwteqae")
    public suspend fun dailyMaintenanceWindow(`value`: ClusterMaintenancePolicyDailyMaintenanceWindowArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dailyMaintenanceWindow = mapped
    }

    /**
     * @param argument Time window specified for daily maintenance operations.
     * Specify `start_time` in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) format "HH:MM”,
     * where HH : \[00-23\] and MM : \[00-59\] GMT. For example:
     * Examples:
     */
    @JvmName("emeqgfhjsjijqxbi")
    public suspend fun dailyMaintenanceWindow(argument: suspend ClusterMaintenancePolicyDailyMaintenanceWindowArgsBuilder.() -> Unit) {
        val toBeMapped = ClusterMaintenancePolicyDailyMaintenanceWindowArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.dailyMaintenanceWindow = mapped
    }

    /**
     * @param value Exceptions to maintenance window. Non-emergency maintenance should not occur in these windows. A cluster can have up to 20 maintenance exclusions at a time [Maintenance Window and Exclusions](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions)
     */
    @JvmName("sjqwhmesvelbswbw")
    public suspend fun maintenanceExclusions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maintenanceExclusions = mapped
    }

    /**
     * @param argument Exceptions to maintenance window. Non-emergency maintenance should not occur in these windows. A cluster can have up to 20 maintenance exclusions at a time [Maintenance Window and Exclusions](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions)
     */
    @JvmName("opvasphyslwmxehu")
    public suspend fun maintenanceExclusions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ClusterMaintenancePolicyMaintenanceExclusionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.maintenanceExclusions = mapped
    }

    /**
     * @param argument Exceptions to maintenance window. Non-emergency maintenance should not occur in these windows. A cluster can have up to 20 maintenance exclusions at a time [Maintenance Window and Exclusions](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions)
     */
    @JvmName("hyypfemrppxqlqfs")
    public suspend fun maintenanceExclusions(vararg argument: suspend ClusterMaintenancePolicyMaintenanceExclusionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ClusterMaintenancePolicyMaintenanceExclusionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.maintenanceExclusions = mapped
    }

    /**
     * @param argument Exceptions to maintenance window. Non-emergency maintenance should not occur in these windows. A cluster can have up to 20 maintenance exclusions at a time [Maintenance Window and Exclusions](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions)
     */
    @JvmName("infoubiseynnelrg")
    public suspend fun maintenanceExclusions(argument: suspend ClusterMaintenancePolicyMaintenanceExclusionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ClusterMaintenancePolicyMaintenanceExclusionArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.maintenanceExclusions = mapped
    }

    /**
     * @param values Exceptions to maintenance window. Non-emergency maintenance should not occur in these windows. A cluster can have up to 20 maintenance exclusions at a time [Maintenance Window and Exclusions](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions)
     */
    @JvmName("fqcaegkqclywryeu")
    public suspend fun maintenanceExclusions(vararg values: ClusterMaintenancePolicyMaintenanceExclusionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.maintenanceExclusions = mapped
    }

    /**
     * @param value Time window for recurring maintenance operations.
     * Specify `start_time` and `end_time` in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) "Zulu" date format.  The start time's date is
     * the initial date that the window starts, and the end time is used for calculating duration.  Specify `recurrence` in
     * [RFC5545](https://tools.ietf.org/html/rfc5545#section-3.8.5.3) RRULE format, to specify when this recurs.
     * Note that GKE may accept other formats, but will return values in UTC, causing a permanent diff.
     * Examples:
     * ```
     * maintenance_policy {
     * recurring_window {
     * start_time = "2019-08-01T02:00:00Z"
     * end_time = "2019-08-01T06:00:00Z"
     * recurrence = "FREQ=DAILY"
     * }
     * }
     * ```
     * ```
     * maintenance_policy {
     * recurring_window {
     * start_time = "2019-01-01T09:00:00Z"
     * end_time = "2019-01-01T17:00:00Z"
     * recurrence = "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR"
     * }
     * }
     * ```
     */
    @JvmName("qvsndloursruiihe")
    public suspend fun recurringWindow(`value`: ClusterMaintenancePolicyRecurringWindowArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.recurringWindow = mapped
    }

    /**
     * @param argument Time window for recurring maintenance operations.
     * Specify `start_time` and `end_time` in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) "Zulu" date format.  The start time's date is
     * the initial date that the window starts, and the end time is used for calculating duration.  Specify `recurrence` in
     * [RFC5545](https://tools.ietf.org/html/rfc5545#section-3.8.5.3) RRULE format, to specify when this recurs.
     * Note that GKE may accept other formats, but will return values in UTC, causing a permanent diff.
     * Examples:
     * ```
     * maintenance_policy {
     * recurring_window {
     * start_time = "2019-08-01T02:00:00Z"
     * end_time = "2019-08-01T06:00:00Z"
     * recurrence = "FREQ=DAILY"
     * }
     * }
     * ```
     * ```
     * maintenance_policy {
     * recurring_window {
     * start_time = "2019-01-01T09:00:00Z"
     * end_time = "2019-01-01T17:00:00Z"
     * recurrence = "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR"
     * }
     * }
     * ```
     */
    @JvmName("jmvphpmkwgikklyh")
    public suspend fun recurringWindow(argument: suspend ClusterMaintenancePolicyRecurringWindowArgsBuilder.() -> Unit) {
        val toBeMapped = ClusterMaintenancePolicyRecurringWindowArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.recurringWindow = mapped
    }

    internal fun build(): ClusterMaintenancePolicyArgs = ClusterMaintenancePolicyArgs(
        dailyMaintenanceWindow = dailyMaintenanceWindow,
        maintenanceExclusions = maintenanceExclusions,
        recurringWindow = recurringWindow,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy