com.pulumi.azurenative.insights.inputs.ScaleRuleArgs Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure 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.azurenative.insights.inputs;
import com.pulumi.azurenative.insights.inputs.MetricTriggerArgs;
import com.pulumi.azurenative.insights.inputs.ScaleActionArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.util.Objects;
/**
* A rule that provide the triggers and parameters for the scaling action.
*
*/
public final class ScaleRuleArgs extends com.pulumi.resources.ResourceArgs {
public static final ScaleRuleArgs Empty = new ScaleRuleArgs();
/**
* the trigger that results in a scaling action.
*
*/
@Import(name="metricTrigger", required=true)
private Output metricTrigger;
/**
* @return the trigger that results in a scaling action.
*
*/
public Output metricTrigger() {
return this.metricTrigger;
}
/**
* the parameters for the scaling action.
*
*/
@Import(name="scaleAction", required=true)
private Output scaleAction;
/**
* @return the parameters for the scaling action.
*
*/
public Output scaleAction() {
return this.scaleAction;
}
private ScaleRuleArgs() {}
private ScaleRuleArgs(ScaleRuleArgs $) {
this.metricTrigger = $.metricTrigger;
this.scaleAction = $.scaleAction;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(ScaleRuleArgs defaults) {
return new Builder(defaults);
}
public static final class Builder {
private ScaleRuleArgs $;
public Builder() {
$ = new ScaleRuleArgs();
}
public Builder(ScaleRuleArgs defaults) {
$ = new ScaleRuleArgs(Objects.requireNonNull(defaults));
}
/**
* @param metricTrigger the trigger that results in a scaling action.
*
* @return builder
*
*/
public Builder metricTrigger(Output metricTrigger) {
$.metricTrigger = metricTrigger;
return this;
}
/**
* @param metricTrigger the trigger that results in a scaling action.
*
* @return builder
*
*/
public Builder metricTrigger(MetricTriggerArgs metricTrigger) {
return metricTrigger(Output.of(metricTrigger));
}
/**
* @param scaleAction the parameters for the scaling action.
*
* @return builder
*
*/
public Builder scaleAction(Output scaleAction) {
$.scaleAction = scaleAction;
return this;
}
/**
* @param scaleAction the parameters for the scaling action.
*
* @return builder
*
*/
public Builder scaleAction(ScaleActionArgs scaleAction) {
return scaleAction(Output.of(scaleAction));
}
public ScaleRuleArgs build() {
if ($.metricTrigger == null) {
throw new MissingRequiredPropertyException("ScaleRuleArgs", "metricTrigger");
}
if ($.scaleAction == null) {
throw new MissingRequiredPropertyException("ScaleRuleArgs", "scaleAction");
}
return $;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy