![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.rds.kotlin.DbParameterGroup.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.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 database engine and engine version compatible with that DB parameter group family.
* To list all of the available parameter group families for a DB engine, use the following command:
* ``aws rds describe-db-engine-versions --query "DBEngineVersions[].DBParameterGroupFamily" --engine ``
* For example, to list all of the available parameter group families for the MySQL DB engine, use the following command:
* ``aws rds describe-db-engine-versions --query "DBEngineVersions[].DBParameterGroupFamily" --engine mysql``
* The output contains duplicates.
* The following are the valid DB engine values:
* + ``aurora-mysql``
* + ``aurora-postgresql``
* + ``db2-ae``
* + ``db2-se``
* + ``mysql``
* + ``oracle-ee``
* + ``oracle-ee-cdb``
* + ``oracle-se2``
* + ``oracle-se2-cdb``
* + ``postgres``
* + ``sqlserver-ee``
* + ``sqlserver-se``
* + ``sqlserver-ex``
* + ``sqlserver-web``
*/
public val family: Output
get() = javaResource.family().applyValue({ args0 -> args0 })
/**
* An array of parameter names and values for the parameter update. You must specify at least one parameter name and value.
* For more information about parameter groups, see [Working with parameter groups](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithParamGroups.html) in the *Amazon RDS User Guide*, or [Working with 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)
})
/**
* Tags to assign to the DB parameter group.
*/
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 - 2025 Weber Informatics LLC | Privacy Policy