
com.pulumi.aws.opsworks.outputs.CustomLayerLoadBasedAutoScalingDownscaling Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws Show documentation
Show all versions of aws Show documentation
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.aws.opsworks.outputs;
import com.pulumi.core.annotations.CustomType;
import java.lang.Double;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class CustomLayerLoadBasedAutoScalingDownscaling {
/**
* @return Custom Cloudwatch auto scaling alarms, to be used as thresholds. This parameter takes a list of up to five alarm names, which are case sensitive and must be in the same region as the stack.
*
*/
private @Nullable List alarms;
/**
* @return The CPU utilization threshold, as a percent of the available CPU. A value of -1 disables the threshold.
*
*/
private @Nullable Double cpuThreshold;
/**
* @return The amount of time (in minutes) after a scaling event occurs that AWS OpsWorks Stacks should ignore metrics and suppress additional scaling events.
*
*/
private @Nullable Integer ignoreMetricsTime;
/**
* @return The number of instances to add or remove when the load exceeds a threshold.
*
*/
private @Nullable Integer instanceCount;
/**
* @return The load threshold. A value of -1 disables the threshold.
*
*/
private @Nullable Double loadThreshold;
/**
* @return The memory utilization threshold, as a percent of the available memory. A value of -1 disables the threshold.
*
*/
private @Nullable Double memoryThreshold;
/**
* @return The amount of time, in minutes, that the load must exceed a threshold before more instances are added or removed.
*
*/
private @Nullable Integer thresholdsWaitTime;
private CustomLayerLoadBasedAutoScalingDownscaling() {}
/**
* @return Custom Cloudwatch auto scaling alarms, to be used as thresholds. This parameter takes a list of up to five alarm names, which are case sensitive and must be in the same region as the stack.
*
*/
public List alarms() {
return this.alarms == null ? List.of() : this.alarms;
}
/**
* @return The CPU utilization threshold, as a percent of the available CPU. A value of -1 disables the threshold.
*
*/
public Optional cpuThreshold() {
return Optional.ofNullable(this.cpuThreshold);
}
/**
* @return The amount of time (in minutes) after a scaling event occurs that AWS OpsWorks Stacks should ignore metrics and suppress additional scaling events.
*
*/
public Optional ignoreMetricsTime() {
return Optional.ofNullable(this.ignoreMetricsTime);
}
/**
* @return The number of instances to add or remove when the load exceeds a threshold.
*
*/
public Optional instanceCount() {
return Optional.ofNullable(this.instanceCount);
}
/**
* @return The load threshold. A value of -1 disables the threshold.
*
*/
public Optional loadThreshold() {
return Optional.ofNullable(this.loadThreshold);
}
/**
* @return The memory utilization threshold, as a percent of the available memory. A value of -1 disables the threshold.
*
*/
public Optional memoryThreshold() {
return Optional.ofNullable(this.memoryThreshold);
}
/**
* @return The amount of time, in minutes, that the load must exceed a threshold before more instances are added or removed.
*
*/
public Optional thresholdsWaitTime() {
return Optional.ofNullable(this.thresholdsWaitTime);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(CustomLayerLoadBasedAutoScalingDownscaling defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable List alarms;
private @Nullable Double cpuThreshold;
private @Nullable Integer ignoreMetricsTime;
private @Nullable Integer instanceCount;
private @Nullable Double loadThreshold;
private @Nullable Double memoryThreshold;
private @Nullable Integer thresholdsWaitTime;
public Builder() {}
public Builder(CustomLayerLoadBasedAutoScalingDownscaling defaults) {
Objects.requireNonNull(defaults);
this.alarms = defaults.alarms;
this.cpuThreshold = defaults.cpuThreshold;
this.ignoreMetricsTime = defaults.ignoreMetricsTime;
this.instanceCount = defaults.instanceCount;
this.loadThreshold = defaults.loadThreshold;
this.memoryThreshold = defaults.memoryThreshold;
this.thresholdsWaitTime = defaults.thresholdsWaitTime;
}
@CustomType.Setter
public Builder alarms(@Nullable List alarms) {
this.alarms = alarms;
return this;
}
public Builder alarms(String... alarms) {
return alarms(List.of(alarms));
}
@CustomType.Setter
public Builder cpuThreshold(@Nullable Double cpuThreshold) {
this.cpuThreshold = cpuThreshold;
return this;
}
@CustomType.Setter
public Builder ignoreMetricsTime(@Nullable Integer ignoreMetricsTime) {
this.ignoreMetricsTime = ignoreMetricsTime;
return this;
}
@CustomType.Setter
public Builder instanceCount(@Nullable Integer instanceCount) {
this.instanceCount = instanceCount;
return this;
}
@CustomType.Setter
public Builder loadThreshold(@Nullable Double loadThreshold) {
this.loadThreshold = loadThreshold;
return this;
}
@CustomType.Setter
public Builder memoryThreshold(@Nullable Double memoryThreshold) {
this.memoryThreshold = memoryThreshold;
return this;
}
@CustomType.Setter
public Builder thresholdsWaitTime(@Nullable Integer thresholdsWaitTime) {
this.thresholdsWaitTime = thresholdsWaitTime;
return this;
}
public CustomLayerLoadBasedAutoScalingDownscaling build() {
final var _resultValue = new CustomLayerLoadBasedAutoScalingDownscaling();
_resultValue.alarms = alarms;
_resultValue.cpuThreshold = cpuThreshold;
_resultValue.ignoreMetricsTime = ignoreMetricsTime;
_resultValue.instanceCount = instanceCount;
_resultValue.loadThreshold = loadThreshold;
_resultValue.memoryThreshold = memoryThreshold;
_resultValue.thresholdsWaitTime = thresholdsWaitTime;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy