com.pulumi.awsnative.imagebuilder.kotlin.inputs.LifecyclePolicyPolicyDetailArgs.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.imagebuilder.kotlin.inputs
import com.pulumi.awsnative.imagebuilder.inputs.LifecyclePolicyPolicyDetailArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* The policy detail of the lifecycle policy.
* @property action Configuration details for the policy action.
* @property exclusionRules Additional rules to specify resources that should be exempt from policy actions.
* @property filter Specifies the resources that the lifecycle policy applies to.
*/
public data class LifecyclePolicyPolicyDetailArgs(
public val action: Output,
public val exclusionRules: Output? = null,
public val filter: Output,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.awsnative.imagebuilder.inputs.LifecyclePolicyPolicyDetailArgs =
com.pulumi.awsnative.imagebuilder.inputs.LifecyclePolicyPolicyDetailArgs.builder()
.action(action.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.exclusionRules(exclusionRules?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.filter(filter.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}
/**
* Builder for [LifecyclePolicyPolicyDetailArgs].
*/
@PulumiTagMarker
public class LifecyclePolicyPolicyDetailArgsBuilder internal constructor() {
private var action: Output? = null
private var exclusionRules: Output? = null
private var filter: Output? = null
/**
* @param value Configuration details for the policy action.
*/
@JvmName("woayfvycbouuerfy")
public suspend fun action(`value`: Output) {
this.action = value
}
/**
* @param value Additional rules to specify resources that should be exempt from policy actions.
*/
@JvmName("qfydbbkcfoykssel")
public suspend fun exclusionRules(`value`: Output) {
this.exclusionRules = value
}
/**
* @param value Specifies the resources that the lifecycle policy applies to.
*/
@JvmName("xyidjnonbwoibamq")
public suspend fun filter(`value`: Output) {
this.filter = value
}
/**
* @param value Configuration details for the policy action.
*/
@JvmName("dgqqyxhaxmbbuuwg")
public suspend fun action(`value`: LifecyclePolicyActionArgs) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.action = mapped
}
/**
* @param argument Configuration details for the policy action.
*/
@JvmName("saytgnueiycwchwi")
public suspend fun action(argument: suspend LifecyclePolicyActionArgsBuilder.() -> Unit) {
val toBeMapped = LifecyclePolicyActionArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.action = mapped
}
/**
* @param value Additional rules to specify resources that should be exempt from policy actions.
*/
@JvmName("ovahjnkwrjljjygj")
public suspend fun exclusionRules(`value`: LifecyclePolicyExclusionRulesArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.exclusionRules = mapped
}
/**
* @param argument Additional rules to specify resources that should be exempt from policy actions.
*/
@JvmName("ufdarewwywhgsebx")
public suspend fun exclusionRules(argument: suspend LifecyclePolicyExclusionRulesArgsBuilder.() -> Unit) {
val toBeMapped = LifecyclePolicyExclusionRulesArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.exclusionRules = mapped
}
/**
* @param value Specifies the resources that the lifecycle policy applies to.
*/
@JvmName("mkbmvflogkjpntqx")
public suspend fun filter(`value`: LifecyclePolicyFilterArgs) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.filter = mapped
}
/**
* @param argument Specifies the resources that the lifecycle policy applies to.
*/
@JvmName("dacaenijycjcdknb")
public suspend fun filter(argument: suspend LifecyclePolicyFilterArgsBuilder.() -> Unit) {
val toBeMapped = LifecyclePolicyFilterArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.filter = mapped
}
internal fun build(): LifecyclePolicyPolicyDetailArgs = LifecyclePolicyPolicyDetailArgs(
action = action ?: throw PulumiNullFieldException("action"),
exclusionRules = exclusionRules,
filter = filter ?: throw PulumiNullFieldException("filter"),
)
}