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

com.pulumi.awsnative.applicationsignals.kotlin.ServiceLevelObjectiveArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.applicationsignals.kotlin

import com.pulumi.awsnative.applicationsignals.ServiceLevelObjectiveArgs.builder
import com.pulumi.awsnative.applicationsignals.kotlin.inputs.ServiceLevelObjectiveGoalArgs
import com.pulumi.awsnative.applicationsignals.kotlin.inputs.ServiceLevelObjectiveGoalArgsBuilder
import com.pulumi.awsnative.applicationsignals.kotlin.inputs.ServiceLevelObjectiveRequestBasedSliArgs
import com.pulumi.awsnative.applicationsignals.kotlin.inputs.ServiceLevelObjectiveRequestBasedSliArgsBuilder
import com.pulumi.awsnative.applicationsignals.kotlin.inputs.ServiceLevelObjectiveSliArgs
import com.pulumi.awsnative.applicationsignals.kotlin.inputs.ServiceLevelObjectiveSliArgsBuilder
import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Resource Type definition for AWS::ApplicationSignals::ServiceLevelObjective
 * @property description An optional description for this SLO. Default is 'No description'
 * @property goal This structure contains the attributes that determine the goal of an SLO. This includes the time period for evaluation and the attainment threshold.
 * @property name The name of this SLO.
 * @property requestBasedSli A structure containing information about the performance metric that this SLO monitors, if this is a request-based SLO.
 * @property sli A structure containing information about the performance metric that this SLO monitors, if this is a period-based SLO.
 * @property tags A list of key-value pairs to associate with the SLO. You can associate as many as 50 tags with an SLO. To be able to associate tags with the SLO when you create the SLO, you must have the cloudwatch:TagResource permission.
 * Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.
 */
public data class ServiceLevelObjectiveArgs(
    public val description: Output? = null,
    public val goal: Output? = null,
    public val name: Output? = null,
    public val requestBasedSli: Output? = null,
    public val sli: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.applicationsignals.ServiceLevelObjectiveArgs =
        com.pulumi.awsnative.applicationsignals.ServiceLevelObjectiveArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .goal(goal?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .name(name?.applyValue({ args0 -> args0 }))
            .requestBasedSli(requestBasedSli?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .sli(sli?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

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

    private var goal: Output? = null

    private var name: Output? = null

    private var requestBasedSli: Output? = null

    private var sli: Output? = null

    private var tags: Output>? = null

    /**
     * @param value An optional description for this SLO. Default is 'No description'
     */
    @JvmName("hiuupiiljsxqmrrr")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value This structure contains the attributes that determine the goal of an SLO. This includes the time period for evaluation and the attainment threshold.
     */
    @JvmName("atuskdsvlfarkjnr")
    public suspend fun goal(`value`: Output) {
        this.goal = value
    }

    /**
     * @param value The name of this SLO.
     */
    @JvmName("umkrujacnaemrilu")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value A structure containing information about the performance metric that this SLO monitors, if this is a request-based SLO.
     */
    @JvmName("mytwkjvwpxbeqfax")
    public suspend fun requestBasedSli(`value`: Output) {
        this.requestBasedSli = value
    }

    /**
     * @param value A structure containing information about the performance metric that this SLO monitors, if this is a period-based SLO.
     */
    @JvmName("pwjypyqokcsraqcq")
    public suspend fun sli(`value`: Output) {
        this.sli = value
    }

    /**
     * @param value A list of key-value pairs to associate with the SLO. You can associate as many as 50 tags with an SLO. To be able to associate tags with the SLO when you create the SLO, you must have the cloudwatch:TagResource permission.
     * Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.
     */
    @JvmName("ppvhtrlwbspcyids")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values A list of key-value pairs to associate with the SLO. You can associate as many as 50 tags with an SLO. To be able to associate tags with the SLO when you create the SLO, you must have the cloudwatch:TagResource permission.
     * Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.
     */
    @JvmName("qdiuphmelieyioba")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value An optional description for this SLO. Default is 'No description'
     */
    @JvmName("desxmciibimlggfa")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value This structure contains the attributes that determine the goal of an SLO. This includes the time period for evaluation and the attainment threshold.
     */
    @JvmName("kaqetkqqobrjynyq")
    public suspend fun goal(`value`: ServiceLevelObjectiveGoalArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.goal = mapped
    }

    /**
     * @param argument This structure contains the attributes that determine the goal of an SLO. This includes the time period for evaluation and the attainment threshold.
     */
    @JvmName("nbhovivjqxlqhsfd")
    public suspend fun goal(argument: suspend ServiceLevelObjectiveGoalArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceLevelObjectiveGoalArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.goal = mapped
    }

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

    /**
     * @param value A structure containing information about the performance metric that this SLO monitors, if this is a request-based SLO.
     */
    @JvmName("medsmjksavoawjfy")
    public suspend fun requestBasedSli(`value`: ServiceLevelObjectiveRequestBasedSliArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requestBasedSli = mapped
    }

    /**
     * @param argument A structure containing information about the performance metric that this SLO monitors, if this is a request-based SLO.
     */
    @JvmName("drkupeokwpxsqtng")
    public suspend fun requestBasedSli(argument: suspend ServiceLevelObjectiveRequestBasedSliArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceLevelObjectiveRequestBasedSliArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.requestBasedSli = mapped
    }

    /**
     * @param value A structure containing information about the performance metric that this SLO monitors, if this is a period-based SLO.
     */
    @JvmName("bntbnisfuasqdwbo")
    public suspend fun sli(`value`: ServiceLevelObjectiveSliArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sli = mapped
    }

    /**
     * @param argument A structure containing information about the performance metric that this SLO monitors, if this is a period-based SLO.
     */
    @JvmName("gokgoyifsbiqfufr")
    public suspend fun sli(argument: suspend ServiceLevelObjectiveSliArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceLevelObjectiveSliArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.sli = mapped
    }

    /**
     * @param value A list of key-value pairs to associate with the SLO. You can associate as many as 50 tags with an SLO. To be able to associate tags with the SLO when you create the SLO, you must have the cloudwatch:TagResource permission.
     * Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.
     */
    @JvmName("hvubiyyvcardxvdn")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument A list of key-value pairs to associate with the SLO. You can associate as many as 50 tags with an SLO. To be able to associate tags with the SLO when you create the SLO, you must have the cloudwatch:TagResource permission.
     * Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.
     */
    @JvmName("jgiahlnijjbervbn")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument A list of key-value pairs to associate with the SLO. You can associate as many as 50 tags with an SLO. To be able to associate tags with the SLO when you create the SLO, you must have the cloudwatch:TagResource permission.
     * Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.
     */
    @JvmName("vlyljpdtwiaaxfel")
    public suspend fun tags(vararg argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument A list of key-value pairs to associate with the SLO. You can associate as many as 50 tags with an SLO. To be able to associate tags with the SLO when you create the SLO, you must have the cloudwatch:TagResource permission.
     * Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.
     */
    @JvmName("dqdxiithkctiyokm")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values A list of key-value pairs to associate with the SLO. You can associate as many as 50 tags with an SLO. To be able to associate tags with the SLO when you create the SLO, you must have the cloudwatch:TagResource permission.
     * Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.
     */
    @JvmName("xnptjittyripehsa")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): ServiceLevelObjectiveArgs = ServiceLevelObjectiveArgs(
        description = description,
        goal = goal,
        name = name,
        requestBasedSli = requestBasedSli,
        sli = sli,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy