Google Cloud Batch V1 Client - Class LifecyclePolicy (0.15.0)

Reference documentation and code samples for the Google Cloud Batch V1 Client class LifecyclePolicy.

LifecyclePolicy describes how to deal with task failures based on different conditions.

Generated from protobuf message google.cloud.batch.v1.LifecyclePolicy

Namespace

Google \ Cloud \ Batch \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ action int

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.

↳ action_condition Google\Cloud\Batch\V1\LifecyclePolicy\ActionCondition

Conditions that decide why a task failure is dealt with a specific action.

getAction

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.

Returns
TypeDescription
int

setAction

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.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getActionCondition

Conditions that decide why a task failure is dealt with a specific action.

Returns
TypeDescription
Google\Cloud\Batch\V1\LifecyclePolicy\ActionCondition|null

hasActionCondition

clearActionCondition

setActionCondition

Conditions that decide why a task failure is dealt with a specific action.

Parameter
NameDescription
var Google\Cloud\Batch\V1\LifecyclePolicy\ActionCondition
Returns
TypeDescription
$this