SageMakerStartPipelineExecution Class
Use a SageMaker pipeline as a target for AWS EventBridge Scheduler.
Example
ts
import * as sagemaker from 'aws-cdk-lib/aws-sagemaker';
declare const pipeline: sagemaker.IPipeline;
new Schedule(this, 'Schedule', {
schedule: ScheduleExpression.rate(Duration.minutes(60)),
target: new targets.SageMakerStartPipelineExecution(pipeline, {
pipelineParameterList: [{
name: 'parameter-name',
value: 'parameter-value',
}],
}),
});
python
import aws_cdk.aws_sagemaker as sagemaker
# pipeline: sagemaker.IPipeline
Schedule(self, "Schedule",
schedule=ScheduleExpression.rate(Duration.minutes(60)),
target=targets.SageMakerStartPipelineExecution(pipeline,
pipeline_parameter_list=[targets.SageMakerPipelineParameter(
name="parameter-name",
value="parameter-value"
)]
)
)
java
import software.amazon.awscdk.services.sagemaker.*;
IPipeline pipeline;
Schedule.Builder.create(this, "Schedule")
.schedule(ScheduleExpression.rate(Duration.minutes(60)))
.target(SageMakerStartPipelineExecution.Builder.create(pipeline)
.pipelineParameterList(List.of(SageMakerPipelineParameter.builder()
.name("parameter-name")
.value("parameter-value")
.build()))
.build())
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
using Amazon.CDK.AWS.Sagemaker;
IPipeline pipeline;
new Schedule(this, "Schedule", new ScheduleProps {
Schedule = ScheduleExpression.Rate(Duration.Minutes(60)),
Target = new SageMakerStartPipelineExecution(pipeline, new SageMakerStartPipelineExecutionProps {
PipelineParameterList = new [] { new SageMakerPipelineParameter {
Name = "parameter-name",
Value = "parameter-value"
} }
})
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
import sagemaker "github.com/aws/aws-cdk-go/awscdk"
var pipeline IPipeline
awscdk.NewSchedule(this, jsii.String("Schedule"), &ScheduleProps{
Schedule: awscdk.ScheduleExpression_Rate(awscdk.Duration_Minutes(jsii.Number(60))),
Target: targets.NewSageMakerStartPipelineExecution(pipeline, &SageMakerStartPipelineExecutionProps{
PipelineParameterList: []SageMakerPipelineParameter{
&SageMakerPipelineParameter{
Name: jsii.String("parameter-name"),
Value: jsii.String("parameter-value"),
},
},
}),
})
Initializer
ts
new SageMakerStartPipelineExecution(pipeline: IPipeline, props?: SageMakerStartPipelineExecutionProps)
python
SageMakerStartPipelineExecution(pipeline: IPipeline, props: typing.Optional[SageMakerStartPipelineExecutionProps] = None)
java
new SageMakerStartPipelineExecution(IPipeline pipeline, SageMakerStartPipelineExecutionProps props)
csharp
new SageMakerStartPipelineExecution(IPipeline pipeline, SageMakerStartPipelineExecutionProps? props = null)
go
NewSageMakerStartPipelineExecution(Pipeline IPipeline, Props SageMakerStartPipelineExecutionProps)
Methods
bind(schedule: ISchedule): ScheduleTargetConfigdef bind(self, schedule: ISchedule) -> ScheduleTargetConfigpublic ScheduleTargetConfig bind(ISchedule schedule)public ScheduleTargetConfig Bind(ISchedule schedule)func Bind(Schedule ISchedule) ScheduleTargetConfig#Create a return a Schedule Target Configuration for the given schedule.
returns
Returns: a Schedule Target Configuration