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

com.pulumi.awsnative.quicksight.kotlin.TemplateArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.quicksight.kotlin

import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.awsnative.quicksight.TemplateArgs.builder
import com.pulumi.awsnative.quicksight.kotlin.inputs.TemplateResourcePermissionArgs
import com.pulumi.awsnative.quicksight.kotlin.inputs.TemplateResourcePermissionArgsBuilder
import com.pulumi.awsnative.quicksight.kotlin.inputs.TemplateSourceEntityArgs
import com.pulumi.awsnative.quicksight.kotlin.inputs.TemplateSourceEntityArgsBuilder
import com.pulumi.awsnative.quicksight.kotlin.inputs.TemplateValidationStrategyArgs
import com.pulumi.awsnative.quicksight.kotlin.inputs.TemplateValidationStrategyArgsBuilder
import com.pulumi.awsnative.quicksight.kotlin.inputs.TemplateVersionDefinitionArgs
import com.pulumi.awsnative.quicksight.kotlin.inputs.TemplateVersionDefinitionArgsBuilder
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 the AWS::QuickSight::Template Resource Type.
 * @property awsAccountId The ID for the AWS account that the group is in. You use the ID for the AWS account that contains your Amazon QuickSight account.
 * @property definition
 * @property name A display name for the template.
 * @property permissions A list of resource permissions to be set on the template.
 * @property sourceEntity The entity that you are using as a source when you create the template. In `SourceEntity` , you specify the type of object you're using as source: `SourceTemplate` for a template or `SourceAnalysis` for an analysis. Both of these require an Amazon Resource Name (ARN). For `SourceTemplate` , specify the ARN of the source template. For `SourceAnalysis` , specify the ARN of the source analysis. The `SourceTemplate` ARN can contain any AWS account and any Amazon QuickSight-supported AWS Region .
 * Use the `DataSetReferences` entity within `SourceTemplate` or `SourceAnalysis` to list the replacement datasets for the placeholders listed in the original. The schema in each dataset must match its placeholder.
 * Either a `SourceEntity` or a `Definition` must be provided in order for the request to be valid.
 * @property tags Contains a map of the key-value pairs for the resource tag or tags assigned to the resource.
 * @property templateId An ID for the template that you want to create. This template is unique per AWS Region ; in each AWS account.
 * @property validationStrategy The option to relax the validation that is required to create and update analyses, dashboards, and templates with definition objects. When you set this value to `LENIENT` , validation is skipped for specific errors.
 * @property versionDescription A description of the current template version being created. This API operation creates the first version of the template. Every time `UpdateTemplate` is called, a new version is created. Each version of the template maintains a description of the version in the `VersionDescription` field.
 */
public data class TemplateArgs(
    public val awsAccountId: Output? = null,
    public val definition: Output? = null,
    public val name: Output? = null,
    public val permissions: Output>? = null,
    public val sourceEntity: Output? = null,
    public val tags: Output>? = null,
    public val templateId: Output? = null,
    public val validationStrategy: Output? = null,
    public val versionDescription: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.quicksight.TemplateArgs =
        com.pulumi.awsnative.quicksight.TemplateArgs.builder()
            .awsAccountId(awsAccountId?.applyValue({ args0 -> args0 }))
            .definition(definition?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .name(name?.applyValue({ args0 -> args0 }))
            .permissions(
                permissions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .sourceEntity(sourceEntity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .templateId(templateId?.applyValue({ args0 -> args0 }))
            .validationStrategy(
                validationStrategy?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .versionDescription(versionDescription?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [TemplateArgs].
 */
@PulumiTagMarker
public class TemplateArgsBuilder internal constructor() {
    private var awsAccountId: Output? = null

    private var definition: Output? = null

    private var name: Output? = null

    private var permissions: Output>? = null

    private var sourceEntity: Output? = null

    private var tags: Output>? = null

    private var templateId: Output? = null

    private var validationStrategy: Output? = null

    private var versionDescription: Output? = null

    /**
     * @param value The ID for the AWS account that the group is in. You use the ID for the AWS account that contains your Amazon QuickSight account.
     */
    @JvmName("jeactsbttfbxtfsa")
    public suspend fun awsAccountId(`value`: Output) {
        this.awsAccountId = value
    }

    /**
     * @param value
     */
    @JvmName("bmotgxhibgfavkhn")
    public suspend fun definition(`value`: Output) {
        this.definition = value
    }

    /**
     * @param value A display name for the template.
     */
    @JvmName("ohrngfgmbabtdyhm")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value A list of resource permissions to be set on the template.
     */
    @JvmName("vfbgapckojiwvurv")
    public suspend fun permissions(`value`: Output>) {
        this.permissions = value
    }

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

    /**
     * @param values A list of resource permissions to be set on the template.
     */
    @JvmName("ooeuoisfykxgatkb")
    public suspend fun permissions(values: List>) {
        this.permissions = Output.all(values)
    }

    /**
     * @param value The entity that you are using as a source when you create the template. In `SourceEntity` , you specify the type of object you're using as source: `SourceTemplate` for a template or `SourceAnalysis` for an analysis. Both of these require an Amazon Resource Name (ARN). For `SourceTemplate` , specify the ARN of the source template. For `SourceAnalysis` , specify the ARN of the source analysis. The `SourceTemplate` ARN can contain any AWS account and any Amazon QuickSight-supported AWS Region .
     * Use the `DataSetReferences` entity within `SourceTemplate` or `SourceAnalysis` to list the replacement datasets for the placeholders listed in the original. The schema in each dataset must match its placeholder.
     * Either a `SourceEntity` or a `Definition` must be provided in order for the request to be valid.
     */
    @JvmName("fufxspblbhrcfddr")
    public suspend fun sourceEntity(`value`: Output) {
        this.sourceEntity = value
    }

    /**
     * @param value Contains a map of the key-value pairs for the resource tag or tags assigned to the resource.
     */
    @JvmName("gougwmoufnbqsefw")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values Contains a map of the key-value pairs for the resource tag or tags assigned to the resource.
     */
    @JvmName("ietsmljpyrthwewx")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value An ID for the template that you want to create. This template is unique per AWS Region ; in each AWS account.
     */
    @JvmName("qkkomykbnulaarpg")
    public suspend fun templateId(`value`: Output) {
        this.templateId = value
    }

    /**
     * @param value The option to relax the validation that is required to create and update analyses, dashboards, and templates with definition objects. When you set this value to `LENIENT` , validation is skipped for specific errors.
     */
    @JvmName("gjqdnqphuhktjohk")
    public suspend fun validationStrategy(`value`: Output) {
        this.validationStrategy = value
    }

    /**
     * @param value A description of the current template version being created. This API operation creates the first version of the template. Every time `UpdateTemplate` is called, a new version is created. Each version of the template maintains a description of the version in the `VersionDescription` field.
     */
    @JvmName("mkjefvrmixawplbw")
    public suspend fun versionDescription(`value`: Output) {
        this.versionDescription = value
    }

    /**
     * @param value The ID for the AWS account that the group is in. You use the ID for the AWS account that contains your Amazon QuickSight account.
     */
    @JvmName("mwuhbonhmjnfhfpj")
    public suspend fun awsAccountId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.awsAccountId = mapped
    }

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

    /**
     * @param argument
     */
    @JvmName("lotmghintfkjhmsa")
    public suspend fun definition(argument: suspend TemplateVersionDefinitionArgsBuilder.() -> Unit) {
        val toBeMapped = TemplateVersionDefinitionArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.definition = mapped
    }

    /**
     * @param value A display name for the template.
     */
    @JvmName("yfpyewmersrrwwgg")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value A list of resource permissions to be set on the template.
     */
    @JvmName("vvcdunlpthqigven")
    public suspend fun permissions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.permissions = mapped
    }

    /**
     * @param argument A list of resource permissions to be set on the template.
     */
    @JvmName("nxblcnqqutytohlq")
    public suspend fun permissions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            TemplateResourcePermissionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.permissions = mapped
    }

    /**
     * @param argument A list of resource permissions to be set on the template.
     */
    @JvmName("bofnslrednumyxce")
    public suspend fun permissions(vararg argument: suspend TemplateResourcePermissionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            TemplateResourcePermissionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.permissions = mapped
    }

    /**
     * @param argument A list of resource permissions to be set on the template.
     */
    @JvmName("ahwuhoihbjxkmklv")
    public suspend fun permissions(argument: suspend TemplateResourcePermissionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            TemplateResourcePermissionArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.permissions = mapped
    }

    /**
     * @param values A list of resource permissions to be set on the template.
     */
    @JvmName("kfmffadeoopkeock")
    public suspend fun permissions(vararg values: TemplateResourcePermissionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.permissions = mapped
    }

    /**
     * @param value The entity that you are using as a source when you create the template. In `SourceEntity` , you specify the type of object you're using as source: `SourceTemplate` for a template or `SourceAnalysis` for an analysis. Both of these require an Amazon Resource Name (ARN). For `SourceTemplate` , specify the ARN of the source template. For `SourceAnalysis` , specify the ARN of the source analysis. The `SourceTemplate` ARN can contain any AWS account and any Amazon QuickSight-supported AWS Region .
     * Use the `DataSetReferences` entity within `SourceTemplate` or `SourceAnalysis` to list the replacement datasets for the placeholders listed in the original. The schema in each dataset must match its placeholder.
     * Either a `SourceEntity` or a `Definition` must be provided in order for the request to be valid.
     */
    @JvmName("rumoavshmssojujy")
    public suspend fun sourceEntity(`value`: TemplateSourceEntityArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceEntity = mapped
    }

    /**
     * @param argument The entity that you are using as a source when you create the template. In `SourceEntity` , you specify the type of object you're using as source: `SourceTemplate` for a template or `SourceAnalysis` for an analysis. Both of these require an Amazon Resource Name (ARN). For `SourceTemplate` , specify the ARN of the source template. For `SourceAnalysis` , specify the ARN of the source analysis. The `SourceTemplate` ARN can contain any AWS account and any Amazon QuickSight-supported AWS Region .
     * Use the `DataSetReferences` entity within `SourceTemplate` or `SourceAnalysis` to list the replacement datasets for the placeholders listed in the original. The schema in each dataset must match its placeholder.
     * Either a `SourceEntity` or a `Definition` must be provided in order for the request to be valid.
     */
    @JvmName("ebbalqpffnxsuoyw")
    public suspend fun sourceEntity(argument: suspend TemplateSourceEntityArgsBuilder.() -> Unit) {
        val toBeMapped = TemplateSourceEntityArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.sourceEntity = mapped
    }

    /**
     * @param value Contains a map of the key-value pairs for the resource tag or tags assigned to the resource.
     */
    @JvmName("ijncaabtqxbxgwnh")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument Contains a map of the key-value pairs for the resource tag or tags assigned to the resource.
     */
    @JvmName("bhkuwpraljtknlib")
    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 Contains a map of the key-value pairs for the resource tag or tags assigned to the resource.
     */
    @JvmName("nduqhnpwuskgkmkq")
    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 Contains a map of the key-value pairs for the resource tag or tags assigned to the resource.
     */
    @JvmName("imcvxnchkeycaobj")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values Contains a map of the key-value pairs for the resource tag or tags assigned to the resource.
     */
    @JvmName("fhqtegrqvwivmuuo")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value An ID for the template that you want to create. This template is unique per AWS Region ; in each AWS account.
     */
    @JvmName("ftluvfllxylvwfoi")
    public suspend fun templateId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.templateId = mapped
    }

    /**
     * @param value The option to relax the validation that is required to create and update analyses, dashboards, and templates with definition objects. When you set this value to `LENIENT` , validation is skipped for specific errors.
     */
    @JvmName("kclimajwwswsughb")
    public suspend fun validationStrategy(`value`: TemplateValidationStrategyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.validationStrategy = mapped
    }

    /**
     * @param argument The option to relax the validation that is required to create and update analyses, dashboards, and templates with definition objects. When you set this value to `LENIENT` , validation is skipped for specific errors.
     */
    @JvmName("ukuujmiusdjbldhw")
    public suspend fun validationStrategy(argument: suspend TemplateValidationStrategyArgsBuilder.() -> Unit) {
        val toBeMapped = TemplateValidationStrategyArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.validationStrategy = mapped
    }

    /**
     * @param value A description of the current template version being created. This API operation creates the first version of the template. Every time `UpdateTemplate` is called, a new version is created. Each version of the template maintains a description of the version in the `VersionDescription` field.
     */
    @JvmName("prhhchrnaiuohyki")
    public suspend fun versionDescription(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.versionDescription = mapped
    }

    internal fun build(): TemplateArgs = TemplateArgs(
        awsAccountId = awsAccountId,
        definition = definition,
        name = name,
        permissions = permissions,
        sourceEntity = sourceEntity,
        tags = tags,
        templateId = templateId,
        validationStrategy = validationStrategy,
        versionDescription = versionDescription,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy