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."],[[["The latest version of the `LifecyclePolicy` API is 2.13.0, part of the Google Cloud Batch V1 service."],["`LifecyclePolicy` is a class that defines how task failures are handled based on different conditions, and it implements multiple interfaces including `IMessage`, `IEquatable`, `IDeepCloneable`, and `IBufferMessage`."],["This class offers two constructors: a default constructor and a constructor that accepts another `LifecyclePolicy` object."],["The `LifecyclePolicy` class includes properties such as `Action` and `ActionCondition`, which determine the action to be executed upon task failure and the conditions that trigger this action."],["The `LifecyclePolicy` is found under the namespace `Google.Cloud.Batch.V1`."]]],[]]