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

com.pulumi.aws.redshift.kotlin.UsageLimitArgs.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: 6.66.3.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.redshift.kotlin

import com.pulumi.aws.redshift.UsageLimitArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Creates a new Amazon Redshift Usage Limit.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.redshift.UsageLimit("example", {
 *     clusterIdentifier: exampleAwsRedshiftCluster.id,
 *     featureType: "concurrency-scaling",
 *     limitType: "time",
 *     amount: 60,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.redshift.UsageLimit("example",
 *     cluster_identifier=example_aws_redshift_cluster["id"],
 *     feature_type="concurrency-scaling",
 *     limit_type="time",
 *     amount=60)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.RedShift.UsageLimit("example", new()
 *     {
 *         ClusterIdentifier = exampleAwsRedshiftCluster.Id,
 *         FeatureType = "concurrency-scaling",
 *         LimitType = "time",
 *         Amount = 60,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/redshift"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := redshift.NewUsageLimit(ctx, "example", &redshift.UsageLimitArgs{
 * 			ClusterIdentifier: pulumi.Any(exampleAwsRedshiftCluster.Id),
 * 			FeatureType:       pulumi.String("concurrency-scaling"),
 * 			LimitType:         pulumi.String("time"),
 * 			Amount:            pulumi.Int(60),
 * 		})
 * 		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.redshift.UsageLimit;
 * import com.pulumi.aws.redshift.UsageLimitArgs;
 * 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 UsageLimit("example", UsageLimitArgs.builder()
 *             .clusterIdentifier(exampleAwsRedshiftCluster.id())
 *             .featureType("concurrency-scaling")
 *             .limitType("time")
 *             .amount(60)
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:redshift:UsageLimit
 *     properties:
 *       clusterIdentifier: ${exampleAwsRedshiftCluster.id}
 *       featureType: concurrency-scaling
 *       limitType: time
 *       amount: 60
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import Redshift usage limits using the `id`. For example:
 * ```sh
 * $ pulumi import aws:redshift/usageLimit:UsageLimit example example-id
 * ```
 * @property amount The limit amount. If time-based, this amount is in minutes. If data-based, this amount is in terabytes (TB). The value must be a positive number.
 * @property breachAction The action that Amazon Redshift takes when the limit is reached. The default is `log`. Valid values are `log`, `emit-metric`, and `disable`.
 * @property clusterIdentifier The identifier of the cluster that you want to limit usage.
 * @property featureType The Amazon Redshift feature that you want to limit. Valid values are `spectrum`, `concurrency-scaling`, and `cross-region-datasharing`.
 * @property limitType The type of limit. Depending on the feature type, this can be based on a time duration or data size. If FeatureType is `spectrum`, then LimitType must be `data-scanned`. If FeatureType is `concurrency-scaling`, then LimitType must be `time`. If FeatureType is `cross-region-datasharing`, then LimitType must be `data-scanned`. Valid values are `data-scanned`, and `time`.
 * @property period The time period that the amount applies to. A weekly period begins on Sunday. The default is `monthly`. Valid values are `daily`, `weekly`, and `monthly`.
 * @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.
 */
public data class UsageLimitArgs(
    public val amount: Output? = null,
    public val breachAction: Output? = null,
    public val clusterIdentifier: Output? = null,
    public val featureType: Output? = null,
    public val limitType: Output? = null,
    public val period: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.redshift.UsageLimitArgs =
        com.pulumi.aws.redshift.UsageLimitArgs.builder()
            .amount(amount?.applyValue({ args0 -> args0 }))
            .breachAction(breachAction?.applyValue({ args0 -> args0 }))
            .clusterIdentifier(clusterIdentifier?.applyValue({ args0 -> args0 }))
            .featureType(featureType?.applyValue({ args0 -> args0 }))
            .limitType(limitType?.applyValue({ args0 -> args0 }))
            .period(period?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [UsageLimitArgs].
 */
@PulumiTagMarker
public class UsageLimitArgsBuilder internal constructor() {
    private var amount: Output? = null

    private var breachAction: Output? = null

    private var clusterIdentifier: Output? = null

    private var featureType: Output? = null

    private var limitType: Output? = null

    private var period: Output? = null

    private var tags: Output>? = null

    /**
     * @param value The limit amount. If time-based, this amount is in minutes. If data-based, this amount is in terabytes (TB). The value must be a positive number.
     */
    @JvmName("hcxwkabtnitfpumy")
    public suspend fun amount(`value`: Output) {
        this.amount = value
    }

    /**
     * @param value The action that Amazon Redshift takes when the limit is reached. The default is `log`. Valid values are `log`, `emit-metric`, and `disable`.
     */
    @JvmName("pmepjwjbflicsvnf")
    public suspend fun breachAction(`value`: Output) {
        this.breachAction = value
    }

    /**
     * @param value The identifier of the cluster that you want to limit usage.
     */
    @JvmName("taghqnfborniuavc")
    public suspend fun clusterIdentifier(`value`: Output) {
        this.clusterIdentifier = value
    }

    /**
     * @param value The Amazon Redshift feature that you want to limit. Valid values are `spectrum`, `concurrency-scaling`, and `cross-region-datasharing`.
     */
    @JvmName("djygtkdudurrsecw")
    public suspend fun featureType(`value`: Output) {
        this.featureType = value
    }

    /**
     * @param value The type of limit. Depending on the feature type, this can be based on a time duration or data size. If FeatureType is `spectrum`, then LimitType must be `data-scanned`. If FeatureType is `concurrency-scaling`, then LimitType must be `time`. If FeatureType is `cross-region-datasharing`, then LimitType must be `data-scanned`. Valid values are `data-scanned`, and `time`.
     */
    @JvmName("rwxdgwbifguvldrx")
    public suspend fun limitType(`value`: Output) {
        this.limitType = value
    }

    /**
     * @param value The time period that the amount applies to. A weekly period begins on Sunday. The default is `monthly`. Valid values are `daily`, `weekly`, and `monthly`.
     */
    @JvmName("ukpyynfignckiwxg")
    public suspend fun period(`value`: Output) {
        this.period = value
    }

    /**
     * @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("jeevtwwlswfmglhy")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The limit amount. If time-based, this amount is in minutes. If data-based, this amount is in terabytes (TB). The value must be a positive number.
     */
    @JvmName("bynbtfwxlieqtyga")
    public suspend fun amount(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.amount = mapped
    }

    /**
     * @param value The action that Amazon Redshift takes when the limit is reached. The default is `log`. Valid values are `log`, `emit-metric`, and `disable`.
     */
    @JvmName("msibdihiftbnjlqr")
    public suspend fun breachAction(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.breachAction = mapped
    }

    /**
     * @param value The identifier of the cluster that you want to limit usage.
     */
    @JvmName("cphdyxtirhaaxjhd")
    public suspend fun clusterIdentifier(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clusterIdentifier = mapped
    }

    /**
     * @param value The Amazon Redshift feature that you want to limit. Valid values are `spectrum`, `concurrency-scaling`, and `cross-region-datasharing`.
     */
    @JvmName("duoifyplbpixafpn")
    public suspend fun featureType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.featureType = mapped
    }

    /**
     * @param value The type of limit. Depending on the feature type, this can be based on a time duration or data size. If FeatureType is `spectrum`, then LimitType must be `data-scanned`. If FeatureType is `concurrency-scaling`, then LimitType must be `time`. If FeatureType is `cross-region-datasharing`, then LimitType must be `data-scanned`. Valid values are `data-scanned`, and `time`.
     */
    @JvmName("fudqmudcyegensbp")
    public suspend fun limitType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.limitType = mapped
    }

    /**
     * @param value The time period that the amount applies to. A weekly period begins on Sunday. The default is `monthly`. Valid values are `daily`, `weekly`, and `monthly`.
     */
    @JvmName("bilvqgqttifayimy")
    public suspend fun period(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.period = 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("fdoolaqlumsvmrvm")
    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("kkvbyewnvrjrgsbn")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): UsageLimitArgs = UsageLimitArgs(
        amount = amount,
        breachAction = breachAction,
        clusterIdentifier = clusterIdentifier,
        featureType = featureType,
        limitType = limitType,
        period = period,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy