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

com.pulumi.awsnative.rds.kotlin.DbParameterGroup.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.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.Any
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List

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

    public var args: DbParameterGroupArgs = DbParameterGroupArgs()

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

/**
 * The ``AWS::RDS::DBParameterGroup`` resource creates a custom parameter group for an RDS database family.
 *  This type can be declared in a template and referenced in the ``DBParameterGroupName`` property of an ``AWS::RDS::DBInstance`` resource.
 *  For information about configuring parameters for Amazon RDS DB instances, see [Working with parameter groups](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithParamGroups.html) in the *Amazon RDS User Guide*.
 *  For information about configuring parameters for Amazon Aurora DB instances, see [Working with parameter groups](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_WorkingWithParamGroups.html) in the *Amazon Aurora User Guide*.
 *   Applying a parameter group to a DB instance may require the DB instance to reboot, resulting in a database outage for the duration of the reboot.
 */
public class DbParameterGroup internal constructor(
    override val javaResource: com.pulumi.awsnative.rds.DbParameterGroup,
) : KotlinCustomResource(javaResource, DbParameterGroupMapper) {
    /**
     * The name of the DB parameter group.
     *  Constraints:
     *   +  Must be 1 to 255 letters, numbers, or hyphens.
     *   +  First character must be a letter
     *   +  Can't end with a hyphen or contain two consecutive hyphens
     *  If you don't specify a value for ``DBParameterGroupName`` property, a name is automatically created for the DB parameter group.
     *   This value is stored as a lowercase string.
     */
    public val dbParameterGroupName: Output?
        get() = javaResource.dbParameterGroupName().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Provides the customer-specified description for this DB parameter group.
     */
    public val description: Output
        get() = javaResource.description().applyValue({ args0 -> args0 })

    /**
     * The DB parameter group family name. A DB parameter group can be associated with one and only one DB parameter group family, and can be applied only to a DB instance running a DB engine and engine version compatible with that DB parameter group family.
     *   The DB parameter group family can't be changed when updating a DB parameter group.
     *   To list all of the available parameter group families, use the following command:
     *   ``aws rds describe-db-engine-versions --query "DBEngineVersions[].DBParameterGroupFamily"``
     *  The output contains duplicates.
     *  For more information, see ``CreateDBParameterGroup``.
     */
    public val family: Output
        get() = javaResource.family().applyValue({ args0 -> args0 })

    /**
     * An array of parameter names and values for the parameter update. At least one parameter name and value must be supplied. Subsequent arguments are optional.
     *  RDS for Db2 requires you to bring your own Db2 license. You must enter your IBM customer ID (``rds.ibm_customer_id``) and site number (``rds.ibm_site_id``) before starting a Db2 instance.
     *  For more information about DB parameters and DB parameter groups for Amazon RDS DB engines, see [Working with DB Parameter Groups](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithParamGroups.html) in the *Amazon RDS User Guide*.
     *  For more information about DB cluster and DB instance parameters and parameter groups for Amazon Aurora DB engines, see [Working with DB Parameter Groups and DB Cluster Parameter Groups](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_WorkingWithParamGroups.html) in the *Amazon Aurora User Guide*.
     *    AWS CloudFormation doesn't support specifying an apply method for each individual parameter. The default apply method for each parameter is used.
     * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::RDS::DBParameterGroup` for more information about the expected schema for this property.
     */
    public val parameters: Output?
        get() = javaResource.parameters().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * An optional array of key-value pairs to apply to this DB parameter group.
     *    Currently, this is the only property that supports drift detection.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> toKotlin(args0) })
                })
            }).orElse(null)
        })
}

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy