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

com.pulumi.aws.redshiftserverless.kotlin.WorkgroupArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.aws.redshiftserverless.kotlin

import com.pulumi.aws.redshiftserverless.WorkgroupArgs.builder
import com.pulumi.aws.redshiftserverless.kotlin.inputs.WorkgroupConfigParameterArgs
import com.pulumi.aws.redshiftserverless.kotlin.inputs.WorkgroupConfigParameterArgsBuilder
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.Boolean
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Creates a new Amazon Redshift Serverless Workgroup.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.redshiftserverless.Workgroup("example", {
 *     namespaceName: "concurrency-scaling",
 *     workgroupName: "concurrency-scaling",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.redshiftserverless.Workgroup("example",
 *     namespace_name="concurrency-scaling",
 *     workgroup_name="concurrency-scaling")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.RedshiftServerless.Workgroup("example", new()
 *     {
 *         NamespaceName = "concurrency-scaling",
 *         WorkgroupName = "concurrency-scaling",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/redshiftserverless"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := redshiftserverless.NewWorkgroup(ctx, "example", &redshiftserverless.WorkgroupArgs{
 * 			NamespaceName: pulumi.String("concurrency-scaling"),
 * 			WorkgroupName: pulumi.String("concurrency-scaling"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.redshiftserverless.Workgroup;
 * import com.pulumi.aws.redshiftserverless.WorkgroupArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var example = new Workgroup("example", WorkgroupArgs.builder()
 *             .namespaceName("concurrency-scaling")
 *             .workgroupName("concurrency-scaling")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:redshiftserverless:Workgroup
 *     properties:
 *       namespaceName: concurrency-scaling
 *       workgroupName: concurrency-scaling
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import Redshift Serverless Workgroups using the `workgroup_name`. For example:
 * ```sh
 * $ pulumi import aws:redshiftserverless/workgroup:Workgroup example example
 * ```
 * @property baseCapacity The base data warehouse capacity of the workgroup in Redshift Processing Units (RPUs).
 * @property configParameters An array of parameters to set for more control over a serverless database. See `Config Parameter` below.
 * @property enhancedVpcRouting The value that specifies whether to turn on enhanced virtual private cloud (VPC) routing, which forces Amazon Redshift Serverless to route traffic through your VPC instead of over the internet.
 * @property maxCapacity The maximum data-warehouse capacity Amazon Redshift Serverless uses to serve queries, specified in Redshift Processing Units (RPUs).
 * @property namespaceName The name of the namespace.
 * @property port The port number on which the cluster accepts incoming connections.
 * @property publiclyAccessible A value that specifies whether the workgroup can be accessed from a public network.
 * @property securityGroupIds An array of security group IDs to associate with the workgroup.
 * @property subnetIds An array of VPC subnet IDs to associate with the workgroup. When set, must contain at least three subnets spanning three Availability Zones. A minimum number of IP addresses is required and scales with the Base Capacity. For more information, see the following [AWS document](https://docs.aws.amazon.com/redshift/latest/mgmt/serverless-known-issues.html).
 * @property tags A map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
 * @property workgroupName The name of the workgroup.
 * The following arguments are optional:
 */
public data class WorkgroupArgs(
    public val baseCapacity: Output? = null,
    public val configParameters: Output>? = null,
    public val enhancedVpcRouting: Output? = null,
    public val maxCapacity: Output? = null,
    public val namespaceName: Output? = null,
    public val port: Output? = null,
    public val publiclyAccessible: Output? = null,
    public val securityGroupIds: Output>? = null,
    public val subnetIds: Output>? = null,
    public val tags: Output>? = null,
    public val workgroupName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.redshiftserverless.WorkgroupArgs =
        com.pulumi.aws.redshiftserverless.WorkgroupArgs.builder()
            .baseCapacity(baseCapacity?.applyValue({ args0 -> args0 }))
            .configParameters(
                configParameters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .enhancedVpcRouting(enhancedVpcRouting?.applyValue({ args0 -> args0 }))
            .maxCapacity(maxCapacity?.applyValue({ args0 -> args0 }))
            .namespaceName(namespaceName?.applyValue({ args0 -> args0 }))
            .port(port?.applyValue({ args0 -> args0 }))
            .publiclyAccessible(publiclyAccessible?.applyValue({ args0 -> args0 }))
            .securityGroupIds(securityGroupIds?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .subnetIds(subnetIds?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .workgroupName(workgroupName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [WorkgroupArgs].
 */
@PulumiTagMarker
public class WorkgroupArgsBuilder internal constructor() {
    private var baseCapacity: Output? = null

    private var configParameters: Output>? = null

    private var enhancedVpcRouting: Output? = null

    private var maxCapacity: Output? = null

    private var namespaceName: Output? = null

    private var port: Output? = null

    private var publiclyAccessible: Output? = null

    private var securityGroupIds: Output>? = null

    private var subnetIds: Output>? = null

    private var tags: Output>? = null

    private var workgroupName: Output? = null

    /**
     * @param value The base data warehouse capacity of the workgroup in Redshift Processing Units (RPUs).
     */
    @JvmName("povkdgekuauoitcf")
    public suspend fun baseCapacity(`value`: Output) {
        this.baseCapacity = value
    }

    /**
     * @param value An array of parameters to set for more control over a serverless database. See `Config Parameter` below.
     */
    @JvmName("euacegmvhewcwcfu")
    public suspend fun configParameters(`value`: Output>) {
        this.configParameters = value
    }

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

    /**
     * @param values An array of parameters to set for more control over a serverless database. See `Config Parameter` below.
     */
    @JvmName("irhdqodjtvivifpe")
    public suspend fun configParameters(values: List>) {
        this.configParameters = Output.all(values)
    }

    /**
     * @param value The value that specifies whether to turn on enhanced virtual private cloud (VPC) routing, which forces Amazon Redshift Serverless to route traffic through your VPC instead of over the internet.
     */
    @JvmName("eujxeslfbvsxhbtg")
    public suspend fun enhancedVpcRouting(`value`: Output) {
        this.enhancedVpcRouting = value
    }

    /**
     * @param value The maximum data-warehouse capacity Amazon Redshift Serverless uses to serve queries, specified in Redshift Processing Units (RPUs).
     */
    @JvmName("hojkgeunygsvtkal")
    public suspend fun maxCapacity(`value`: Output) {
        this.maxCapacity = value
    }

    /**
     * @param value The name of the namespace.
     */
    @JvmName("leyvurrxdtetykia")
    public suspend fun namespaceName(`value`: Output) {
        this.namespaceName = value
    }

    /**
     * @param value The port number on which the cluster accepts incoming connections.
     */
    @JvmName("ugcirsymfcwknbvx")
    public suspend fun port(`value`: Output) {
        this.port = value
    }

    /**
     * @param value A value that specifies whether the workgroup can be accessed from a public network.
     */
    @JvmName("oaguqxrgytcvqfqx")
    public suspend fun publiclyAccessible(`value`: Output) {
        this.publiclyAccessible = value
    }

    /**
     * @param value An array of security group IDs to associate with the workgroup.
     */
    @JvmName("gbmqtpkccuybissb")
    public suspend fun securityGroupIds(`value`: Output>) {
        this.securityGroupIds = value
    }

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

    /**
     * @param values An array of security group IDs to associate with the workgroup.
     */
    @JvmName("wgcviqssoxpqwcdq")
    public suspend fun securityGroupIds(values: List>) {
        this.securityGroupIds = Output.all(values)
    }

    /**
     * @param value An array of VPC subnet IDs to associate with the workgroup. When set, must contain at least three subnets spanning three Availability Zones. A minimum number of IP addresses is required and scales with the Base Capacity. For more information, see the following [AWS document](https://docs.aws.amazon.com/redshift/latest/mgmt/serverless-known-issues.html).
     */
    @JvmName("gxiughkuhpchejof")
    public suspend fun subnetIds(`value`: Output>) {
        this.subnetIds = value
    }

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

    /**
     * @param values An array of VPC subnet IDs to associate with the workgroup. When set, must contain at least three subnets spanning three Availability Zones. A minimum number of IP addresses is required and scales with the Base Capacity. For more information, see the following [AWS document](https://docs.aws.amazon.com/redshift/latest/mgmt/serverless-known-issues.html).
     */
    @JvmName("vjcduhedskoggnfu")
    public suspend fun subnetIds(values: List>) {
        this.subnetIds = Output.all(values)
    }

    /**
     * @param value A map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("kveokfcyoonhggat")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The name of the workgroup.
     * The following arguments are optional:
     */
    @JvmName("uabvewoeplrhsaoi")
    public suspend fun workgroupName(`value`: Output) {
        this.workgroupName = value
    }

    /**
     * @param value The base data warehouse capacity of the workgroup in Redshift Processing Units (RPUs).
     */
    @JvmName("brvcrhpruvoaanac")
    public suspend fun baseCapacity(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.baseCapacity = mapped
    }

    /**
     * @param value An array of parameters to set for more control over a serverless database. See `Config Parameter` below.
     */
    @JvmName("qaoiuqicgtqnscvg")
    public suspend fun configParameters(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.configParameters = mapped
    }

    /**
     * @param argument An array of parameters to set for more control over a serverless database. See `Config Parameter` below.
     */
    @JvmName("ormeuvknlgxmsded")
    public suspend fun configParameters(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            WorkgroupConfigParameterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.configParameters = mapped
    }

    /**
     * @param argument An array of parameters to set for more control over a serverless database. See `Config Parameter` below.
     */
    @JvmName("klgdfdpirnhpsmkx")
    public suspend fun configParameters(vararg argument: suspend WorkgroupConfigParameterArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            WorkgroupConfigParameterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.configParameters = mapped
    }

    /**
     * @param argument An array of parameters to set for more control over a serverless database. See `Config Parameter` below.
     */
    @JvmName("rsucuvddersgdsvp")
    public suspend fun configParameters(argument: suspend WorkgroupConfigParameterArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            WorkgroupConfigParameterArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.configParameters = mapped
    }

    /**
     * @param values An array of parameters to set for more control over a serverless database. See `Config Parameter` below.
     */
    @JvmName("ctugikgxochrvqjm")
    public suspend fun configParameters(vararg values: WorkgroupConfigParameterArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.configParameters = mapped
    }

    /**
     * @param value The value that specifies whether to turn on enhanced virtual private cloud (VPC) routing, which forces Amazon Redshift Serverless to route traffic through your VPC instead of over the internet.
     */
    @JvmName("eiafkercmosmtbix")
    public suspend fun enhancedVpcRouting(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enhancedVpcRouting = mapped
    }

    /**
     * @param value The maximum data-warehouse capacity Amazon Redshift Serverless uses to serve queries, specified in Redshift Processing Units (RPUs).
     */
    @JvmName("wbhqyabytnijgedc")
    public suspend fun maxCapacity(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxCapacity = mapped
    }

    /**
     * @param value The name of the namespace.
     */
    @JvmName("uglswafonoccvlsr")
    public suspend fun namespaceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.namespaceName = mapped
    }

    /**
     * @param value The port number on which the cluster accepts incoming connections.
     */
    @JvmName("cmrqmgjxqfjkojky")
    public suspend fun port(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.port = mapped
    }

    /**
     * @param value A value that specifies whether the workgroup can be accessed from a public network.
     */
    @JvmName("yljjgggythciiftw")
    public suspend fun publiclyAccessible(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.publiclyAccessible = mapped
    }

    /**
     * @param value An array of security group IDs to associate with the workgroup.
     */
    @JvmName("nmnhixxcekvpetpq")
    public suspend fun securityGroupIds(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.securityGroupIds = mapped
    }

    /**
     * @param values An array of security group IDs to associate with the workgroup.
     */
    @JvmName("fixrtvirpidopesi")
    public suspend fun securityGroupIds(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.securityGroupIds = mapped
    }

    /**
     * @param value An array of VPC subnet IDs to associate with the workgroup. When set, must contain at least three subnets spanning three Availability Zones. A minimum number of IP addresses is required and scales with the Base Capacity. For more information, see the following [AWS document](https://docs.aws.amazon.com/redshift/latest/mgmt/serverless-known-issues.html).
     */
    @JvmName("ffhmqdxaggskpijj")
    public suspend fun subnetIds(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.subnetIds = mapped
    }

    /**
     * @param values An array of VPC subnet IDs to associate with the workgroup. When set, must contain at least three subnets spanning three Availability Zones. A minimum number of IP addresses is required and scales with the Base Capacity. For more information, see the following [AWS document](https://docs.aws.amazon.com/redshift/latest/mgmt/serverless-known-issues.html).
     */
    @JvmName("ctcumbxmauycahcf")
    public suspend fun subnetIds(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.subnetIds = mapped
    }

    /**
     * @param value A map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("buetloynrbbpkijk")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("gjmlbbokqlqkwvlh")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value The name of the workgroup.
     * The following arguments are optional:
     */
    @JvmName("lmrpiheklccdaljm")
    public suspend fun workgroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.workgroupName = mapped
    }

    internal fun build(): WorkgroupArgs = WorkgroupArgs(
        baseCapacity = baseCapacity,
        configParameters = configParameters,
        enhancedVpcRouting = enhancedVpcRouting,
        maxCapacity = maxCapacity,
        namespaceName = namespaceName,
        port = port,
        publiclyAccessible = publiclyAccessible,
        securityGroupIds = securityGroupIds,
        subnetIds = subnetIds,
        tags = tags,
        workgroupName = workgroupName,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy