com.pulumi.awsnative.devopsguru.kotlin.LogAnomalyDetectionIntegration.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.devopsguru.kotlin
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
/**
* Builder for [LogAnomalyDetectionIntegration].
*/
@PulumiTagMarker
public class LogAnomalyDetectionIntegrationResourceBuilder internal constructor() {
public var name: String? = null
public var args: LogAnomalyDetectionIntegrationArgs = LogAnomalyDetectionIntegrationArgs()
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 LogAnomalyDetectionIntegrationArgsBuilder.() -> Unit) {
val builder = LogAnomalyDetectionIntegrationArgsBuilder()
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(): LogAnomalyDetectionIntegration {
val builtJavaResource =
com.pulumi.awsnative.devopsguru.LogAnomalyDetectionIntegration(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return LogAnomalyDetectionIntegration(builtJavaResource)
}
}
/**
* This resource schema represents the LogAnomalyDetectionIntegration resource in the Amazon DevOps Guru.
*/
public class LogAnomalyDetectionIntegration internal constructor(
override val javaResource: com.pulumi.awsnative.devopsguru.LogAnomalyDetectionIntegration,
) : KotlinCustomResource(javaResource, LogAnomalyDetectionIntegrationMapper) {
/**
* The account ID associated with the integration of DevOps Guru with CloudWatch log groups for log anomaly detection.
*/
public val accountId: Output
get() = javaResource.accountId().applyValue({ args0 -> args0 })
}
public object LogAnomalyDetectionIntegrationMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.devopsguru.LogAnomalyDetectionIntegration::class == javaResource::class
override fun map(javaResource: Resource): LogAnomalyDetectionIntegration =
LogAnomalyDetectionIntegration(
javaResource as
com.pulumi.awsnative.devopsguru.LogAnomalyDetectionIntegration,
)
}
/**
* @see [LogAnomalyDetectionIntegration].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [LogAnomalyDetectionIntegration].
*/
public suspend fun logAnomalyDetectionIntegration(
name: String,
block: suspend LogAnomalyDetectionIntegrationResourceBuilder.() -> Unit,
): LogAnomalyDetectionIntegration {
val builder = LogAnomalyDetectionIntegrationResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [LogAnomalyDetectionIntegration].
* @param name The _unique_ name of the resulting resource.
*/
public fun logAnomalyDetectionIntegration(name: String): LogAnomalyDetectionIntegration {
val builder = LogAnomalyDetectionIntegrationResourceBuilder()
builder.name(name)
return builder.build()
}