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-08-07 UTC."],[[["\u003cp\u003eThe latest version of the \u003ccode\u003eLifecyclePolicy\u003c/code\u003e class is 2.13.0, found within the Google Cloud Batch v1 API.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eLifecyclePolicy\u003c/code\u003e is designed to manage task failures, defining how different conditions should be handled.\u003c/p\u003e\n"],["\u003cp\u003eThe 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 to support various functionalities.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eLifecyclePolicy\u003c/code\u003e includes properties for \u003ccode\u003eAction\u003c/code\u003e and \u003ccode\u003eActionCondition\u003c/code\u003e, which determine the course of action (retry or fail) when specific conditions related to task failures are met.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation provides access to previous versions of the \u003ccode\u003eLifecyclePolicy\u003c/code\u003e class, dating back to version 1.0.0.\u003c/p\u003e\n"]]],[],null,[]]