workflows
Creates, updates, deletes, gets or lists a workflows resource.
Overview
| Name | workflows |
| Type | Resource |
| Id | aws.codecatalyst.workflows |
Fields
The following fields are returned by SELECT queries:
- get_workflow
- list_workflows
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the workflow. (pattern: <code>[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}</code>) |
name | string | The name of the workflow. |
created_time | string (date-time) | The date and time the workflow was created, in coordinated universal time (UTC) timestamp format as specified in RFC 3339 |
definition | object | Information about the workflow definition file for the workflow. |
last_updated_time | string (date-time) | The date and time the workflow was last updated, in coordinated universal time (UTC) timestamp format as specified in RFC 3339 |
project_name | string | The name of the project in the space. (pattern: <code>[a-zA-Z0-9]+(?:[-_.][a-zA-Z0-9]+)*</code>) |
run_mode | string | The behavior to use when multiple workflows occur at the same time. For more information, see https://docs.aws.amazon.com/codecatalyst/latest/userguide/workflows-configure-runs.html in the Amazon CodeCatalyst User Guide. (QUEUED, PARALLEL, SUPERSEDED) |
source_branch_name | string | The name of the branch that contains the workflow YAML. |
source_repository_name | string | The name of the source repository where the workflow YAML is stored. (pattern: <code>(?!.[.]git$)[\w-.]</code>) |
space_name | string | The name of the space. (pattern: <code>[a-zA-Z0-9]+(?:[-_.][a-zA-Z0-9]+)*</code>) |
status | string | The status of the workflow. (INVALID, ACTIVE) |
| Name | Datatype | Description |
|---|---|---|
id | string | The system-generated unique ID of a workflow. (pattern: <code>[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}</code>) |
name | string | The name of the workflow. |
created_time | string (date-time) | The date and time the workflow was created, in coordinated universal time (UTC) timestamp format as specified in RFC 3339 |
definition | object | Information about the workflow definition file. |
last_updated_time | string (date-time) | The date and time the workflow was last updated, in coordinated universal time (UTC) timestamp format as specified in RFC 3339 |
run_mode | string | The run mode of the workflow. (QUEUED, PARALLEL, SUPERSEDED) |
source_branch_name | string | The name of the branch of the source repository where the workflow definition file is stored. |
source_repository_name | string | The name of the source repository where the workflow definition file is stored. (pattern: <code>(?!.[.]git$)[\w-.]</code>) |
status | string | The status of the workflow. (INVALID, ACTIVE) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_workflow | select | space_name, id, project_name, region | Returns information about a workflow. | |
list_workflows | select | space_name, project_name, region | nextToken, maxResults | Retrieves a list of workflows in a specified project. |
start_workflow_run | exec | space_name, project_name, workflowId, region | Begins a run of a specified workflow. |
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 |
|---|---|---|
id | string | The ID of the workflow. To rerieve a list of workflow IDs, use ListWorkflows. |
project_name | string | The name of the project in the space. |
region | string | AWS region (default: us-east-1) |
space_name | string | The name of the space. |
workflowId | string | The system-generated unique ID of the workflow. To retrieve a list of workflow IDs, use ListWorkflows. |
maxResults | integer | The maximum number of results to show in a single call to this API. If the number of results is larger than the number you specified, the response will include a NextToken element, which you can use to obtain additional results. |
nextToken | string | A token returned from a call to this API to indicate the next batch of results to return, if any. |
SELECT examples
- get_workflow
- list_workflows
Returns information about a workflow.
SELECT
id,
name,
created_time,
definition,
last_updated_time,
project_name,
run_mode,
source_branch_name,
source_repository_name,
space_name,
status
FROM aws.codecatalyst.workflows
WHERE space_name = '{{ space_name }}' -- required
AND id = '{{ id }}' -- required
AND project_name = '{{ project_name }}' -- required
AND region = '{{ region }}' -- required
;
Retrieves a list of workflows in a specified project.
SELECT
id,
name,
created_time,
definition,
last_updated_time,
run_mode,
source_branch_name,
source_repository_name,
status
FROM aws.codecatalyst.workflows
WHERE space_name = '{{ space_name }}' -- required
AND project_name = '{{ project_name }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
Lifecycle Methods
- start_workflow_run
Begins a run of a specified workflow.
EXEC aws.codecatalyst.workflows.start_workflow_run
@space_name='{{ space_name }}' --required,
@project_name='{{ project_name }}' --required,
@workflowId='{{ workflowId }}' --required,
@region='{{ region }}' --required
@@json=
'{
"clientToken": "{{ clientToken }}"
}'
;