As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

Types for Google Cloud Workflows Executions v1 API

class google.cloud.workflows.executions_v1.types.CancelExecutionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for the [CancelExecution][google.cloud.workflows.executions.v1.Executions.CancelExecution] method.

name

Required. Name of the execution to be cancelled. Format:

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

Type

str

class google.cloud.workflows.executions_v1.types.CreateExecutionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for the [CreateExecution][google.cloud.workflows.executions.v1.Executions.CreateExecution] method.

parent

Required. Name of the workflow for which an execution should be created. Format: projects/{project}/locations/{location}/workflows/{workflow} The latest revision of the workflow will be used.

Type

str

execution

Required. Execution to be created.

Type

google.cloud.workflows.executions_v1.types.Execution

class google.cloud.workflows.executions_v1.types.Execution(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A running instance of a Workflow.

name

Output only. The resource name of the execution. Format:

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

Type

str

start_time

Output only. Marks the beginning of execution.

Type

google.protobuf.timestamp_pb2.Timestamp

end_time

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

Type

google.protobuf.timestamp_pb2.Timestamp

duration

Output only. Measures the duration of the execution.

Type

google.protobuf.duration_pb2.Duration

state

Output only. Current state of the execution.

Type

google.cloud.workflows.executions_v1.types.Execution.State

argument

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\"}"}'

Type

str

result

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

Type

str

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.

Type

google.cloud.workflows.executions_v1.types.Execution.Error

workflow_revision_id

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

Type

str

call_log_level

The call logging level associated to this execution.

Type

google.cloud.workflows.executions_v1.types.Execution.CallLogLevel

status

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

Type

google.cloud.workflows.executions_v1.types.Execution.Status

labels

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.

Type

MutableMapping[str, str]

state_error

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.

Type

google.cloud.workflows.executions_v1.types.Execution.StateError

class CallLogLevel(value)[source]

Bases: proto.enums.Enum

Describes the level of platform logging to apply to calls and call responses during workflow executions.

Values:
CALL_LOG_LEVEL_UNSPECIFIED (0):

No call logging level specified.

LOG_ALL_CALLS (1):

Log all call steps within workflows, all call returns, and all exceptions raised.

LOG_ERRORS_ONLY (2):

Log only exceptions that are raised from call steps within workflows.

LOG_NONE (3):

Explicitly log nothing.

class Error(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Error describes why the execution was abnormally terminated.

payload

Error message and data returned represented as a JSON string.

Type

str

context

Human-readable stack trace string.

Type

str

stack_trace

Stack trace with detailed information of where error was generated.

Type

google.cloud.workflows.executions_v1.types.Execution.StackTrace

class LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class StackTrace(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A collection of stack elements (frames) where an error occurred.

elements

An array of stack elements.

Type

MutableSequence[google.cloud.workflows.executions_v1.types.Execution.StackTraceElement]

class StackTraceElement(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A single stack element (frame) where an error occurred.

step

The step the error occurred at.

Type

str

routine

The routine where the error occurred.

Type

str

position

The source position information of the stack trace element.

Type

google.cloud.workflows.executions_v1.types.Execution.StackTraceElement.Position

class Position(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Position contains source position information about the stack trace element such as line number, column number and length of the code block in bytes.

line

The source code line number the current instruction was generated from.

Type

int

column

The source code column position (of the line) the current instruction was generated from.

Type

int

length

The number of bytes of source code making up this stack trace element.

Type

int

class State(value)[source]

Bases: proto.enums.Enum

Describes the current state of the execution. More states might be added in the future.

Values:
STATE_UNSPECIFIED (0):

Invalid state.

ACTIVE (1):

The execution is in progress.

SUCCEEDED (2):

The execution finished successfully.

FAILED (3):

The execution failed with an error.

CANCELLED (4):

The execution was stopped intentionally.

UNAVAILABLE (5):

Execution data is unavailable. See the state_error field.

QUEUED (6):

Request has been placed in the backlog for processing at a later time.

class StateError(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Describes an error related to the current state of the Execution resource.

details

Provides specifics about the error.

Type

str

type_

The type of this state error.

Type

google.cloud.workflows.executions_v1.types.Execution.StateError.Type

class Type(value)[source]

Bases: proto.enums.Enum

Describes the possible types of a state error.

Values:
TYPE_UNSPECIFIED (0):

No type specified.

KMS_ERROR (1):

Caused by an issue with KMS.

class Status(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the current status of this execution.

current_steps

A list of currently executing or last executed step names for the workflow execution currently running. If the workflow has succeeded or failed, this is the last attempted or executed step. Presently, if the current step is inside a subworkflow, the list only includes that step. In the future, the list will contain items for each step in the call stack, starting with the outermost step in the main subworkflow, and ending with the most deeply nested step.

Type

MutableSequence[google.cloud.workflows.executions_v1.types.Execution.Status.Step]

class Step(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents a step of the workflow this execution is running.

routine

Name of a routine within the workflow.

Type

str

step

Name of a step within the routine.

Type

str

class google.cloud.workflows.executions_v1.types.ExecutionView(value)[source]

Bases: proto.enums.Enum

Defines possible views for execution resource.

Values:
EXECUTION_VIEW_UNSPECIFIED (0):

The default / unset value.

BASIC (1):

Includes only basic metadata about the execution. The following fields are returned: name, start_time, end_time, duration, state, and workflow_revision_id.

FULL (2):

Includes all data.

class google.cloud.workflows.executions_v1.types.GetExecutionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for the [GetExecution][google.cloud.workflows.executions.v1.Executions.GetExecution] method.

name

Required. Name of the execution to be retrieved. Format:

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

Type

str

view

Optional. A view defining which fields should be filled in the returned execution. The API will default to the FULL view.

Type

google.cloud.workflows.executions_v1.types.ExecutionView

class google.cloud.workflows.executions_v1.types.ListExecutionsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for the [ListExecutions][] method.

parent

Required. Name of the workflow for which the executions should be listed. Format: projects/{project}/locations/{location}/workflows/{workflow}

Type

str

page_size

Maximum number of executions to return per call. Max supported value depends on the selected Execution view: it’s 1000 for BASIC and 100 for FULL. The default value used if the field is not specified is 100, regardless of the selected view. Values greater than the max value will be coerced down to it.

Type

int

page_token

A page token, received from a previous ListExecutions call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListExecutions must match the call that provided the page token.

Note that pagination is applied to dynamic data. The list of executions returned can change between page requests.

Type

str

view

Optional. A view defining which fields should be filled in the returned executions. The API will default to the BASIC view.

Type

google.cloud.workflows.executions_v1.types.ExecutionView

filter

Optional. Filters applied to the [Executions.ListExecutions] results. The following fields are supported for filtering: executionID, state, startTime, endTime, duration, workflowRevisionID, stepName, and label.

Type

str

order_by

Optional. The ordering applied to the [Executions.ListExecutions] results. By default the ordering is based on descending start time. The following fields are supported for order by: executionID, startTime, endTime, duration, state, and workflowRevisionID.

Type

str

class google.cloud.workflows.executions_v1.types.ListExecutionsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response for the [ListExecutions][google.cloud.workflows.executions.v1.Executions.ListExecutions] method.

executions

The executions which match the request.

Type

MutableSequence[google.cloud.workflows.executions_v1.types.Execution]

next_page_token

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

Type

str