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

com.pulumi.awsnative.rds.kotlin.Integration.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.rds.kotlin

import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin
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 kotlin.collections.Map

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

    public var args: IntegrationArgs = IntegrationArgs()

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

/**
 * A zero-ETL integration with Amazon Redshift.
 */
public class Integration internal constructor(
    override val javaResource: com.pulumi.awsnative.rds.Integration,
) : KotlinCustomResource(javaResource, IntegrationMapper) {
    /**
     * An optional set of non-secret key–value pairs that contains additional contextual information about the data. For more information, see [Encryption context](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context) in the *Key Management Service Developer Guide*.
     *  You can only include this parameter if you specify the ``KMSKeyId`` parameter.
     */
    public val additionalEncryptionContext: Output>?
        get() = javaResource.additionalEncryptionContext().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 -> args0.key.to(args0.value) }).toMap()
            }).orElse(null)
        })

    /**
     * The time when the integration was created, in Universal Coordinated Time (UTC).
     */
    public val createTime: Output
        get() = javaResource.createTime().applyValue({ args0 -> args0 })

    /**
     * Data filters for the integration. These filters determine which tables from the source database are sent to the target Amazon Redshift data warehouse.
     */
    public val dataFilter: Output?
        get() = javaResource.dataFilter().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

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

    /**
     * The ARN of the integration.
     */
    public val integrationArn: Output
        get() = javaResource.integrationArn().applyValue({ args0 -> args0 })

    /**
     * The name of the integration.
     */
    public val integrationName: Output?
        get() = javaResource.integrationName().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The AWS Key Management System (AWS KMS) key identifier for the key to use to encrypt the integration. If you don't specify an encryption key, RDS uses a default AWS owned key.
     */
    public val kmsKeyId: Output?
        get() = javaResource.kmsKeyId().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The Amazon Resource Name (ARN) of the database to use as the source for replication.
     */
    public val sourceArn: Output
        get() = javaResource.sourceArn().applyValue({ args0 -> args0 })

    /**
     * A list of tags. For more information, see [Tagging Amazon RDS Resources](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) in the *Amazon RDS User Guide.*.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> toKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * The ARN of the Redshift data warehouse to use as the target for replication.
     */
    public val targetArn: Output
        get() = javaResource.targetArn().applyValue({ args0 -> args0 })
}

public object IntegrationMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.rds.Integration::class == javaResource::class

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy