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"]],[["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 Google.Cloud.Batch.V1 API defines how to handle task failures based on specific conditions, including retrying or failing tasks depending on exit codes.\u003c/p\u003e\n"],["\u003cp\u003eThe class has an \u003ccode\u003eAction\u003c/code\u003e property that determines whether to \u003ccode\u003eRETRY_TASK\u003c/code\u003e or \u003ccode\u003eFAIL_TASK\u003c/code\u003e based on exit code matches and an \u003ccode\u003eActionCondition\u003c/code\u003e property to set conditions for a failure.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the API documentation available is 2.13.0, with version 2.9.0 detailed here and a list of versions all the way back to 1.0.0.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eLifecyclePolicy\u003c/code\u003e class implements multiple interfaces including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, and is part of the \u003ccode\u003eGoogle.Cloud.Batch.V1\u003c/code\u003e namespace within the \u003ccode\u003eGoogle.Cloud.Batch.V1.dll\u003c/code\u003e assembly.\u003c/p\u003e\n"]]],[],null,[]]