ResizeOperationStatus Class

  • java.lang.Object
    • com.azure.resourcemanager.batch.models.ResizeOperationStatus

Implements

public final class ResizeOperationStatus
implements JsonSerializable<ResizeOperationStatus>

Details about the current or last completed resize operation. Describes either the current operation (if the pool AllocationState is Resizing) or the previously completed operation (if the AllocationState is Steady).

Constructor Summary

Constructor Description
ResizeOperationStatus()

Creates an instance of ResizeOperationStatus class.

Method Summary

Modifier and Type Method and Description
List<ResizeError> errors()

Get the errors property: This property is set only if an error occurred during the last pool resize, and only when the pool allocationState is Steady.

static ResizeOperationStatus fromJson(JsonReader jsonReader)

Reads an instance of ResizeOperationStatus from the JsonReader.

ComputeNodeDeallocationOption nodeDeallocationOption()

Get the nodeDeallocationOption property: The default value is requeue.

Duration resizeTimeout()

Get the resizeTimeout property: The default value is 15 minutes.

OffsetDateTime startTime()

Get the startTime property: The time when this resize operation was started.

Integer targetDedicatedNodes()

Get the targetDedicatedNodes property: The desired number of dedicated compute nodes in the pool.

Integer targetLowPriorityNodes()

Get the targetLowPriorityNodes property: The desired number of Spot/low-priority compute nodes in the pool.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ResizeOperationStatus withErrors(List<ResizeError> errors)

Set the errors property: This property is set only if an error occurred during the last pool resize, and only when the pool allocationState is Steady.

ResizeOperationStatus withNodeDeallocationOption(ComputeNodeDeallocationOption nodeDeallocationOption)

Set the nodeDeallocationOption property: The default value is requeue.

ResizeOperationStatus withResizeTimeout(Duration resizeTimeout)

Set the resizeTimeout property: The default value is 15 minutes.

ResizeOperationStatus withStartTime(OffsetDateTime startTime)

Set the startTime property: The time when this resize operation was started.

ResizeOperationStatus withTargetDedicatedNodes(Integer targetDedicatedNodes)

Set the targetDedicatedNodes property: The desired number of dedicated compute nodes in the pool.

ResizeOperationStatus withTargetLowPriorityNodes(Integer targetLowPriorityNodes)

Set the targetLowPriorityNodes property: The desired number of Spot/low-priority compute nodes in the pool.

Methods inherited from java.lang.Object

Constructor Details

ResizeOperationStatus

public ResizeOperationStatus()

Creates an instance of ResizeOperationStatus class.

Method Details

errors

public List errors()

Get the errors property: This property is set only if an error occurred during the last pool resize, and only when the pool allocationState is Steady.

Returns:

the errors value.

fromJson

public static ResizeOperationStatus fromJson(JsonReader jsonReader)

Reads an instance of ResizeOperationStatus from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

Throws:

IOException

- If an error occurs while reading the ResizeOperationStatus.

nodeDeallocationOption

public ComputeNodeDeallocationOption nodeDeallocationOption()

Get the nodeDeallocationOption property: The default value is requeue.

Returns:

the nodeDeallocationOption value.

resizeTimeout

public Duration resizeTimeout()

Get the resizeTimeout property: The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).

Returns:

the resizeTimeout value.

startTime

public OffsetDateTime startTime()

Get the startTime property: The time when this resize operation was started.

Returns:

the startTime value.

targetDedicatedNodes

public Integer targetDedicatedNodes()

Get the targetDedicatedNodes property: The desired number of dedicated compute nodes in the pool.

Returns:

the targetDedicatedNodes value.

targetLowPriorityNodes

public Integer targetLowPriorityNodes()

Get the targetLowPriorityNodes property: The desired number of Spot/low-priority compute nodes in the pool.

Returns:

the targetLowPriorityNodes value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withErrors

public ResizeOperationStatus withErrors(List errors)

Set the errors property: This property is set only if an error occurred during the last pool resize, and only when the pool allocationState is Steady.

Parameters:

errors - the errors value to set.

Returns:

the ResizeOperationStatus object itself.

withNodeDeallocationOption

public ResizeOperationStatus withNodeDeallocationOption(ComputeNodeDeallocationOption nodeDeallocationOption)

Set the nodeDeallocationOption property: The default value is requeue.

Parameters:

nodeDeallocationOption - the nodeDeallocationOption value to set.

Returns:

the ResizeOperationStatus object itself.

withResizeTimeout

public ResizeOperationStatus withResizeTimeout(Duration resizeTimeout)

Set the resizeTimeout property: The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).

Parameters:

resizeTimeout - the resizeTimeout value to set.

Returns:

the ResizeOperationStatus object itself.

withStartTime

public ResizeOperationStatus withStartTime(OffsetDateTime startTime)

Set the startTime property: The time when this resize operation was started.

Parameters:

startTime - the startTime value to set.

Returns:

the ResizeOperationStatus object itself.

withTargetDedicatedNodes

public ResizeOperationStatus withTargetDedicatedNodes(Integer targetDedicatedNodes)

Set the targetDedicatedNodes property: The desired number of dedicated compute nodes in the pool.

Parameters:

targetDedicatedNodes - the targetDedicatedNodes value to set.

Returns:

the ResizeOperationStatus object itself.

withTargetLowPriorityNodes

public ResizeOperationStatus withTargetLowPriorityNodes(Integer targetLowPriorityNodes)

Set the targetLowPriorityNodes property: The desired number of Spot/low-priority compute nodes in the pool.

Parameters:

targetLowPriorityNodes - the targetLowPriorityNodes value to set.

Returns:

the ResizeOperationStatus object itself.

Applies to