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

com.pulumi.awsnative.batch.kotlin.inputs.SchedulingPolicyFairsharePolicyArgs.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: 1.24.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.batch.kotlin.inputs

import com.pulumi.awsnative.batch.inputs.SchedulingPolicyFairsharePolicyArgs.builder
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.Double
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Fair Share Policy for the Job Queue.
 * @property computeReservation A value used to reserve some of the available maximum vCPU for fair share identifiers that aren't already used.
 * The reserved ratio is `( *computeReservation* /100)^ *ActiveFairShares*` where `*ActiveFairShares*` is the number of active fair share identifiers.
 * For example, a `computeReservation` value of 50 indicates that AWS Batch reserves 50% of the maximum available vCPU if there's only one fair share identifier. It reserves 25% if there are two fair share identifiers. It reserves 12.5% if there are three fair share identifiers. A `computeReservation` value of 25 indicates that AWS Batch should reserve 25% of the maximum available vCPU if there's only one fair share identifier, 6.25% if there are two fair share identifiers, and 1.56% if there are three fair share identifiers.
 * The minimum value is 0 and the maximum value is 99.
 * @property shareDecaySeconds The amount of time (in seconds) to use to calculate a fair share percentage for each fair share identifier in use. A value of zero (0) indicates that only current usage is measured. The decay allows for more recently run jobs to have more weight than jobs that ran earlier. The maximum supported value is 604800 (1 week).
 * @property shareDistribution List of Share Attributes
 */
public data class SchedulingPolicyFairsharePolicyArgs(
    public val computeReservation: Output? = null,
    public val shareDecaySeconds: Output? = null,
    public val shareDistribution: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.batch.inputs.SchedulingPolicyFairsharePolicyArgs =
        com.pulumi.awsnative.batch.inputs.SchedulingPolicyFairsharePolicyArgs.builder()
            .computeReservation(computeReservation?.applyValue({ args0 -> args0 }))
            .shareDecaySeconds(shareDecaySeconds?.applyValue({ args0 -> args0 }))
            .shareDistribution(
                shareDistribution?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [SchedulingPolicyFairsharePolicyArgs].
 */
@PulumiTagMarker
public class SchedulingPolicyFairsharePolicyArgsBuilder internal constructor() {
    private var computeReservation: Output? = null

    private var shareDecaySeconds: Output? = null

    private var shareDistribution: Output>? = null

    /**
     * @param value A value used to reserve some of the available maximum vCPU for fair share identifiers that aren't already used.
     * The reserved ratio is `( *computeReservation* /100)^ *ActiveFairShares*` where `*ActiveFairShares*` is the number of active fair share identifiers.
     * For example, a `computeReservation` value of 50 indicates that AWS Batch reserves 50% of the maximum available vCPU if there's only one fair share identifier. It reserves 25% if there are two fair share identifiers. It reserves 12.5% if there are three fair share identifiers. A `computeReservation` value of 25 indicates that AWS Batch should reserve 25% of the maximum available vCPU if there's only one fair share identifier, 6.25% if there are two fair share identifiers, and 1.56% if there are three fair share identifiers.
     * The minimum value is 0 and the maximum value is 99.
     */
    @JvmName("woplpphopeawxukp")
    public suspend fun computeReservation(`value`: Output) {
        this.computeReservation = value
    }

    /**
     * @param value The amount of time (in seconds) to use to calculate a fair share percentage for each fair share identifier in use. A value of zero (0) indicates that only current usage is measured. The decay allows for more recently run jobs to have more weight than jobs that ran earlier. The maximum supported value is 604800 (1 week).
     */
    @JvmName("idjaecvnuggrjwld")
    public suspend fun shareDecaySeconds(`value`: Output) {
        this.shareDecaySeconds = value
    }

    /**
     * @param value List of Share Attributes
     */
    @JvmName("tuswtjqhjvwmvvhf")
    public suspend fun shareDistribution(`value`: Output>) {
        this.shareDistribution = value
    }

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

    /**
     * @param values List of Share Attributes
     */
    @JvmName("ymwbcyivbkfcukio")
    public suspend fun shareDistribution(values: List>) {
        this.shareDistribution = Output.all(values)
    }

    /**
     * @param value A value used to reserve some of the available maximum vCPU for fair share identifiers that aren't already used.
     * The reserved ratio is `( *computeReservation* /100)^ *ActiveFairShares*` where `*ActiveFairShares*` is the number of active fair share identifiers.
     * For example, a `computeReservation` value of 50 indicates that AWS Batch reserves 50% of the maximum available vCPU if there's only one fair share identifier. It reserves 25% if there are two fair share identifiers. It reserves 12.5% if there are three fair share identifiers. A `computeReservation` value of 25 indicates that AWS Batch should reserve 25% of the maximum available vCPU if there's only one fair share identifier, 6.25% if there are two fair share identifiers, and 1.56% if there are three fair share identifiers.
     * The minimum value is 0 and the maximum value is 99.
     */
    @JvmName("ewdwhstgascpjqyv")
    public suspend fun computeReservation(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.computeReservation = mapped
    }

    /**
     * @param value The amount of time (in seconds) to use to calculate a fair share percentage for each fair share identifier in use. A value of zero (0) indicates that only current usage is measured. The decay allows for more recently run jobs to have more weight than jobs that ran earlier. The maximum supported value is 604800 (1 week).
     */
    @JvmName("mxbrhlgvytmiaare")
    public suspend fun shareDecaySeconds(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.shareDecaySeconds = mapped
    }

    /**
     * @param value List of Share Attributes
     */
    @JvmName("mbhogwydluehvewn")
    public suspend fun shareDistribution(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.shareDistribution = mapped
    }

    /**
     * @param argument List of Share Attributes
     */
    @JvmName("vgbbicchdgakqfio")
    public suspend fun shareDistribution(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            SchedulingPolicyShareAttributesArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.shareDistribution = mapped
    }

    /**
     * @param argument List of Share Attributes
     */
    @JvmName("ymvjcqyiimtxbvcy")
    public suspend fun shareDistribution(vararg argument: suspend SchedulingPolicyShareAttributesArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            SchedulingPolicyShareAttributesArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.shareDistribution = mapped
    }

    /**
     * @param argument List of Share Attributes
     */
    @JvmName("jbhvdpgegxnvnwyy")
    public suspend fun shareDistribution(argument: suspend SchedulingPolicyShareAttributesArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            SchedulingPolicyShareAttributesArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.shareDistribution = mapped
    }

    /**
     * @param values List of Share Attributes
     */
    @JvmName("gciwdvpdmwvooxbf")
    public suspend fun shareDistribution(vararg values: SchedulingPolicyShareAttributesArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.shareDistribution = mapped
    }

    internal fun build(): SchedulingPolicyFairsharePolicyArgs = SchedulingPolicyFairsharePolicyArgs(
        computeReservation = computeReservation,
        shareDecaySeconds = shareDecaySeconds,
        shareDistribution = shareDistribution,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy