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

com.pulumi.awsnative.ssm.kotlin.inputs.PatchBaselineRuleArgs.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: 1.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.ssm.kotlin.inputs

import com.pulumi.awsnative.ssm.inputs.PatchBaselineRuleArgs.builder
import com.pulumi.awsnative.ssm.kotlin.enums.PatchBaselineRuleComplianceLevel
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * Defines an approval rule for a patch baseline.
 * @property approveAfterDays The number of days after the release date of each patch matched by the rule that the patch is marked as approved in the patch baseline. For example, a value of `7` means that patches are approved seven days after they are released.
 * You must specify a value for `ApproveAfterDays` .
 * Exception: Not supported on Debian Server or Ubuntu Server.
 * @property approveUntilDate The cutoff date for auto approval of released patches. Any patches released on or before this date are installed automatically. Not supported on Debian Server or Ubuntu Server.
 * Enter dates in the format `YYYY-MM-DD` . For example, `2021-12-31` .
 * @property complianceLevel A compliance severity level for all approved patches in a patch baseline. Valid compliance severity levels include the following: `UNSPECIFIED` , `CRITICAL` , `HIGH` , `MEDIUM` , `LOW` , and `INFORMATIONAL` .
 * @property enableNonSecurity For managed nodes identified by the approval rule filters, enables a patch baseline to apply non-security updates available in the specified repository. The default value is `false` . Applies to Linux managed nodes only.
 * @property patchFilterGroup The patch filter group that defines the criteria for the rule.
 */
public data class PatchBaselineRuleArgs(
    public val approveAfterDays: Output? = null,
    public val approveUntilDate: Output? = null,
    public val complianceLevel: Output? = null,
    public val enableNonSecurity: Output? = null,
    public val patchFilterGroup: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.ssm.inputs.PatchBaselineRuleArgs =
        com.pulumi.awsnative.ssm.inputs.PatchBaselineRuleArgs.builder()
            .approveAfterDays(approveAfterDays?.applyValue({ args0 -> args0 }))
            .approveUntilDate(approveUntilDate?.applyValue({ args0 -> args0 }))
            .complianceLevel(complianceLevel?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .enableNonSecurity(enableNonSecurity?.applyValue({ args0 -> args0 }))
            .patchFilterGroup(
                patchFilterGroup?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [PatchBaselineRuleArgs].
 */
@PulumiTagMarker
public class PatchBaselineRuleArgsBuilder internal constructor() {
    private var approveAfterDays: Output? = null

    private var approveUntilDate: Output? = null

    private var complianceLevel: Output? = null

    private var enableNonSecurity: Output? = null

    private var patchFilterGroup: Output? = null

    /**
     * @param value The number of days after the release date of each patch matched by the rule that the patch is marked as approved in the patch baseline. For example, a value of `7` means that patches are approved seven days after they are released.
     * You must specify a value for `ApproveAfterDays` .
     * Exception: Not supported on Debian Server or Ubuntu Server.
     */
    @JvmName("lgoghldwnhnoowlv")
    public suspend fun approveAfterDays(`value`: Output) {
        this.approveAfterDays = value
    }

    /**
     * @param value The cutoff date for auto approval of released patches. Any patches released on or before this date are installed automatically. Not supported on Debian Server or Ubuntu Server.
     * Enter dates in the format `YYYY-MM-DD` . For example, `2021-12-31` .
     */
    @JvmName("vasmmansardhhpnk")
    public suspend fun approveUntilDate(`value`: Output) {
        this.approveUntilDate = value
    }

    /**
     * @param value A compliance severity level for all approved patches in a patch baseline. Valid compliance severity levels include the following: `UNSPECIFIED` , `CRITICAL` , `HIGH` , `MEDIUM` , `LOW` , and `INFORMATIONAL` .
     */
    @JvmName("bqaafemmdbdkbbwx")
    public suspend fun complianceLevel(`value`: Output) {
        this.complianceLevel = value
    }

    /**
     * @param value For managed nodes identified by the approval rule filters, enables a patch baseline to apply non-security updates available in the specified repository. The default value is `false` . Applies to Linux managed nodes only.
     */
    @JvmName("ojorpsrekeyrfprw")
    public suspend fun enableNonSecurity(`value`: Output) {
        this.enableNonSecurity = value
    }

    /**
     * @param value The patch filter group that defines the criteria for the rule.
     */
    @JvmName("cteijgyjtkvfkghy")
    public suspend fun patchFilterGroup(`value`: Output) {
        this.patchFilterGroup = value
    }

    /**
     * @param value The number of days after the release date of each patch matched by the rule that the patch is marked as approved in the patch baseline. For example, a value of `7` means that patches are approved seven days after they are released.
     * You must specify a value for `ApproveAfterDays` .
     * Exception: Not supported on Debian Server or Ubuntu Server.
     */
    @JvmName("ndqmlnjocusqpynn")
    public suspend fun approveAfterDays(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.approveAfterDays = mapped
    }

    /**
     * @param value The cutoff date for auto approval of released patches. Any patches released on or before this date are installed automatically. Not supported on Debian Server or Ubuntu Server.
     * Enter dates in the format `YYYY-MM-DD` . For example, `2021-12-31` .
     */
    @JvmName("mxblcjlusoqswxyl")
    public suspend fun approveUntilDate(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.approveUntilDate = mapped
    }

    /**
     * @param value A compliance severity level for all approved patches in a patch baseline. Valid compliance severity levels include the following: `UNSPECIFIED` , `CRITICAL` , `HIGH` , `MEDIUM` , `LOW` , and `INFORMATIONAL` .
     */
    @JvmName("apjvmcoxipjhqfts")
    public suspend fun complianceLevel(`value`: PatchBaselineRuleComplianceLevel?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.complianceLevel = mapped
    }

    /**
     * @param value For managed nodes identified by the approval rule filters, enables a patch baseline to apply non-security updates available in the specified repository. The default value is `false` . Applies to Linux managed nodes only.
     */
    @JvmName("ynukwhuwxdsolfjk")
    public suspend fun enableNonSecurity(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableNonSecurity = mapped
    }

    /**
     * @param value The patch filter group that defines the criteria for the rule.
     */
    @JvmName("lhohmundfwadxuoi")
    public suspend fun patchFilterGroup(`value`: PatchBaselinePatchFilterGroupArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.patchFilterGroup = mapped
    }

    /**
     * @param argument The patch filter group that defines the criteria for the rule.
     */
    @JvmName("okkrjxbhfmhwpybn")
    public suspend fun patchFilterGroup(argument: suspend PatchBaselinePatchFilterGroupArgsBuilder.() -> Unit) {
        val toBeMapped = PatchBaselinePatchFilterGroupArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.patchFilterGroup = mapped
    }

    internal fun build(): PatchBaselineRuleArgs = PatchBaselineRuleArgs(
        approveAfterDays = approveAfterDays,
        approveUntilDate = approveUntilDate,
        complianceLevel = complianceLevel,
        enableNonSecurity = enableNonSecurity,
        patchFilterGroup = patchFilterGroup,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy