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

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

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

package com.pulumi.awsnative.bedrock.kotlin

import com.pulumi.awsnative.bedrock.AgentArgs.builder
import com.pulumi.awsnative.bedrock.kotlin.inputs.AgentActionGroupArgs
import com.pulumi.awsnative.bedrock.kotlin.inputs.AgentActionGroupArgsBuilder
import com.pulumi.awsnative.bedrock.kotlin.inputs.AgentGuardrailConfigurationArgs
import com.pulumi.awsnative.bedrock.kotlin.inputs.AgentGuardrailConfigurationArgsBuilder
import com.pulumi.awsnative.bedrock.kotlin.inputs.AgentKnowledgeBaseArgs
import com.pulumi.awsnative.bedrock.kotlin.inputs.AgentKnowledgeBaseArgsBuilder
import com.pulumi.awsnative.bedrock.kotlin.inputs.AgentPromptOverrideConfigurationArgs
import com.pulumi.awsnative.bedrock.kotlin.inputs.AgentPromptOverrideConfigurationArgsBuilder
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.Boolean
import kotlin.Double
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Definition of AWS::Bedrock::Agent Resource Type
 * @property actionGroups List of ActionGroups
 * @property agentName Name for a resource.
 * @property agentResourceRoleArn ARN of a IAM role.
 * @property autoPrepare Specifies whether to automatically prepare after creating or updating the agent.
 * @property customerEncryptionKeyArn A KMS key ARN
 * @property description Description of the Resource.
 * @property foundationModel ARN or name of a Bedrock model.
 * @property guardrailConfiguration Details about the guardrail associated with the agent.
 * @property idleSessionTtlInSeconds Max Session Time.
 * @property instruction Instruction for the agent.
 * @property knowledgeBases List of Agent Knowledge Bases
 * @property promptOverrideConfiguration Contains configurations to override prompt templates in different parts of an agent sequence. For more information, see [Advanced prompts](https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts.html) .
 * @property skipResourceInUseCheckOnDelete Specifies whether to allow deleting agent while it is in use.
 * @property tags Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:
 * - [Tag naming limits and requirements](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-conventions)
 * - [Tagging best practices](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-best-practices)
 * @property testAliasTags Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:
 * - [Tag naming limits and requirements](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-conventions)
 * - [Tagging best practices](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-best-practices)
 */
public data class AgentArgs(
    public val actionGroups: Output>? = null,
    public val agentName: Output? = null,
    public val agentResourceRoleArn: Output? = null,
    public val autoPrepare: Output? = null,
    public val customerEncryptionKeyArn: Output? = null,
    public val description: Output? = null,
    public val foundationModel: Output? = null,
    public val guardrailConfiguration: Output? = null,
    public val idleSessionTtlInSeconds: Output? = null,
    public val instruction: Output? = null,
    public val knowledgeBases: Output>? = null,
    public val promptOverrideConfiguration: Output? = null,
    public val skipResourceInUseCheckOnDelete: Output? = null,
    public val tags: Output>? = null,
    public val testAliasTags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.bedrock.AgentArgs =
        com.pulumi.awsnative.bedrock.AgentArgs.builder()
            .actionGroups(
                actionGroups?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .agentName(agentName?.applyValue({ args0 -> args0 }))
            .agentResourceRoleArn(agentResourceRoleArn?.applyValue({ args0 -> args0 }))
            .autoPrepare(autoPrepare?.applyValue({ args0 -> args0 }))
            .customerEncryptionKeyArn(customerEncryptionKeyArn?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .foundationModel(foundationModel?.applyValue({ args0 -> args0 }))
            .guardrailConfiguration(
                guardrailConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .idleSessionTtlInSeconds(idleSessionTtlInSeconds?.applyValue({ args0 -> args0 }))
            .instruction(instruction?.applyValue({ args0 -> args0 }))
            .knowledgeBases(
                knowledgeBases?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .promptOverrideConfiguration(
                promptOverrideConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .skipResourceInUseCheckOnDelete(skipResourceInUseCheckOnDelete?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .testAliasTags(
                testAliasTags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [AgentArgs].
 */
@PulumiTagMarker
public class AgentArgsBuilder internal constructor() {
    private var actionGroups: Output>? = null

    private var agentName: Output? = null

    private var agentResourceRoleArn: Output? = null

    private var autoPrepare: Output? = null

    private var customerEncryptionKeyArn: Output? = null

    private var description: Output? = null

    private var foundationModel: Output? = null

    private var guardrailConfiguration: Output? = null

    private var idleSessionTtlInSeconds: Output? = null

    private var instruction: Output? = null

    private var knowledgeBases: Output>? = null

    private var promptOverrideConfiguration: Output? = null

    private var skipResourceInUseCheckOnDelete: Output? = null

    private var tags: Output>? = null

    private var testAliasTags: Output>? = null

    /**
     * @param value List of ActionGroups
     */
    @JvmName("oissxgkjsaomqygs")
    public suspend fun actionGroups(`value`: Output>) {
        this.actionGroups = value
    }

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

    /**
     * @param values List of ActionGroups
     */
    @JvmName("hglsrlqavxmnuvau")
    public suspend fun actionGroups(values: List>) {
        this.actionGroups = Output.all(values)
    }

    /**
     * @param value Name for a resource.
     */
    @JvmName("vivhkepfmvlrqwtx")
    public suspend fun agentName(`value`: Output) {
        this.agentName = value
    }

    /**
     * @param value ARN of a IAM role.
     */
    @JvmName("adqeaisuqrnplqcy")
    public suspend fun agentResourceRoleArn(`value`: Output) {
        this.agentResourceRoleArn = value
    }

    /**
     * @param value Specifies whether to automatically prepare after creating or updating the agent.
     */
    @JvmName("jrhmqxhllrbindbi")
    public suspend fun autoPrepare(`value`: Output) {
        this.autoPrepare = value
    }

    /**
     * @param value A KMS key ARN
     */
    @JvmName("kgfxglfonhbcptoa")
    public suspend fun customerEncryptionKeyArn(`value`: Output) {
        this.customerEncryptionKeyArn = value
    }

    /**
     * @param value Description of the Resource.
     */
    @JvmName("ufksarqummcjbdnq")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value ARN or name of a Bedrock model.
     */
    @JvmName("ufvyxqsnpmbsogwk")
    public suspend fun foundationModel(`value`: Output) {
        this.foundationModel = value
    }

    /**
     * @param value Details about the guardrail associated with the agent.
     */
    @JvmName("mtibtysmkokreald")
    public suspend fun guardrailConfiguration(`value`: Output) {
        this.guardrailConfiguration = value
    }

    /**
     * @param value Max Session Time.
     */
    @JvmName("rgghfibienlgfwhv")
    public suspend fun idleSessionTtlInSeconds(`value`: Output) {
        this.idleSessionTtlInSeconds = value
    }

    /**
     * @param value Instruction for the agent.
     */
    @JvmName("spwralaxofekxkfk")
    public suspend fun instruction(`value`: Output) {
        this.instruction = value
    }

    /**
     * @param value List of Agent Knowledge Bases
     */
    @JvmName("vxqlkognbuhiwnqf")
    public suspend fun knowledgeBases(`value`: Output>) {
        this.knowledgeBases = value
    }

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

    /**
     * @param values List of Agent Knowledge Bases
     */
    @JvmName("gncbwttptefhtndl")
    public suspend fun knowledgeBases(values: List>) {
        this.knowledgeBases = Output.all(values)
    }

    /**
     * @param value Contains configurations to override prompt templates in different parts of an agent sequence. For more information, see [Advanced prompts](https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts.html) .
     */
    @JvmName("dspqafwlagmytqwg")
    public suspend fun promptOverrideConfiguration(`value`: Output) {
        this.promptOverrideConfiguration = value
    }

    /**
     * @param value Specifies whether to allow deleting agent while it is in use.
     */
    @JvmName("wtmbaamyfjbrbdvn")
    public suspend fun skipResourceInUseCheckOnDelete(`value`: Output) {
        this.skipResourceInUseCheckOnDelete = value
    }

    /**
     * @param value Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:
     * - [Tag naming limits and requirements](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-conventions)
     * - [Tagging best practices](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-best-practices)
     */
    @JvmName("jxgilriodfgqujfb")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:
     * - [Tag naming limits and requirements](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-conventions)
     * - [Tagging best practices](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-best-practices)
     */
    @JvmName("pgefvcvimldrnysv")
    public suspend fun testAliasTags(`value`: Output>) {
        this.testAliasTags = value
    }

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

    /**
     * @param argument List of ActionGroups
     */
    @JvmName("gfywssasifbxwiyv")
    public suspend fun actionGroups(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AgentActionGroupArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.actionGroups = mapped
    }

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

    /**
     * @param argument List of ActionGroups
     */
    @JvmName("bskslbaadcwyemks")
    public suspend fun actionGroups(argument: suspend AgentActionGroupArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(AgentActionGroupArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.actionGroups = mapped
    }

    /**
     * @param values List of ActionGroups
     */
    @JvmName("stnnigwbuxsgndoi")
    public suspend fun actionGroups(vararg values: AgentActionGroupArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.actionGroups = mapped
    }

    /**
     * @param value Name for a resource.
     */
    @JvmName("oqudmgycsrmpeihk")
    public suspend fun agentName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.agentName = mapped
    }

    /**
     * @param value ARN of a IAM role.
     */
    @JvmName("viaxxoqfpelsyldb")
    public suspend fun agentResourceRoleArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.agentResourceRoleArn = mapped
    }

    /**
     * @param value Specifies whether to automatically prepare after creating or updating the agent.
     */
    @JvmName("kdqfrxcibpeosdlo")
    public suspend fun autoPrepare(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoPrepare = mapped
    }

    /**
     * @param value A KMS key ARN
     */
    @JvmName("rklvnoleyrlclxnu")
    public suspend fun customerEncryptionKeyArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customerEncryptionKeyArn = mapped
    }

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

    /**
     * @param value ARN or name of a Bedrock model.
     */
    @JvmName("pwdnpgcoslginybw")
    public suspend fun foundationModel(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.foundationModel = mapped
    }

    /**
     * @param value Details about the guardrail associated with the agent.
     */
    @JvmName("tcudtgeceguqqctk")
    public suspend fun guardrailConfiguration(`value`: AgentGuardrailConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.guardrailConfiguration = mapped
    }

    /**
     * @param argument Details about the guardrail associated with the agent.
     */
    @JvmName("qrcwusmauihpwvbi")
    public suspend fun guardrailConfiguration(argument: suspend AgentGuardrailConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = AgentGuardrailConfigurationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.guardrailConfiguration = mapped
    }

    /**
     * @param value Max Session Time.
     */
    @JvmName("dedjyoltothrateg")
    public suspend fun idleSessionTtlInSeconds(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.idleSessionTtlInSeconds = mapped
    }

    /**
     * @param value Instruction for the agent.
     */
    @JvmName("elflrwjlrwahechg")
    public suspend fun instruction(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instruction = mapped
    }

    /**
     * @param value List of Agent Knowledge Bases
     */
    @JvmName("jrlvhuvfllgyhwxh")
    public suspend fun knowledgeBases(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.knowledgeBases = mapped
    }

    /**
     * @param argument List of Agent Knowledge Bases
     */
    @JvmName("afcektvgxjsfccma")
    public suspend fun knowledgeBases(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AgentKnowledgeBaseArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.knowledgeBases = mapped
    }

    /**
     * @param argument List of Agent Knowledge Bases
     */
    @JvmName("vvdaikcbivlkwrru")
    public suspend fun knowledgeBases(vararg argument: suspend AgentKnowledgeBaseArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AgentKnowledgeBaseArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.knowledgeBases = mapped
    }

    /**
     * @param argument List of Agent Knowledge Bases
     */
    @JvmName("fjshcnpxwreiuqtd")
    public suspend fun knowledgeBases(argument: suspend AgentKnowledgeBaseArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(AgentKnowledgeBaseArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.knowledgeBases = mapped
    }

    /**
     * @param values List of Agent Knowledge Bases
     */
    @JvmName("srkwmaehnyjvfiho")
    public suspend fun knowledgeBases(vararg values: AgentKnowledgeBaseArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.knowledgeBases = mapped
    }

    /**
     * @param value Contains configurations to override prompt templates in different parts of an agent sequence. For more information, see [Advanced prompts](https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts.html) .
     */
    @JvmName("qxudlwgiwwqnaoil")
    public suspend fun promptOverrideConfiguration(`value`: AgentPromptOverrideConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.promptOverrideConfiguration = mapped
    }

    /**
     * @param argument Contains configurations to override prompt templates in different parts of an agent sequence. For more information, see [Advanced prompts](https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts.html) .
     */
    @JvmName("gxfvuyswdsnergfs")
    public suspend fun promptOverrideConfiguration(argument: suspend AgentPromptOverrideConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = AgentPromptOverrideConfigurationArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.promptOverrideConfiguration = mapped
    }

    /**
     * @param value Specifies whether to allow deleting agent while it is in use.
     */
    @JvmName("tgkbrjvnuycflfrn")
    public suspend fun skipResourceInUseCheckOnDelete(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.skipResourceInUseCheckOnDelete = mapped
    }

    /**
     * @param value Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:
     * - [Tag naming limits and requirements](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-conventions)
     * - [Tagging best practices](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-best-practices)
     */
    @JvmName("nfphmndnypbvbpdl")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:
     * - [Tag naming limits and requirements](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-conventions)
     * - [Tagging best practices](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-best-practices)
     */
    @JvmName("bytopuiumwruceax")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:
     * - [Tag naming limits and requirements](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-conventions)
     * - [Tagging best practices](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-best-practices)
     */
    @JvmName("kttnvyxbtsdoptsv")
    public suspend fun testAliasTags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.testAliasTags = mapped
    }

    /**
     * @param values Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:
     * - [Tag naming limits and requirements](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-conventions)
     * - [Tagging best practices](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-best-practices)
     */
    @JvmName("duvkusexsscxlvcd")
    public fun testAliasTags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.testAliasTags = mapped
    }

    internal fun build(): AgentArgs = AgentArgs(
        actionGroups = actionGroups,
        agentName = agentName,
        agentResourceRoleArn = agentResourceRoleArn,
        autoPrepare = autoPrepare,
        customerEncryptionKeyArn = customerEncryptionKeyArn,
        description = description,
        foundationModel = foundationModel,
        guardrailConfiguration = guardrailConfiguration,
        idleSessionTtlInSeconds = idleSessionTtlInSeconds,
        instruction = instruction,
        knowledgeBases = knowledgeBases,
        promptOverrideConfiguration = promptOverrideConfiguration,
        skipResourceInUseCheckOnDelete = skipResourceInUseCheckOnDelete,
        tags = tags,
        testAliasTags = testAliasTags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy