public sealed class LifecyclePolicy : IMessage<LifecyclePolicy>, IEquatable<LifecyclePolicy>, IDeepCloneable<LifecyclePolicy>, IBufferMessage, IMessage
Reference documentation and code samples for the Batch v1 API class LifecyclePolicy.
LifecyclePolicy describes how to deal with task failures
based on different conditions.
public LifecyclePolicy.Types.Action Action { get; set; }
Action to execute when ActionCondition is true.
When RETRY_TASK is specified, we will retry failed tasks
if we notice any exit code match and fail tasks if no match is found.
Likewise, when FAIL_TASK is specified, we will fail tasks
if we notice any exit code match and retry tasks if no match is found.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-17 UTC."],[[["This webpage provides documentation for the `LifecyclePolicy` class within the Google Cloud Batch v1 API, detailing how to manage task failures."],["The latest version of the API is 2.13.0, but the current page focuses on version 2.11.0, with links to other versions ranging from 1.0.0 to 2.13.0."],["`LifecyclePolicy` implements interfaces like `IMessage`, `IEquatable`, `IDeepCloneable`, and `IBufferMessage`, offering functionalities like message handling, comparison, deep cloning, and buffer management."],["The `LifecyclePolicy` class has two constructors: a default one and one that allows for copying an existing `LifecyclePolicy` instance."],["The properties `Action` and `ActionCondition` within `LifecyclePolicy` determine what should happen in response to task failures, such as retrying or failing, based on specified conditions."]]],[]]