Google Cloud Workflows V1 Client - Class Execution (0.5.0)

Reference documentation and code samples for the Google Cloud Workflows V1 Client class Execution.

A running instance of a Workflow.

Generated from protobuf message google.cloud.workflows.executions.v1.Execution

Namespace

Google \ Cloud \ Workflows \ Executions \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

Output only. The resource name of the execution. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}

↳ start_time Google\Protobuf\Timestamp

Output only. Marks the beginning of execution.

↳ end_time Google\Protobuf\Timestamp

Output only. Marks the end of execution, successful or not.

↳ duration Google\Protobuf\Duration

Output only. Measures the duration of the execution.

↳ state int

Output only. Current state of the execution.

↳ argument string

Input parameters of the execution represented as a JSON string. The size limit is 32KB. Note: If you are using the REST API directly to run your workflow, you must escape any JSON string value of argument. Example: '{"argument":"{\"firstName\":\"FIRST\",\"lastName\":\"LAST\"}"}'

↳ result string

Output only. Output of the execution represented as a JSON string. The value can only be present if the execution's state is SUCCEEDED.

↳ error Google\Cloud\Workflows\Executions\V1\Execution\Error

Output only. The error which caused the execution to finish prematurely. The value is only present if the execution's state is FAILED or CANCELLED.

↳ workflow_revision_id string

Output only. Revision of the workflow this execution is using.

↳ call_log_level int

The call logging level associated to this execution.

↳ status Google\Cloud\Workflows\Executions\V1\Execution\Status

Output only. Status tracks the current steps and progress data of this execution.

↳ labels array|Google\Protobuf\Internal\MapField

Labels associated with this execution. Labels can contain at most 64 entries. Keys and values can be no longer than 63 characters and can only contain lowercase letters, numeric characters, underscores, and dashes. Label keys must start with a letter. International characters are allowed. By default, labels are inherited from the workflow but are overridden by any labels associated with the execution.

↳ state_error Google\Cloud\Workflows\Executions\V1\Execution\StateError

Output only. Error regarding the state of the Execution resource. For example, this field will have error details if the execution data is unavailable due to revoked KMS key permissions.

getName

Output only. The resource name of the execution.

Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}

Returns
TypeDescription
string

setName

Output only. The resource name of the execution.

Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getStartTime

Output only. Marks the beginning of execution.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasStartTime

clearStartTime

setStartTime

Output only. Marks the beginning of execution.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getEndTime

Output only. Marks the end of execution, successful or not.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasEndTime

clearEndTime

setEndTime

Output only. Marks the end of execution, successful or not.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getDuration

Output only. Measures the duration of the execution.

Returns
TypeDescription
Google\Protobuf\Duration|null

hasDuration

clearDuration

setDuration

Output only. Measures the duration of the execution.

Parameter
NameDescription
var Google\Protobuf\Duration
Returns
TypeDescription
$this

getState

Output only. Current state of the execution.

Returns
TypeDescription
int

setState

Output only. Current state of the execution.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getArgument

Input parameters of the execution represented as a JSON string.

The size limit is 32KB. Note: If you are using the REST API directly to run your workflow, you must escape any JSON string value of argument. Example: '{"argument":"{\"firstName\":\"FIRST\",\"lastName\":\"LAST\"}"}'

Returns
TypeDescription
string

setArgument

Input parameters of the execution represented as a JSON string.

The size limit is 32KB. Note: If you are using the REST API directly to run your workflow, you must escape any JSON string value of argument. Example: '{"argument":"{\"firstName\":\"FIRST\",\"lastName\":\"LAST\"}"}'

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getResult

Output only. Output of the execution represented as a JSON string. The value can only be present if the execution's state is SUCCEEDED.

Returns
TypeDescription
string

setResult

Output only. Output of the execution represented as a JSON string. The value can only be present if the execution's state is SUCCEEDED.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getError

Output only. The error which caused the execution to finish prematurely.

The value is only present if the execution's state is FAILED or CANCELLED.

Returns
TypeDescription
Google\Cloud\Workflows\Executions\V1\Execution\Error|null

hasError

clearError

setError

Output only. The error which caused the execution to finish prematurely.

The value is only present if the execution's state is FAILED or CANCELLED.

Parameter
NameDescription
var Google\Cloud\Workflows\Executions\V1\Execution\Error
Returns
TypeDescription
$this

getWorkflowRevisionId

Output only. Revision of the workflow this execution is using.

Returns
TypeDescription
string

setWorkflowRevisionId

Output only. Revision of the workflow this execution is using.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getCallLogLevel

The call logging level associated to this execution.

Returns
TypeDescription
int

setCallLogLevel

The call logging level associated to this execution.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getStatus

Output only. Status tracks the current steps and progress data of this execution.

Returns
TypeDescription
Google\Cloud\Workflows\Executions\V1\Execution\Status|null

hasStatus

clearStatus

setStatus

Output only. Status tracks the current steps and progress data of this execution.

Parameter
NameDescription
var Google\Cloud\Workflows\Executions\V1\Execution\Status
Returns
TypeDescription
$this

getLabels

Labels associated with this execution.

Labels can contain at most 64 entries. Keys and values can be no longer than 63 characters and can only contain lowercase letters, numeric characters, underscores, and dashes. Label keys must start with a letter. International characters are allowed. By default, labels are inherited from the workflow but are overridden by any labels associated with the execution.

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setLabels

Labels associated with this execution.

Labels can contain at most 64 entries. Keys and values can be no longer than 63 characters and can only contain lowercase letters, numeric characters, underscores, and dashes. Label keys must start with a letter. International characters are allowed. By default, labels are inherited from the workflow but are overridden by any labels associated with the execution.

Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this

getStateError

Output only. Error regarding the state of the Execution resource. For example, this field will have error details if the execution data is unavailable due to revoked KMS key permissions.

Returns
TypeDescription
Google\Cloud\Workflows\Executions\V1\Execution\StateError|null

hasStateError

clearStateError

setStateError

Output only. Error regarding the state of the Execution resource. For example, this field will have error details if the execution data is unavailable due to revoked KMS key permissions.

Parameter
NameDescription
var Google\Cloud\Workflows\Executions\V1\Execution\StateError
Returns
TypeDescription
$this