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

com.pulumi.awsnative.dynamodb.kotlin.inputs.GlobalTableCapacityAutoScalingSettingsArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.dynamodb.kotlin.inputs

import com.pulumi.awsnative.dynamodb.inputs.GlobalTableCapacityAutoScalingSettingsArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 *
 * @property maxCapacity The maximum provisioned capacity units for the global table.
 * @property minCapacity The minimum provisioned capacity units for the global table.
 * @property seedCapacity When switching billing mode from `PAY_PER_REQUEST` to `PROVISIONED` , DynamoDB requires you to specify read and write capacity unit values for the table and for each global secondary index. These values will be applied to all replicas. The table will use these provisioned values until CloudFormation creates the autoscaling policies you configured in your template. CloudFormation cannot determine what capacity the table and its global secondary indexes will require in this time period, since they are application-dependent.
 * If you want to switch a table's billing mode from `PAY_PER_REQUEST` to `PROVISIONED` , you must specify a value for this property for each autoscaled resource. If you specify different values for the same resource in different regions, CloudFormation will use the highest value found in either the `SeedCapacity` or `ReadCapacityUnits` properties. For example, if your global secondary index `myGSI` has a `SeedCapacity` of 10 in us-east-1 and a fixed `ReadCapacityUnits` of 20 in eu-west-1, CloudFormation will initially set the read capacity for `myGSI` to 20. Note that if you disable `ScaleIn` for `myGSI` in us-east-1, its read capacity units might not be set back to 10.
 * You must also specify a value for `SeedCapacity` when you plan to switch a table's billing mode from `PROVISIONED` to `PAY_PER_REQUEST` , because CloudFormation might need to roll back the operation (reverting the billing mode to `PROVISIONED` ) and this cannot succeed without specifying a value for `SeedCapacity` .
 * @property targetTrackingScalingPolicyConfiguration Defines a target tracking scaling policy.
 */
public data class GlobalTableCapacityAutoScalingSettingsArgs(
    public val maxCapacity: Output,
    public val minCapacity: Output,
    public val seedCapacity: Output? = null,
    public val targetTrackingScalingPolicyConfiguration: Output,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.dynamodb.inputs.GlobalTableCapacityAutoScalingSettingsArgs =
        com.pulumi.awsnative.dynamodb.inputs.GlobalTableCapacityAutoScalingSettingsArgs.builder()
            .maxCapacity(maxCapacity.applyValue({ args0 -> args0 }))
            .minCapacity(minCapacity.applyValue({ args0 -> args0 }))
            .seedCapacity(seedCapacity?.applyValue({ args0 -> args0 }))
            .targetTrackingScalingPolicyConfiguration(
                targetTrackingScalingPolicyConfiguration.applyValue({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                }),
            ).build()
}

/**
 * Builder for [GlobalTableCapacityAutoScalingSettingsArgs].
 */
@PulumiTagMarker
public class GlobalTableCapacityAutoScalingSettingsArgsBuilder internal constructor() {
    private var maxCapacity: Output? = null

    private var minCapacity: Output? = null

    private var seedCapacity: Output? = null

    private var targetTrackingScalingPolicyConfiguration:
        Output? = null

    /**
     * @param value The maximum provisioned capacity units for the global table.
     */
    @JvmName("ftsyrpvhttsokmbn")
    public suspend fun maxCapacity(`value`: Output) {
        this.maxCapacity = value
    }

    /**
     * @param value The minimum provisioned capacity units for the global table.
     */
    @JvmName("xejlhcjmpgwwxbnb")
    public suspend fun minCapacity(`value`: Output) {
        this.minCapacity = value
    }

    /**
     * @param value When switching billing mode from `PAY_PER_REQUEST` to `PROVISIONED` , DynamoDB requires you to specify read and write capacity unit values for the table and for each global secondary index. These values will be applied to all replicas. The table will use these provisioned values until CloudFormation creates the autoscaling policies you configured in your template. CloudFormation cannot determine what capacity the table and its global secondary indexes will require in this time period, since they are application-dependent.
     * If you want to switch a table's billing mode from `PAY_PER_REQUEST` to `PROVISIONED` , you must specify a value for this property for each autoscaled resource. If you specify different values for the same resource in different regions, CloudFormation will use the highest value found in either the `SeedCapacity` or `ReadCapacityUnits` properties. For example, if your global secondary index `myGSI` has a `SeedCapacity` of 10 in us-east-1 and a fixed `ReadCapacityUnits` of 20 in eu-west-1, CloudFormation will initially set the read capacity for `myGSI` to 20. Note that if you disable `ScaleIn` for `myGSI` in us-east-1, its read capacity units might not be set back to 10.
     * You must also specify a value for `SeedCapacity` when you plan to switch a table's billing mode from `PROVISIONED` to `PAY_PER_REQUEST` , because CloudFormation might need to roll back the operation (reverting the billing mode to `PROVISIONED` ) and this cannot succeed without specifying a value for `SeedCapacity` .
     */
    @JvmName("udublrguliqqayin")
    public suspend fun seedCapacity(`value`: Output) {
        this.seedCapacity = value
    }

    /**
     * @param value Defines a target tracking scaling policy.
     */
    @JvmName("mfwljaiaqwlagmqr")
    public suspend fun targetTrackingScalingPolicyConfiguration(`value`: Output) {
        this.targetTrackingScalingPolicyConfiguration = value
    }

    /**
     * @param value The maximum provisioned capacity units for the global table.
     */
    @JvmName("jkwbyywnqwwfjuau")
    public suspend fun maxCapacity(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.maxCapacity = mapped
    }

    /**
     * @param value The minimum provisioned capacity units for the global table.
     */
    @JvmName("sdfictiervyvoulo")
    public suspend fun minCapacity(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.minCapacity = mapped
    }

    /**
     * @param value When switching billing mode from `PAY_PER_REQUEST` to `PROVISIONED` , DynamoDB requires you to specify read and write capacity unit values for the table and for each global secondary index. These values will be applied to all replicas. The table will use these provisioned values until CloudFormation creates the autoscaling policies you configured in your template. CloudFormation cannot determine what capacity the table and its global secondary indexes will require in this time period, since they are application-dependent.
     * If you want to switch a table's billing mode from `PAY_PER_REQUEST` to `PROVISIONED` , you must specify a value for this property for each autoscaled resource. If you specify different values for the same resource in different regions, CloudFormation will use the highest value found in either the `SeedCapacity` or `ReadCapacityUnits` properties. For example, if your global secondary index `myGSI` has a `SeedCapacity` of 10 in us-east-1 and a fixed `ReadCapacityUnits` of 20 in eu-west-1, CloudFormation will initially set the read capacity for `myGSI` to 20. Note that if you disable `ScaleIn` for `myGSI` in us-east-1, its read capacity units might not be set back to 10.
     * You must also specify a value for `SeedCapacity` when you plan to switch a table's billing mode from `PROVISIONED` to `PAY_PER_REQUEST` , because CloudFormation might need to roll back the operation (reverting the billing mode to `PROVISIONED` ) and this cannot succeed without specifying a value for `SeedCapacity` .
     */
    @JvmName("bjwmqsgjnvtpvblk")
    public suspend fun seedCapacity(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.seedCapacity = mapped
    }

    /**
     * @param value Defines a target tracking scaling policy.
     */
    @JvmName("mulegpjkfkwyhdie")
    public suspend fun targetTrackingScalingPolicyConfiguration(`value`: GlobalTableTargetTrackingScalingPolicyConfigurationArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.targetTrackingScalingPolicyConfiguration = mapped
    }

    /**
     * @param argument Defines a target tracking scaling policy.
     */
    @JvmName("viyprxwuribuspls")
    public suspend fun targetTrackingScalingPolicyConfiguration(argument: suspend GlobalTableTargetTrackingScalingPolicyConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = GlobalTableTargetTrackingScalingPolicyConfigurationArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.targetTrackingScalingPolicyConfiguration = mapped
    }

    internal fun build(): GlobalTableCapacityAutoScalingSettingsArgs =
        GlobalTableCapacityAutoScalingSettingsArgs(
            maxCapacity = maxCapacity ?: throw PulumiNullFieldException("maxCapacity"),
            minCapacity = minCapacity ?: throw PulumiNullFieldException("minCapacity"),
            seedCapacity = seedCapacity,
            targetTrackingScalingPolicyConfiguration = targetTrackingScalingPolicyConfiguration ?: throw
                PulumiNullFieldException("targetTrackingScalingPolicyConfiguration"),
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy