ScaleAction Class
- java.
lang. Object - com.
azure. resourcemanager. monitor. models. ScaleAction
- com.
Implements
public final class ScaleAction
implements JsonSerializable<ScaleAction>
The parameters for the scaling action.
Constructor Summary
Constructor | Description |
---|---|
ScaleAction() |
Creates an instance of Scale |
Method Summary
Modifier and Type | Method and Description |
---|---|
Duration |
cooldown()
Get the cooldown property: the amount of time to wait since the last scaling action before this action occurs. |
Scale |
direction()
Get the direction property: the scale direction. |
static
Scale |
fromJson(JsonReader jsonReader)
Reads an instance of Scale |
Json |
toJson(JsonWriter jsonWriter) |
Scale |
type()
Get the type property: the type of action that should occur when the scale rule fires. |
void |
validate()
Validates the instance. |
String |
value()
Get the value property: the number of instances that are involved in the scaling action. |
Scale |
withCooldown(Duration cooldown)
Set the cooldown property: the amount of time to wait since the last scaling action before this action occurs. |
Scale |
withDirection(ScaleDirection direction)
Set the direction property: the scale direction. |
Scale |
withType(ScaleType type)
Set the type property: the type of action that should occur when the scale rule fires. |
Scale |
withValue(String value)
Set the value property: the number of instances that are involved in the scaling action. |
Methods inherited from java.lang.Object
Constructor Details
ScaleAction
public ScaleAction()
Creates an instance of ScaleAction class.
Method Details
cooldown
public Duration cooldown()
Get the cooldown property: the amount of time to wait since the last scaling action before this action occurs. It must be between 1 week and 1 minute in ISO 8601 format.
Returns:
direction
public ScaleDirection direction()
Get the direction property: the scale direction. Whether the scaling action increases or decreases the number of instances.
Returns:
fromJson
public static ScaleAction fromJson(JsonReader jsonReader)
Reads an instance of ScaleAction from the JsonReader.
Parameters:
Returns:
Throws:
toJson
type
public ScaleType type()
Get the type property: the type of action that should occur when the scale rule fires.
Returns:
validate
public void validate()
Validates the instance.
value
public String value()
Get the value property: the number of instances that are involved in the scaling action. This value must be 1 or greater. The default value is 1.
Returns:
withCooldown
public ScaleAction withCooldown(Duration cooldown)
Set the cooldown property: the amount of time to wait since the last scaling action before this action occurs. It must be between 1 week and 1 minute in ISO 8601 format.
Parameters:
Returns:
withDirection
public ScaleAction withDirection(ScaleDirection direction)
Set the direction property: the scale direction. Whether the scaling action increases or decreases the number of instances.
Parameters:
Returns:
withType
public ScaleAction withType(ScaleType type)
Set the type property: the type of action that should occur when the scale rule fires.
Parameters:
Returns:
withValue
public ScaleAction withValue(String value)
Set the value property: the number of instances that are involved in the scaling action. This value must be 1 or greater. The default value is 1.
Parameters:
Returns:
Applies to
Azure SDK for Java