
com.pulumi.awsnative.applicationsignals.kotlin.ServiceLevelObjective.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.applicationsignals.kotlin
import com.pulumi.awsnative.applicationsignals.kotlin.outputs.ServiceLevelObjectiveGoal
import com.pulumi.awsnative.applicationsignals.kotlin.outputs.ServiceLevelObjectiveSli
import com.pulumi.awsnative.kotlin.outputs.Tag
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.applicationsignals.kotlin.outputs.ServiceLevelObjectiveGoal.Companion.toKotlin as serviceLevelObjectiveGoalToKotlin
import com.pulumi.awsnative.applicationsignals.kotlin.outputs.ServiceLevelObjectiveSli.Companion.toKotlin as serviceLevelObjectiveSliToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
/**
* Builder for [ServiceLevelObjective].
*/
@PulumiTagMarker
public class ServiceLevelObjectiveResourceBuilder internal constructor() {
public var name: String? = null
public var args: ServiceLevelObjectiveArgs = ServiceLevelObjectiveArgs()
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 ServiceLevelObjectiveArgsBuilder.() -> Unit) {
val builder = ServiceLevelObjectiveArgsBuilder()
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(): ServiceLevelObjective {
val builtJavaResource =
com.pulumi.awsnative.applicationsignals.ServiceLevelObjective(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return ServiceLevelObjective(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::ApplicationSignals::ServiceLevelObjective
*/
public class ServiceLevelObjective internal constructor(
override val javaResource: com.pulumi.awsnative.applicationsignals.ServiceLevelObjective,
) : KotlinCustomResource(javaResource, ServiceLevelObjectiveMapper) {
/**
* The ARN of this SLO.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* Epoch time in seconds of the time that this SLO was created
*/
public val createdTime: Output
get() = javaResource.createdTime().applyValue({ args0 -> args0 })
/**
* An optional description for this SLO. Default is 'No description'
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* This structure contains the attributes that determine the goal of an SLO. This includes the time period for evaluation and the attainment threshold.
*/
public val goal: Output?
get() = javaResource.goal().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
serviceLevelObjectiveGoalToKotlin(args0)
})
}).orElse(null)
})
/**
* Epoch time in seconds of the time that this SLO was most recently updated
*/
public val lastUpdatedTime: Output
get() = javaResource.lastUpdatedTime().applyValue({ args0 -> args0 })
/**
* The name of this SLO.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* A structure containing information about the performance metric that this SLO monitors.
*/
public val sli: Output
get() = javaResource.sli().applyValue({ args0 ->
args0.let({ args0 ->
serviceLevelObjectiveSliToKotlin(args0)
})
})
/**
* 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 val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
}
public object ServiceLevelObjectiveMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.applicationsignals.ServiceLevelObjective::class == javaResource::class
override fun map(javaResource: Resource): ServiceLevelObjective =
ServiceLevelObjective(
javaResource as
com.pulumi.awsnative.applicationsignals.ServiceLevelObjective,
)
}
/**
* @see [ServiceLevelObjective].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [ServiceLevelObjective].
*/
public suspend fun serviceLevelObjective(
name: String,
block: suspend ServiceLevelObjectiveResourceBuilder.() -> Unit,
): ServiceLevelObjective {
val builder = ServiceLevelObjectiveResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [ServiceLevelObjective].
* @param name The _unique_ name of the resulting resource.
*/
public fun serviceLevelObjective(name: String): ServiceLevelObjective {
val builder = ServiceLevelObjectiveResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy