workflows
Creates, updates, deletes, gets or lists a workflows resource.
Overview
| Name | workflows |
| Type | Resource |
| Id | aws.glue.workflows |
Fields
The following fields are returned by SELECT queries:
- batch_get_workflows
- get_workflow
| Name | Datatype | Description |
|---|---|---|
missing_workflows | array | A list of names of workflows not found. |
workflows | array | A list of workflow resource metadata. |
| Name | Datatype | Description |
|---|---|---|
blueprint_details | object | This structure indicates the details of the blueprint that this particular workflow is created from. |
created_on | string (date-time) | The date and time when the workflow was created. |
default_run_properties | object | A collection of properties to be used as part of each execution of the workflow. The run properties are made available to each job in the workflow. A job can modify the properties for the next jobs in the flow. |
description | string | A description of the workflow. |
graph | object | The graph representing all the Glue components that belong to the workflow as nodes and directed connections between them as edges. |
last_modified_on | string (date-time) | The date and time when the workflow was last modified. |
last_run | object | The information about the last execution of the workflow. |
max_concurrent_runs | integer | You can use this parameter to prevent unwanted multiple updates to data, to control costs, or in some cases, to prevent exceeding the maximum number of concurrent runs of any of the component jobs. If you leave this parameter blank, there is no limit to the number of concurrent workflow runs. |
name | string | The name of the workflow. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\t]*</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
batch_get_workflows | select | region | Returns a list of resource metadata for a given list of workflow names. After calling the ListWorkflows operation, you can call this operation to access the data to which you have been granted permissions. This operation supports all IAM permissions, including permission conditions that uses tags. | |
get_workflow | select | region | Retrieves resource metadata for a workflow. | |
create_workflow | insert | region | Creates a new workflow. | |
update_workflow | update | region | Updates an existing workflow. | |
delete_workflow | delete | region | Deletes a workflow. | |
list_workflows | exec | region | Lists names of workflows created in the account. | |
resume_workflow_run | exec | region, RunId, NodeIds | Restarts selected nodes of a previous partially completed workflow run and resumes the workflow run. The selected nodes and all nodes that are downstream from the selected nodes are run. | |
start_workflow_run | exec | region | Starts a new run of the specified workflow. | |
stop_workflow_run | exec | region, RunId | Stops the execution of the specified workflow run. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- batch_get_workflows
- get_workflow
Returns a list of resource metadata for a given list of workflow names. After calling the ListWorkflows operation, you can call this operation to access the data to which you have been granted permissions. This operation supports all IAM permissions, including permission conditions that uses tags.
SELECT
missing_workflows,
workflows
FROM aws.glue.workflows
WHERE region = '{{ region }}' -- required
;
Retrieves resource metadata for a workflow.
SELECT
blueprint_details,
created_on,
default_run_properties,
description,
graph,
last_modified_on,
last_run,
max_concurrent_runs,
name
FROM aws.glue.workflows
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_workflow
- Manifest
Creates a new workflow.
INSERT INTO aws.glue.workflows (
Name,
Description,
DefaultRunProperties,
Tags,
MaxConcurrentRuns,
region
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ DefaultRunProperties }}',
'{{ Tags }}',
{{ MaxConcurrentRuns }},
'{{ region }}'
RETURNING
name
;
# Description fields are for documentation purposes
- name: workflows
props:
- name: region
value: "{{ region }}"
description: Required parameter for the workflows resource.
- name: Name
value: "{{ Name }}"
description: |
The name to be assigned to the workflow. It should be unique within your account.
- name: Description
value: "{{ Description }}"
description: |
A description of the workflow.
- name: DefaultRunProperties
value: "{{ DefaultRunProperties }}"
description: |
A collection of properties to be used as part of each execution of the workflow. Run properties may be logged. Do not pass plaintext secrets as properties. Retrieve secrets from a Glue Connection, Amazon Web Services Secrets Manager or other secret management mechanism if you intend to use them within the workflow run.
- name: Tags
value: "{{ Tags }}"
description: |
The tags to be used with this workflow.
- name: MaxConcurrentRuns
value: {{ MaxConcurrentRuns }}
description: |
You can use this parameter to prevent unwanted multiple updates to data, to control costs, or in some cases, to prevent exceeding the maximum number of concurrent runs of any of the component jobs. If you leave this parameter blank, there is no limit to the number of concurrent workflow runs.
UPDATE examples
- update_workflow
Updates an existing workflow.
UPDATE aws.glue.workflows
SET
Name = '{{ Name }}',
Description = '{{ Description }}',
DefaultRunProperties = '{{ DefaultRunProperties }}',
MaxConcurrentRuns = {{ MaxConcurrentRuns }}
WHERE
region = '{{ region }}' --required
RETURNING
name;
DELETE examples
- delete_workflow
Deletes a workflow.
DELETE FROM aws.glue.workflows
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- list_workflows
- resume_workflow_run
- start_workflow_run
- stop_workflow_run
Lists names of workflows created in the account.
EXEC aws.glue.workflows.list_workflows
@region='{{ region }}' --required
@@json=
'{
"NextToken": "{{ NextToken }}",
"MaxResults": {{ MaxResults }}
}'
;
Restarts selected nodes of a previous partially completed workflow run and resumes the workflow run. The selected nodes and all nodes that are downstream from the selected nodes are run.
EXEC aws.glue.workflows.resume_workflow_run
@region='{{ region }}' --required
@@json=
'{
"Name": "{{ Name }}",
"RunId": "{{ RunId }}",
"NodeIds": "{{ NodeIds }}"
}'
;
Starts a new run of the specified workflow.
EXEC aws.glue.workflows.start_workflow_run
@region='{{ region }}' --required
@@json=
'{
"Name": "{{ Name }}",
"RunProperties": "{{ RunProperties }}"
}'
;
Stops the execution of the specified workflow run.
EXEC aws.glue.workflows.stop_workflow_run
@region='{{ region }}' --required
@@json=
'{
"Name": "{{ Name }}",
"RunId": "{{ RunId }}"
}'
;