public sealed class LifecyclePolicy : IMessage<LifecyclePolicy>, IEquatable<LifecyclePolicy>, IDeepCloneable<LifecyclePolicy>, IBufferMessage, IMessage
Reference documentation and code samples for the Batch v1alpha 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"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eLifecyclePolicy\u003c/code\u003e class in the Batch v1alpha API describes how task failures are handled based on specified conditions.\u003c/p\u003e\n"],["\u003cp\u003eIt provides constructors for creating a new \u003ccode\u003eLifecyclePolicy\u003c/code\u003e instance or copying an existing one.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAction\u003c/code\u003e property determines whether to retry or fail a task based on exit codes, with specific behavior for \u003ccode\u003eRETRY_TASK\u003c/code\u003e and \u003ccode\u003eFAIL_TASK\u003c/code\u003e actions.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eActionCondition\u003c/code\u003e property defines the criteria for triggering a specific action in response to a task failure.\u003c/p\u003e\n"]]],[],null,[]]