
com.pulumi.awsnative.gamelift.kotlin.outputs.FleetScalingPolicy.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.gamelift.kotlin.outputs
import com.pulumi.awsnative.gamelift.kotlin.enums.FleetScalingPolicyComparisonOperator
import com.pulumi.awsnative.gamelift.kotlin.enums.FleetScalingPolicyMetricName
import com.pulumi.awsnative.gamelift.kotlin.enums.FleetScalingPolicyPolicyType
import com.pulumi.awsnative.gamelift.kotlin.enums.FleetScalingPolicyScalingAdjustmentType
import com.pulumi.awsnative.gamelift.kotlin.enums.FleetScalingPolicyStatus
import com.pulumi.awsnative.gamelift.kotlin.enums.FleetScalingPolicyUpdateStatus
import kotlin.Double
import kotlin.Int
import kotlin.String
import kotlin.Suppress
/**
* Rule that controls how a fleet is scaled. Scaling policies are uniquely identified by the combination of name and fleet ID.
* @property comparisonOperator Comparison operator to use when measuring a metric against the threshold value.
* @property evaluationPeriods Length of time (in minutes) the metric must be at or beyond the threshold before a scaling event is triggered.
* @property location The fleet location.
* @property metricName Name of the Amazon GameLift-defined metric that is used to trigger a scaling adjustment.
* @property name A descriptive label that is associated with a fleet's scaling policy. Policy names do not need to be unique.
* @property policyType The type of scaling policy to create. For a target-based policy, set the parameter MetricName to 'PercentAvailableGameSessions' and specify a TargetConfiguration. For a rule-based policy set the following parameters: MetricName, ComparisonOperator, Threshold, EvaluationPeriods, ScalingAdjustmentType, and ScalingAdjustment.
* @property scalingAdjustment Amount of adjustment to make, based on the scaling adjustment type.
* @property scalingAdjustmentType The type of adjustment to make to a fleet's instance count.
* @property status Current status of the scaling policy. The scaling policy can be in force only when in an ACTIVE status. Scaling policies can be suspended for individual fleets. If the policy is suspended for a fleet, the policy status does not change.
* @property targetConfiguration An object that contains settings for a target-based scaling policy.
* @property threshold Metric value used to trigger a scaling event.
* @property updateStatus The current status of the fleet's scaling policies in a requested fleet location. The status PENDING_UPDATE indicates that an update was requested for the fleet but has not yet been completed for the location.
*/
public data class FleetScalingPolicy(
public val comparisonOperator: FleetScalingPolicyComparisonOperator? = null,
public val evaluationPeriods: Int? = null,
public val location: String? = null,
public val metricName: FleetScalingPolicyMetricName,
public val name: String,
public val policyType: FleetScalingPolicyPolicyType? = null,
public val scalingAdjustment: Int? = null,
public val scalingAdjustmentType: FleetScalingPolicyScalingAdjustmentType? = null,
public val status: FleetScalingPolicyStatus? = null,
public val targetConfiguration: FleetTargetConfiguration? = null,
public val threshold: Double? = null,
public val updateStatus: FleetScalingPolicyUpdateStatus? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.awsnative.gamelift.outputs.FleetScalingPolicy): FleetScalingPolicy = FleetScalingPolicy(
comparisonOperator = javaType.comparisonOperator().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.gamelift.kotlin.enums.FleetScalingPolicyComparisonOperator.Companion.toKotlin(args0)
})
}).orElse(null),
evaluationPeriods = javaType.evaluationPeriods().map({ args0 -> args0 }).orElse(null),
location = javaType.location().map({ args0 -> args0 }).orElse(null),
metricName = javaType.metricName().let({ args0 ->
com.pulumi.awsnative.gamelift.kotlin.enums.FleetScalingPolicyMetricName.Companion.toKotlin(args0)
}),
name = javaType.name(),
policyType = javaType.policyType().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.gamelift.kotlin.enums.FleetScalingPolicyPolicyType.Companion.toKotlin(args0)
})
}).orElse(null),
scalingAdjustment = javaType.scalingAdjustment().map({ args0 -> args0 }).orElse(null),
scalingAdjustmentType = javaType.scalingAdjustmentType().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.gamelift.kotlin.enums.FleetScalingPolicyScalingAdjustmentType.Companion.toKotlin(args0)
})
}).orElse(null),
status = javaType.status().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.gamelift.kotlin.enums.FleetScalingPolicyStatus.Companion.toKotlin(args0)
})
}).orElse(null),
targetConfiguration = javaType.targetConfiguration().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.gamelift.kotlin.outputs.FleetTargetConfiguration.Companion.toKotlin(args0)
})
}).orElse(null),
threshold = javaType.threshold().map({ args0 -> args0 }).orElse(null),
updateStatus = javaType.updateStatus().map({ args0 ->
args0.let({ args0 ->
com.pulumi.awsnative.gamelift.kotlin.enums.FleetScalingPolicyUpdateStatus.Companion.toKotlin(args0)
})
}).orElse(null),
)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy