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

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

package com.pulumi.awsnative.cleanrooms.kotlin

import com.pulumi.awsnative.cleanrooms.kotlin.enums.ConfiguredTableAnalysisMethod
import com.pulumi.awsnative.cleanrooms.kotlin.outputs.ConfiguredTableAnalysisRule
import com.pulumi.awsnative.cleanrooms.kotlin.outputs.ConfiguredTableTableReference
import com.pulumi.awsnative.kotlin.outputs.Tag
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.cleanrooms.kotlin.enums.ConfiguredTableAnalysisMethod.Companion.toKotlin as configuredTableAnalysisMethodToKotlin
import com.pulumi.awsnative.cleanrooms.kotlin.outputs.ConfiguredTableAnalysisRule.Companion.toKotlin as configuredTableAnalysisRuleToKotlin
import com.pulumi.awsnative.cleanrooms.kotlin.outputs.ConfiguredTableTableReference.Companion.toKotlin as configuredTableTableReferenceToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin

/**
 * Builder for [ConfiguredTable].
 */
@PulumiTagMarker
public class ConfiguredTableResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: ConfiguredTableArgs = ConfiguredTableArgs()

    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 ConfiguredTableArgsBuilder.() -> Unit) {
        val builder = ConfiguredTableArgsBuilder()
        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(): ConfiguredTable {
        val builtJavaResource = com.pulumi.awsnative.cleanrooms.ConfiguredTable(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return ConfiguredTable(builtJavaResource)
    }
}

/**
 * Represents a table that can be associated with collaborations
 */
public class ConfiguredTable internal constructor(
    override val javaResource: com.pulumi.awsnative.cleanrooms.ConfiguredTable,
) : KotlinCustomResource(javaResource, ConfiguredTableMapper) {
    /**
     * The columns within the underlying AWS Glue table that can be utilized within collaborations.
     */
    public val allowedColumns: Output>
        get() = javaResource.allowedColumns().applyValue({ args0 -> args0.map({ args0 -> args0 }) })

    /**
     * The analysis method for the configured table. The only valid value is currently `DIRECT_QUERY`.
     */
    public val analysisMethod: Output
        get() = javaResource.analysisMethod().applyValue({ args0 ->
            args0.let({ args0 ->
                configuredTableAnalysisMethodToKotlin(args0)
            })
        })

    /**
     * The entire created analysis rule.
     */
    public val analysisRules: Output>?
        get() = javaResource.analysisRules().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 ->
                        configuredTableAnalysisRuleToKotlin(args0)
                    })
                })
            }).orElse(null)
        })

    /**
     * Returns the Amazon Resource Name (ARN) of the specified configured table.
     * Example: `arn:aws:cleanrooms:us-east-1:111122223333:configuredtable/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111`
     */
    public val arn: Output
        get() = javaResource.arn().applyValue({ args0 -> args0 })

    /**
     * Returns the unique identifier of the specified configured table.
     * Example: `a1b2c3d4-5678-90ab-cdef-EXAMPLE33333`
     */
    public val configuredTableIdentifier: Output
        get() = javaResource.configuredTableIdentifier().applyValue({ args0 -> args0 })

    /**
     * A description for the configured table.
     */
    public val description: Output?
        get() = javaResource.description().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * A name for the configured table.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * The AWS Glue table that this configured table represents.
     */
    public val tableReference: Output
        get() = javaResource.tableReference().applyValue({ args0 ->
            args0.let({ args0 ->
                configuredTableTableReferenceToKotlin(args0)
            })
        })

    /**
     * An arbitrary set of tags (key-value pairs) for this cleanrooms collaboration.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> tagToKotlin(args0) })
                })
            }).orElse(null)
        })
}

public object ConfiguredTableMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.cleanrooms.ConfiguredTable::class == javaResource::class

    override fun map(javaResource: Resource): ConfiguredTable = ConfiguredTable(
        javaResource as
            com.pulumi.awsnative.cleanrooms.ConfiguredTable,
    )
}

/**
 * @see [ConfiguredTable].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [ConfiguredTable].
 */
public suspend fun configuredTable(
    name: String,
    block: suspend ConfiguredTableResourceBuilder.() -> Unit,
): ConfiguredTable {
    val builder = ConfiguredTableResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [ConfiguredTable].
 * @param name The _unique_ name of the resulting resource.
 */
public fun configuredTable(name: String): ConfiguredTable {
    val builder = ConfiguredTableResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy