![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.wisdom.kotlin.Assistant.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.wisdom.kotlin
import com.pulumi.awsnative.kotlin.outputs.CreateOnlyTag
import com.pulumi.awsnative.wisdom.kotlin.enums.AssistantType
import com.pulumi.awsnative.wisdom.kotlin.outputs.AssistantServerSideEncryptionConfiguration
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 com.pulumi.awsnative.kotlin.outputs.CreateOnlyTag.Companion.toKotlin as createOnlyTagToKotlin
import com.pulumi.awsnative.wisdom.kotlin.enums.AssistantType.Companion.toKotlin as assistantTypeToKotlin
import com.pulumi.awsnative.wisdom.kotlin.outputs.AssistantServerSideEncryptionConfiguration.Companion.toKotlin as assistantServerSideEncryptionConfigurationToKotlin
/**
* Builder for [Assistant].
*/
@PulumiTagMarker
public class AssistantResourceBuilder internal constructor() {
public var name: String? = null
public var args: AssistantArgs = AssistantArgs()
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 AssistantArgsBuilder.() -> Unit) {
val builder = AssistantArgsBuilder()
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(): Assistant {
val builtJavaResource = com.pulumi.awsnative.wisdom.Assistant(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Assistant(builtJavaResource)
}
}
/**
* Definition of AWS::Wisdom::Assistant Resource Type
*/
public class Assistant internal constructor(
override val javaResource: com.pulumi.awsnative.wisdom.Assistant,
) : KotlinCustomResource(javaResource, AssistantMapper) {
/**
* The Amazon Resource Name (ARN) of the assistant.
*/
public val assistantArn: Output
get() = javaResource.assistantArn().applyValue({ args0 -> args0 })
/**
* The ID of the Wisdom assistant.
*/
public val assistantId: Output
get() = javaResource.assistantId().applyValue({ args0 -> args0 })
/**
* The description of the assistant.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The name of the assistant.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The configuration information for the customer managed key used for encryption. The customer managed key must have a policy that allows `kms:CreateGrant` and `kms:DescribeKey` permissions to the IAM identity using the key to invoke Wisdom. To use Wisdom with chat, the key policy must also allow `kms:Decrypt` , `kms:GenerateDataKey*` , and `kms:DescribeKey` permissions to the `connect.amazonaws.com` service principal. For more information about setting up a customer managed key for Wisdom, see [Enable Amazon Connect Wisdom for your instance](https://docs.aws.amazon.com/connect/latest/adminguide/enable-wisdom.html) .
*/
public val serverSideEncryptionConfiguration: Output?
get() = javaResource.serverSideEncryptionConfiguration().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
assistantServerSideEncryptionConfigurationToKotlin(args0)
})
}).orElse(null)
})
/**
* The tags used to organize, track, or control access for this resource.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> createOnlyTagToKotlin(args0) })
})
}).orElse(null)
})
/**
* The type of assistant.
*/
public val type: Output
get() = javaResource.type().applyValue({ args0 ->
args0.let({ args0 ->
assistantTypeToKotlin(args0)
})
})
}
public object AssistantMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.wisdom.Assistant::class == javaResource::class
override fun map(javaResource: Resource): Assistant = Assistant(
javaResource as
com.pulumi.awsnative.wisdom.Assistant,
)
}
/**
* @see [Assistant].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Assistant].
*/
public suspend fun assistant(name: String, block: suspend AssistantResourceBuilder.() -> Unit): Assistant {
val builder = AssistantResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Assistant].
* @param name The _unique_ name of the resulting resource.
*/
public fun assistant(name: String): Assistant {
val builder = AssistantResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy