![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.cloudwatch.kotlin.CompositeAlarm.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.cloudwatch.kotlin
import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin
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
/**
* Builder for [CompositeAlarm].
*/
@PulumiTagMarker
public class CompositeAlarmResourceBuilder internal constructor() {
public var name: String? = null
public var args: CompositeAlarmArgs = CompositeAlarmArgs()
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 CompositeAlarmArgsBuilder.() -> Unit) {
val builder = CompositeAlarmArgsBuilder()
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(): CompositeAlarm {
val builtJavaResource = com.pulumi.awsnative.cloudwatch.CompositeAlarm(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return CompositeAlarm(builtJavaResource)
}
}
/**
* The AWS::CloudWatch::CompositeAlarm type specifies an alarm which aggregates the states of other Alarms (Metric or Composite Alarms) as defined by the AlarmRule expression
*/
public class CompositeAlarm internal constructor(
override val javaResource: com.pulumi.awsnative.cloudwatch.CompositeAlarm,
) : KotlinCustomResource(javaResource, CompositeAlarmMapper) {
/**
* Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.
*/
public val actionsEnabled: Output?
get() = javaResource.actionsEnabled().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Actions will be suppressed if the suppressor alarm is in the ALARM state. ActionsSuppressor can be an AlarmName or an Amazon Resource Name (ARN) from an existing alarm.
*/
public val actionsSuppressor: Output?
get() = javaResource.actionsSuppressor().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Actions will be suppressed if WaitPeriod is active. The length of time that actions are suppressed is in seconds.
*/
public val actionsSuppressorExtensionPeriod: Output?
get() = javaResource.actionsSuppressorExtensionPeriod().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Actions will be suppressed if ExtensionPeriod is active. The length of time that actions are suppressed is in seconds.
*/
public val actionsSuppressorWaitPeriod: Output?
get() = javaResource.actionsSuppressorWaitPeriod().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The list of actions to execute when this alarm transitions into an ALARM state from any other state. Specify each action as an Amazon Resource Name (ARN).
*/
public val alarmActions: Output>?
get() = javaResource.alarmActions().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0
})
}).orElse(null)
})
/**
* The description of the alarm
*/
public val alarmDescription: Output?
get() = javaResource.alarmDescription().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The name of the Composite Alarm
*/
public val alarmName: Output?
get() = javaResource.alarmName().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Expression which aggregates the state of other Alarms (Metric or Composite Alarms)
*/
public val alarmRule: Output
get() = javaResource.alarmRule().applyValue({ args0 -> args0 })
/**
* Amazon Resource Name (ARN) of the alarm
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state. Each action is specified as an Amazon Resource Name (ARN).
*/
public val insufficientDataActions: Output>?
get() = javaResource.insufficientDataActions().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 -> args0 })
}).orElse(null)
})
/**
* The actions to execute when this alarm transitions to the OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).
*/
public val okActions: Output>?
get() = javaResource.okActions().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0
})
}).orElse(null)
})
/**
* A list of key-value pairs to associate with the composite alarm. You can associate as many as 50 tags with an alarm.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> toKotlin(args0) })
})
}).orElse(null)
})
}
public object CompositeAlarmMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.cloudwatch.CompositeAlarm::class == javaResource::class
override fun map(javaResource: Resource): CompositeAlarm = CompositeAlarm(
javaResource as
com.pulumi.awsnative.cloudwatch.CompositeAlarm,
)
}
/**
* @see [CompositeAlarm].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [CompositeAlarm].
*/
public suspend fun compositeAlarm(
name: String,
block: suspend CompositeAlarmResourceBuilder.() -> Unit,
): CompositeAlarm {
val builder = CompositeAlarmResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [CompositeAlarm].
* @param name The _unique_ name of the resulting resource.
*/
public fun compositeAlarm(name: String): CompositeAlarm {
val builder = CompositeAlarmResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy