
com.pulumi.azurenative.servicefabric.inputs.ScalingPolicyArgs 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.servicefabric.inputs;
import com.pulumi.azurenative.servicefabric.inputs.AddRemoveIncrementalNamedPartitionScalingMechanismArgs;
import com.pulumi.azurenative.servicefabric.inputs.AveragePartitionLoadScalingTriggerArgs;
import com.pulumi.azurenative.servicefabric.inputs.AverageServiceLoadScalingTriggerArgs;
import com.pulumi.azurenative.servicefabric.inputs.PartitionInstanceCountScaleMechanismArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.util.Objects;
/**
* Specifies a metric to load balance a service during runtime.
*
*/
public final class ScalingPolicyArgs extends com.pulumi.resources.ResourceArgs {
public static final ScalingPolicyArgs Empty = new ScalingPolicyArgs();
/**
* Specifies the mechanism associated with this scaling policy
*
*/
@Import(name="scalingMechanism", required=true)
private Output> scalingMechanism;
/**
* @return Specifies the mechanism associated with this scaling policy
*
*/
public Output> scalingMechanism() {
return this.scalingMechanism;
}
/**
* Specifies the trigger associated with this scaling policy.
*
*/
@Import(name="scalingTrigger", required=true)
private Output> scalingTrigger;
/**
* @return Specifies the trigger associated with this scaling policy.
*
*/
public Output> scalingTrigger() {
return this.scalingTrigger;
}
private ScalingPolicyArgs() {}
private ScalingPolicyArgs(ScalingPolicyArgs $) {
this.scalingMechanism = $.scalingMechanism;
this.scalingTrigger = $.scalingTrigger;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(ScalingPolicyArgs defaults) {
return new Builder(defaults);
}
public static final class Builder {
private ScalingPolicyArgs $;
public Builder() {
$ = new ScalingPolicyArgs();
}
public Builder(ScalingPolicyArgs defaults) {
$ = new ScalingPolicyArgs(Objects.requireNonNull(defaults));
}
/**
* @param scalingMechanism Specifies the mechanism associated with this scaling policy
*
* @return builder
*
*/
public Builder scalingMechanism(Output> scalingMechanism) {
$.scalingMechanism = scalingMechanism;
return this;
}
/**
* @param scalingMechanism Specifies the mechanism associated with this scaling policy
*
* @return builder
*
*/
public Builder scalingMechanism(Either scalingMechanism) {
return scalingMechanism(Output.of(scalingMechanism));
}
/**
* @param scalingMechanism Specifies the mechanism associated with this scaling policy
*
* @return builder
*
*/
public Builder scalingMechanism(AddRemoveIncrementalNamedPartitionScalingMechanismArgs scalingMechanism) {
return scalingMechanism(Either.ofLeft(scalingMechanism));
}
/**
* @param scalingMechanism Specifies the mechanism associated with this scaling policy
*
* @return builder
*
*/
public Builder scalingMechanism(PartitionInstanceCountScaleMechanismArgs scalingMechanism) {
return scalingMechanism(Either.ofRight(scalingMechanism));
}
/**
* @param scalingTrigger Specifies the trigger associated with this scaling policy.
*
* @return builder
*
*/
public Builder scalingTrigger(Output> scalingTrigger) {
$.scalingTrigger = scalingTrigger;
return this;
}
/**
* @param scalingTrigger Specifies the trigger associated with this scaling policy.
*
* @return builder
*
*/
public Builder scalingTrigger(Either scalingTrigger) {
return scalingTrigger(Output.of(scalingTrigger));
}
/**
* @param scalingTrigger Specifies the trigger associated with this scaling policy.
*
* @return builder
*
*/
public Builder scalingTrigger(AveragePartitionLoadScalingTriggerArgs scalingTrigger) {
return scalingTrigger(Either.ofLeft(scalingTrigger));
}
/**
* @param scalingTrigger Specifies the trigger associated with this scaling policy.
*
* @return builder
*
*/
public Builder scalingTrigger(AverageServiceLoadScalingTriggerArgs scalingTrigger) {
return scalingTrigger(Either.ofRight(scalingTrigger));
}
public ScalingPolicyArgs build() {
if ($.scalingMechanism == null) {
throw new MissingRequiredPropertyException("ScalingPolicyArgs", "scalingMechanism");
}
if ($.scalingTrigger == null) {
throw new MissingRequiredPropertyException("ScalingPolicyArgs", "scalingTrigger");
}
return $;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy