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

com.pulumi.awsnative.bedrock.kotlin.KnowledgeBaseArgs.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: 0.122.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.bedrock.kotlin

import com.pulumi.awsnative.bedrock.KnowledgeBaseArgs.builder
import com.pulumi.awsnative.bedrock.kotlin.inputs.KnowledgeBaseConfigurationArgs
import com.pulumi.awsnative.bedrock.kotlin.inputs.KnowledgeBaseConfigurationArgsBuilder
import com.pulumi.awsnative.bedrock.kotlin.inputs.KnowledgeBaseStorageConfigurationArgs
import com.pulumi.awsnative.bedrock.kotlin.inputs.KnowledgeBaseStorageConfigurationArgsBuilder
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Definition of AWS::Bedrock::KnowledgeBase Resource Type
 * @property description Description of the Resource.
 * @property knowledgeBaseConfiguration Contains details about the embeddings configuration of the knowledge base.
 * @property name The name of the knowledge base.
 * @property roleArn The ARN of the IAM role with permissions to invoke API operations on the knowledge base. The ARN must begin with AmazonBedrockExecutionRoleForKnowledgeBase_
 * @property storageConfiguration Contains details about the storage configuration of the knowledge base.
 * @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)
 */
public data class KnowledgeBaseArgs(
    public val description: Output? = null,
    public val knowledgeBaseConfiguration: Output? = null,
    public val name: Output? = null,
    public val roleArn: Output? = null,
    public val storageConfiguration: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.bedrock.KnowledgeBaseArgs =
        com.pulumi.awsnative.bedrock.KnowledgeBaseArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .knowledgeBaseConfiguration(
                knowledgeBaseConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .name(name?.applyValue({ args0 -> args0 }))
            .roleArn(roleArn?.applyValue({ args0 -> args0 }))
            .storageConfiguration(
                storageConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [KnowledgeBaseArgs].
 */
@PulumiTagMarker
public class KnowledgeBaseArgsBuilder internal constructor() {
    private var description: Output? = null

    private var knowledgeBaseConfiguration: Output? = null

    private var name: Output? = null

    private var roleArn: Output? = null

    private var storageConfiguration: Output? = null

    private var tags: Output>? = null

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

    /**
     * @param value Contains details about the embeddings configuration of the knowledge base.
     */
    @JvmName("bxsnuqshxebwsqpq")
    public suspend fun knowledgeBaseConfiguration(`value`: Output) {
        this.knowledgeBaseConfiguration = value
    }

    /**
     * @param value The name of the knowledge base.
     */
    @JvmName("cllvwkaadueidtcy")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The ARN of the IAM role with permissions to invoke API operations on the knowledge base. The ARN must begin with AmazonBedrockExecutionRoleForKnowledgeBase_
     */
    @JvmName("vohcxkrinvoyjcwu")
    public suspend fun roleArn(`value`: Output) {
        this.roleArn = value
    }

    /**
     * @param value Contains details about the storage configuration of the knowledge base.
     */
    @JvmName("qsuwiwqqgnbwhvoo")
    public suspend fun storageConfiguration(`value`: Output) {
        this.storageConfiguration = 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("hfuthlydxcdqmbjj")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param value Contains details about the embeddings configuration of the knowledge base.
     */
    @JvmName("sfmplrqdtvojlmwm")
    public suspend fun knowledgeBaseConfiguration(`value`: KnowledgeBaseConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.knowledgeBaseConfiguration = mapped
    }

    /**
     * @param argument Contains details about the embeddings configuration of the knowledge base.
     */
    @JvmName("eyomtqwcpwvqxvcs")
    public suspend fun knowledgeBaseConfiguration(argument: suspend KnowledgeBaseConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = KnowledgeBaseConfigurationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.knowledgeBaseConfiguration = mapped
    }

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

    /**
     * @param value The ARN of the IAM role with permissions to invoke API operations on the knowledge base. The ARN must begin with AmazonBedrockExecutionRoleForKnowledgeBase_
     */
    @JvmName("vwfyynnurwkvlvny")
    public suspend fun roleArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.roleArn = mapped
    }

    /**
     * @param value Contains details about the storage configuration of the knowledge base.
     */
    @JvmName("youqenxqsdrylvgx")
    public suspend fun storageConfiguration(`value`: KnowledgeBaseStorageConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageConfiguration = mapped
    }

    /**
     * @param argument Contains details about the storage configuration of the knowledge base.
     */
    @JvmName("kdtkrgobindrifkv")
    public suspend fun storageConfiguration(argument: suspend KnowledgeBaseStorageConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = KnowledgeBaseStorageConfigurationArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.storageConfiguration = 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("oqeddtkrdujxvbpe")
    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("dswryrxelhokuqto")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): KnowledgeBaseArgs = KnowledgeBaseArgs(
        description = description,
        knowledgeBaseConfiguration = knowledgeBaseConfiguration,
        name = name,
        roleArn = roleArn,
        storageConfiguration = storageConfiguration,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy