Skip to content

aws.swf.list_open_workflow_executions

Example SQL Queries

SELECT * FROM
aws.swf.list_open_workflow_executions
WHERE
"domain" = 'VALUE'
AND "start_time_filter" = 'VALUE';

Description

Returns a list of open workflow executions in the specified domain that meet the filtering criteria. The results may be split into multiple pages. To retrieve subsequent pages, make the call again using the nextPageToken returned by the initial call.

This operation is eventually consistent. The results are best effort and may not exactly reflect recent updates and changes.

Access Control

You can use IAM policies to control this action's access to Amazon SWF resources as follows:

  • Use a Resource element with the domain name to limit the action to only specified domains.

  • Use an Action element to allow or deny permission to call this action.

  • Constrain the following parameters by using a Condition element with the appropriate keys.

    • tagFilter.tag: String constraint. The key is swf:tagFilter.tag.

    • typeFilter.name: String constraint. The key is swf:typeFilter.name.

    • typeFilter.version: String constraint. The key is swf:typeFilter.version.

If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.

Table Definition

Column NameColumn Data Type
domain Required Input Column

The name of the domain that contains the workflow executions to list.

VARCHAR
start_time_filter Required Input Column

Workflow executions are included in the returned results based on whether their start times are within the range specified by this filter.

STRUCT(
"oldest_date" TIMESTAMP_S,
"latest_date" TIMESTAMP_S
)
Show child fields
start_time_filter.latest_date

Specifies the latest start or close date and time to return.

start_time_filter.oldest_date

Specifies the oldest start or close date and time to return.

execution_filter Input Column

If specified, only workflow executions matching the workflow ID specified in the filter are returned.

executionFilter, typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.

STRUCT(
"workflow_id" VARCHAR
)
Show child fields
execution_filter.workflow_id

The workflowId to pass of match the criteria of this filter.

reverse_order Input Column

When set to true, returns the results in reverse order. By default the results are returned in descending order of the start time of the executions.

BOOLEAN
tag_filter Input Column

If specified, only executions that have the matching tag are listed.

executionFilter, typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.

STRUCT(
"tag" VARCHAR
)
Show child fields
tag_filter.tag

Specifies the tag that must be associated with the execution for it to meet the filter criteria.

Tags may only contain unicode letters, digits, whitespace, or these symbols: _ . :/= + - @.

type_filter Input Column

If specified, only executions of the type specified in the filter are returned.

executionFilter, typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.

STRUCT(
"name" VARCHAR,
"version" VARCHAR
)
Show child fields
type_filter.name

Name of the workflow type.

type_filter.version

Version of the workflow type.

_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
cancel_requested

Set to true if a cancellation is requested for this workflow execution.

BOOLEAN
close_status

If the execution status is closed then this specifies how the execution was closed:

  • COMPLETED – the execution was successfully completed.

  • CANCELED – the execution was canceled.Cancellation allows the implementation to gracefully clean up before the execution is closed.

  • TERMINATED – the execution was force terminated.

  • FAILED – the execution failed to complete.

  • TIMED_OUT – the execution did not complete in the alloted time and was automatically timed out.

  • CONTINUED_AS_NEW – the execution is logically continued. This means the current execution was completed and a new execution was started to carry on the workflow.

VARCHAR
close_timestamp

The time when the workflow execution was closed. Set only if the execution status is CLOSED.

TIMESTAMP_S
execution

The workflow execution this information is about.

STRUCT(
"workflow_id" VARCHAR,
"run_id" VARCHAR
)
Show child fields
execution.run_id

A system-generated unique identifier for the workflow execution.

execution.workflow_id

The user defined identifier associated with the workflow execution.

execution_status

The current status of the execution.

VARCHAR
parent

If this workflow execution is a child of another execution then contains the workflow execution that started this execution.

STRUCT(
"workflow_id" VARCHAR,
"run_id" VARCHAR
)
Show child fields
parent.run_id

A system-generated unique identifier for the workflow execution.

parent.workflow_id

The user defined identifier associated with the workflow execution.

start_timestamp

The time when the execution was started.

TIMESTAMP_S
tag_list

The list of tags associated with the workflow execution. Tags can be used to identify and list workflow executions of interest through the visibility APIs. A workflow execution can have a maximum of 5 tags.

VARCHAR[]
Show child fields
tag_list[]
workflow_type

The type of the workflow execution.

STRUCT(
"name" VARCHAR,
"version" VARCHAR
)
Show child fields
workflow_type.name

The name of the workflow type.

The combination of workflow type name and version must be unique with in a domain.

workflow_type.version

The version of the workflow type.

The combination of workflow type name and version must be unique with in a domain.