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

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

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

package com.pulumi.awsnative.rds.kotlin

import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.awsnative.rds.DbSubnetGroupArgs.builder
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

/**
 * The ``AWS::RDS::DBSubnetGroup`` resource creates a database subnet group. Subnet groups must contain at least two subnets in two different Availability Zones in the same region.
 *  For more information, see [Working with DB subnet groups](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html#USER_VPC.Subnets) in the *Amazon RDS User Guide*.
 * @property dbSubnetGroupDescription The description for the DB subnet group.
 * @property dbSubnetGroupName The name for the DB subnet group. This value is stored as a lowercase string.
 *  Constraints:
 *   +  Must contain no more than 255 letters, numbers, periods, underscores, spaces, or hyphens.
 *   +  Must not be default.
 *   +  First character must be a letter.
 *  Example: ``mydbsubnetgroup``
 * @property subnetIds The EC2 Subnet IDs for the DB subnet group.
 * @property tags Tags to assign to the DB subnet group.
 */
public data class DbSubnetGroupArgs(
    public val dbSubnetGroupDescription: Output? = null,
    public val dbSubnetGroupName: Output? = null,
    public val subnetIds: Output>? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.rds.DbSubnetGroupArgs =
        com.pulumi.awsnative.rds.DbSubnetGroupArgs.builder()
            .dbSubnetGroupDescription(dbSubnetGroupDescription?.applyValue({ args0 -> args0 }))
            .dbSubnetGroupName(dbSubnetGroupName?.applyValue({ args0 -> args0 }))
            .subnetIds(subnetIds?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [DbSubnetGroupArgs].
 */
@PulumiTagMarker
public class DbSubnetGroupArgsBuilder internal constructor() {
    private var dbSubnetGroupDescription: Output? = null

    private var dbSubnetGroupName: Output? = null

    private var subnetIds: Output>? = null

    private var tags: Output>? = null

    /**
     * @param value The description for the DB subnet group.
     */
    @JvmName("nykripbhguwdlpti")
    public suspend fun dbSubnetGroupDescription(`value`: Output) {
        this.dbSubnetGroupDescription = value
    }

    /**
     * @param value The name for the DB subnet group. This value is stored as a lowercase string.
     *  Constraints:
     *   +  Must contain no more than 255 letters, numbers, periods, underscores, spaces, or hyphens.
     *   +  Must not be default.
     *   +  First character must be a letter.
     *  Example: ``mydbsubnetgroup``
     */
    @JvmName("toxuscgmpdrtscki")
    public suspend fun dbSubnetGroupName(`value`: Output) {
        this.dbSubnetGroupName = value
    }

    /**
     * @param value The EC2 Subnet IDs for the DB subnet group.
     */
    @JvmName("ppvqkchewawhgmyd")
    public suspend fun subnetIds(`value`: Output>) {
        this.subnetIds = value
    }

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

    /**
     * @param values The EC2 Subnet IDs for the DB subnet group.
     */
    @JvmName("vytqylkuyofiygwd")
    public suspend fun subnetIds(values: List>) {
        this.subnetIds = Output.all(values)
    }

    /**
     * @param value Tags to assign to the DB subnet group.
     */
    @JvmName("eybohmdpripcxasr")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values Tags to assign to the DB subnet group.
     */
    @JvmName("nqptbpwokhnrelqj")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value The description for the DB subnet group.
     */
    @JvmName("npjfdpdotqrgtphm")
    public suspend fun dbSubnetGroupDescription(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dbSubnetGroupDescription = mapped
    }

    /**
     * @param value The name for the DB subnet group. This value is stored as a lowercase string.
     *  Constraints:
     *   +  Must contain no more than 255 letters, numbers, periods, underscores, spaces, or hyphens.
     *   +  Must not be default.
     *   +  First character must be a letter.
     *  Example: ``mydbsubnetgroup``
     */
    @JvmName("dedjvqnxqukftlwi")
    public suspend fun dbSubnetGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dbSubnetGroupName = mapped
    }

    /**
     * @param value The EC2 Subnet IDs for the DB subnet group.
     */
    @JvmName("tfiuggmbmdoteugh")
    public suspend fun subnetIds(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.subnetIds = mapped
    }

    /**
     * @param values The EC2 Subnet IDs for the DB subnet group.
     */
    @JvmName("klnygafiltyooayn")
    public suspend fun subnetIds(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.subnetIds = mapped
    }

    /**
     * @param value Tags to assign to the DB subnet group.
     */
    @JvmName("accpvattgvxsmjxi")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument Tags to assign to the DB subnet group.
     */
    @JvmName("vvubgldbpacffegd")
    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 Tags to assign to the DB subnet group.
     */
    @JvmName("wxdcwcjuuxxqlunu")
    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 Tags to assign to the DB subnet group.
     */
    @JvmName("rdrjwdaetyigrlbv")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values Tags to assign to the DB subnet group.
     */
    @JvmName("vibvnbfygcksrgph")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): DbSubnetGroupArgs = DbSubnetGroupArgs(
        dbSubnetGroupDescription = dbSubnetGroupDescription,
        dbSubnetGroupName = dbSubnetGroupName,
        subnetIds = subnetIds,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy