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

com.pulumi.awsnative.shield.kotlin.ProactiveEngagement.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.shield.kotlin

import com.pulumi.awsnative.shield.kotlin.enums.ProactiveEngagementStatus
import com.pulumi.awsnative.shield.kotlin.outputs.ProactiveEngagementEmergencyContact
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.shield.kotlin.enums.ProactiveEngagementStatus.Companion.toKotlin as proactiveEngagementStatusToKotlin
import com.pulumi.awsnative.shield.kotlin.outputs.ProactiveEngagementEmergencyContact.Companion.toKotlin as proactiveEngagementEmergencyContactToKotlin

/**
 * Builder for [ProactiveEngagement].
 */
@PulumiTagMarker
public class ProactiveEngagementResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: ProactiveEngagementArgs = ProactiveEngagementArgs()

    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 ProactiveEngagementArgsBuilder.() -> Unit) {
        val builder = ProactiveEngagementArgsBuilder()
        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(): ProactiveEngagement {
        val builtJavaResource = com.pulumi.awsnative.shield.ProactiveEngagement(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return ProactiveEngagement(builtJavaResource)
    }
}

/**
 * Authorizes the Shield Response Team (SRT) to use email and phone to notify contacts about escalations to the SRT and to initiate proactive customer support.
 */
public class ProactiveEngagement internal constructor(
    override val javaResource: com.pulumi.awsnative.shield.ProactiveEngagement,
) : KotlinCustomResource(javaResource, ProactiveEngagementMapper) {
    /**
     * The ID of the account that submitted the template.
     */
    public val accountId: Output
        get() = javaResource.accountId().applyValue({ args0 -> args0 })

    /**
     * A list of email addresses and phone numbers that the Shield Response Team (SRT) can use to contact you for escalations to the SRT and to initiate proactive customer support.
     * To enable proactive engagement, the contact list must include at least one phone number.
     */
    public val emergencyContactList: Output>
        get() = javaResource.emergencyContactList().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> proactiveEngagementEmergencyContactToKotlin(args0) })
            })
        })

    /**
     * If `ENABLED`, the Shield Response Team (SRT) will use email and phone to notify contacts about escalations to the SRT and to initiate proactive customer support.
     * If `DISABLED`, the SRT will not proactively notify contacts about escalations or to initiate proactive customer support.
     */
    public val proactiveEngagementStatus: Output
        get() = javaResource.proactiveEngagementStatus().applyValue({ args0 ->
            args0.let({ args0 ->
                proactiveEngagementStatusToKotlin(args0)
            })
        })
}

public object ProactiveEngagementMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.shield.ProactiveEngagement::class == javaResource::class

    override fun map(javaResource: Resource): ProactiveEngagement = ProactiveEngagement(
        javaResource
            as com.pulumi.awsnative.shield.ProactiveEngagement,
    )
}

/**
 * @see [ProactiveEngagement].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [ProactiveEngagement].
 */
public suspend fun proactiveEngagement(
    name: String,
    block: suspend ProactiveEngagementResourceBuilder.() -> Unit,
): ProactiveEngagement {
    val builder = ProactiveEngagementResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [ProactiveEngagement].
 * @param name The _unique_ name of the resulting resource.
 */
public fun proactiveEngagement(name: String): ProactiveEngagement {
    val builder = ProactiveEngagementResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy