com.pulumi.awsnative.rds.kotlin.DbProxyTargetGroup.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.rds.kotlin
import com.pulumi.awsnative.rds.kotlin.enums.DbProxyTargetGroupTargetGroupName
import com.pulumi.awsnative.rds.kotlin.outputs.DbProxyTargetGroupConnectionPoolConfigurationInfoFormat
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.rds.kotlin.enums.DbProxyTargetGroupTargetGroupName.Companion.toKotlin as dbProxyTargetGroupTargetGroupNameToKotlin
import com.pulumi.awsnative.rds.kotlin.outputs.DbProxyTargetGroupConnectionPoolConfigurationInfoFormat.Companion.toKotlin as dbProxyTargetGroupConnectionPoolConfigurationInfoFormatToKotlin
/**
* Builder for [DbProxyTargetGroup].
*/
@PulumiTagMarker
public class DbProxyTargetGroupResourceBuilder internal constructor() {
public var name: String? = null
public var args: DbProxyTargetGroupArgs = DbProxyTargetGroupArgs()
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 DbProxyTargetGroupArgsBuilder.() -> Unit) {
val builder = DbProxyTargetGroupArgsBuilder()
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(): DbProxyTargetGroup {
val builtJavaResource = com.pulumi.awsnative.rds.DbProxyTargetGroup(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return DbProxyTargetGroup(builtJavaResource)
}
}
/**
* Resource schema for AWS::RDS::DBProxyTargetGroup
*/
public class DbProxyTargetGroup internal constructor(
override val javaResource: com.pulumi.awsnative.rds.DbProxyTargetGroup,
) : KotlinCustomResource(javaResource, DbProxyTargetGroupMapper) {
/**
* Settings that control the size and behavior of the connection pool associated with a `DBProxyTargetGroup` .
*/
public val connectionPoolConfigurationInfo:
Output?
get() = javaResource.connectionPoolConfigurationInfo().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
dbProxyTargetGroupConnectionPoolConfigurationInfoFormatToKotlin(args0)
})
}).orElse(null)
})
/**
* One or more DB cluster identifiers.
*/
public val dbClusterIdentifiers: Output>?
get() = javaResource.dbClusterIdentifiers().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 -> args0 })
}).orElse(null)
})
/**
* One or more DB instance identifiers.
*/
public val dbInstanceIdentifiers: Output>?
get() = javaResource.dbInstanceIdentifiers().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 -> args0 })
}).orElse(null)
})
/**
* The identifier for the proxy.
*/
public val dbProxyName: Output
get() = javaResource.dbProxyName().applyValue({ args0 -> args0 })
/**
* The Amazon Resource Name (ARN) representing the target group.
*/
public val targetGroupArn: Output
get() = javaResource.targetGroupArn().applyValue({ args0 -> args0 })
/**
* The identifier for the DBProxyTargetGroup
*/
public val targetGroupName: Output
get() = javaResource.targetGroupName().applyValue({ args0 ->
args0.let({ args0 ->
dbProxyTargetGroupTargetGroupNameToKotlin(args0)
})
})
}
public object DbProxyTargetGroupMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.rds.DbProxyTargetGroup::class == javaResource::class
override fun map(javaResource: Resource): DbProxyTargetGroup = DbProxyTargetGroup(
javaResource as
com.pulumi.awsnative.rds.DbProxyTargetGroup,
)
}
/**
* @see [DbProxyTargetGroup].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [DbProxyTargetGroup].
*/
public suspend fun dbProxyTargetGroup(
name: String,
block: suspend DbProxyTargetGroupResourceBuilder.() -> Unit,
): DbProxyTargetGroup {
val builder = DbProxyTargetGroupResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [DbProxyTargetGroup].
* @param name The _unique_ name of the resulting resource.
*/
public fun dbProxyTargetGroup(name: String): DbProxyTargetGroup {
val builder = DbProxyTargetGroupResourceBuilder()
builder.name(name)
return builder.build()
}