com.pulumi.awsnative.ce.kotlin.AnomalyMonitor.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.ce.kotlin
import com.pulumi.awsnative.ce.kotlin.enums.AnomalyMonitorMonitorDimension
import com.pulumi.awsnative.ce.kotlin.enums.AnomalyMonitorMonitorType
import com.pulumi.awsnative.ce.kotlin.outputs.AnomalyMonitorResourceTag
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.ce.kotlin.enums.AnomalyMonitorMonitorDimension.Companion.toKotlin as anomalyMonitorMonitorDimensionToKotlin
import com.pulumi.awsnative.ce.kotlin.enums.AnomalyMonitorMonitorType.Companion.toKotlin as anomalyMonitorMonitorTypeToKotlin
import com.pulumi.awsnative.ce.kotlin.outputs.AnomalyMonitorResourceTag.Companion.toKotlin as anomalyMonitorResourceTagToKotlin
/**
* Builder for [AnomalyMonitor].
*/
@PulumiTagMarker
public class AnomalyMonitorResourceBuilder internal constructor() {
public var name: String? = null
public var args: AnomalyMonitorArgs = AnomalyMonitorArgs()
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 AnomalyMonitorArgsBuilder.() -> Unit) {
val builder = AnomalyMonitorArgsBuilder()
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(): AnomalyMonitor {
val builtJavaResource = com.pulumi.awsnative.ce.AnomalyMonitor(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return AnomalyMonitor(builtJavaResource)
}
}
/**
* AWS Cost Anomaly Detection leverages advanced Machine Learning technologies to identify anomalous spend and root causes, so you can quickly take action. You can use Cost Anomaly Detection by creating monitor.
* ## Example Usage
* ### Example
* No Java example available.
* ### Example
* No Java example available.
* ### Example
* No Java example available.
* ### Example
* No Java example available.
* ### Example
* No Java example available.
* ### Example
* No Java example available.
* ### Example
* No Java example available.
* ### Example
* No Java example available.
* ### Example
* No Java example available.
* ### Example
* No Java example available.
* ### Example
* No Java example available.
* ### Example
* No Java example available.
*/
public class AnomalyMonitor internal constructor(
override val javaResource: com.pulumi.awsnative.ce.AnomalyMonitor,
) : KotlinCustomResource(javaResource, AnomalyMonitorMapper) {
/**
* The date when the monitor was created.
*/
public val creationDate: Output
get() = javaResource.creationDate().applyValue({ args0 -> args0 })
/**
* The value for evaluated dimensions.
*/
public val dimensionalValueCount: Output
get() = javaResource.dimensionalValueCount().applyValue({ args0 -> args0 })
/**
* The date when the monitor last evaluated for anomalies.
*/
public val lastEvaluatedDate: Output
get() = javaResource.lastEvaluatedDate().applyValue({ args0 -> args0 })
/**
* The date when the monitor was last updated.
*/
public val lastUpdatedDate: Output
get() = javaResource.lastUpdatedDate().applyValue({ args0 -> args0 })
/**
* The Amazon Resource Name (ARN) value for the monitor.
*/
public val monitorArn: Output
get() = javaResource.monitorArn().applyValue({ args0 -> args0 })
/**
* The dimensions to evaluate
*/
public val monitorDimension: Output?
get() = javaResource.monitorDimension().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> anomalyMonitorMonitorDimensionToKotlin(args0) })
}).orElse(null)
})
/**
* The name of the monitor.
*/
public val monitorName: Output
get() = javaResource.monitorName().applyValue({ args0 -> args0 })
/**
* The array of `MonitorSpecification` in JSON array format. For instance, you can use `MonitorSpecification` to specify a tag, Cost Category, or linked account for your custom anomaly monitor. For further information, see the [Examples](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ce-anomalymonitor.html#aws-resource-ce-anomalymonitor--examples) section of this page.
*/
public val monitorSpecification: Output?
get() = javaResource.monitorSpecification().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The possible type values.
*/
public val monitorType: Output
get() = javaResource.monitorType().applyValue({ args0 ->
args0.let({ args0 ->
anomalyMonitorMonitorTypeToKotlin(args0)
})
})
/**
* Tags to assign to monitor.
*/
public val resourceTags: Output>?
get() = javaResource.resourceTags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> anomalyMonitorResourceTagToKotlin(args0) })
})
}).orElse(null)
})
}
public object AnomalyMonitorMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.ce.AnomalyMonitor::class == javaResource::class
override fun map(javaResource: Resource): AnomalyMonitor = AnomalyMonitor(
javaResource as
com.pulumi.awsnative.ce.AnomalyMonitor,
)
}
/**
* @see [AnomalyMonitor].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [AnomalyMonitor].
*/
public suspend fun anomalyMonitor(
name: String,
block: suspend AnomalyMonitorResourceBuilder.() -> Unit,
): AnomalyMonitor {
val builder = AnomalyMonitorResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [AnomalyMonitor].
* @param name The _unique_ name of the resulting resource.
*/
public fun anomalyMonitor(name: String): AnomalyMonitor {
val builder = AnomalyMonitorResourceBuilder()
builder.name(name)
return builder.build()
}