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

com.pulumi.awsnative.ssm.kotlin.PatchBaselineArgs.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

import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.awsnative.ssm.PatchBaselineArgs.builder
import com.pulumi.awsnative.ssm.kotlin.enums.PatchBaselineApprovedPatchesComplianceLevel
import com.pulumi.awsnative.ssm.kotlin.enums.PatchBaselineOperatingSystem
import com.pulumi.awsnative.ssm.kotlin.enums.PatchBaselineRejectedPatchesAction
import com.pulumi.awsnative.ssm.kotlin.inputs.PatchBaselinePatchFilterGroupArgs
import com.pulumi.awsnative.ssm.kotlin.inputs.PatchBaselinePatchFilterGroupArgsBuilder
import com.pulumi.awsnative.ssm.kotlin.inputs.PatchBaselinePatchSourceArgs
import com.pulumi.awsnative.ssm.kotlin.inputs.PatchBaselinePatchSourceArgsBuilder
import com.pulumi.awsnative.ssm.kotlin.inputs.PatchBaselineRuleGroupArgs
import com.pulumi.awsnative.ssm.kotlin.inputs.PatchBaselineRuleGroupArgsBuilder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Resource Type definition for AWS::SSM::PatchBaseline
 * ## Example Usage
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 * @property approvalRules A set of rules used to include patches in the baseline.
 * @property approvedPatches A list of explicitly approved patches for the baseline.
 * @property approvedPatchesComplianceLevel Defines the compliance level for approved patches. This means that if an approved patch is reported as missing, this is the severity of the compliance violation. The default value is UNSPECIFIED.
 * @property approvedPatchesEnableNonSecurity Indicates whether the list of approved patches includes non-security updates that should be applied to the instances. The default value is 'false'. Applies to Linux instances only.
 * @property defaultBaseline Set the baseline as default baseline. Only registering to default patch baseline is allowed.
 * @property description The description of the patch baseline.
 * @property globalFilters A set of global filters used to include patches in the baseline.
 * @property name The name of the patch baseline.
 * @property operatingSystem Defines the operating system the patch baseline applies to. The Default value is WINDOWS.
 * @property patchGroups PatchGroups is used to associate instances with a specific patch baseline
 * @property rejectedPatches A list of explicitly rejected patches for the baseline.
 * @property rejectedPatchesAction The action for Patch Manager to take on patches included in the RejectedPackages list.
 * @property sources Information about the patches to use to update the instances, including target operating systems and source repository. Applies to Linux instances only.
 * @property tags Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways.
 */
public data class PatchBaselineArgs(
    public val approvalRules: Output? = null,
    public val approvedPatches: Output>? = null,
    public val approvedPatchesComplianceLevel: Output? =
        null,
    public val approvedPatchesEnableNonSecurity: Output? = null,
    public val defaultBaseline: Output? = null,
    public val description: Output? = null,
    public val globalFilters: Output? = null,
    public val name: Output? = null,
    public val operatingSystem: Output? = null,
    public val patchGroups: Output>? = null,
    public val rejectedPatches: Output>? = null,
    public val rejectedPatchesAction: Output? = null,
    public val sources: Output>? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.ssm.PatchBaselineArgs =
        com.pulumi.awsnative.ssm.PatchBaselineArgs.builder()
            .approvalRules(approvalRules?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .approvedPatches(approvedPatches?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .approvedPatchesComplianceLevel(
                approvedPatchesComplianceLevel?.applyValue({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                }),
            )
            .approvedPatchesEnableNonSecurity(approvedPatchesEnableNonSecurity?.applyValue({ args0 -> args0 }))
            .defaultBaseline(defaultBaseline?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .globalFilters(globalFilters?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .name(name?.applyValue({ args0 -> args0 }))
            .operatingSystem(operatingSystem?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .patchGroups(patchGroups?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .rejectedPatches(rejectedPatches?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .rejectedPatchesAction(
                rejectedPatchesAction?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .sources(
                sources?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [PatchBaselineArgs].
 */
@PulumiTagMarker
public class PatchBaselineArgsBuilder internal constructor() {
    private var approvalRules: Output? = null

    private var approvedPatches: Output>? = null

    private var approvedPatchesComplianceLevel: Output? =
        null

    private var approvedPatchesEnableNonSecurity: Output? = null

    private var defaultBaseline: Output? = null

    private var description: Output? = null

    private var globalFilters: Output? = null

    private var name: Output? = null

    private var operatingSystem: Output? = null

    private var patchGroups: Output>? = null

    private var rejectedPatches: Output>? = null

    private var rejectedPatchesAction: Output? = null

    private var sources: Output>? = null

    private var tags: Output>? = null

    /**
     * @param value A set of rules used to include patches in the baseline.
     */
    @JvmName("vylrmpoybhyahdlm")
    public suspend fun approvalRules(`value`: Output) {
        this.approvalRules = value
    }

    /**
     * @param value A list of explicitly approved patches for the baseline.
     */
    @JvmName("egloaqiqmxyfvtgq")
    public suspend fun approvedPatches(`value`: Output>) {
        this.approvedPatches = value
    }

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

    /**
     * @param values A list of explicitly approved patches for the baseline.
     */
    @JvmName("hijikcbdcbpxxeiu")
    public suspend fun approvedPatches(values: List>) {
        this.approvedPatches = Output.all(values)
    }

    /**
     * @param value Defines the compliance level for approved patches. This means that if an approved patch is reported as missing, this is the severity of the compliance violation. The default value is UNSPECIFIED.
     */
    @JvmName("vhjajyhobltopkab")
    public suspend fun approvedPatchesComplianceLevel(`value`: Output) {
        this.approvedPatchesComplianceLevel = value
    }

    /**
     * @param value Indicates whether the list of approved patches includes non-security updates that should be applied to the instances. The default value is 'false'. Applies to Linux instances only.
     */
    @JvmName("sposexirbqgpwglo")
    public suspend fun approvedPatchesEnableNonSecurity(`value`: Output) {
        this.approvedPatchesEnableNonSecurity = value
    }

    /**
     * @param value Set the baseline as default baseline. Only registering to default patch baseline is allowed.
     */
    @JvmName("dhbmdabxpwbcxadr")
    public suspend fun defaultBaseline(`value`: Output) {
        this.defaultBaseline = value
    }

    /**
     * @param value The description of the patch baseline.
     */
    @JvmName("mykhteyxfhjaduvx")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value A set of global filters used to include patches in the baseline.
     */
    @JvmName("qgxkongvakujfhid")
    public suspend fun globalFilters(`value`: Output) {
        this.globalFilters = value
    }

    /**
     * @param value The name of the patch baseline.
     */
    @JvmName("ygxogkrvywurxlac")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Defines the operating system the patch baseline applies to. The Default value is WINDOWS.
     */
    @JvmName("ochfsytipypjvjly")
    public suspend fun operatingSystem(`value`: Output) {
        this.operatingSystem = value
    }

    /**
     * @param value PatchGroups is used to associate instances with a specific patch baseline
     */
    @JvmName("fsxdmffjbvnkllaw")
    public suspend fun patchGroups(`value`: Output>) {
        this.patchGroups = value
    }

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

    /**
     * @param values PatchGroups is used to associate instances with a specific patch baseline
     */
    @JvmName("himndagxbnskqoot")
    public suspend fun patchGroups(values: List>) {
        this.patchGroups = Output.all(values)
    }

    /**
     * @param value A list of explicitly rejected patches for the baseline.
     */
    @JvmName("qwbnddqdthjiohkd")
    public suspend fun rejectedPatches(`value`: Output>) {
        this.rejectedPatches = value
    }

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

    /**
     * @param values A list of explicitly rejected patches for the baseline.
     */
    @JvmName("uvmmjrmxlrfjujfv")
    public suspend fun rejectedPatches(values: List>) {
        this.rejectedPatches = Output.all(values)
    }

    /**
     * @param value The action for Patch Manager to take on patches included in the RejectedPackages list.
     */
    @JvmName("tffqkidejqrskmke")
    public suspend fun rejectedPatchesAction(`value`: Output) {
        this.rejectedPatchesAction = value
    }

    /**
     * @param value Information about the patches to use to update the instances, including target operating systems and source repository. Applies to Linux instances only.
     */
    @JvmName("balksshsitrgtlpi")
    public suspend fun sources(`value`: Output>) {
        this.sources = value
    }

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

    /**
     * @param values Information about the patches to use to update the instances, including target operating systems and source repository. Applies to Linux instances only.
     */
    @JvmName("exrsybwnxuntqcod")
    public suspend fun sources(values: List>) {
        this.sources = Output.all(values)
    }

    /**
     * @param value Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways.
     */
    @JvmName("ofxgqpjtaakjbrdp")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways.
     */
    @JvmName("hxjuivpfeblfltoj")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value A set of rules used to include patches in the baseline.
     */
    @JvmName("wqwafixurwdfwaev")
    public suspend fun approvalRules(`value`: PatchBaselineRuleGroupArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.approvalRules = mapped
    }

    /**
     * @param argument A set of rules used to include patches in the baseline.
     */
    @JvmName("nfmhfdjmpkxwhtxq")
    public suspend fun approvalRules(argument: suspend PatchBaselineRuleGroupArgsBuilder.() -> Unit) {
        val toBeMapped = PatchBaselineRuleGroupArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.approvalRules = mapped
    }

    /**
     * @param value A list of explicitly approved patches for the baseline.
     */
    @JvmName("rkgfpevntnumitag")
    public suspend fun approvedPatches(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.approvedPatches = mapped
    }

    /**
     * @param values A list of explicitly approved patches for the baseline.
     */
    @JvmName("tjwqejjqqwclgook")
    public suspend fun approvedPatches(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.approvedPatches = mapped
    }

    /**
     * @param value Defines the compliance level for approved patches. This means that if an approved patch is reported as missing, this is the severity of the compliance violation. The default value is UNSPECIFIED.
     */
    @JvmName("gscavopmesldwfrq")
    public suspend fun approvedPatchesComplianceLevel(`value`: PatchBaselineApprovedPatchesComplianceLevel?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.approvedPatchesComplianceLevel = mapped
    }

    /**
     * @param value Indicates whether the list of approved patches includes non-security updates that should be applied to the instances. The default value is 'false'. Applies to Linux instances only.
     */
    @JvmName("curmvgjriukuulds")
    public suspend fun approvedPatchesEnableNonSecurity(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.approvedPatchesEnableNonSecurity = mapped
    }

    /**
     * @param value Set the baseline as default baseline. Only registering to default patch baseline is allowed.
     */
    @JvmName("viynsnxtaktcnwbm")
    public suspend fun defaultBaseline(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.defaultBaseline = mapped
    }

    /**
     * @param value The description of the patch baseline.
     */
    @JvmName("onvxkdiitjvcbpeu")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value A set of global filters used to include patches in the baseline.
     */
    @JvmName("tbffinyotwxejdsr")
    public suspend fun globalFilters(`value`: PatchBaselinePatchFilterGroupArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.globalFilters = mapped
    }

    /**
     * @param argument A set of global filters used to include patches in the baseline.
     */
    @JvmName("orrxhiccsocmidur")
    public suspend fun globalFilters(argument: suspend PatchBaselinePatchFilterGroupArgsBuilder.() -> Unit) {
        val toBeMapped = PatchBaselinePatchFilterGroupArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.globalFilters = mapped
    }

    /**
     * @param value The name of the patch baseline.
     */
    @JvmName("gsbeyfejvakrdldh")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Defines the operating system the patch baseline applies to. The Default value is WINDOWS.
     */
    @JvmName("meuejtxoixrdwnuu")
    public suspend fun operatingSystem(`value`: PatchBaselineOperatingSystem?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.operatingSystem = mapped
    }

    /**
     * @param value PatchGroups is used to associate instances with a specific patch baseline
     */
    @JvmName("edxkhitsynytqtvu")
    public suspend fun patchGroups(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.patchGroups = mapped
    }

    /**
     * @param values PatchGroups is used to associate instances with a specific patch baseline
     */
    @JvmName("rghyalryfssjdolr")
    public suspend fun patchGroups(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.patchGroups = mapped
    }

    /**
     * @param value A list of explicitly rejected patches for the baseline.
     */
    @JvmName("lqxqepccwwegxnrh")
    public suspend fun rejectedPatches(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.rejectedPatches = mapped
    }

    /**
     * @param values A list of explicitly rejected patches for the baseline.
     */
    @JvmName("srgsdpjxcidpimtp")
    public suspend fun rejectedPatches(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.rejectedPatches = mapped
    }

    /**
     * @param value The action for Patch Manager to take on patches included in the RejectedPackages list.
     */
    @JvmName("ccirjnnooucwagfq")
    public suspend fun rejectedPatchesAction(`value`: PatchBaselineRejectedPatchesAction?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.rejectedPatchesAction = mapped
    }

    /**
     * @param value Information about the patches to use to update the instances, including target operating systems and source repository. Applies to Linux instances only.
     */
    @JvmName("tauqdaehwyhkkeig")
    public suspend fun sources(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sources = mapped
    }

    /**
     * @param argument Information about the patches to use to update the instances, including target operating systems and source repository. Applies to Linux instances only.
     */
    @JvmName("syvrjoctvcyirbds")
    public suspend fun sources(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            PatchBaselinePatchSourceArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.sources = mapped
    }

    /**
     * @param argument Information about the patches to use to update the instances, including target operating systems and source repository. Applies to Linux instances only.
     */
    @JvmName("gxqqbudileiptkec")
    public suspend fun sources(vararg argument: suspend PatchBaselinePatchSourceArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            PatchBaselinePatchSourceArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.sources = mapped
    }

    /**
     * @param argument Information about the patches to use to update the instances, including target operating systems and source repository. Applies to Linux instances only.
     */
    @JvmName("hjmmcnhukmfxtqjy")
    public suspend fun sources(argument: suspend PatchBaselinePatchSourceArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            PatchBaselinePatchSourceArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.sources = mapped
    }

    /**
     * @param values Information about the patches to use to update the instances, including target operating systems and source repository. Applies to Linux instances only.
     */
    @JvmName("teqnkayfpwjvbnkh")
    public suspend fun sources(vararg values: PatchBaselinePatchSourceArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.sources = mapped
    }

    /**
     * @param value Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways.
     */
    @JvmName("hbhyuxaxpaocfyvw")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways.
     */
    @JvmName("sqcckilulqwyyicg")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways.
     */
    @JvmName("byfvaanrvbbijfwb")
    public suspend fun tags(vararg argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways.
     */
    @JvmName("doctgjeqwajdiqen")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways.
     */
    @JvmName("cmehbhjlheleltul")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): PatchBaselineArgs = PatchBaselineArgs(
        approvalRules = approvalRules,
        approvedPatches = approvedPatches,
        approvedPatchesComplianceLevel = approvedPatchesComplianceLevel,
        approvedPatchesEnableNonSecurity = approvedPatchesEnableNonSecurity,
        defaultBaseline = defaultBaseline,
        description = description,
        globalFilters = globalFilters,
        name = name,
        operatingSystem = operatingSystem,
        patchGroups = patchGroups,
        rejectedPatches = rejectedPatches,
        rejectedPatchesAction = rejectedPatchesAction,
        sources = sources,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy