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

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

package com.pulumi.awsnative.resiliencehub.kotlin

import com.pulumi.awsnative.resiliencehub.AppArgs.builder
import com.pulumi.awsnative.resiliencehub.kotlin.enums.AppAssessmentSchedule
import com.pulumi.awsnative.resiliencehub.kotlin.inputs.AppEventSubscriptionArgs
import com.pulumi.awsnative.resiliencehub.kotlin.inputs.AppEventSubscriptionArgsBuilder
import com.pulumi.awsnative.resiliencehub.kotlin.inputs.AppPermissionModelArgs
import com.pulumi.awsnative.resiliencehub.kotlin.inputs.AppPermissionModelArgsBuilder
import com.pulumi.awsnative.resiliencehub.kotlin.inputs.AppResourceMappingArgs
import com.pulumi.awsnative.resiliencehub.kotlin.inputs.AppResourceMappingArgsBuilder
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 Type Definition for AWS::ResilienceHub::App.
 * @property appAssessmentSchedule Assessment execution schedule.
 * @property appTemplateBody A string containing full ResilienceHub app template body.
 * @property description App description.
 * @property eventSubscriptions The list of events you would like to subscribe and get notification for.
 * @property name Name of the app.
 * @property permissionModel Defines the roles and credentials that AWS Resilience Hub would use while creating the application, importing its resources, and running an assessment.
 * @property resiliencyPolicyArn Amazon Resource Name (ARN) of the Resiliency Policy.
 * @property resourceMappings An array of ResourceMapping objects.
 * @property tags Tags assigned to the resource. A tag is a label that you assign to an AWS resource. Each tag consists of a key/value pair.
 */
public data class AppArgs(
    public val appAssessmentSchedule: Output? = null,
    public val appTemplateBody: Output? = null,
    public val description: Output? = null,
    public val eventSubscriptions: Output>? = null,
    public val name: Output? = null,
    public val permissionModel: Output? = null,
    public val resiliencyPolicyArn: Output? = null,
    public val resourceMappings: Output>? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.resiliencehub.AppArgs =
        com.pulumi.awsnative.resiliencehub.AppArgs.builder()
            .appAssessmentSchedule(
                appAssessmentSchedule?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .appTemplateBody(appTemplateBody?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .eventSubscriptions(
                eventSubscriptions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .name(name?.applyValue({ args0 -> args0 }))
            .permissionModel(permissionModel?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .resiliencyPolicyArn(resiliencyPolicyArn?.applyValue({ args0 -> args0 }))
            .resourceMappings(
                resourceMappings?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [AppArgs].
 */
@PulumiTagMarker
public class AppArgsBuilder internal constructor() {
    private var appAssessmentSchedule: Output? = null

    private var appTemplateBody: Output? = null

    private var description: Output? = null

    private var eventSubscriptions: Output>? = null

    private var name: Output? = null

    private var permissionModel: Output? = null

    private var resiliencyPolicyArn: Output? = null

    private var resourceMappings: Output>? = null

    private var tags: Output>? = null

    /**
     * @param value Assessment execution schedule.
     */
    @JvmName("iitfajgbevpagoej")
    public suspend fun appAssessmentSchedule(`value`: Output) {
        this.appAssessmentSchedule = value
    }

    /**
     * @param value A string containing full ResilienceHub app template body.
     */
    @JvmName("ffllwgckvvddmeoa")
    public suspend fun appTemplateBody(`value`: Output) {
        this.appTemplateBody = value
    }

    /**
     * @param value App description.
     */
    @JvmName("rtvypmtghhmqlkqs")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value The list of events you would like to subscribe and get notification for.
     */
    @JvmName("xppsudbdnaqodnfw")
    public suspend fun eventSubscriptions(`value`: Output>) {
        this.eventSubscriptions = value
    }

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

    /**
     * @param values The list of events you would like to subscribe and get notification for.
     */
    @JvmName("skymtgqkliasskkb")
    public suspend fun eventSubscriptions(values: List>) {
        this.eventSubscriptions = Output.all(values)
    }

    /**
     * @param value Name of the app.
     */
    @JvmName("jkoiinqwtrsidste")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Defines the roles and credentials that AWS Resilience Hub would use while creating the application, importing its resources, and running an assessment.
     */
    @JvmName("hnhoyaewjbixrlrw")
    public suspend fun permissionModel(`value`: Output) {
        this.permissionModel = value
    }

    /**
     * @param value Amazon Resource Name (ARN) of the Resiliency Policy.
     */
    @JvmName("wiyarawbklvpykqj")
    public suspend fun resiliencyPolicyArn(`value`: Output) {
        this.resiliencyPolicyArn = value
    }

    /**
     * @param value An array of ResourceMapping objects.
     */
    @JvmName("ithlmhlffmuukgsc")
    public suspend fun resourceMappings(`value`: Output>) {
        this.resourceMappings = value
    }

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

    /**
     * @param values An array of ResourceMapping objects.
     */
    @JvmName("mlatfepekptxyrtp")
    public suspend fun resourceMappings(values: List>) {
        this.resourceMappings = Output.all(values)
    }

    /**
     * @param value Tags assigned to the resource. A tag is a label that you assign to an AWS resource. Each tag consists of a key/value pair.
     */
    @JvmName("rbbtpwjokoshobaf")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Assessment execution schedule.
     */
    @JvmName("neqncroksoihvjwy")
    public suspend fun appAssessmentSchedule(`value`: AppAssessmentSchedule?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.appAssessmentSchedule = mapped
    }

    /**
     * @param value A string containing full ResilienceHub app template body.
     */
    @JvmName("ssavtmxfhoylqhii")
    public suspend fun appTemplateBody(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.appTemplateBody = mapped
    }

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

    /**
     * @param value The list of events you would like to subscribe and get notification for.
     */
    @JvmName("hwvqobdgdjpxgfiu")
    public suspend fun eventSubscriptions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.eventSubscriptions = mapped
    }

    /**
     * @param argument The list of events you would like to subscribe and get notification for.
     */
    @JvmName("hdtuingomytdjwjx")
    public suspend fun eventSubscriptions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AppEventSubscriptionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.eventSubscriptions = mapped
    }

    /**
     * @param argument The list of events you would like to subscribe and get notification for.
     */
    @JvmName("nwbafewonysihgbu")
    public suspend fun eventSubscriptions(vararg argument: suspend AppEventSubscriptionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AppEventSubscriptionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.eventSubscriptions = mapped
    }

    /**
     * @param argument The list of events you would like to subscribe and get notification for.
     */
    @JvmName("atnwqnbaikyapfpk")
    public suspend fun eventSubscriptions(argument: suspend AppEventSubscriptionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(AppEventSubscriptionArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.eventSubscriptions = mapped
    }

    /**
     * @param values The list of events you would like to subscribe and get notification for.
     */
    @JvmName("jhbkcupvesmuadjf")
    public suspend fun eventSubscriptions(vararg values: AppEventSubscriptionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.eventSubscriptions = mapped
    }

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

    /**
     * @param value Defines the roles and credentials that AWS Resilience Hub would use while creating the application, importing its resources, and running an assessment.
     */
    @JvmName("hpelqvwdjwoxhlgv")
    public suspend fun permissionModel(`value`: AppPermissionModelArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.permissionModel = mapped
    }

    /**
     * @param argument Defines the roles and credentials that AWS Resilience Hub would use while creating the application, importing its resources, and running an assessment.
     */
    @JvmName("mymwmhgcnhmuenqp")
    public suspend fun permissionModel(argument: suspend AppPermissionModelArgsBuilder.() -> Unit) {
        val toBeMapped = AppPermissionModelArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.permissionModel = mapped
    }

    /**
     * @param value Amazon Resource Name (ARN) of the Resiliency Policy.
     */
    @JvmName("pddyjgyqdfkwpxuc")
    public suspend fun resiliencyPolicyArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resiliencyPolicyArn = mapped
    }

    /**
     * @param value An array of ResourceMapping objects.
     */
    @JvmName("wyexkvelplnaihyb")
    public suspend fun resourceMappings(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceMappings = mapped
    }

    /**
     * @param argument An array of ResourceMapping objects.
     */
    @JvmName("elrvpqhejaswqygj")
    public suspend fun resourceMappings(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AppResourceMappingArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.resourceMappings = mapped
    }

    /**
     * @param argument An array of ResourceMapping objects.
     */
    @JvmName("ediynhipsbmotblh")
    public suspend fun resourceMappings(vararg argument: suspend AppResourceMappingArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AppResourceMappingArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.resourceMappings = mapped
    }

    /**
     * @param argument An array of ResourceMapping objects.
     */
    @JvmName("mrylxswvqtehauma")
    public suspend fun resourceMappings(argument: suspend AppResourceMappingArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(AppResourceMappingArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.resourceMappings = mapped
    }

    /**
     * @param values An array of ResourceMapping objects.
     */
    @JvmName("awejxaaueylydnhj")
    public suspend fun resourceMappings(vararg values: AppResourceMappingArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.resourceMappings = mapped
    }

    /**
     * @param value Tags assigned to the resource. A tag is a label that you assign to an AWS resource. Each tag consists of a key/value pair.
     */
    @JvmName("piylovkhcoldeyss")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Tags assigned to the resource. A tag is a label that you assign to an AWS resource. Each tag consists of a key/value pair.
     */
    @JvmName("xffqhlhocqtbpqow")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): AppArgs = AppArgs(
        appAssessmentSchedule = appAssessmentSchedule,
        appTemplateBody = appTemplateBody,
        description = description,
        eventSubscriptions = eventSubscriptions,
        name = name,
        permissionModel = permissionModel,
        resiliencyPolicyArn = resiliencyPolicyArn,
        resourceMappings = resourceMappings,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy