Skip to main content

workflows

Creates, updates, deletes, gets or lists a workflows resource.

Overview

Nameworkflows
TypeResource
Idaws.codecatalyst.workflows

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe 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>)
namestringThe name of the workflow.
created_timestring (date-time)The date and time the workflow was created, in coordinated universal time (UTC) timestamp format as specified in RFC 3339
definitionobjectInformation about the workflow definition file for the workflow.
last_updated_timestring (date-time)The date and time the workflow was last updated, in coordinated universal time (UTC) timestamp format as specified in RFC 3339
project_namestringThe name of the project in the space. (pattern: <code>[a-zA-Z0-9]+(?:[-_.][a-zA-Z0-9]+)*</code>)
run_modestringThe 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_namestringThe name of the branch that contains the workflow YAML.
source_repository_namestringThe name of the source repository where the workflow YAML is stored. (pattern: <code>(?!.[.]git$)[\w-.]</code>)
space_namestringThe name of the space. (pattern: <code>[a-zA-Z0-9]+(?:[-_.][a-zA-Z0-9]+)*</code>)
statusstringThe status of the workflow. (INVALID, ACTIVE)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_workflowselectspace_name, id, project_name, regionReturns information about a workflow.
list_workflowsselectspace_name, project_name, regionnextToken, maxResultsRetrieves a list of workflows in a specified project.
start_workflow_runexecspace_name, project_name, workflowId, regionBegins 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.

NameDatatypeDescription
idstringThe ID of the workflow. To rerieve a list of workflow IDs, use ListWorkflows.
project_namestringThe name of the project in the space.
regionstringAWS region (default: us-east-1)
space_namestringThe name of the space.
workflowIdstringThe system-generated unique ID of the workflow. To retrieve a list of workflow IDs, use ListWorkflows.
maxResultsintegerThe 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.
nextTokenstringA token returned from a call to this API to indicate the next batch of results to return, if any.

SELECT examples

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
;

Lifecycle Methods

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