com.pulumi.awsnative.qbusiness.kotlin.Index.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.qbusiness.kotlin
import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.qbusiness.kotlin.enums.IndexStatus
import com.pulumi.awsnative.qbusiness.kotlin.enums.IndexType
import com.pulumi.awsnative.qbusiness.kotlin.outputs.IndexCapacityConfiguration
import com.pulumi.awsnative.qbusiness.kotlin.outputs.IndexDocumentAttributeConfiguration
import com.pulumi.awsnative.qbusiness.kotlin.outputs.IndexStatistics
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.Tag.Companion.toKotlin as tagToKotlin
import com.pulumi.awsnative.qbusiness.kotlin.enums.IndexStatus.Companion.toKotlin as indexStatusToKotlin
import com.pulumi.awsnative.qbusiness.kotlin.enums.IndexType.Companion.toKotlin as indexTypeToKotlin
import com.pulumi.awsnative.qbusiness.kotlin.outputs.IndexCapacityConfiguration.Companion.toKotlin as indexCapacityConfigurationToKotlin
import com.pulumi.awsnative.qbusiness.kotlin.outputs.IndexDocumentAttributeConfiguration.Companion.toKotlin as indexDocumentAttributeConfigurationToKotlin
import com.pulumi.awsnative.qbusiness.kotlin.outputs.IndexStatistics.Companion.toKotlin as indexStatisticsToKotlin
/**
* Builder for [Index].
*/
@PulumiTagMarker
public class IndexResourceBuilder internal constructor() {
public var name: String? = null
public var args: IndexArgs = IndexArgs()
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 IndexArgsBuilder.() -> Unit) {
val builder = IndexArgsBuilder()
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(): Index {
val builtJavaResource = com.pulumi.awsnative.qbusiness.Index(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Index(builtJavaResource)
}
}
/**
* Definition of AWS::QBusiness::Index Resource Type
*/
public class Index internal constructor(
override val javaResource: com.pulumi.awsnative.qbusiness.Index,
) : KotlinCustomResource(javaResource, IndexMapper) {
/**
* The identifier of the Amazon Q Business application using the index.
*/
public val applicationId: Output
get() = javaResource.applicationId().applyValue({ args0 -> args0 })
/**
* The capacity units you want to provision for your index. You can add and remove capacity to fit your usage needs.
*/
public val capacityConfiguration: Output?
get() = javaResource.capacityConfiguration().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> indexCapacityConfigurationToKotlin(args0) })
}).orElse(null)
})
/**
* The Unix timestamp when the index was created.
*/
public val createdAt: Output
get() = javaResource.createdAt().applyValue({ args0 -> args0 })
/**
* A description for the Amazon Q Business index.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The name of the index.
*/
public val displayName: Output
get() = javaResource.displayName().applyValue({ args0 -> args0 })
/**
* Configuration information for document attributes. Document attributes are metadata or fields associated with your documents. For example, the company department name associated with each document.
* For more information, see [Understanding document attributes](https://docs.aws.amazon.com/amazonq/latest/business-use-dg/doc-attributes.html) .
*/
public val documentAttributeConfigurations: Output>?
get() = javaResource.documentAttributeConfigurations().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
indexDocumentAttributeConfigurationToKotlin(args0)
})
})
}).orElse(null)
})
/**
* The Amazon Resource Name (ARN) of an Amazon Q Business index.
*/
public val indexArn: Output
get() = javaResource.indexArn().applyValue({ args0 -> args0 })
/**
* The identifier for the index.
*/
public val indexId: Output
get() = javaResource.indexId().applyValue({ args0 -> args0 })
public val indexStatistics: Output
get() = javaResource.indexStatistics().applyValue({ args0 ->
args0.let({ args0 ->
indexStatisticsToKotlin(args0)
})
})
/**
* The current status of the index. When the status is `ACTIVE` , the index is ready.
*/
public val status: Output
get() = javaResource.status().applyValue({ args0 ->
args0.let({ args0 ->
indexStatusToKotlin(args0)
})
})
/**
* A list of key-value pairs that identify or categorize the index. You can also use tags to help control access to the index. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
/**
* The index type that's suitable for your needs. For more information on what's included in each type of index, see [Amazon Q Business tiers](https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/tiers.html#index-tiers) .
*/
public val type: Output?
get() = javaResource.type().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
indexTypeToKotlin(args0)
})
}).orElse(null)
})
/**
* The Unix timestamp when the index was last updated.
*/
public val updatedAt: Output
get() = javaResource.updatedAt().applyValue({ args0 -> args0 })
}
public object IndexMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.qbusiness.Index::class == javaResource::class
override fun map(javaResource: Resource): Index = Index(
javaResource as
com.pulumi.awsnative.qbusiness.Index,
)
}
/**
* @see [Index].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Index].
*/
public suspend fun index(name: String, block: suspend IndexResourceBuilder.() -> Unit): Index {
val builder = IndexResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Index].
* @param name The _unique_ name of the resulting resource.
*/
public fun index(name: String): Index {
val builder = IndexResourceBuilder()
builder.name(name)
return builder.build()
}