
com.pulumi.awsnative.codestarnotifications.kotlin.NotificationRule.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.codestarnotifications.kotlin
import com.pulumi.awsnative.codestarnotifications.kotlin.enums.NotificationRuleDetailType
import com.pulumi.awsnative.codestarnotifications.kotlin.enums.NotificationRuleStatus
import com.pulumi.awsnative.codestarnotifications.kotlin.outputs.NotificationRuleTarget
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
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.awsnative.codestarnotifications.kotlin.enums.NotificationRuleDetailType.Companion.toKotlin as notificationRuleDetailTypeToKotlin
import com.pulumi.awsnative.codestarnotifications.kotlin.enums.NotificationRuleStatus.Companion.toKotlin as notificationRuleStatusToKotlin
import com.pulumi.awsnative.codestarnotifications.kotlin.outputs.NotificationRuleTarget.Companion.toKotlin as notificationRuleTargetToKotlin
/**
* Builder for [NotificationRule].
*/
@PulumiTagMarker
public class NotificationRuleResourceBuilder internal constructor() {
public var name: String? = null
public var args: NotificationRuleArgs = NotificationRuleArgs()
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 NotificationRuleArgsBuilder.() -> Unit) {
val builder = NotificationRuleArgsBuilder()
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(): NotificationRule {
val builtJavaResource =
com.pulumi.awsnative.codestarnotifications.NotificationRule(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return NotificationRule(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::CodeStarNotifications::NotificationRule
*/
public class NotificationRule internal constructor(
override val javaResource: com.pulumi.awsnative.codestarnotifications.NotificationRule,
) : KotlinCustomResource(javaResource, NotificationRuleMapper) {
/**
* The Amazon Resource Name (ARN) of the notification rule.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The name or email alias of the person who created the notification rule.
*/
public val createdBy: Output?
get() = javaResource.createdBy().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The level of detail to include in the notifications for this resource. `BASIC` will include only the contents of the event as it would appear in Amazon CloudWatch. `FULL` will include any supplemental information provided by AWS CodeStar Notifications and/or the service for the resource for which the notification is created.
*/
public val detailType: Output
get() = javaResource.detailType().applyValue({ args0 ->
args0.let({ args0 ->
notificationRuleDetailTypeToKotlin(args0)
})
})
/**
* The event type associated with this notification rule. For a complete list of event types and IDs, see [Notification concepts](https://docs.aws.amazon.com/dtconsole/latest/userguide/concepts.html#concepts-api) in the *Developer Tools Console User Guide* .
*/
public val eventTypeId: Output?
get() = javaResource.eventTypeId().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* A list of event types associated with this notification rule. For a complete list of event types and IDs, see [Notification concepts](https://docs.aws.amazon.com/dtconsole/latest/userguide/concepts.html#concepts-api) in the *Developer Tools Console User Guide* .
*/
public val eventTypeIds: Output>
get() = javaResource.eventTypeIds().applyValue({ args0 -> args0.map({ args0 -> args0 }) })
/**
* The name for the notification rule. Notification rule names must be unique in your AWS account .
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The Amazon Resource Name (ARN) of the resource to associate with the notification rule. Supported resources include pipelines in AWS CodePipeline , repositories in AWS CodeCommit , and build projects in AWS CodeBuild .
*/
public val resource: Output
get() = javaResource.resource().applyValue({ args0 -> args0 })
/**
* The status of the notification rule. The default value is `ENABLED` . If the status is set to `DISABLED` , notifications aren't sent for the notification rule.
*/
public val status: Output?
get() = javaResource.status().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
notificationRuleStatusToKotlin(args0)
})
}).orElse(null)
})
/**
* A list of tags to apply to this notification rule. Key names cannot start with " `aws` ".
*/
public val tags: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy