PredictiveAutoscalePolicy Class

  • java.lang.Object
    • com.azure.resourcemanager.monitor.models.PredictiveAutoscalePolicy

Implements

public final class PredictiveAutoscalePolicy
implements JsonSerializable<PredictiveAutoscalePolicy>

The parameters for enabling predictive autoscale.

Constructor Summary

Constructor Description
PredictiveAutoscalePolicy()

Creates an instance of PredictiveAutoscalePolicy class.

Method Summary

Modifier and Type Method and Description
static PredictiveAutoscalePolicy fromJson(JsonReader jsonReader)

Reads an instance of PredictiveAutoscalePolicy from the JsonReader.

Duration scaleLookAheadTime()

Get the scaleLookAheadTime property: the amount of time to specify by which instances are launched in advance.

PredictiveAutoscalePolicyScaleMode scaleMode()

Get the scaleMode property: the predictive autoscale mode.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

PredictiveAutoscalePolicy withScaleLookAheadTime(Duration scaleLookAheadTime)

Set the scaleLookAheadTime property: the amount of time to specify by which instances are launched in advance.

PredictiveAutoscalePolicy withScaleMode(PredictiveAutoscalePolicyScaleMode scaleMode)

Set the scaleMode property: the predictive autoscale mode.

Methods inherited from java.lang.Object

Constructor Details

PredictiveAutoscalePolicy

public PredictiveAutoscalePolicy()

Creates an instance of PredictiveAutoscalePolicy class.

Method Details

fromJson

public static PredictiveAutoscalePolicy fromJson(JsonReader jsonReader)

Reads an instance of PredictiveAutoscalePolicy from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of PredictiveAutoscalePolicy if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

scaleLookAheadTime

public Duration scaleLookAheadTime()

Get the scaleLookAheadTime property: the amount of time to specify by which instances are launched in advance. It must be between 1 minute and 60 minutes in ISO 8601 format.

Returns:

the scaleLookAheadTime value.

scaleMode

public PredictiveAutoscalePolicyScaleMode scaleMode()

Get the scaleMode property: the predictive autoscale mode.

Returns:

the scaleMode value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withScaleLookAheadTime

public PredictiveAutoscalePolicy withScaleLookAheadTime(Duration scaleLookAheadTime)

Set the scaleLookAheadTime property: the amount of time to specify by which instances are launched in advance. It must be between 1 minute and 60 minutes in ISO 8601 format.

Parameters:

scaleLookAheadTime - the scaleLookAheadTime value to set.

Returns:

the PredictiveAutoscalePolicy object itself.

withScaleMode

public PredictiveAutoscalePolicy withScaleMode(PredictiveAutoscalePolicyScaleMode scaleMode)

Set the scaleMode property: the predictive autoscale mode.

Parameters:

scaleMode - the scaleMode value to set.

Returns:

the PredictiveAutoscalePolicy object itself.

Applies to