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

com.pulumi.awsnative.imagebuilder.kotlin.LifecyclePolicyArgs.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: 0.122.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.imagebuilder.kotlin

import com.pulumi.awsnative.imagebuilder.LifecyclePolicyArgs.builder
import com.pulumi.awsnative.imagebuilder.kotlin.enums.LifecyclePolicyResourceType
import com.pulumi.awsnative.imagebuilder.kotlin.enums.LifecyclePolicyStatus
import com.pulumi.awsnative.imagebuilder.kotlin.inputs.LifecyclePolicyPolicyDetailArgs
import com.pulumi.awsnative.imagebuilder.kotlin.inputs.LifecyclePolicyPolicyDetailArgsBuilder
import com.pulumi.awsnative.imagebuilder.kotlin.inputs.LifecyclePolicyResourceSelectionArgs
import com.pulumi.awsnative.imagebuilder.kotlin.inputs.LifecyclePolicyResourceSelectionArgsBuilder
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Resource schema for AWS::ImageBuilder::LifecyclePolicy
 * @property description The description of the lifecycle policy.
 * @property executionRole The execution role of the lifecycle policy.
 * @property name The name of the lifecycle policy.
 * @property policyDetails The policy details of the lifecycle policy.
 * @property resourceSelection The resource selection of the lifecycle policy.
 * @property resourceType The resource type of the lifecycle policy.
 * @property status The status of the lifecycle policy.
 * @property tags The tags associated with the lifecycle policy.
 */
public data class LifecyclePolicyArgs(
    public val description: Output? = null,
    public val executionRole: Output? = null,
    public val name: Output? = null,
    public val policyDetails: Output>? = null,
    public val resourceSelection: Output? = null,
    public val resourceType: Output? = null,
    public val status: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.imagebuilder.LifecyclePolicyArgs =
        com.pulumi.awsnative.imagebuilder.LifecyclePolicyArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .executionRole(executionRole?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .policyDetails(
                policyDetails?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .resourceSelection(resourceSelection?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .resourceType(resourceType?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .status(status?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [LifecyclePolicyArgs].
 */
@PulumiTagMarker
public class LifecyclePolicyArgsBuilder internal constructor() {
    private var description: Output? = null

    private var executionRole: Output? = null

    private var name: Output? = null

    private var policyDetails: Output>? = null

    private var resourceSelection: Output? = null

    private var resourceType: Output? = null

    private var status: Output? = null

    private var tags: Output>? = null

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

    /**
     * @param value The execution role of the lifecycle policy.
     */
    @JvmName("txvwywtwaxkwfxtb")
    public suspend fun executionRole(`value`: Output) {
        this.executionRole = value
    }

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

    /**
     * @param value The policy details of the lifecycle policy.
     */
    @JvmName("dmdalwipfitviegm")
    public suspend fun policyDetails(`value`: Output>) {
        this.policyDetails = value
    }

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

    /**
     * @param values The policy details of the lifecycle policy.
     */
    @JvmName("oscnjgcotcalmeyj")
    public suspend fun policyDetails(values: List>) {
        this.policyDetails = Output.all(values)
    }

    /**
     * @param value The resource selection of the lifecycle policy.
     */
    @JvmName("xxsmwyxiwuyufycw")
    public suspend fun resourceSelection(`value`: Output) {
        this.resourceSelection = value
    }

    /**
     * @param value The resource type of the lifecycle policy.
     */
    @JvmName("uvthpvlnnwmndeex")
    public suspend fun resourceType(`value`: Output) {
        this.resourceType = value
    }

    /**
     * @param value The status of the lifecycle policy.
     */
    @JvmName("sqjhpidxcbwrgpkb")
    public suspend fun status(`value`: Output) {
        this.status = value
    }

    /**
     * @param value The tags associated with the lifecycle policy.
     */
    @JvmName("dibadpakscqttjrm")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param value The execution role of the lifecycle policy.
     */
    @JvmName("srwgnbxmsiphqqlk")
    public suspend fun executionRole(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.executionRole = mapped
    }

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

    /**
     * @param value The policy details of the lifecycle policy.
     */
    @JvmName("clngcbymncxbbqsp")
    public suspend fun policyDetails(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.policyDetails = mapped
    }

    /**
     * @param argument The policy details of the lifecycle policy.
     */
    @JvmName("dwuityyxoxnjvfad")
    public suspend fun policyDetails(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            LifecyclePolicyPolicyDetailArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.policyDetails = mapped
    }

    /**
     * @param argument The policy details of the lifecycle policy.
     */
    @JvmName("ujdvljdpxmyvcfgs")
    public suspend fun policyDetails(vararg argument: suspend LifecyclePolicyPolicyDetailArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            LifecyclePolicyPolicyDetailArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.policyDetails = mapped
    }

    /**
     * @param argument The policy details of the lifecycle policy.
     */
    @JvmName("acmrbpsyjkmlngrx")
    public suspend fun policyDetails(argument: suspend LifecyclePolicyPolicyDetailArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            LifecyclePolicyPolicyDetailArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.policyDetails = mapped
    }

    /**
     * @param values The policy details of the lifecycle policy.
     */
    @JvmName("cplnveoiflmfsita")
    public suspend fun policyDetails(vararg values: LifecyclePolicyPolicyDetailArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.policyDetails = mapped
    }

    /**
     * @param value The resource selection of the lifecycle policy.
     */
    @JvmName("eixslcgsjdiwtyxc")
    public suspend fun resourceSelection(`value`: LifecyclePolicyResourceSelectionArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceSelection = mapped
    }

    /**
     * @param argument The resource selection of the lifecycle policy.
     */
    @JvmName("ahyhrelyngtbwmtd")
    public suspend fun resourceSelection(argument: suspend LifecyclePolicyResourceSelectionArgsBuilder.() -> Unit) {
        val toBeMapped = LifecyclePolicyResourceSelectionArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.resourceSelection = mapped
    }

    /**
     * @param value The resource type of the lifecycle policy.
     */
    @JvmName("bvbcxflmpspcvmbm")
    public suspend fun resourceType(`value`: LifecyclePolicyResourceType?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceType = mapped
    }

    /**
     * @param value The status of the lifecycle policy.
     */
    @JvmName("lnxguuptxqthikpf")
    public suspend fun status(`value`: LifecyclePolicyStatus?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.status = mapped
    }

    /**
     * @param value The tags associated with the lifecycle policy.
     */
    @JvmName("vttsspebvgeifofj")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values The tags associated with the lifecycle policy.
     */
    @JvmName("mkxcepfbugsqejfd")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): LifecyclePolicyArgs = LifecyclePolicyArgs(
        description = description,
        executionRole = executionRole,
        name = name,
        policyDetails = policyDetails,
        resourceSelection = resourceSelection,
        resourceType = resourceType,
        status = status,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy