Skip to main content

pipelines

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

Overview

Namepipelines
TypeResource
Idaws.iotsitewise.pipelines

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
computationsarrayA list of compute nodes forming a pipeline DAG.
created_atstring (date-time)The time the pipeline was created, in Unix epoch time.
descriptionstringThe description of the pipeline. (pattern: <code>[^\u0000-\u001F\u007F]+</code>)
environment_variablesobjectThe environment variables shared across all compute nodes in the pipeline.
pipeline_arnstringThe ARN of the pipeline. (pattern: <code>^arn:aws(-cn|-us-gov)?:[a-zA-Z0-9-:/_.]+$</code>)
pipeline_namestringReusable resource name with alphanumeric, hyphen, and underscore characters. (pattern: <code>[a-zA-Z0-9_-]+</code>)
statusobjectThe current lifecycle status of the pipeline.
updated_atstring (date-time)The time the pipeline was last updated, in Unix epoch time.
versionstringThe version of the pipeline. (pattern: <code>^(0|([1-9]{1}\d*))$</code>)
workspace_namestringThe name of the workspace. (pattern: <code>^[a-zA-Z0-9_-]+$</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_pipelineselectworkspace_name, pipeline_name, regionversionRetrieves detailed information about a specific pipeline in a workspace.
list_pipelinesselectworkspace_name, regionnextToken, maxResultsLists pipelines in a workspace. To get complete details about a pipeline, use DescribePipeline.
create_pipelineinsertworkspace_name, region, pipelineName, computationsCreates a new pipeline in the specified workspace. A pipeline defines a directed acyclic graph (DAG) of compute nodes, where each node references a task and can declare dependencies on other nodes. Cyclic dependencies are not allowed. Nodes without dependencies run in parallel, while nodes with dependencies wait for all upstream nodes to complete successfully before starting. You can set environment variables at the pipeline level that are shared across all compute nodes, and override them at the individual compute node level.
update_pipelineupdateworkspace_name, pipeline_name, regionUpdates an existing pipeline in the specified workspace. Only the fields provided in the request are updated; fields not included in the request are preserved unchanged. You can update the pipeline description, environment variables, and the list of compute nodes independently.
delete_pipelinedeleteworkspace_name, pipeline_name, regionDeletes a pipeline from the specified workspace. A pipeline cannot be deleted if it has any active executions. Wait for all executions to complete before attempting to delete the pipeline, or use CancelPipelineExecution to stop a running execution.
cancel_pipeline_executionexecworkspace_name, pipeline_name, pipeline_execution_id, regionCancels a pipeline execution in the specified workspace. If the execution is not in a terminal state (such as NOT_STARTED or RUNNING), it transitions to CANCELLING and asynchronously to CANCELLED. This operation is idempotent: calling it on an execution that is already CANCELLING or CANCELLED returns success with the current state. Calling it on a terminal execution (SUCCEEDED or FAILED) returns a conflict error. You can optionally provide a reason; it is returned in the stateDetails field when you describe the execution.
start_pipeline_executionexecworkspace_name, pipeline_name, regionStarts execution of a pipeline in the specified workspace. Each compute node runs according to the DAG dependency order defined in the pipeline. Nodes without dependencies start immediately, while dependent nodes wait for all upstream nodes to complete successfully. You can provide runtime environment variable overrides that take the highest priority in the environment variable hierarchy, without modifying the pipeline definition.

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
pipeline_execution_idstringThe unique identifier of the pipeline execution.
pipeline_namestringThe name of the pipeline to execute.
regionstringAWS region (default: us-east-1)
workspace_namestringThe name of the workspace containing the pipeline.
maxResultsintegerThe maximum number of results to return for each paginated request. Default: 50.
nextTokenstringThe token to be used for the next set of paginated results.
versionstringThe version number of the pipeline to retrieve. If not specified, returns the latest version.

SELECT examples

Retrieves detailed information about a specific pipeline in a workspace.

SELECT
computations,
created_at,
description,
environment_variables,
pipeline_arn,
pipeline_name,
status,
updated_at,
version,
workspace_name
FROM aws.iotsitewise.pipelines
WHERE workspace_name = '{{ workspace_name }}' -- required
AND pipeline_name = '{{ pipeline_name }}' -- required
AND region = '{{ region }}' -- required
AND version = '{{ version }}'
;

INSERT examples

Creates a new pipeline in the specified workspace. A pipeline defines a directed acyclic graph (DAG) of compute nodes, where each node references a task and can declare dependencies on other nodes. Cyclic dependencies are not allowed. Nodes without dependencies run in parallel, while nodes with dependencies wait for all upstream nodes to complete successfully before starting. You can set environment variables at the pipeline level that are shared across all compute nodes, and override them at the individual compute node level.

INSERT INTO aws.iotsitewise.pipelines (
pipelineName,
description,
environmentVariables,
computations,
tags,
clientToken,
workspace_name,
region
)
SELECT
'{{ pipelineName }}' /* required */,
'{{ description }}',
'{{ environmentVariables }}',
'{{ computations }}' /* required */,
'{{ tags }}',
'{{ clientToken }}',
'{{ workspace_name }}',
'{{ region }}'
RETURNING
pipeline_arn,
pipeline_name,
status,
version
;

UPDATE examples

Updates an existing pipeline in the specified workspace. Only the fields provided in the request are updated; fields not included in the request are preserved unchanged. You can update the pipeline description, environment variables, and the list of compute nodes independently.

UPDATE aws.iotsitewise.pipelines
SET
description = '{{ description }}',
environmentVariables = '{{ environmentVariables }}',
computations = '{{ computations }}'
WHERE
workspace_name = '{{ workspace_name }}' --required
AND pipeline_name = '{{ pipeline_name }}' --required
AND region = '{{ region }}' --required
RETURNING
status,
version;

DELETE examples

Deletes a pipeline from the specified workspace. A pipeline cannot be deleted if it has any active executions. Wait for all executions to complete before attempting to delete the pipeline, or use CancelPipelineExecution to stop a running execution.

DELETE FROM aws.iotsitewise.pipelines
WHERE workspace_name = '{{ workspace_name }}' --required
AND pipeline_name = '{{ pipeline_name }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Cancels a pipeline execution in the specified workspace. If the execution is not in a terminal state (such as NOT_STARTED or RUNNING), it transitions to CANCELLING and asynchronously to CANCELLED. This operation is idempotent: calling it on an execution that is already CANCELLING or CANCELLED returns success with the current state. Calling it on a terminal execution (SUCCEEDED or FAILED) returns a conflict error. You can optionally provide a reason; it is returned in the stateDetails field when you describe the execution.

EXEC aws.iotsitewise.pipelines.cancel_pipeline_execution
@workspace_name='{{ workspace_name }}' --required,
@pipeline_name='{{ pipeline_name }}' --required,
@pipeline_execution_id='{{ pipeline_execution_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"reason": "{{ reason }}"
}'
;