ComputeBatchModelFactory.ExitConditions Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies how the Batch service should respond when the Task completes.
public static Azure.Compute.Batch.ExitConditions ExitConditions(System.Collections.Generic.IEnumerable<Azure.Compute.Batch.ExitCodeMapping> exitCodes = default, System.Collections.Generic.IEnumerable<Azure.Compute.Batch.ExitCodeRangeMapping> exitCodeRanges = default, Azure.Compute.Batch.ExitOptions preProcessingError = default, Azure.Compute.Batch.ExitOptions fileUploadError = default, Azure.Compute.Batch.ExitOptions default = default);
static member ExitConditions : seq<Azure.Compute.Batch.ExitCodeMapping> * seq<Azure.Compute.Batch.ExitCodeRangeMapping> * Azure.Compute.Batch.ExitOptions * Azure.Compute.Batch.ExitOptions * Azure.Compute.Batch.ExitOptions -> Azure.Compute.Batch.ExitConditions
Public Shared Function ExitConditions (Optional exitCodes As IEnumerable(Of ExitCodeMapping) = Nothing, Optional exitCodeRanges As IEnumerable(Of ExitCodeRangeMapping) = Nothing, Optional preProcessingError As ExitOptions = Nothing, Optional fileUploadError As ExitOptions = Nothing, Optional default As ExitOptions = Nothing) As ExitConditions
Parameters
- exitCodes
- IEnumerable<ExitCodeMapping>
A list of individual Task exit codes and how the Batch service should respond to them.
- exitCodeRanges
- IEnumerable<ExitCodeRangeMapping>
A list of Task exit code ranges and how the Batch service should respond to them.
- preProcessingError
- ExitOptions
How the Batch service should respond if the Task fails to start due to an error.
- fileUploadError
- ExitOptions
How the Batch service should respond if a file upload error occurs. If the Task exited with an exit code that was specified via exitCodes or exitCodeRanges, and then encountered a file upload error, then the action specified by the exit code takes precedence.
- default
- ExitOptions
How the Batch service should respond if the Task fails with an exit condition not covered by any of the other properties. This value is used if the Task exits with any nonzero exit code not listed in the exitCodes or exitCodeRanges collection, with a pre-processing error if the preProcessingError property is not present, or with a file upload error if the fileUploadError property is not present. If you want non-default behavior on exit code 0, you must list it explicitly using the exitCodes or exitCodeRanges collection.
Returns
A new ExitConditions instance for mocking.