Class ScaleAction
- java.lang.Object
-
- com.microsoft.azure.management.monitor.ScaleAction
-
public class ScaleAction extends Object
The parameters for the scaling action.
-
-
Constructor Summary
Constructors Constructor Description ScaleAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.joda.time.Periodcooldown()Get the amount of time to wait since the last scaling action before this action occurs.ScaleDirectiondirection()Get the scale direction.ScaleTypetype()Get the type of action that should occur when the scale rule fires.Stringvalue()Get the number of instances that are involved in the scaling action.ScaleActionwithCooldown(org.joda.time.Period cooldown)Set the amount of time to wait since the last scaling action before this action occurs.ScaleActionwithDirection(ScaleDirection direction)Set the scale direction.ScaleActionwithType(ScaleType type)Set the type of action that should occur when the scale rule fires.ScaleActionwithValue(String value)Set the number of instances that are involved in the scaling action.
-
-
-
Method Detail
-
direction
public ScaleDirection direction()
Get the scale direction. Whether the scaling action increases or decreases the number of instances. Possible values include: 'None', 'Increase', 'Decrease'.- Returns:
- the direction value
-
withDirection
public ScaleAction withDirection(ScaleDirection direction)
Set the scale direction. Whether the scaling action increases or decreases the number of instances. Possible values include: 'None', 'Increase', 'Decrease'.- Parameters:
direction- the direction value to set- Returns:
- the ScaleAction object itself.
-
type
public ScaleType type()
Get the type of action that should occur when the scale rule fires. Possible values include: 'ChangeCount', 'PercentChangeCount', 'ExactCount'.- Returns:
- the type value
-
withType
public ScaleAction withType(ScaleType type)
Set the type of action that should occur when the scale rule fires. Possible values include: 'ChangeCount', 'PercentChangeCount', 'ExactCount'.- Parameters:
type- the type value to set- Returns:
- the ScaleAction object itself.
-
value
public String value()
Get the number of instances that are involved in the scaling action. This value must be 1 or greater. The default value is 1.- Returns:
- the value value
-
withValue
public ScaleAction withValue(String value)
Set the number of instances that are involved in the scaling action. This value must be 1 or greater. The default value is 1.- Parameters:
value- the value value to set- Returns:
- the ScaleAction object itself.
-
cooldown
public org.joda.time.Period cooldown()
Get 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:
- the cooldown value
-
withCooldown
public ScaleAction withCooldown(org.joda.time.Period cooldown)
Set 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:
cooldown- the cooldown value to set- Returns:
- the ScaleAction object itself.
-
-