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

com.pulumi.awsnative.bedrock.kotlin.GuardrailArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 1.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.bedrock.kotlin

import com.pulumi.awsnative.bedrock.GuardrailArgs.builder
import com.pulumi.awsnative.bedrock.kotlin.inputs.GuardrailContentPolicyConfigArgs
import com.pulumi.awsnative.bedrock.kotlin.inputs.GuardrailContentPolicyConfigArgsBuilder
import com.pulumi.awsnative.bedrock.kotlin.inputs.GuardrailSensitiveInformationPolicyConfigArgs
import com.pulumi.awsnative.bedrock.kotlin.inputs.GuardrailSensitiveInformationPolicyConfigArgsBuilder
import com.pulumi.awsnative.bedrock.kotlin.inputs.GuardrailTopicPolicyConfigArgs
import com.pulumi.awsnative.bedrock.kotlin.inputs.GuardrailTopicPolicyConfigArgsBuilder
import com.pulumi.awsnative.bedrock.kotlin.inputs.GuardrailWordPolicyConfigArgs
import com.pulumi.awsnative.bedrock.kotlin.inputs.GuardrailWordPolicyConfigArgsBuilder
import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Definition of AWS::Bedrock::Guardrail Resource Type
 * @property blockedInputMessaging Messaging for when violations are detected in text
 * @property blockedOutputsMessaging Messaging for when violations are detected in text
 * @property contentPolicyConfig The content filter policies to configure for the guardrail.
 * @property description Description of the guardrail or its version
 * @property kmsKeyArn The KMS key with which the guardrail was encrypted at rest
 * @property name Name of the guardrail
 * @property sensitiveInformationPolicyConfig The sensitive information policy to configure for the guardrail.
 * @property tags List of Tags
 * @property topicPolicyConfig The topic policies to configure for the guardrail.
 * @property wordPolicyConfig The word policy you configure for the guardrail.
 */
public data class GuardrailArgs(
    public val blockedInputMessaging: Output? = null,
    public val blockedOutputsMessaging: Output? = null,
    public val contentPolicyConfig: Output? = null,
    public val description: Output? = null,
    public val kmsKeyArn: Output? = null,
    public val name: Output? = null,
    public val sensitiveInformationPolicyConfig: Output? = null,
    public val tags: Output>? = null,
    public val topicPolicyConfig: Output? = null,
    public val wordPolicyConfig: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.bedrock.GuardrailArgs =
        com.pulumi.awsnative.bedrock.GuardrailArgs.builder()
            .blockedInputMessaging(blockedInputMessaging?.applyValue({ args0 -> args0 }))
            .blockedOutputsMessaging(blockedOutputsMessaging?.applyValue({ args0 -> args0 }))
            .contentPolicyConfig(
                contentPolicyConfig?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .description(description?.applyValue({ args0 -> args0 }))
            .kmsKeyArn(kmsKeyArn?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .sensitiveInformationPolicyConfig(
                sensitiveInformationPolicyConfig?.applyValue({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                }),
            )
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .topicPolicyConfig(topicPolicyConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .wordPolicyConfig(
                wordPolicyConfig?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [GuardrailArgs].
 */
@PulumiTagMarker
public class GuardrailArgsBuilder internal constructor() {
    private var blockedInputMessaging: Output? = null

    private var blockedOutputsMessaging: Output? = null

    private var contentPolicyConfig: Output? = null

    private var description: Output? = null

    private var kmsKeyArn: Output? = null

    private var name: Output? = null

    private var sensitiveInformationPolicyConfig:
        Output? = null

    private var tags: Output>? = null

    private var topicPolicyConfig: Output? = null

    private var wordPolicyConfig: Output? = null

    /**
     * @param value Messaging for when violations are detected in text
     */
    @JvmName("jgaaeoayvoaucflq")
    public suspend fun blockedInputMessaging(`value`: Output) {
        this.blockedInputMessaging = value
    }

    /**
     * @param value Messaging for when violations are detected in text
     */
    @JvmName("eqorgbbbbareduxy")
    public suspend fun blockedOutputsMessaging(`value`: Output) {
        this.blockedOutputsMessaging = value
    }

    /**
     * @param value The content filter policies to configure for the guardrail.
     */
    @JvmName("ksihnwnhyralqeha")
    public suspend fun contentPolicyConfig(`value`: Output) {
        this.contentPolicyConfig = value
    }

    /**
     * @param value Description of the guardrail or its version
     */
    @JvmName("uwfsaupbyndyqggo")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value The KMS key with which the guardrail was encrypted at rest
     */
    @JvmName("ftvfvkwlmxdrsxec")
    public suspend fun kmsKeyArn(`value`: Output) {
        this.kmsKeyArn = value
    }

    /**
     * @param value Name of the guardrail
     */
    @JvmName("iergkbgooxucmatu")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The sensitive information policy to configure for the guardrail.
     */
    @JvmName("iwpxffvsdaocqarn")
    public suspend fun sensitiveInformationPolicyConfig(`value`: Output) {
        this.sensitiveInformationPolicyConfig = value
    }

    /**
     * @param value List of Tags
     */
    @JvmName("edjbkwoqpibnbvki")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    @JvmName("yfggbpijbkexqvku")
    public suspend fun tags(vararg values: Output) {
        this.tags = Output.all(values.asList())
    }

    /**
     * @param values List of Tags
     */
    @JvmName("mncdcohmknmuvmop")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value The topic policies to configure for the guardrail.
     */
    @JvmName("dyybgbbkjayqtmkf")
    public suspend fun topicPolicyConfig(`value`: Output) {
        this.topicPolicyConfig = value
    }

    /**
     * @param value The word policy you configure for the guardrail.
     */
    @JvmName("xrmpdprijxcamesf")
    public suspend fun wordPolicyConfig(`value`: Output) {
        this.wordPolicyConfig = value
    }

    /**
     * @param value Messaging for when violations are detected in text
     */
    @JvmName("hvxlgqmkjoqpuhyr")
    public suspend fun blockedInputMessaging(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.blockedInputMessaging = mapped
    }

    /**
     * @param value Messaging for when violations are detected in text
     */
    @JvmName("nkegxqwjffcjkfef")
    public suspend fun blockedOutputsMessaging(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.blockedOutputsMessaging = mapped
    }

    /**
     * @param value The content filter policies to configure for the guardrail.
     */
    @JvmName("dsfxftcpjxcmvraq")
    public suspend fun contentPolicyConfig(`value`: GuardrailContentPolicyConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.contentPolicyConfig = mapped
    }

    /**
     * @param argument The content filter policies to configure for the guardrail.
     */
    @JvmName("oufgdpldvlqifcue")
    public suspend fun contentPolicyConfig(argument: suspend GuardrailContentPolicyConfigArgsBuilder.() -> Unit) {
        val toBeMapped = GuardrailContentPolicyConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.contentPolicyConfig = mapped
    }

    /**
     * @param value Description of the guardrail or its version
     */
    @JvmName("frpblrkakylthiwa")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value The KMS key with which the guardrail was encrypted at rest
     */
    @JvmName("jfdbvcpjfowjlcux")
    public suspend fun kmsKeyArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kmsKeyArn = mapped
    }

    /**
     * @param value Name of the guardrail
     */
    @JvmName("keaitnkrwfxgjsyx")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The sensitive information policy to configure for the guardrail.
     */
    @JvmName("yybppnwsbocnijfa")
    public suspend fun sensitiveInformationPolicyConfig(`value`: GuardrailSensitiveInformationPolicyConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sensitiveInformationPolicyConfig = mapped
    }

    /**
     * @param argument The sensitive information policy to configure for the guardrail.
     */
    @JvmName("vfcqcgkbpkrktgjx")
    public suspend fun sensitiveInformationPolicyConfig(argument: suspend GuardrailSensitiveInformationPolicyConfigArgsBuilder.() -> Unit) {
        val toBeMapped = GuardrailSensitiveInformationPolicyConfigArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.sensitiveInformationPolicyConfig = mapped
    }

    /**
     * @param value List of Tags
     */
    @JvmName("leiitovbxorstfef")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument List of Tags
     */
    @JvmName("xqleepokvfyvcnir")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument List of Tags
     */
    @JvmName("adsojrncinpsgilb")
    public suspend fun tags(vararg argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument List of Tags
     */
    @JvmName("bewxficyavjfsoob")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values List of Tags
     */
    @JvmName("kxqlvjtynctmjtgo")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value The topic policies to configure for the guardrail.
     */
    @JvmName("ydckcvftmjiiugdd")
    public suspend fun topicPolicyConfig(`value`: GuardrailTopicPolicyConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.topicPolicyConfig = mapped
    }

    /**
     * @param argument The topic policies to configure for the guardrail.
     */
    @JvmName("uwmlvssrycnmbtka")
    public suspend fun topicPolicyConfig(argument: suspend GuardrailTopicPolicyConfigArgsBuilder.() -> Unit) {
        val toBeMapped = GuardrailTopicPolicyConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.topicPolicyConfig = mapped
    }

    /**
     * @param value The word policy you configure for the guardrail.
     */
    @JvmName("kukefnnpfknclaid")
    public suspend fun wordPolicyConfig(`value`: GuardrailWordPolicyConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.wordPolicyConfig = mapped
    }

    /**
     * @param argument The word policy you configure for the guardrail.
     */
    @JvmName("evuwyyxwtovsyqnx")
    public suspend fun wordPolicyConfig(argument: suspend GuardrailWordPolicyConfigArgsBuilder.() -> Unit) {
        val toBeMapped = GuardrailWordPolicyConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.wordPolicyConfig = mapped
    }

    internal fun build(): GuardrailArgs = GuardrailArgs(
        blockedInputMessaging = blockedInputMessaging,
        blockedOutputsMessaging = blockedOutputsMessaging,
        contentPolicyConfig = contentPolicyConfig,
        description = description,
        kmsKeyArn = kmsKeyArn,
        name = name,
        sensitiveInformationPolicyConfig = sensitiveInformationPolicyConfig,
        tags = tags,
        topicPolicyConfig = topicPolicyConfig,
        wordPolicyConfig = wordPolicyConfig,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy