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 document provides reference information for the `LifecyclePolicy` class within the Google Cloud Batch v1 API, detailing its purpose in managing task failures."],["The `LifecyclePolicy` class, found in the `Google.Cloud.Batch.V1` namespace, describes how to handle task failures based on specific conditions, offering both `RETRY_TASK` and `FAIL_TASK` actions."],["The `LifecyclePolicy` class is accessible through various versions of the API, from 1.0.0 up to the latest 2.13.0, and in this document, focuses on version 2.6.0."],["The `LifecyclePolicy` class has two properties: `Action`, which determines the action to take (retry or fail), and `ActionCondition`, which defines the conditions triggering the action."],["This page provides both a public default constructor `LifecyclePolicy()`, and one taking a `LifecyclePolicy` parameter `LifecyclePolicy(LifecyclePolicy other)`, to copy or create a new instance of the same settings."]]],[]]