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

com.pulumi.aws.dlm.kotlin.inputs.LifecyclePolicyPolicyDetailsEventSourceParametersArgs.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: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.dlm.kotlin.inputs

import com.pulumi.aws.dlm.inputs.LifecyclePolicyPolicyDetailsEventSourceParametersArgs.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 kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property descriptionRegex The snapshot description that can trigger the policy. The description pattern is specified using a regular expression. The policy runs only if a snapshot with a description that matches the specified pattern is shared with your account.
 * @property eventType The type of event. Currently, only `shareSnapshot` events are supported.
 * @property snapshotOwners The IDs of the AWS accounts that can trigger policy by sharing snapshots with your account. The policy only runs if one of the specified AWS accounts shares a snapshot with your account.
 */
public data class LifecyclePolicyPolicyDetailsEventSourceParametersArgs(
    public val descriptionRegex: Output,
    public val eventType: Output,
    public val snapshotOwners: Output>,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.dlm.inputs.LifecyclePolicyPolicyDetailsEventSourceParametersArgs =
        com.pulumi.aws.dlm.inputs.LifecyclePolicyPolicyDetailsEventSourceParametersArgs.builder()
            .descriptionRegex(descriptionRegex.applyValue({ args0 -> args0 }))
            .eventType(eventType.applyValue({ args0 -> args0 }))
            .snapshotOwners(snapshotOwners.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [LifecyclePolicyPolicyDetailsEventSourceParametersArgs].
 */
@PulumiTagMarker
public class LifecyclePolicyPolicyDetailsEventSourceParametersArgsBuilder internal constructor() {
    private var descriptionRegex: Output? = null

    private var eventType: Output? = null

    private var snapshotOwners: Output>? = null

    /**
     * @param value The snapshot description that can trigger the policy. The description pattern is specified using a regular expression. The policy runs only if a snapshot with a description that matches the specified pattern is shared with your account.
     */
    @JvmName("ybmhrvsrtcupvlnb")
    public suspend fun descriptionRegex(`value`: Output) {
        this.descriptionRegex = value
    }

    /**
     * @param value The type of event. Currently, only `shareSnapshot` events are supported.
     */
    @JvmName("jveekfdphikbsqbn")
    public suspend fun eventType(`value`: Output) {
        this.eventType = value
    }

    /**
     * @param value The IDs of the AWS accounts that can trigger policy by sharing snapshots with your account. The policy only runs if one of the specified AWS accounts shares a snapshot with your account.
     */
    @JvmName("tiulbytjfjayakwr")
    public suspend fun snapshotOwners(`value`: Output>) {
        this.snapshotOwners = value
    }

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

    /**
     * @param values The IDs of the AWS accounts that can trigger policy by sharing snapshots with your account. The policy only runs if one of the specified AWS accounts shares a snapshot with your account.
     */
    @JvmName("gjnekrvbhrjgnbtp")
    public suspend fun snapshotOwners(values: List>) {
        this.snapshotOwners = Output.all(values)
    }

    /**
     * @param value The snapshot description that can trigger the policy. The description pattern is specified using a regular expression. The policy runs only if a snapshot with a description that matches the specified pattern is shared with your account.
     */
    @JvmName("wivxxoljmbyckdls")
    public suspend fun descriptionRegex(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.descriptionRegex = mapped
    }

    /**
     * @param value The type of event. Currently, only `shareSnapshot` events are supported.
     */
    @JvmName("oapggxheuadtkqei")
    public suspend fun eventType(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.eventType = mapped
    }

    /**
     * @param value The IDs of the AWS accounts that can trigger policy by sharing snapshots with your account. The policy only runs if one of the specified AWS accounts shares a snapshot with your account.
     */
    @JvmName("kmxywehfarxaruib")
    public suspend fun snapshotOwners(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.snapshotOwners = mapped
    }

    /**
     * @param values The IDs of the AWS accounts that can trigger policy by sharing snapshots with your account. The policy only runs if one of the specified AWS accounts shares a snapshot with your account.
     */
    @JvmName("ewrnucnypipxsctp")
    public suspend fun snapshotOwners(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.snapshotOwners = mapped
    }

    internal fun build(): LifecyclePolicyPolicyDetailsEventSourceParametersArgs =
        LifecyclePolicyPolicyDetailsEventSourceParametersArgs(
            descriptionRegex = descriptionRegex ?: throw PulumiNullFieldException("descriptionRegex"),
            eventType = eventType ?: throw PulumiNullFieldException("eventType"),
            snapshotOwners = snapshotOwners ?: throw PulumiNullFieldException("snapshotOwners"),
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy