Skip to main content

pipelines

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

Overview

Namepipelines
TypeResource
Idaws.sagemaker.pipelines

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_byobjectInformation about the user who created or modified a SageMaker resource.
creation_timestring (date-time)The time when the pipeline was created.
last_modified_byobjectInformation about the user who created or modified a SageMaker resource.
last_modified_timestring (date-time)The time when the pipeline was last modified.
last_run_timestring (date-time)The time when the pipeline was last run.
parallelism_configurationobjectLists the parallelism configuration applied to the pipeline.
pipeline_arnstringThe Amazon Resource Name (ARN) of the pipeline. (pattern: <code>arn:aws[a-z-]:sagemaker:[a-z0-9-]:([0-9]{12}|aws):pipeline/.*</code>)
pipeline_definitionstringThe JSON pipeline definition. (pattern: <code>.(?:[ \r\n\t].)*</code>)
pipeline_descriptionstringThe description of the pipeline. (pattern: <code>.*</code>)
pipeline_display_namestringThe display name of the pipeline. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,255}</code>)
pipeline_namestringThe name of the pipeline. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,255}</code>)
pipeline_statusstringThe status of the pipeline execution. (Active, Deleting)
pipeline_version_descriptionstringThe description of the pipeline version. (pattern: <code>.*</code>)
pipeline_version_display_namestringThe display name of the pipeline version. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,81}</code>)
role_arnstringThe Amazon Resource Name (ARN) that the pipeline uses to execute. (pattern: <code>arn:aws[a-z-]*:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@-_/]+</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_pipelineselectregionDescribes the details of a pipeline.
list_pipelinesselectregionGets a list of pipelines.
create_pipelineinsertregion, PipelineName, ClientRequestToken, RoleArnCreates a pipeline using a JSON pipeline definition.
update_pipelineupdateregion, PipelineNameUpdates a pipeline.
delete_pipelinedeleteregionDeletes a pipeline if there are no running instances of the pipeline. To delete a pipeline, you must stop all running instances of the pipeline using the StopPipelineExecution API. When you delete a pipeline, all instances of the pipeline are deleted.
start_pipeline_executionexecregion, PipelineName, ClientRequestTokenStarts a pipeline execution.
stop_pipeline_executionexecregion, PipelineExecutionArn, ClientRequestTokenStops a pipeline execution. Callback Step A pipeline execution won't stop while a callback step is running. When you call StopPipelineExecution on a pipeline execution with a running callback step, SageMaker Pipelines sends an additional Amazon SQS message to the specified SQS queue. The body of the SQS message contains a "Status" field which is set to "Stopping". You should add logic to your Amazon SQS message consumer to take any needed action (for example, resource cleanup) upon receipt of the message followed by a call to SendPipelineExecutionStepSuccess or SendPipelineExecutionStepFailure. Only when SageMaker Pipelines receives one of these calls will it stop the pipeline execution. Lambda Step A pipeline execution can't be stopped while a lambda step is running because the Lambda function invoked by the lambda step can't be stopped. If you attempt to stop the execution while the Lambda function is running, the pipeline waits for the Lambda function to finish or until the timeout is hit, whichever occurs first, and then stops. If the Lambda function finishes, the pipeline execution status is Stopped. If the timeout is hit the pipeline execution status is Failed.

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
regionstringAWS region (default: us-east-1)

SELECT examples

Describes the details of a pipeline.

SELECT
created_by,
creation_time,
last_modified_by,
last_modified_time,
last_run_time,
parallelism_configuration,
pipeline_arn,
pipeline_definition,
pipeline_description,
pipeline_display_name,
pipeline_name,
pipeline_status,
pipeline_version_description,
pipeline_version_display_name,
role_arn
FROM aws.sagemaker.pipelines
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a pipeline using a JSON pipeline definition.

INSERT INTO aws.sagemaker.pipelines (
PipelineName,
PipelineDisplayName,
PipelineDefinition,
PipelineDefinitionS3Location,
PipelineDescription,
ClientRequestToken,
RoleArn,
Tags,
ParallelismConfiguration,
region
)
SELECT
'{{ PipelineName }}' /* required */,
'{{ PipelineDisplayName }}',
'{{ PipelineDefinition }}',
'{{ PipelineDefinitionS3Location }}',
'{{ PipelineDescription }}',
'{{ ClientRequestToken }}' /* required */,
'{{ RoleArn }}' /* required */,
'{{ Tags }}',
'{{ ParallelismConfiguration }}',
'{{ region }}'
RETURNING
pipeline_arn
;

UPDATE examples

Updates a pipeline.

UPDATE aws.sagemaker.pipelines
SET
PipelineName = '{{ PipelineName }}',
PipelineDisplayName = '{{ PipelineDisplayName }}',
PipelineDefinition = '{{ PipelineDefinition }}',
PipelineDefinitionS3Location = '{{ PipelineDefinitionS3Location }}',
PipelineDescription = '{{ PipelineDescription }}',
RoleArn = '{{ RoleArn }}',
ParallelismConfiguration = '{{ ParallelismConfiguration }}'
WHERE
region = '{{ region }}' --required
AND PipelineName = '{{ PipelineName }}' --required
RETURNING
pipeline_arn,
pipeline_version_id;

DELETE examples

Deletes a pipeline if there are no running instances of the pipeline. To delete a pipeline, you must stop all running instances of the pipeline using the StopPipelineExecution API. When you delete a pipeline, all instances of the pipeline are deleted.

DELETE FROM aws.sagemaker.pipelines
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Starts a pipeline execution.

EXEC aws.sagemaker.pipelines.start_pipeline_execution
@region='{{ region }}' --required
@@json=
'{
"PipelineName": "{{ PipelineName }}",
"PipelineExecutionDisplayName": "{{ PipelineExecutionDisplayName }}",
"PipelineParameters": "{{ PipelineParameters }}",
"PipelineExecutionDescription": "{{ PipelineExecutionDescription }}",
"ClientRequestToken": "{{ ClientRequestToken }}",
"ParallelismConfiguration": "{{ ParallelismConfiguration }}",
"SelectiveExecutionConfig": "{{ SelectiveExecutionConfig }}",
"PipelineVersionId": {{ PipelineVersionId }},
"MlflowExperimentName": "{{ MlflowExperimentName }}"
}'
;