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

com.pulumi.awsnative.redshift.kotlin.ClusterParameterGroup.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.redshift.kotlin

import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.redshift.kotlin.outputs.ClusterParameterGroupParameter
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.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
import com.pulumi.awsnative.redshift.kotlin.outputs.ClusterParameterGroupParameter.Companion.toKotlin as clusterParameterGroupParameterToKotlin

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

    public var args: ClusterParameterGroupArgs = ClusterParameterGroupArgs()

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

/**
 * Resource Type definition for AWS::Redshift::ClusterParameterGroup
 */
public class ClusterParameterGroup internal constructor(
    override val javaResource: com.pulumi.awsnative.redshift.ClusterParameterGroup,
) : KotlinCustomResource(javaResource, ClusterParameterGroupMapper) {
    /**
     * A description of the parameter group.
     */
    public val description: Output
        get() = javaResource.description().applyValue({ args0 -> args0 })

    /**
     * The Amazon Redshift engine version to which the cluster parameter group applies. The cluster engine version determines the set of parameters.
     */
    public val parameterGroupFamily: Output
        get() = javaResource.parameterGroupFamily().applyValue({ args0 -> args0 })

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

    /**
     * An array of parameters to be modified. A maximum of 20 parameters can be modified in a single request.
     */
    public val parameters: Output>?
        get() = javaResource.parameters().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> clusterParameterGroupParameterToKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * An array of key-value pairs to apply to this resource.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> tagToKotlin(args0) })
                })
            }).orElse(null)
        })
}

public object ClusterParameterGroupMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.redshift.ClusterParameterGroup::class == javaResource::class

    override fun map(javaResource: Resource): ClusterParameterGroup =
        ClusterParameterGroup(javaResource as com.pulumi.awsnative.redshift.ClusterParameterGroup)
}

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy