All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.awsnative.supportapp.kotlin.SlackChannelConfiguration.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.supportapp.kotlin

import com.pulumi.awsnative.supportapp.kotlin.enums.SlackChannelConfigurationNotifyOnCaseSeverity
import com.pulumi.awsnative.supportapp.kotlin.enums.SlackChannelConfigurationNotifyOnCaseSeverity.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.String
import kotlin.Suppress
import kotlin.Unit

/**
 * Builder for [SlackChannelConfiguration].
 */
@PulumiTagMarker
public class SlackChannelConfigurationResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: SlackChannelConfigurationArgs = SlackChannelConfigurationArgs()

    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 SlackChannelConfigurationArgsBuilder.() -> Unit) {
        val builder = SlackChannelConfigurationArgsBuilder()
        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(): SlackChannelConfiguration {
        val builtJavaResource =
            com.pulumi.awsnative.supportapp.SlackChannelConfiguration(
                this.name,
                this.args.toJava(),
                this.opts.toJava(),
            )
        return SlackChannelConfiguration(builtJavaResource)
    }
}

/**
 * An AWS Support App resource that creates, updates, lists and deletes Slack channel configurations.
 * ## Example Usage
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 */
public class SlackChannelConfiguration internal constructor(
    override val javaResource: com.pulumi.awsnative.supportapp.SlackChannelConfiguration,
) : KotlinCustomResource(javaResource, SlackChannelConfigurationMapper) {
    /**
     * The channel ID in Slack, which identifies a channel within a workspace.
     */
    public val channelId: Output
        get() = javaResource.channelId().applyValue({ args0 -> args0 })

    /**
     * The channel name in Slack.
     */
    public val channelName: Output?
        get() = javaResource.channelName().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The Amazon Resource Name (ARN) of an IAM role that grants the AWS Support App access to perform operations for AWS services.
     */
    public val channelRoleArn: Output
        get() = javaResource.channelRoleArn().applyValue({ args0 -> args0 })

    /**
     * Whether to notify when a correspondence is added to a case.
     */
    public val notifyOnAddCorrespondenceToCase: Output?
        get() = javaResource.notifyOnAddCorrespondenceToCase().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The severity level of a support case that a customer wants to get notified for.
     */
    public val notifyOnCaseSeverity: Output
        get() = javaResource.notifyOnCaseSeverity().applyValue({ args0 ->
            args0.let({ args0 ->
                toKotlin(args0)
            })
        })

    /**
     * Whether to notify when a case is created or reopened.
     */
    public val notifyOnCreateOrReopenCase: Output?
        get() = javaResource.notifyOnCreateOrReopenCase().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Whether to notify when a case is resolved.
     */
    public val notifyOnResolveCase: Output?
        get() = javaResource.notifyOnResolveCase().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The team ID in Slack, which uniquely identifies a workspace.
     */
    public val teamId: Output
        get() = javaResource.teamId().applyValue({ args0 -> args0 })
}

public object SlackChannelConfigurationMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.supportapp.SlackChannelConfiguration::class == javaResource::class

    override fun map(javaResource: Resource): SlackChannelConfiguration =
        SlackChannelConfiguration(
            javaResource as
                com.pulumi.awsnative.supportapp.SlackChannelConfiguration,
        )
}

/**
 * @see [SlackChannelConfiguration].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [SlackChannelConfiguration].
 */
public suspend fun slackChannelConfiguration(
    name: String,
    block: suspend SlackChannelConfigurationResourceBuilder.() -> Unit,
): SlackChannelConfiguration {
    val builder = SlackChannelConfigurationResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [SlackChannelConfiguration].
 * @param name The _unique_ name of the resulting resource.
 */
public fun slackChannelConfiguration(name: String): SlackChannelConfiguration {
    val builder = SlackChannelConfigurationResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy