
com.pulumi.awsnative.ssm.kotlin.PatchBaseline.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.ssm.kotlin
import com.pulumi.awsnative.kotlin.outputs.Tag
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.outputs.PatchBaselinePatchFilterGroup
import com.pulumi.awsnative.ssm.kotlin.outputs.PatchBaselinePatchSource
import com.pulumi.awsnative.ssm.kotlin.outputs.PatchBaselineRuleGroup
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
import com.pulumi.awsnative.ssm.kotlin.enums.PatchBaselineApprovedPatchesComplianceLevel.Companion.toKotlin as patchBaselineApprovedPatchesComplianceLevelToKotlin
import com.pulumi.awsnative.ssm.kotlin.enums.PatchBaselineOperatingSystem.Companion.toKotlin as patchBaselineOperatingSystemToKotlin
import com.pulumi.awsnative.ssm.kotlin.enums.PatchBaselineRejectedPatchesAction.Companion.toKotlin as patchBaselineRejectedPatchesActionToKotlin
import com.pulumi.awsnative.ssm.kotlin.outputs.PatchBaselinePatchFilterGroup.Companion.toKotlin as patchBaselinePatchFilterGroupToKotlin
import com.pulumi.awsnative.ssm.kotlin.outputs.PatchBaselinePatchSource.Companion.toKotlin as patchBaselinePatchSourceToKotlin
import com.pulumi.awsnative.ssm.kotlin.outputs.PatchBaselineRuleGroup.Companion.toKotlin as patchBaselineRuleGroupToKotlin
/**
* Builder for [PatchBaseline].
*/
@PulumiTagMarker
public class PatchBaselineResourceBuilder internal constructor() {
public var name: String? = null
public var args: PatchBaselineArgs = PatchBaselineArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend PatchBaselineArgsBuilder.() -> Unit) {
val builder = PatchBaselineArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): PatchBaseline {
val builtJavaResource = com.pulumi.awsnative.ssm.PatchBaseline(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return PatchBaseline(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::SSM::PatchBaseline
* ## Example Usage
* ### Example
* No Java example available.
* ### Example
* No Java example available.
*/
public class PatchBaseline internal constructor(
override val javaResource: com.pulumi.awsnative.ssm.PatchBaseline,
) : KotlinCustomResource(javaResource, PatchBaselineMapper) {
/**
* A set of rules used to include patches in the baseline.
*/
public val approvalRules: Output?
get() = javaResource.approvalRules().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> patchBaselineRuleGroupToKotlin(args0) })
}).orElse(null)
})
/**
* A list of explicitly approved patches for the baseline.
*/
public val approvedPatches: Output>?
get() = javaResource.approvedPatches().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 -> args0 })
}).orElse(null)
})
/**
* 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.
*/
public val approvedPatchesComplianceLevel: Output?
get() = javaResource.approvedPatchesComplianceLevel().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
patchBaselineApprovedPatchesComplianceLevelToKotlin(args0)
})
}).orElse(null)
})
/**
* 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.
*/
public val approvedPatchesEnableNonSecurity: Output?
get() = javaResource.approvedPatchesEnableNonSecurity().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The ID of the patch baseline.
*/
public val awsId: Output
get() = javaResource.awsId().applyValue({ args0 -> args0 })
/**
* Set the baseline as default baseline. Only registering to default patch baseline is allowed.
*/
public val defaultBaseline: Output?
get() = javaResource.defaultBaseline().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The description of the patch baseline.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* A set of global filters used to include patches in the baseline.
*/
public val globalFilters: Output?
get() = javaResource.globalFilters().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> patchBaselinePatchFilterGroupToKotlin(args0) })
}).orElse(null)
})
/**
* The name of the patch baseline.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* Defines the operating system the patch baseline applies to. The Default value is WINDOWS.
*/
public val operatingSystem: Output?
get() = javaResource.operatingSystem().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> patchBaselineOperatingSystemToKotlin(args0) })
}).orElse(null)
})
/**
* PatchGroups is used to associate instances with a specific patch baseline
*/
public val patchGroups: Output>?
get() = javaResource.patchGroups().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0
})
}).orElse(null)
})
/**
* A list of explicitly rejected patches for the baseline.
*/
public val rejectedPatches: Output>?
get() = javaResource.rejectedPatches().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 -> args0 })
}).orElse(null)
})
/**
* The action for Patch Manager to take on patches included in the RejectedPackages list.
*/
public val rejectedPatchesAction: Output?
get() = javaResource.rejectedPatchesAction().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> patchBaselineRejectedPatchesActionToKotlin(args0) })
}).orElse(null)
})
/**
* Information about the patches to use to update the instances, including target operating systems and source repository. Applies to Linux instances only.
*/
public val sources: Output>?
get() = javaResource.sources().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> patchBaselinePatchSourceToKotlin(args0) })
})
}).orElse(null)
})
/**
* Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
}
public object PatchBaselineMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.ssm.PatchBaseline::class == javaResource::class
override fun map(javaResource: Resource): PatchBaseline = PatchBaseline(
javaResource as
com.pulumi.awsnative.ssm.PatchBaseline,
)
}
/**
* @see [PatchBaseline].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [PatchBaseline].
*/
public suspend fun patchBaseline(
name: String,
block: suspend PatchBaselineResourceBuilder.() -> Unit,
): PatchBaseline {
val builder = PatchBaselineResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [PatchBaseline].
* @param name The _unique_ name of the resulting resource.
*/
public fun patchBaseline(name: String): PatchBaseline {
val builder = PatchBaselineResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy